-
Notifications
You must be signed in to change notification settings - Fork 34
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
[BUG] - ffmpeg exited with code 1 #47
Comments
Removing "-vf scale=1280:720" from camera.js fixed it Wonder if it is due to the copy vcodec? |
Do you mean this in Line 308? |
I'm having this same issue, I just tried removing that line in camera.js to no avail. Here's my error:
|
Try “audio” : false in config.json in videoConfig section |
Nahh, still not working =/ |
I think the most annoying part of all of this is that everything else is working so well. I got MQTT notifications working 100%, still images show just fine, its just the damn video that I cannot for the life of me get to stream correctly... |
Looks like yours is starting the stream with “vfscale” which was causing the issue for me. Does your camera work with homebridge-camera-ffmpeg? |
@jcbshw Last time I tried it with ffmpeg it did. It worked for about 30 seconds after one time of messing with the configs (didn't do anything really differently) then it just stopped working again. Do you think this would work better if I ran a different homebridge instance on a Debian or Ubuntu VM, as opposed to running on the rPi? |
I am running it on my RPi 4 using docker-homebride without any issue. If you use the "copy" codec it doesn't encode the video and just transmits it as it to homekit so the RPi is suitable for that. I'd try to get it working in homebridge-camera-ffmpeg first as they have more support with issues, then use those same settings with homebridge-dafang. I've attached my latest config.json for my camera. I've also removed line 308 from camera.js. |
Your config hasn't worked for me either =/ I don't have a user/password setup yet, and I don't think my still image would be available via SSL. I'm on a rPi 3 as well, im going to spin up a docker version and see if that works.. Edit: I rebooted the camera, and it seems to be working almost flawlessly now! Thanks so much! |
@billyjacoby can you please share a working config? I'm trying to figure this one out. And if possible the video settings on the camera itself (bitrate, resolution, codec, CBR/VBR, etc.) |
here's my whole config sans local IP addresses:
Let me know if you have any other questions that I can help with! |
By any chance, is "defang.local" meant to be "dafang.local"? |
I ran into a very similar problem here. The few takeaways after using camera-ffmpeg and homebridge-dafang. With camera-ffmpeg, I would always get exited with code 1 when audio was set to true. Changing it to false worked. It may have had to do with my original ffmpeg installation. I don't think I included the aac option. With homebridge-dafang, I was able to get default video configuration to work after installing the ffmpeg variation with I also tried switching from the default still image snapshot that uses the rtsp feed to the jpeg feed by using |
FFmpeg errors out when trying to view the stream. I am able to view the stream with the same camera using homebridge-camera-ffmpeg. I compared the how both are starting the stream and the only difference seems to be "-vf scale=1280:720" while using dafang plugin.
homebridge-dafang
ffmpeg -i rtsp://192.168.1.110:8554/unicast -map 0:0 -vcodec copy -pix_fmt yuv420p -r 15 -f rawvideo -fflags +genpts+discardcorrupt -vf scale=1280:720 -b:v 299k -bufsize 299k -maxrate 299k -payload_type 99 -ssrc 8856484 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params w9Dkt+stdHMs8zvNkhl8izPxN93YgJzefq+Ot+bS srtp://192.168.1.120:55571?rtcpport=55571&localrtcpport=55571&pkt_size=1316
homebridge-camera-ffmpeg
ffmpeg -i rtsp://192.168.1.110:8554/unicast -map 0:0 -vcodec copy -pix_fmt yuv420p -r 15 -f rawvideo -fflags +genpts+discardcorrupt -b:v 299k -bufsize 299k -maxrate 299k -payload_type 99 -ssrc 1222423 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params MXrm3B4GnA+FA4nY6j2YixqPu96AZaQvRVfDX6Jx srtp://192.168.1.120:54565?rtcpport=54565&localrtcpport=54565&pkt_size=1316 -loglevel debug
I've attached my config.json
config.txt
The text was updated successfully, but these errors were encountered: