MPV vs. VLC streaming problem

Hi all, :waving_hand:

I´m happy to report that I finally could solve the initial problem I described in my thread #1.

A short recap:

[00007f0600001610] http stream error: error: HTTP/1.1 403 Forbidden
  • Spoofing vlc´s user agent didn´t work either:
    vlc --http-user-agent="Mozilla/5.0 (compatible; mpv)" http://ott-cdn.ucom.am/s24/index.m3u8

  • freetuxtv uses vlc under the hood, so the problem is also apparent here.

I finally managed to play the stream with vlc as well:

In order to achieve this goal I created an .m3u playlist with:

  • An #EXTVLCOPT:http-user-agent=... line to spoof a browser User-Agent. # that´s the important bit
  • The stream URL.

I obtained the information from https://github.com/Alstruit/iptv2/blob/master/streams/am_ucom.m3u:

#EXTINF:-1 tvg-id="BBCNewsEurope.uk" http-user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML,like Gecko) Mobile/15E148",BBC World News (480p) [Not 24/7]
#EXTVLCOPT:http-user-agent=Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML,like Gecko) Mobile/15E148
http://ott-cdn.ucom.am/s24/index.m3u8

I then launched vlc like this (from within the folder where the file resides):
firejail --disable-mnt --private=$(pwd) vlc play.m3u

Why This Works:

  • VLC parses the playlist file and respects the EXTVLCOPT options.
  • My research showed that using a mobile Safari user agent (iPhone OS) is often more “trusted” by streaming services.
  • Firejail ensures isolation (just in case the stream was doing something sketchy). :wink:

Having ascertained that this method proved to be successful I then
created a file “BBC_News_TV.m3u” and added it to freetuxtv´s group list.

The files´s contents: the same as before with vlc.

And freetuxtv does indeed play the BBC stream now. :+1:

Finally it works. :blush:

For good measure I sandbox the freetuxtv process:

firejail --disable-mnt --read-only=[PATH-TO-FREETUXTV-CONFIG-FOLDER] --private=[PATH-TO-FREETUXTV-CONFIG-FOLDER] freetuxtv

Many greetings from Rosika :slightly_smiling_face:

3 Likes