How to retrieve HLS streaming video URL?

20,220

A m3u8 file is an index file which contains urls for the individual video streams inside it, generally as URI's to MPEG-2 transport segment files. These are basically 'chunks' of your video file.

For your example if you copy the link you have above and paste it into a standard Chrome browser, it should download rather than try to play the m3u8 file.

If you then select the downloaded file in your explorer or finder etc and open it with a text file you should be able to see the URI's to the individual 'ts' files in the m3u8 index file. For your example above this results in:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:41125
#EXT-X-TARGETDURATION:8
#EXTINF:8.360,
41125.ts?md=8bPwZMHZb1HGu3OVofJ7cw&e=1441922937
#EXTINF:8.000,
41126.ts?md=8bPwZMHZb1HGu3OVofJ7cw&e=1441922937
#EXTINF:8.400,
41127.ts?md=8bPwZMHZb1HGu3OVofJ7cw&e=1441922937
#EXTINF:8.200,
41128.ts?md=8bPwZMHZb1HGu3OVofJ7cw&e=1441922937
#EXTINF:7.200,
41129.ts?md=8bPwZMHZb1HGu3OVofJ7cw&e=1441922937
Share:
20,220
Admin
Author by

Admin

Updated on January 09, 2020

Comments

  • Admin
    Admin over 4 years

    How to retrieve HLS streaming video URL for watching live streams with VLC? (actual path to media file). I used Wireshark to find URL of leave stream, but only can get this path, which contains no link to video file.

    Example of stream.

    EDIT: I find the easiest way is to use the Firefox developer tools: Tools > Web Developer > Network, and watch the network requests made when a page is loaded. Then just see 'GET' requests to M3U8 playlist file, the full path to playlist shown on the right pane, in the 'Filter URLs' box. Finally, put the discovered M3U8 link into the standard M3U playlist file. It can be played on mpv Media Player (Linux), for example.