node-tcp-streaming-server icon indicating copy to clipboard operation
node-tcp-streaming-server copied to clipboard

Image preview error

Open fabioharry opened this issue 6 years ago • 5 comments

Thanks for sharing!

I'm working on a project that uses this feature, but when I run your solution, an error is occurring.

Has anyone managed to make it work?

Any idea how I can solve it?

Uncaught DOMException: Failed to execute 'appendBuffer' on 'SourceBuffer': The HTMLMediaElement.error attribute is not null.
    at WebSocket.ws.onmessage (http://localhost:8080/js/app.js:66:24)
ws.onmessage @ app.js:66

Cod ffmpeg + IP cam RTSP

ffmpeg -rtsp_transport tcp -i rtsp://admin:[email protected]/Streaming/Channels/1 -vcodec libx264 -profile:v main -g 25 -r 25 -b:v 500k -keyint_min 250 -strict experimental -pix_fmt yuv420p -movflags empty_moov+default_base_moof -an -preset ultrafast -f mp4 tcp://localhost:9090

captura de tela de 2018-07-25 23-04-08

captura de tela de 2018-07-25 23-05-21

fabioharry avatar Jul 26 '18 02:07 fabioharry

I got the same error in Chromium but didnt have it in Firefox. However still didnt get it working...

jdelrue avatar Jul 28 '18 08:07 jdelrue

Hello, awesome project.

  • @fabioharry @jdelrue It works (vp8enc, webcam) on firefox 62.0
  • it doesn't work on chromium 69.0.3497.81 (Official Build) Built on Ubuntu (same issue as #3)

issue on chromium may be linked to https://bugs.chromium.org/p/chromium/issues/detail?id=469457

It also works using x11grab (on firefox 62.0) but I had to take into account my modest hardware ^^ (-framerate 5, fewer threads, lower speed...)

Setup

ffmpeg -f x11grab -framerate 5 -video_size cif -i :0  -vcodec libvpx -b:v 3500k -r 25 -crf 10 -quality realtime -speed 6 -threads 4 -an -g 25 -f webm tcp://localhost:9090

PicoJr avatar Sep 29 '18 09:09 PicoJr

Any update? Any solution for chromium?

deepaash avatar Aug 17 '19 16:08 deepaash

You could open chrome://media-internals/ page and see whats happening there

zim32 avatar Aug 19 '20 22:08 zim32

try to change the first buffer from 3 to 2

ivanjx avatar Mar 02 '22 01:03 ivanjx