Experimental HLS support

With HLS Play from chrome strore, it works even without the ?channel=1

The camera, for information, is this one : https://www.sercomm.com/contpage.aspx?langid=1&type=prod3&L1id=2&L2id=3&L3id=9&Prodid=457

But with my ISP firmware on it

Try Chrome plugin “Allow CORS” - https://chrome.google.com/webstore/detail/allow-cors-access-control/lhobafahddgcelffkeicbaginigeejlf?hl=en
It’s not a production solution, but if it will work with this plugin - it’s a CORS issue.
Alternatively you can look into browser console.

Hi, i looked in the console and yeah, it looks like tit's a CORS issue : Access to XMLHttpRequest at 'http://192.168.0.31/img/stream.m3u8' from origin 'http://octopi.local' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

But i don't get how to set the extension to make it work

@foosel, @jneilliii, here is the merge request to delel branch: https://github.com/OctoPrint/OctoPrint/pull/3647 .
Look into the merge request description for CORS issues explanation and possible workarounds.
Please, review and put your thoughts.

@chyrla, look into the merge request too, maybe you will find a workaround.

So I skimmed through the thread, and see that there is a plugin, but all a pull request to OP. Should I wait for the pull request to get implemented, or should I be OK grabbing the plugin while I wait?

Grab the plugin and mind CORS issues.

Well ok CORS chrome app was just not activated...

So, no more CORS issue, but i have a "Unchecked runtime.lastError: The message port closed before a response was received." error in console. here /#tab_plugin_hlswebcam:1

I don't know if this is the problem, but i still have the player with infinite loading screen.

EDIT :
Solved the error, it was from real-debrid extension. But it does not fix my infinite loading. No error anywhere but no stream.

Tried on Google chrome and Firefox :


I have made an OctoPi branch with Octoprint 1.4.0+HLS patches and HLS by default.
I suppose it can be used for testing before HLS code will be merged to Octoprint release.
Build instructions inside.

@chyrla, there you can look how to proxy your HLS via HAProxy.

Just a heads up, the pull request is not abandoned, it's just waiting for review :slight_smile:

Oh thank you I was wondering about that.

OctoPrint 1.4.1/2 release + summer holidays meant it hasn't been looked at. There's a small stack accumulating, Gina will be back at the end of this week/next week to begin looking through the backlog.

3 Likes

Good news: this feature is going to be included in 1.5 .

1 Like

When is 1.5 coming out? I want this for my c615 because it has native h264 output.

There is no date for 1.5 release. It's done when it's done :wink:

You could try this plugin in the meantime

You'll still need octopi 0.18 for full support.

1 Like

“It has native h264 output” - you will have to learn how to change ffmpeg settings, because in OctoPi we are going to reencode all input using pi built-in encoder. Good news is that it’s technically possible to do.