Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ffmpeg stops abruptly with some cameras #44

Open
adrhc opened this issue Sep 7, 2017 · 0 comments
Open

ffmpeg stops abruptly with some cameras #44

adrhc opened this issue Sep 7, 2017 · 0 comments

Comments

@adrhc
Copy link

adrhc commented Sep 7, 2017

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?

@adrhc adrhc changed the title ffmpeg stops abruptly ffmpeg stops abruptly with some cameras Sep 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant