mplayer preload next fragment when playing fragmented stream

خرید بک لینک

I have the URL of a stream and I am trying to watch it with mplayer.

For some radios/TVs the URL represents a playlist with 10 second fragments so after each fragment I have to wait until mplayer loads the next one.

For example I have the URL http://srclive-lh.akamaihd.net/i/xcanrdi_1@95878/index_400_av-b.m3u8 which happens to point to a playlist file with the following content:

#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-ALLOW-CACHE:YES
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:10654034
#EXTINF:10.000,
http://srclive-lh.akamaihd.net/i/xcanrdi_1@95878/segment10654034_400_av-b.ts?sd=10
#EXTINF:10.000,
http://srclive-lh.akamaihd.net/i/xcanrdi_1@95878/segment10654035_400_av-b.ts?sd=10
#EXTINF:10.000,
http://srclive-lh.akamaihd.net/i/xcanrdi_1@95878/segment10654036_400_av-b.ts?sd=10

When I play the URL

mplayer -playlist 'http://srclive-lh.akamaihd.net/i/xcanrdi_1@95878/master.m3u8'

After 10 seconds mplayer finishes the first entry and starts loading the next one, so there is a pause before the next 10-second fragment starts.

I seem to not be able to formulate my problem well enough for a search engine so I cannot even find how is called what I want to do and what to start reading to solve my problem.

How can I make mplayer play the stream smoothly (like a browser usually does)?

Recent Questions...

ما را در سایت Recent Questions دنبال می‌کنید

برچسب: نویسنده: استخدام کار بازدید: 211 تاريخ: پنجشنبه 27 خرداد 1395 ساعت: 7:33

صفحه بندی