<div dir="ltr">Hi,<br><br>I'm having an issue playing live HLS streams that, at this point, I am unable to solve alone.<br><br>I have defined several workflows for playing HLS streams that go like this (starting with the simplest):<br><br>* gst-launch-1.0 playbin uri=$URL<br>* gst-launch-1.0 souphttpsrc location=$URL ! decodebin name=dec \<br>  dec. ! queue ! videoconvert ! autovideosink \<br>  dec. ! queue ! audioconvert ! autoaudiosink<br>* gst-launch-1.0 souphttpsrc location="$URL" ! hlsdemux ! tsdemux name=demux \<br>  demux. ! queue ! aacparse ! avdec_aac ! audioconvert ! autoaudiosink \<br>  demux. ! queue ! h264parse ! avdec_h264 ! videoconvert ! autovideosink<br><br>Of course I tried several other configurations (adding queues here and there in order to try different buffering strategies) but showing them all might be too distracting.<br><br>I am getting "micro-freezes" (meaning video stops for a fraction of a seconds and the resumes) at regular intervals, and those intervals coincide with the length of the playlist (given that the usual .m3u8 file contains 3 .ts segments totaling between 10 and 15 seconds of video). It doesn't happen with all the HLS streams I've tested, but it happens with a lot o them.<br><br>I think (or at least thought) this is a buffering related issue, so I tried to insert queues before and after the HLS demuxer but, at the moment, I haven't been successful.<br><br>I did gain, tough, a great performance improvement by adding a queue after HLS demux in some cases, but it wasn't enough to solve the micro-freeze issue. I also tried to switch between the different types of queues available (queue, queue2 and multiqueue) and customizing the properties at my disposal (for example: max-size-{buffers,bytes,time}, {low,high}-watermark, playbin flags) but I only managed to increase the startup time (which, base on the documentation, made sense).<br><br>I tested in three different environments with the same result which led me to conclude this is not related to a particular setup.<br><br>Environment 1:<br>  * Hardware: HP Laptop with Core i7 CPU<br>  * OS: Manjaro Linux<br>  * Gstreamer version: 1.16.0 (installed with pacman)<br><br>Environment 2:<br>  * Hardware: Raspberry Pi 3 B+<br>  * OS: Raspbian Stretch<br>  * Gstreamer version: 1.16.0 (compiled without X support)<br><br>Environment 3:<br>  * Hardware: Raspberry Pi 3 B+<br>  * OS: Raspbian Buster<br>  * Gstreamer version: 1.14.0 (installed with apt-get)<br><br>The following is a list of just some of the streams I've been testing that have the micro-freezing issue, in case you want to give them a try.<br><br><div>* <a href="http://video3.earthcam.com/fecnetwork/hdtimes10.flv/.m3u8" target="_blank">http://video3.earthcam.com/fecnetwork/hdtimes10.flv/.m3u8</a></div><div>* <a href="http://video3.earthcam.com/fecnetwork/9974.flv/.m3u8" target="_blank">http://video3.earthcam.com/fecnetwork/9974.flv/.m3u8</a></div>* (DW) <a href="http://dwstream4-lh.akamaihd.net/i/dwstream4_live@131329/master.m3u8" target="_blank">http://dwstream4-lh.akamaihd.net/i/dwstream4_live@131329/master.m3u8</a> <div>* (TC, Ecuador) <a href="https://5c21f7ec1999d.streamlock.net/8054/8054/playlist.m3u8" target="_blank">https://5c21f7ec1999d.streamlock.net/8054/8054/playlist.m3u8</a></div><div>* (DCN) <a href="http://video.oct.dc.gov/out/u/DCN.m3u8" target="_blank">http://video.oct.dc.gov/out/u/DCN.m3u8</a> (provides various options, use connection-speed to stick to one)</div><div>* (NETTV, Argentina) <a href="http://unlimited2-us.dps.live/nettv/nettv.smil/playlist.m3u8" target="_blank">http://unlimited2-us.dps.live/nettv/nettv.smil/playlist.m3u8</a><br></div><div><br></div><div>Interestingly enough, this channel from Argentina works ok: <a href="http://200.115.193.177/live/26hd-720/.m3u8" target="_blank">http://200.115.193.177/live/26hd-720/.m3u8</a>. Believe it or not, this was the only one that played smoothly (I couldn't find any difference of magnitude with the others).<br><br>Streams that are not live, for example, <a href="https://bitmovin.com/mpeg-dash-hls-examples-sample-streams" target="_blank">the ones at bitmovin.com</a> work ok (in the worst case you just have to set the appropriate bit rate).</div><div><br></div><div>It is worth noting that those HLS streams work ok if using <a href="http://docs.livestreamer.io/" target="_blank">livestreamer</a> (with 1~2 seconds delay due to buffering).<br><br>Any help will be appreciated, and I'll be happy to provide additional information in case is needed.<br><br>Thanks!<br><br>--<br>Juan<br>:wq</div></div>