131/h264-live-player

ffmpeg stops abruptly with some cameras

adrhc opened this issue · 0 comments

adrhc commented

hi, I'm running server-ffmpeg.js but I as soon as the ffmpeg process starts it then stops while the equivalent command writes fine to out-rawvideo-file:
ffmpeg -rtsp_transport tcp -re -i 'rtsp://172.20.19.114:554/user=admin_password=6QNMIQGe_channel=1_stream=0.sdp?real_stream' -an -pix_fmt yuv420p -c:v copy -f rawvideo out-rawvideo-file

One of the configuration I tested is:

var args = [
    "-rtsp_transport", "tcp",
    "-re",
    "-i", "'rtsp://172.20.19.114:554/user=admin_password=6QNMIQGe_channel=1_stream=0.sdp?real_stream'",
    "-an",
    '-pix_fmt', 'yuv420p',
    '-c:v', 'copy',
    '-f' ,'rawvideo',
    '-'
];

The same happens while using Encoding Video parameteres specified by https://github.com/mbebenita/Broadway.

Based on the logging below I conclude that ffmpeg fails somehow but I don't understand why it doesn't when used with the same command to write into out-rawvideo-file.

While debugging I noticed that _server.js -> broadcast is never called. I've logged some key execution points:

New guy

ffmpeg -rtsp_transport tcp -re -i 'rtsp://172.20.19.114:554/user=admin_password=6QNMIQGe_channel=1_stream=0.sdp?real_stream' -an -pix_fmt yuv420p -c:v copy -f rawvideo -

ffmpeg.js ffmpeg spawned

ffmpeg.js streamer.stderr.on data:
<Buffer 66 66 6d 70 65 67 20 76 65 72 73 69 6f 6e 20 32 2e 38 2e 31 31 2d 30 75 62 75 6e 74 75 30 2e 31 36 2e 30 34 2e 31 20 43 6f 70 79 72 69 67 68 74 20 28 ... >

ffmpeg.js streamer.stderr.on data:
<Buffer 20 20 6c 69 62 61 76 75 74 69 6c 20 20 20 20 20 20 35 34 2e 20 33 31 2e 31 30 30 20 2f 20 35 34 2e 20 33 31 2e 31 30 30 0a 20 20 6c 69 62 61 76 63 6f ... >

ffmpeg.js streamer.stderr.on close
ffmpeg.js streamer.on exit code = 1, signal = null
ffmpeg.js streamer.on close

With another camera the same config/code works fine.
What could be the problem?