Skip to content

Instantly share code, notes, and snippets.

@khlam
Created November 23, 2024 02:21
Show Gist options
  • Select an option

  • Save khlam/146a72d3fc4d549f6f767cf826c32445 to your computer and use it in GitHub Desktop.

Select an option

Save khlam/146a72d3fc4d549f6f767cf826c32445 to your computer and use it in GitHub Desktop.
Config: Homebridge Camera FFmpeg for bambu lab x1c lan mode camera
{
"name": "Camera FFmpeg",
"cameras": [
{
"name": "bambu",
"videoConfig": {
"source": "-rtsp_transport tcp -i rtsps://bblp:<LAN mode access code>@<X1C IP address>:322/streaming/live/1"
}
}
]
}
@khlam
Copy link
Author

khlam commented Dec 22, 2024

Hi thanks for reaching out. Yes occasionally I need to power-cycle the X1C but overall my stream is stable and works for weeks.

Hard to say what could be the issue, maybe verify the printer has a static IP, can send data over UDP, router firewall rules, update x1c firmware (I'm on 1.08), etc. Incase this helps debugging, the following ffmpeg command streams the camera to a file which can be viewed with VLC.

ffmpeg -i rtsps://bblp:<LAN mode access code>@<X1C IP address>/streaming/live/1 -c copy output.ts

@toddwchapin
Copy link

Thanks so much! I'll give it a shot.

@toddwchapin
Copy link

I think I found a solution. Someone on Reddit suggested that since the Handy app has a timeout on the video feed, perhaps we need to make ffmpeg timeout.

I added this parameter to the URL and it seems to have resolved the issue:

-timelimit 300

So my config is:
-timelimit 300 -rtsp_transport tcp -i rtsps://bblp:<LAN mode access code>@<X1C IP address>:322/streaming/live/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment