[BUG] - ERROR: FFmpeg exited with code 1

See original GitHub issue

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:PASSWORD@10.0.100.106:8554/unicast",
                    "videoConfig": {
                        "source": "-rtsp_transport tcp -i rtsp://USERNAME:PASSWORD@10.0.100.106:8554/unicast",
                        "stillImageSource": "-rtsp_transport http -i rtsp://USERNAME:PASSWORD@10.0.100.106: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?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
jlg89commented, 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.

0reactions
DietShastacommented, Dec 4, 2020

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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

FFMPEG exited with Error code 1 · Issue #213 - GitHub
So your issue is the FFmpeg output "No such file or directory", that's what is causing the code 1 exit. Unfortunately FFmpeg output...
Read more >
ffmpeg exited with code 1: Output with label 'videooutput' does ...
I'm using the https://www.npmjs.com/package/live-stream-radio module, but a few times i get this error using it. How could i solve it?
Read more >
#7926 (ffmpeg 7:3.2.14 ... Error with "homebridge camera ...
Since update to 7:3.2.14 i have no more video and this message in the error log: ERROR: ffmpeg exited with code 1. i...
Read more >
ffmpeg exited with code 1: Conversion failed! : r/node - Reddit
The program was running fine but after I boot another similar app , this one encounters errors The node app simply convert mp4...
Read more >
"FFmpeg failed to perform the conversion" error - how to fix?
I've had a google around but haven't been able to solve the problem. I'm inputting into FFmpeg Silence Detection directly from a microphone...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found