Skip to content

Experimental HLS support. #650

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

Merged
merged 1 commit into from
May 23, 2020
Merged

Experimental HLS support. #650

merged 1 commit into from
May 23, 2020

Conversation

chudsaviet
Copy link
Contributor

@chudsaviet chudsaviet commented May 23, 2020

Please, look at the experimental HLS support scripts.
No custom software is used, just FFMPEG for video and NGINX as content server.
It's not integrated to OctoPrint yet.
To see the HLS stream, you can user VLC or Safari (where there is a native support).
Just open the link: http://octopi.local:8051/hls/stream.m3u8
For other browsers, you can create a page with https://github.com/video-dev/hls.js/ .
It also serves single frames in JPEG for timelapses and notifications: http://octopi.local:8051/jpeg/frame.jpg

I'm open to comments and critic. :)

@guysoft
Copy link
Owner

guysoft commented May 23, 2020

Looks good, do you want me to pull this now or wait till you have the support in OctoPrint?

@chudsaviet
Copy link
Contributor Author

Let’s merge it now, and I will work on support in OctoPrint.

@guysoft guysoft merged commit c07d9d2 into guysoft:devel May 23, 2020
@chudsaviet
Copy link
Contributor Author

Thanks! 🌝

@beegmouse
Copy link

beegmouse commented Oct 6, 2020

Howdy, I have installed. Took a while to get configured.

Installing Nejjis plugin and changing webcam path to. "/hls/stream.m3u8" got it visible.

Doesn't seem to use the camera settings resolution and framerate from octopi.txt
So output is only 800x600

Is there a different location to configure this streamer?

I confirmed the stream was H.264, but it still seems quite bandwidth heavy for a 800x600 stream : 2.5Mb
Also, not sure why, but the network light seems a lot busier and cpu usage seems to be at 90% on a pi4

any thoughts?

@jneilliii
Copy link
Contributor

jneilliii commented Oct 11, 2020

@beegmouse it looks like the framerate and resolution is hard coded in the service configured to stream HLS here. This is why you can't overwrite/effect the settings via octopi.txt.

@beegmouse
Copy link

beegmouse commented Oct 12, 2020

This might be a noob comment.

Will editing /etc/systemd/system/ffmpeg_HLS.service and then restarting the service work?
Or is this something which is set once during install?

I'm not sure what you meant by "hard coded"

Edit (I tried it, it didn't change anything)

@guysoft guysoft mentioned this pull request Nov 4, 2020
@guysoft guysoft mentioned this pull request Jan 11, 2021
@omg-wtf
Copy link

omg-wtf commented Jan 16, 2021

I'm trying the 0.18.0 RC2 out in an attempt to get a Logitech StreamCam to work with HLS. I feel quite stupid since I can't find any clues on what configuration is needed to get this going. It would be awesome to have an instruction including the steps.
I have uncommented camera_streamer=hls and rebooted.
I get connection refused at http://octopi.local:8051/hls/stream.m3u8.
Any suggestions to what I can do more to make it work?

Thanks :)

@beegmouse
Copy link

I'm trying the 0.18.0 RC2 out in an attempt to get a Logitech StreamCam to work with HLS. I feel quite stupid since I can't find any clues on what configuration is needed to get this going. It would be awesome to have an instruction including the steps.
I have uncommented camera_streamer=hls and rebooted.
I get connection refused at http://octopi.local:8051/hls/stream.m3u8.
Any suggestions to what I can do more to make it work?

Thanks :)

Try removing the port ":8051" from the address.

@guysoft
Copy link
Owner

guysoft commented Jan 18, 2021

Is there a documentation somewhere? Worth linking here or writing it. Either in the README or wiki

@omg-wtf
Copy link

omg-wtf commented Jan 19, 2021

http://octopi.local:8051/hls/stream.m3u8.

I just started a big print, so I'll not fiddle too much with it.

However, removing the port turned out to be a promising thing. Navigating to http://octopi.local/hls/stream.m3u8 with Chrome downloads a file called stream.m3u8 with the following contents:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=245760,RESOLUTION=320x240
240p/stream.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1294336,RESOLUTION=640x480
480p/stream.m3u8

I'm hoping this is good and I'll let you know when I can investigate a bit more after the print.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants