[FFmpeg-user] How can I extract m3u8 URL for use with ffmpeg on this site?

Bo Berglund bo.berglund at gmail.com
Mon Apr 11 23:21:37 EEST 2022

On Tue, 12 Apr 2022 03:46:52 +1200, Robert Jeffares <jeffares.robert at gmail.com>

>A script using curl to download the site to a file then grep m3u8 will give
>you a list which you can then sort to select the_one_you_want then ffmpeg
>-I the_one_you_want etc

Does not work...

curl -o testfile http://www.freeintertv.com/view/id-2308
grep m3u8 testfile
...blank output...

It is more involved than this simple assumption.
The m3u8 data appears when the player has started playing the video and then I
can *manually* retrieve it using FireFox in F12 mode.

But I need to automate this...

>Bush shell script is able to manage simple cases sometimes you need more
>grunt. Perl is a reliable option.

I assume you mean bash as in the first line in such scripts:

Bash works fine for what I do, but I need to find the right command to execute
via bash.
I already have curl code to retrieve the m3u8 data and then pass it to sed, but
it won't work for this particular site.

>I have a cron job which does this but use youtube-dl

Youtube-dl has been abandoned for a long time now, replaced by yt-dlp.
Youtube-dl could download live streams but only from Youtube and it could not be
called with a specific timeout so when I used that a few years back I had to use
the timeout function in order to make it stop at the wanted time:

timeout --signal=2 67m <youtube-dl command>

But that does not work with yt-dlp, which is not able to download live streams.

>Hope this answers your question

Unfortunately not.

Bo Berglund
Developer in Sweden

More information about the ffmpeg-user mailing list