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

RTSP Feed for printer cameras #1536

Open
greghesp opened this issue Mar 25, 2023 · 441 comments
Open

RTSP Feed for printer cameras #1536

greghesp opened this issue Mar 25, 2023 · 441 comments
Assignees
Labels
feature New feature or request Printer issues of Printer

Comments

@greghesp
Copy link

greghesp commented Mar 25, 2023

Is your feature request related to a problem? Please describe.
As a user, I cannot access the camera stream of my printer without using the Handy app or Bambu Studio

Describe the solution you'd like
As a user, I would like to be able to access my devices camera via a RTSP stream locally. This should be available whilst the device is in LAN or Cloud Mode, and should have the option to be secured using credentials, without the need for Bambu Studio camera tools to forward on the stream

Describe alternatives you've considered
There are no alternatives, due to the way this is currently implemented

Additional context
This was originally raised here
#1372, however the original poster decided to edit and close the issue for some reason. They then became toxic and it seems theirs GitHub account has been closed.

It had around 60 +1 comments and quite a lot of votes on the original post, so a much requested feature.

This feature is for the printer team, and is not a request for Bambu Studio.

As a developer of the Home Assistant integration, this is a much requested feature, but we are unable to implement this without a RTSP feed.

@greghesp greghesp added the feature New feature or request label Mar 25, 2023
@WolfwithSword
Copy link

+1 For an easily accessible RTSP camera stream feed, such that we can access it without needing bambu studio or the camera tools plugin running as a middleman. This way, I could open it in a browser or hook it up to several home automation platforms easily, or open it conveniently on my phone whether or not it is in LAN only mode.

@greghesp
Copy link
Author

Congrats. Know you copied the best and the feature's got my name on it.

I didn't copy the best, I took the drama out of it. End of. Stop being a child.

@AdrianGarside
Copy link

+1 for webcam style access direct from the printer.

@Ali229
Copy link

Ali229 commented Mar 25, 2023

+1 would love this feature as I now have multiple bambus connected to home assistant - being able to view the camera for each from one place and without internet would be useful

@KyleTeal
Copy link

+1 this would be a great feature

@jngmrks
Copy link

jngmrks commented Mar 25, 2023

+1 for a RTSP Stream direct from 3D-Printer

@RyanEwen
Copy link

+1 I think anyone coming from a printer using OctoPrint or Klipper expected RTSP out of the box

@trati629
Copy link

+1 for RTSP, would love to be able to see what my printer is doing from my TV and steam.

@Cobra-421
Copy link

+1 for RTSP direct from 3D-Printer

@andreifinski
Copy link

need it! hate to use wyze instead of existing camera

@FlyingHippo
Copy link

+1 for RTSP direct from 3D-Printer

@LayerCakeMakes
Copy link

+1 for a video stream locally from the 3d printer.

@uSyzex
Copy link

uSyzex commented Mar 26, 2023

+1 for LAN RTSP

@nejc-cc
Copy link

nejc-cc commented Mar 26, 2023

+1 for RTSP on LAN

@ice-brainvoid
Copy link

+1 for stream

@TriskelionTech
Copy link

+1 This would be awesome! would be great to have this linked to my home automation dashboard!

@davidt94
Copy link

+1 for this. Would be great

@sprior
Copy link

sprior commented Mar 26, 2023

Just a reminder that people who are interested in RTSP may also be interested in this one: #1504

@kazolar
Copy link

kazolar commented Mar 26, 2023

+1 would be awesome to add to BlueIris.

@Metallica22
Copy link

+1 for this.

@Turtletrumpet
Copy link

+1 for RTSP on LAN

@lorenzlars
Copy link

+1

2 similar comments
@dmcw999
Copy link

dmcw999 commented Mar 30, 2023

+1

@TheRealSimon42
Copy link

+1

@PatrickAmann
Copy link

+1 For an accessible RTSP camera stream on LAN.

@synman
Copy link

synman commented Jan 9, 2024

The pybambu snippet works wonderfully... Better than anything I've got out of handy and/or studio.

Thanks again!

@AdrianGarside
Copy link

Awesome. If you can expand on how you can convert the jpegs into an mjpeg with go2rtc that would be very helpful to me! :)

@synman
Copy link

synman commented Jan 9, 2024

@synman
Copy link

synman commented Jan 10, 2024

here's a pure python solution I pulled together today using a multi-threaded mjpeg web server I suped up a couple years ago and the protocol details provided in this thread.

https://github.com/synman/webcamd/tree/bambu

@0x5e
Copy link

0x5e commented Mar 4, 2024

golang version of @synman 's bambu-go2rtc if anyone need to run on device without python environment. https://gist.github.com/0x5e/dfb03f2ae7335bf03bb4b9cf59971597

does anyone know why a1 mini's camera stream is so slow, only 0.5~1 fps?

Update:
Remember to add "-flags low_delay -analyzeduration 10 -probesize 32" params when pulling the a1 mini's rtsp stream. It reduce latency from ~10s to ~5s for me.

@THE-SIMPLE-MARK
Copy link
Contributor

golang version of @synman 's bambu-go2rtc if anyone need to run on device without python environment. https://gist.github.com/0x5e/dfb03f2ae7335bf03bb4b9cf59971597

does anyone know why a1 mini's camera stream is so slow, only 0.5~1 fps?

It's how it is sadly. A1 and the P1 series' cameras are intentionally frame rate limited due to the processor (an ESP32) not being able to handle a high framerate camera alongside managing the core functions of the printer.

@Schokobecher
Copy link

@sodachen22 is there any update when the RTSP feed will be reliable? It works for short while after the printer is rebooted. But usually during the first print it stops working and then will remain broken until the printer is rebooted again.

Sadly, 6 months later, this is still the case. Had to ditch the camera in HA Automations as it frequently caused them to fail (I/O Error, Timeouts)

@WolfwithSword
Copy link

WolfwithSword commented Apr 29, 2024

Sadly, 6 months later, this is still the case. Had to ditch the camera in HA Automations as it frequently caused them to fail (I/O Error, Timeouts)

I did hear recently that the 1.8 firmware supposedly is going to bring reliability improvements to camera streams via live-view and wifi. Only a rumour though but wouldn't be surprised.

@sodachen22
Copy link

@sodachen22 is there any update when the RTSP feed will be reliable? It works for short while after the printer is rebooted. But usually during the first print it stops working and then will remain broken until the printer is rebooted again.

Sadly, 6 months later, this is still the case. Had to ditch the camera in HA Automations as it frequently caused them to fail (I/O Error, Timeouts)

RTSP stability issue may be related to the client, network performance and the server on the printer. To narrow down if this issue is related to the client, would you please check if it is OK with BambuStudio? If there issue is still there, please share the LOG of Studio and Printer with us. Thanks!

@Schokobecher
Copy link

Handy and Bambu Studio keep the connection, but querying the printer directly (LAN Live View turned on) results in no image.
The issue only arises after a while, and is only fixed by a printer restart - after that the connections works immediatley.

Please also see:
greghesp/ha-bambulab#221

Most common error for me is:

Error from stream worker: Error opening stream (ERRORTYPE_5, I/O error) rtsps://:@192.168.1.45/streaming/live/1

@AlexxIT
Copy link

AlexxIT commented May 4, 2024

@synman Hi. Looks like you using python to convert data. I can add this code inside go2rtc. So it will be less CPU cost and more native.

Just needs to access to stream. For example via Ngrok
https://github.com/AlexxIT/go2rtc/wiki/Tunnel-RTSP-camera-to-Intenet

You or anyone else can PM me.

@bobobo1618
Copy link

For anyone with an X1 who comes across this, this seems to be a problem with the P1 series rather than the X1 series. When an X1 is in LAN mode, you can connect to it at rtsps://bblp:<access code>@<ip>:322/streaming/live/1. An example go2rtc config looks like this:

streams:
  bambu: rtsps://bblp:<access code>:<ip>:322/streaming/live/1

You can also connect directly with VLC, ffmpeg, mpv etc. but go2rtc makes it much more stable.

Maybe you might want to add it to the docs @AlexxIT?

@WolfwithSword
Copy link

For anyone with an X1 who comes across this, this seems to be a problem with the P1 series rather than the X1 series. When an X1 is in LAN mode, you can connect to it at rtsps://bblp:<access code>@<ip>:322/streaming/live/1.

Just FYI for X1 series, it does not require LAN mode, but does require LAN Liveview to be enabled, the name is slightly confusing but it is separate. As for P1/A1 series, they do not have the rtsps functionality at this time.

@ColColonCleaner
Copy link

ColColonCleaner commented Jun 30, 2024

Trying to access the camera feed this way rtsps://bblp:<access code>@<ip>:322/streaming/live/1 after including the correct IP and access code, but when using that URL with FFMPEG I get a 'Permission denied' error. The same access code here is used here as in bambu studio, and I can see the camera feed in bambu studio, so I'm not sure why it's failing via FFMPEG. Any clues?

@saileshkotha
Copy link

saileshkotha commented Jul 25, 2024

This works perfectly fine: https://github.com/slynn1324/BambuP1Streamer/blob/main/Dockerfile

Using scrypted, ffmpeg plugin. If anyone want detailed steps, please let me know. Will document this with all configuration details.

image image

@Crackeronkelz
Copy link

Iam trying that since 3 days…
Also want to do the same :-)
Can you please describe how to integrate that in scrypted ?

This works perfectly fine: https://github.com/slynn1324/BambuP1Streamer/blob/main/Dockerfile

Using scrypted, ffmpeg plugin. If anyone want detailed steps, please let me know. Will document this with all configuration details.

image image

@posita
Copy link

posita commented Sep 4, 2024

Trying to access the camera feed this way rtsps://bblp:<access code>@<ip>:322/streaming/live/1 after including the correct IP and access code, but when using that URL with FFMPEG I get a 'Permission denied' error. The same access code here is used here as in bambu studio, and I can see the camera feed in bambu studio, so I'm not sure why it's failing via FFMPEG. Any clues?

Try ffplay instead of ffmpeg? For me, neither VLC nor ffmpeg worked. ffplay did, however.

@AdrianGarside
Copy link

AdrianGarside commented Sep 4, 2024

Trying to access the camera feed this way rtsps://bblp:<access code>@<ip>:322/streaming/live/1 after including the correct IP and access code, but when using that URL with FFMPEG I get a 'Permission denied' error. The same access code here is used here as in bambu studio, and I can see the camera feed in bambu studio, so I'm not sure why it's failing via FFMPEG. Any clues?

Bambu studio doesn’t use the RTSP connection. Support for that was added solely for external access to the video feed locally on the network. It often stops working and rebooting the printer is the only way to start it working again.

@SebastianOsinski
Copy link

This works perfectly fine: https://github.com/slynn1324/BambuP1Streamer/blob/main/Dockerfile

Using scrypted, ffmpeg plugin. If anyone want detailed steps, please let me know. Will document this with all configuration details.

image image

@saileshkotha Does this Docker app still work for you on newest printer firmware? I get errors when trying to stream with it on newest P1S FW.

@shamanskyh
Copy link

Using Scrypted here which works okay, though I'm disappointed in the reliability of the RTSPS stream. It frequently becomes inoperable after a short time and only resumes working after a full restart of the printer.

I'd really appreciate a more reliable local RTSPS stream.

@posita
Copy link

posita commented Oct 13, 2024

You can also connect directly with VLC, ffmpeg, mpv etc. but go2rtc makes it much more stable.

@bobobo1618, how were you able to get VLC to work? VLC doesn't seem to recognize the rtsps scheme, but it won't work for me with rtsp://bblp:<access-code>@<ip-addr>:322/streaming/live/1 either. It just endlessly tries to connect. ffplay and mpv work fine for me.

@brettus90
Copy link

This works perfectly fine: https://github.com/slynn1324/BambuP1Streamer/blob/main/Dockerfile

Using scrypted, ffmpeg plugin. If anyone want detailed steps, please let me know. Will document this with all configuration details.

image image

If you could detail it or send me it i have got as far as installing scrypted on and adding ffmpeg plugin within there but then all the settings i dont know

@undert03
Copy link

undert03 commented Nov 9, 2024

When is the RTSP stream going to be fixed and stable?

@mateuszdrab
Copy link

When is the RTSP stream going to be fixed and stable?

I know right, I've had the X1C for a year now and the stream pretty much never worked right.

Similarly, the A1 mini stream also stops working after a longer uptime.

Both printers need regular restarts to recover from stream failures.

@hfagelnour
Copy link

This works perfectly fine: https://github.com/slynn1324/BambuP1Streamer/blob/main/Dockerfile
Using scrypted, ffmpeg plugin. If anyone want detailed steps, please let me know. Will document this with all configuration details.
image image

If you could detail it or send me it i have got as far as installing scrypted on and adding ffmpeg plugin within there but then all the settings i dont know

+1 would you please detail the scrypted settings you used, thanks

@hfagelnour
Copy link

Using Scrypted here which works okay, though I'm disappointed in the reliability of the RTSPS stream. It frequently becomes inoperable after a short time and only resumes working after a full restart of the printer.

I'd really appreciate a more reliable local RTSPS stream.

what were the scrypted setting did you use in the FFMPEG plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request Printer issues of Printer
Projects
None yet
Development

No branches or pull requests