Page 1 of 1

Multithreads for HLS

Posted: 26 Jan 2023 14:51
by essw
Some IPTV-providers cannot afford normal bandwith for all users, so VLC player should has native support of multi uploading HLS stream segments for each segment (better unlimited uploading threads for each segment) as multi-upload downloader apps do it. For smooth playing video.

VLC player has setting: VOD -> RTSP VoD -> Legacy RTSP VoD server -> Maximum number of connections (by default 0). It's only for RTSP or it's also suitable for HLS, DASH ?

Re: Multithreads for HLS

Posted: 26 Jan 2023 17:25
by Rémi Denis-Courmont
VLC does not upload HLS in the first place. The HLS stream output generates local files. It's entirely up to you how you make them available via HTTP(S).

Re: Multithreads for HLS

Posted: 28 Jan 2023 21:09
by essw
I meant. For ex. has https://example.com/file.m3u8 if we look inside we can see list of several .ts files, every file has duration in seconds depending of HLS provider. If you watch iptv on your smartphone then the bandwidth of your ISP doesn't matter much because you gadget will receives low resolution video, but if you watch on big TV/monitor you probably prefer at least HD or better FHD stream but for it hls provider must has huge bandwidth, but at rush hour or something else bandwidth may not be enough for it.

So need just that vlc using multithreading mode, for compensation low speed from hls server.

Re: Multithreads for HLS

Posted: 30 Jan 2023 19:02
by Rémi Denis-Courmont
Multithreading is not going to improve bandwidth. You're not making any sense.

And VLC has supported multithreaded video decoding for over a decade.

Re: Multithreads for HLS

Posted: 31 Jan 2023 11:22
by Alaric
Current HLS access output won't support crafting a main playlist to expose multiple renditions of the stream. You'll have to craft it yourself and refer all the playlists generated by the accesses.
I think you are misusing the "multithreaded" termination, you just want to have mutliple stream outputs, whether multiple threads are used or not in the implementation does not matter.
You can definetely generate the segments with a complex stream out pipeline involving a duplicate and transcodes such as:

Code: Select all

sout="#duplicate{dst=transcode{... low res profile ...}:livehttp{...}, dst=transcode{... high res profile ...}:livehttp{...}, dst=livehttp{...}}"
This will output mutliple renditions of the stream as you expect, it's just very cumbersome to use and you will likely be more satisfied with ffmpeg...

This will likely be improved after vlc 4.0 though.

Re: Multithreads for HLS

Posted: 02 Feb 2023 15:00
by essw
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:some values
#EXT-X-DISCONTINUITY-SEQUENCE:some values
#EXT-X-PROGRAM-DATE-TIME:some values
#EXTINF:10,
video/video_00001.ts
#EXTINF:10,
video/video_00002.ts
#EXTINF:10,
video/video_00003.ts
#EXTINF:10,
video/video_00004.ts
#EXTINF:10,
video/video_00005.ts

How does VLC download such a playlist? File by file? Simultaneously? Single threaded download for each .ts file or multithreaded download?