-
Notifications
You must be signed in to change notification settings - Fork 3
Add demo to open Bambu X1 Carbon live stream #128
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
base: main
Are you sure you want to change the base?
Conversation
341303a to
ec7d267
Compare
|
i'd love to land this; @jamwaffles any big blockers on landing this beyond the merge conflict? its ok if its kinda broken since we don't have anything in main today, we just ought to document where it's busted before landing :) |
|
No blockers! I tried to retest this at KittyCamp but didn't get very far, so either something in newer firmwares broke this code, or something has bitrotted. I didn't have time or energy to look into it last week but hopefully it's just a case of some simple debugging to make the stream work again. |
|
Understood! I'll give doing some CPR on it a shot as soon as I can |
|
|
||
| let mut stream = Rtsps::new( | ||
| // User is hard coded to `bblp`. Password is printer access code. | ||
| "rtsps://bblp:192190e7@192.168.0.96:322/streaming/live/1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
omg wait its "just" a rtp stream? ok this is cool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep! IIRC I was using ffplay to test it and capture packets. If you need an example command, let me know and I'll look through my shell history and post it here.
I had A Time(tm) getting all the Rust stuff to actually parse and decode frames though, so I'm not unsurprised that fragile code no longer worked when I tested it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.

This needs more work to integrate it into the server (e.g. providing a WebRTC endpoint, dynamic IP and access code), but as it stands it's now possible to get video frames from the printer.
This has been a huge pain in the arse because there isn't a good RTSP auth crate that I could find, so that was written from scratch. Additionally, the network data that comes out of the printer starts with this weird
0x2400(len low)(len high)4 byte preamble that I couldn't find in any specs anywhere, so that confused me for days as it meant none of the H.264 decoders I tried would pick up a frame.I'm sick of reading hex off the command line so I'll present this code as-is for someone else (maybe me later lol) to integrate into machine-api proper.
I've left my
NOTES.mdin as it might prove helpful in the future, but be aware the file is pretty much a live stream (hah)/dumping ground of things I found in my travels.Makes steps towards closing #52