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

[BUG] - ERROR: FFmpeg exited with code 1 #54

Open
btutal opened this issue Mar 20, 2020 · 10 comments
Open

[BUG] - ERROR: FFmpeg exited with code 1 #54

btutal opened this issue Mar 20, 2020 · 10 comments

Comments

@btutal
Copy link

btutal commented Mar 20, 2020

I've an Raspberry Pi 3 B+that hosts Homebridge and installed plugin on it. Whenver I try to use livestream from Home app, it doesn't work and I get the message [Dafang] ERROR: FFmpeg exited with code 1 in the logs.

When I try to check the stream from another machine, it works just fine from VLC on Mac. You can see part of my configs below:

"cameraName": "Xiaomi Dafang",
                    "cameraRTSPStreamUrl": "rtsp://USERNAME:[email protected]:8554/unicast",
                    "videoConfig": {
                        "source": "-rtsp_transport tcp -i rtsp://USERNAME:[email protected]:8554/unicast",
                        "stillImageSource": "-rtsp_transport http -i rtsp://USERNAME:[email protected]:8554/unicast -vframes 1 -r 1",
                        "maxStreams": 5,
                        "maxWidth": 1280,
                        "maxHeight": 720,
                        "maxFPS": 25,
                        "debug": true,
                        "audio": true
                    },

In addition, I have two more cameras which has Motioneyeos and Motioneye server running on same Raspberry Pi. I've them in my Homebridge as well with homebridge-camera-ffmpeg plugin and live stream for them is also working fine.

What might be wrong with my configurations? Do I need to enable/disable some services from Dafang web interface?

@remko2000
Copy link

Same problem here (on a raspberry 4), I've the same problem. It worked once and after that I get only ' mpeg code 1' when I try to stream in homekit.

@bad1dea
Copy link

bad1dea commented May 7, 2020

You will have to do "reset streaming" and it'll work again.

looks like there s bug somewhere.

@MrPasty
Copy link

MrPasty commented Jun 1, 2020

Same issue here, reset streaming does not resolve the issue for me.

@iamironz
Copy link

Same issue

@clrmsc
Copy link

clrmsc commented Jul 28, 2020

Same issue too...

@jlg89
Copy link

jlg89 commented Sep 23, 2020

See the conclusion of #65

@iamironz
Copy link

iamironz commented Sep 26, 2020

See the conclusion of #65

This one dos not work properly. By the way camera-ffmpeg working fine. May be plugin contributors cloud use https://www.npmjs.com/package/ffmpeg-for-homebridge dependency for using embedded ffmpeg inside this plugin? @sahilchaddha What do you think?

@jlg89
Copy link

jlg89 commented Sep 26, 2020

The conclusion of #65 was that homebridge-dafang is not up to date, and the only workaround at this point is to use homebridge-camera-ffmpeg with homebridge-defang-mqtt-republish, which does work. In fact, if you use "vcodec": "copy", you don't even need the MaxWidth/MaxHeight/FPS settings, as ffmpeg will simply pass-through whatever it gets from the camera. This saves considerable CPU.

@btutal
Copy link
Author

btutal commented Sep 26, 2020

Thanks @jlg89 , it works like you suggested.

@DietShasta
Copy link

I am still using Homebridge dafang despite it probably being abandoned forever, and I'm on the current version of homebridge and dafang hacks. After setting vcodec to copy, I'd say 9 times out of 10 if you get ffmpeg exited with code 1, it's related to audio.

The newest dafang hacks firmware seems to really screw things up. Some thing about the Web UI will make your settings go haywire.

I've been using my cameras in homebridge fine up until this morning. Some stopped streaming (exited with code 1 error), some worked.

I decided to give camera ffmpeg another try, but I got the same error. You can quickly turn off the sound from camera ffmpeg settings page, so I tried that. Streaming started to work again, so I went to the dafang hacks web ui, changed the audio format setting from "off" to "PCM" and it brought back streaming.

I'd like to eventually possibly switch to camera ffmpeg again but I need a better solution for saving video files. OR!! just get Aqara G2H cameras!

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

8 participants