bambulab / BambuStudio

PC Software for BambuLab and other 3D printers
GNU Affero General Public License v3.0
2.12k stars 282 forks source link

Video streaming on Windows 10 and VLC Media Player Freezes after first frame #2999

Closed Rich-b1 closed 11 months ago

Rich-b1 commented 11 months ago

Bambu Studio Version

1.7.7.89

Where is the application from?

Bambu Lab Official website

OS version

Windows 10

Additional system information

VLC Media Player version 3.0.20 OBS Studio version 30.0.0

Printer

Bambu Lab X1C

How to reproduce

Install video streaming support via the "Show Live Streaming Guide Page" in Bambu Studio.

Verified that the live streaming works properly with OBS Studio on Windows 10. Close OBS Studio.

Run VLC Player, using the file ffmpeg.sdp as a video source Notice that the first video frame from the X1C is displayed, but then the view track time slider is wandering back and forth. Also the video is frozen at the first frame.

Close VLS Player, then launch OBS Studio again to confirm that the video is working ok.

Actual results

VLC Media Player will display only one frame of video from the X1C.

However, OBS Studio will work correctly at all times.

Expected results

VLC Media player should be able to display the running video from the X1C

Project file & Debug log uploads

No project, simply run VLC Media Player as described.

Checklist of files to include

bambu123 commented 11 months ago

You can use ffplay. D:\Tools\ffplay.exe C:\Users\Administrator\AppData\Roaming\BambuStudioInternal\cameratools\ffmpeg.sdp -protocol_whitelist file,udp,rtp

OzDruiD commented 11 months ago

You can use ffplay. D:\Tools\ffplay.exe C:\Users\Administrator\AppData\Roaming\BambuStudioInternal\cameratools\ffmpeg.sdp -protocol_whitelist file,udp,rtp

This hardly ever works for me, I run the one from the Beta\CameraTools folder, but with the same paramaters..

image

Yet if I reopen OBS /./ its getting the feed - as s inside bambu studio., but with those programs closed, or open, fflplay doesnt get a stream.

I have navigated to the foldaer aand run the full Ffplay command line manually, but it still has the same erorr.

this is the code I use , as %appdata% is a better variable that works for everyone.

`%appdata%\BambuStudioBeta\cameratools\ffplay.exe %appdata%\BambuStudioBeta\cameratools\ffmpeg.sdp -protocol_whitelist file,udp,rtp

Pause`

Rich-b1 commented 11 months ago

I Installed ffmpeg (ffplay) and also didn't have much luck! I also tried it running as an admin, but no change.

I didn't want to debug/analyze/engineer this myself, but simply report this to BambuLab to consider it a bug to be fixed as it's on the Wiki as if it should be working.

Here's the Wiki page i followed: https://wiki.bambulab.com/en/software/bambu-studio/virtual-camera

Here's the error output ffplay, I'm not sure if this is related to the reason why VLC Media Player is not working as this is the first time I've tried ffplay:

[sdp @ 000002a53d3c09c0] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options Input #0, sdp, from 'C:\Users\Rich\AppData\Roaming\BambuStudio\cameratools\ffmpeg.sdp': Metadata: title : No Name Duration: N/A, bitrate: N/A Stream #0:0: Video: h264, none, 90k tbr, 90k tbn nan M-V: nan fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0

Rich-b1 commented 11 months ago

I Installed ffmpeg (ffplay) and also didn't have much luck! I also tried it running as an admin, but no change.

I didn't want to debug/analyze/engineer this myself, but simply report this to BambuLab to consider it a bug to be fixed as it's on the Wiki as if it should be working.

Here's the Wiki page i followed: https://wiki.bambulab.com/en/software/bambu-studio/virtual-camera

Here's the error output ffplay, I'm not sure if this is related to the reason why VLC Media Player is not working as this is the first time I've tried ffplay:

[sdp @ 000002a53d3c09c0] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options Input #0, sdp, from 'C:\Users\Rich\AppData\Roaming\BambuStudio\cameratools\ffmpeg.sdp': Metadata: title : No Name Duration: N/A, bitrate: N/A Stream #0:0: Video: h264, none, 90k tbr, 90k tbn nan M-V: nan fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0

Rich-b1 commented 11 months ago

This is not working at all with VLC Player, nor ffplay

bambu123 commented 11 months ago

Is your sdp files correct?

v=0 o=- 0 0 IN IP4 127.0.0.1 s=No Name c=IN IP4 127.0.0.1 t=0 0 a=tool:libavformat LIBAVFORMAT_VERSION m=video 1234 RTP/AVP 96 a=rtpmap:96 H264/90000 a=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z0LAH42NUCSC2TZAAAADAEAAAA8jwiEagA==,aM4xsgA=; profile-level-id=42C01F

Rich-b1 commented 11 months ago

Yes, These are the same as located in my ffmpeg.sdp file as created by Bambu Studio.

I haven't touched it at all. In fact this is the first time that I even looked inside of this file.

I don't know if these are correct, but they match what my file has in it.

Does VLC Media player work for you in Windows 10?


From: cmguo @.> Sent: Sunday, December 3, 2023 8:32 PM To: bambulab/BambuStudio @.> Cc: Rich-b1 @.>; State change @.> Subject: Re: [bambulab/BambuStudio] Video streaming on Windows 10 and VLC Media Player Freezes after first frame (Issue #2999)

Is your sdp files correct?

v=0 o=- 0 0 IN IP4 127.0.0.1 s=No Name c=IN IP4 127.0.0.1 t=0 0 a=tool:libavformat LIBAVFORMAT_VERSION m=video 1234 RTP/AVP 96 a=rtpmap:96 H264/90000 a=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z0LAH42NUCSC2TZAAAADAEAAAA8jwiEagA==,aM4xsgA=; profile-level-id=42C01F

— Reply to this email directly, view it on GitHubhttps://github.com/bambulab/BambuStudio/issues/2999#issuecomment-1837701070, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BELRUCWAQCDBB2OIRQ7FA63YHUR3JAVCNFSM6AAAAABABJCT62VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZXG4YDCMBXGA. You are receiving this because you modified the open/close state.Message ID: @.***>

Rich-b1 commented 11 months ago

I'm not sure what changed. All I did was open the ffmpeg.sdp file with my text editor, and then close it. (I did NOT save the file, only view it).

Now VLC Player is working! This is strange! I don't know what changed. I will say that just prior to testing this, I had changed my complete hot end. So the power to my printer was turned off, and then on again.

Please ignore this issue. I'll close it for now. And only re-open it again if I can find the conditions to cause it to re-occur on demand.

Sorry for the waste of time!

Rich-b1 commented 11 months ago

I believe I have reproduced the cure, but I'm not sure of what triggers the issue.

If the issue is happening (VLC Player will not work), If I power cycle the X1C, then VLC Media Player seems to work.

I can't yet reproduce this at will yet.

The first time I recreated it I had done the following:

1) Installed Bambu Studio Beta (version 1.8.1.57) 2) Configured Bambu Studio Beta (I was surprised it didn't import my configuration already, this was the first time to try a beta version). 3) Bambu Studio device view, hit play on camera view 4) Bambu Studio device view, click the gear icon next to the camera and enabled "GO Live" 5) Opened previously configured VLC Media Player. This reproduced the issue of VLC Player not working as described. 6) Close Bambu Studio 7) Power cycle the X1C, wait for startup to finish 8) Launch Bambu Studio, start device camera playing to confirm it's working 9) Test VLC Player. It seemed to not work! 10) Cycle "Go Live" in the Camera gear icon from enabled to disabled, to enabled again! 11) Open VLC Player and notice it is now working properly.

I hope this helps someone else reproduce the issue. But once I get VLC Player working, I can't get it to no longer work.

Note that I haven't tried to power cycle my PC yet, so see if this starts VLC Player not working again.

Rich-b1 commented 11 months ago

I feel like I'm on a roller coaster ride with this issue! LOL

It seems to be working and more stable now with firmware 1.07.00.00 on my X1C.

I'll close this issue and only reopen it if it starts again.

Thank you.