Selur's Little Message Board
HLS encoding support - Printable Version

+- Selur's Little Message Board (https://forum.selur.net)
+-- Forum: Hybrid - Support (https://forum.selur.net/forum-1.html)
+--- Forum: Problems & Questions (https://forum.selur.net/forum-3.html)
+--- Thread: HLS encoding support (/thread-435.html)



HLS encoding support - PaulWolf - 22.05.2018

Hi,

does Hybrid support HLS encoding?

thank you in advance


RE: HLS encoding support - Selur - 22.05.2018

Nope, Hybrid doesn't support HLS streaming since I don't know what is required for it to do so. Smile

Cu Selur


RE: HLS encoding support - PaulWolf - 22.05.2018

(22.05.2018, 14:43)Selur Wrote: Shy Nope, Hybrid doesn't support HLS streaming since I don't know what is required for it to do so. Smile

Cu Selur

Thanks for your answer! I didn’t mean streaming, I meant rendering the clip to multiple resolutions and small packets of 10 seconds say.. 
but guess not..


RE: HLS encoding support - Selur - 23.05.2018

Looking at https://docs.peer5.com/guides/production-ready-hls-vod/ creating HLS compatible files doesn't seem complicated.
From what I gathered so far the HLS options are only required during muxing, so one could encode the mp4 source file with any encoder, as long as gop size is set to X seconds, automatically adding of GOPs on scence changes is disabled and the VBV values are set.
Those files could then be segmented using:
ffmpeg -i sourcefile -hls_time 4 -hls_playlist_type vod -hls_segment_filename "OUTPUT FOLDER/RESOLUTIO_%03d.ts" "OUTPUT FOLDER/RESOLUTIO.m3u8
so for a 480p source one would for example use:
ffmpeg -i "H:\Test.mp4" -hls_time 4 -hls_playlist_type vod -hls_segment_filename "h:\hlsTest\480p_%03d.ts" "h:\hlsTest\480p.m3u8
Note that hls_time can only be multiple of the gop size in seconds.

So the values a used would need to set are:
1. the gop size in seconds, the hls package size (needs to be a multiple of the gop size in seconds value)
2. The resolutions to target (width should be enough)
3. The VBV values.

After some thinking, about this I concluded, that I could add additional options to support creating a single file with segmented files and playlist, but adding an option which would tell Hybrid to create multiple resolution etc. in one go conflicts with too much of the inner workings of Hybrid.

Writing a small gui for the script from https://docs.peer5.com/guides/production-ready-hls-vod/ that works on Windows/Mac/Linux wouldn't be complicated either, but that would not be Hybrid but another tool.

Cu Selur


RE: HLS encoding support - PaulWolf - 23.05.2018

(23.05.2018, 10:18)Selur Wrote: Looking at https://docs.peer5.com/guides/production-ready-hls-vod/ creating HLS compatible files doesn't seem complicated.
From what I gathered so far the HLS options are only required during muxing, so one could encode the mp4 source file with any encoder, as long as gop size is set to X seconds, automatically adding of GOPs on scence changes is disabled and the VBV values are set.
Those files could then be segmented using:
ffmpeg -i sourcefile -hls_time 4 -hls_playlist_type vod -hls_segment_filename "OUTPUT FOLDER/RESOLUTIO_%03d.ts" "OUTPUT FOLDER/RESOLUTIO.m3u8
so for a 480p source one would for example use:
ffmpeg -i "H:\Test.mp4" -hls_time 4 -hls_playlist_type vod -hls_segment_filename "h:\hlsTest\480p_%03d.ts" "h:\hlsTest\480p.m3u8
Note that hls_time can only be multiple of the gop size in seconds.

So  the values a used would need to set are:
1. the gop size in seconds, the hls package size (needs to be a multiple of the gop size in seconds value)
2. The resolutions to target (width should be enough)
3. The VBV values.

After some thinking, about this I concluded, that I could add additional options to support creating a single file with segmented files and playlist, but adding an option which would tell Hybrid to create multiple resolution etc. in one go conflicts with too much of the inner workings of Hybrid.

Writing a small gui for the script from https://docs.peer5.com/guides/production-ready-hls-vod/ that works on Windows/Mac/Linux wouldn't be complicated either, but that would not be Hybrid but another tool.

Cu Selurt

thanks a lot 



RE: HLS encoding support - Selur - 23.05.2018

Nothing to thank for, haven't done anything so far. Smile

Cu Selur


RE: HLS encoding support - Selur - 23.05.2018

What OS do you use?
I uploaded a 64bit Windows build of 'KissHLS' to my GoogleDrive.
Assuming you use Windows: Download the file, extract it, start KissHLS and test it.
I basically does what the script from https://docs.peer5.com/guides/production-ready-hls-vod/ suggested with some minor adjustments to the ffmpeg call.

Cu Selur