MPV vs. VLC streaming problem

Hi all, :wave:

here´s a curious problem I encountered lately:

I was adding a personalized group to the programm list of freetuxtv.
I added the path/file: /home/rosika/eigene_Programme.m3u which holds
the address of “BBC News TV”: http://ott-cdn.ucom.am/s24/index.m3u8.

But freetuxtv says: :frowning_face:

“Your input can’t be opened: VLC is unable to open the MRL ‘http://ott-cdn.ucom.am/s24/index.m3u8’.”

Well, I know freetuxtv uses vlc under the hood, so I tried playing the URL http://ott-cdn.ucom.am/s24/index.m3u8 directly in vlc.

Again it failed.

However: mpv is perfectly able of playing this URL. I can see the live stream of the BBC programme. :smiling_face:

I was asking myself: Why can´t vlc do it then?

I did a little research on that.

Since mpv can play the stream but vlc (and by extension, freetuxtv) cannot, the problem likely lies in one of the following areas:

  • vlc Lacks the necessary codecs or modules (1)
  • network or HTTPS handling issues (2)
  • force vlcto use ffmpeg Instead of Its own demuxers (3)

Well, it´s not (1), it seems.

(2) and (3) I may rule out as well.

I tried addressing a potential (2) problem thus:
vlc --no-http-reconnect http://ott-cdn.ucom.am/s24/index.m3u8

… and for (3) I tried
vlc --demux ffmpeg http://ott-cdn.ucom.am/s24/index.m3u8.

Neither of them worked. The problem seems to be lying somewhere else. :thinking:

The error messages pointed in the direction of rights management:

VLC media player 3.0.16 Vetinari (revision 3.0.13-8-g41878ff4f2)
[0000560e17825580] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[00007f0600001610] access stream error: HTTP 403 error
[00007f0600001610] http stream error: error: HTTP/1.1 403 Forbidden
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 960, resource id: 20578458, major code: 40 (TranslateCoords), minor code: 0
QObject::~QObject: Timers cannot be stopped from another thread.

This seems to indicate that vlc is being blocked from accessing the stream, while mpv is not. This usually happens when:

  • the server is rejecting vlc’s user agent
  • the server expects specific headers (e.g., a referrer or cookie)

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

Since the “403 Forbidden” error persists, it looks like the server is blocking vlc entirely,
possibly based on additional headers like referrer or cookies that mpv sends automatically but vlc does not. :neutral_face:

Seems to be a futile attempt all in all, as even if I succeeded in playing the BBC stream in vlc by using some workaround I´d not be able to run it successfully in freetuxtv.

I mean freetuxtv relies on vlc and I guess it thereby uses its default settings,
which would still pose a problem.

So if I cannot integrate the BBC URL in freetuxtv I´m perfectly O.K. with playing the stream in mpv.

I was just wondering why vlc wouldn´t play it using its default settings. I guess there´s not much I can do about it in that respect.

Does perhaps anyone else have any ideas :question:

Thanks and many greetings from Rosika. :slightly_smiling_face:

5 Likes

I’ve also noticed that some torrents (of course legal) work with mpv but not with vlc. I have both and use whatever works :smiley:

4 Likes

Same here. That stream plays on my android tablet (it defaults to mpv) , but if I try with VLC it deletes the stream without giving any message.

3 Likes

Hi again, :wave:

thanks so much for your replies. :heart:

@ihasama :

It´s good to have a confirmation regarding this behaviour.
Thanks for letting me know.

Right. That´s what I´ll have to do as well.

@nevj :

Thanks for trying out the link on your system(s), Neville.
Good to know the behaviour is the same with you.

I think what it boils down to is that I´ll have to adapt to different scenarios by using whatever works, like ihasama does…
… although I wish vlc, being the background engine for freetuxtv, wouldn´t introduce such restrictions.
But that´s certainly some sort of “luxury problem” (or rather: no real problem at all) , and who am I to complain… :wink:

Thanks to all of you and many greetings from Rosika :slightly_smiling_face:

4 Likes

@nevj and all:

Hi all, :waving_hand:

this might be a bit off-topic. Perhaps you may rather consider it to be a follow-up question regarding my initial post.

I used the URL http://ott-cdn.ucom.am/s24/index.m3u8 for getting the BBC News TV stream.

Using it with mpv proved to be working well but I noticed a recurring strange pattern:

At more or less the same time (around 3:45 pm Central European summer time = 1:45 pm UTC) the curent programme gets cut off.
The exact time may vary by a few minutes plus or minus. But the cut off happens pretty much at the same time every day,

  • Sound is chopped. Totally distorted. Not intellegible any more
  • Video stream is cut off altogether and it´s replaced by a standard colour bar test picture:

  • This situation lasts for about 2 minutes
  • After that everything´s back to normal again

Some further information: I also checked the URL with my location script:

"ip": "92.43.140.249",
  "hostname": "host-249.140.43.92.ucom.am",
  "city": "Yerevan",
  "region": "Yerevan",
  "country": "AM",
  "loc": "40.1811,44.5136",
  "org": "AS44395 Ucom CJSC",
  "timezone": "Asia/Yerevan",

Has anyone of you encountered anything similar when streaming :red_question_mark:

As I said: curiously enough the phenomenon seemingly reappears at roughly the same time every day. :neutral_face:

Many greetings from Rosika :slightly_smiling_face:

P.S.:

On iptv2/streams/am_ucom.m3u at master · Alstruit/iptv2 · GitHub
it says:

#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

O.K., they mention “[Not 24/7]”.
Would that account for the interruption of the stream :red_question_mark: :thinking:

3 Likes

Hi @Rosika ,
I think they are probably switching between devices.
Our free to air TV does it regularly.
2 mins is a bit short to be considered an interruption to 24/7
Regards
Neville

1 Like

I use mpv to stream Free-To-Air TV from TVHeadEnd running on a Pi3 :

#!/usr/bin/env bash
# watch TV @ telesto
# updated to run from MacOS too : 
# on linux will need https://github.com/hhirtz/mpv-retro-shaders
# to run CRT style shaders...  not tested on MacOS
OS=$(uname -s)
PROF="crt-lottes"
PROF=""
HOHO="REDACTED"
case $OS in
	Linux)
		/usr/bin/mpv --no-border --mute=yes http://$HOHO:9981/playlist/channels &
	;;
	Darwin)
		# MacOS
		/opt/homebrew/bin/mpv --mute=yes http://$HOHO:9981/playlist/channels &
	;;
	*)
		# sumthin else
		echo "don't bother trying that stuff here... exiting..."
		exit 1
	;;
esac

And I just use back, or forward, in mpv, to change the channel being received…

I also use mpv to stream both my IP cameras via RTSP :

#!/usr/bin/env bash
# fire up MPV @ HD (720p) on BOTH TP-Link webcams
# to use CRT style shaders need this stuff from 'ere : https://github.com/hhirtz/mpv-retro-shaders
UZER="REDACTED"
PSWD="REDACTED"
# BUNGHOLE : CAM1=REDACTED
CAM1=REDACTED
# CAKEHOLE : CAM2=REDACTED
CAM2=REDACTED
STREAM1=stream1
STREAM2=stream2
WIDE="1024"
# DIMENS="1280x720"
# DIMENS="$WIDEx576"
DIMENS="1152x648"
DIMENS="1024x576"
DIMENS="1280x720"
# OFFSET="85"
OFFSET="0"
QHD="2560x1440"
 
ISRUNNING=$(ps -ef |grep mpv|grep stream|wc -l)
# ISRUNNING=$(ps -ef |grep mpv|grep -i stream2|wc -l)
SIXIXIX=592
PROF="crt-lottes"
# PROF="crt-guest-advanced-ntsc"
# PROF="gba"

cameras () {
## CAMERA 1: 
HORIGIN=$((0+$OFFSET))
/usr/bin/mpv --screen=1 --geometry=$DIMENS+$HORIGIN+$SIXIXIX --mute=yes rtsp://$UZER:$PSWD@$CAM1:554/live/$STREAM1 > /dev/null 2>&1 & disown
# sleep 0
## CAMERA 2: 
HORIGIN=$((0+$OFFSET+$OFFSET+1152))
HORIGIN=$((2560-$WIDE))
/usr/bin/mpv --screen=1 --geometry=$DIMENS+$HORIGIN+$SIXIXIX --mute=yes rtsp://$UZER:$PSWD@$CAM2:554/live/$STREAM1 > /dev/null 2>&1 & disown
}

PIDS2KILL=$(ps -ef |grep mpv |grep stream | awk '{print $2}')
echo $ISRUNNING
if [ $ISRUNNING -gt 0 ] ; then
	kill -9 $PIDS2KILL
	cameras
else
	cameras
fi

I did once have this working on MacOs but no longer - the main difference is the path to the mpv executable…
Because those cameras a bit lousy - I usually run this script several times a day to force refresh the feed… e.g. on Monday morning - it was still showing night time on one camera feed…
I have two 32" QHD monitors on my Pop!_OS desktop - so I redirect the MPV output to a specific monitor…

3 Likes

Hi again, :waving_hand:

thanks a lot for your replies.

@nevj :

Ah, I see. Well, that could be it.
Well, if that is the case they do a pretty lousy job, right?
In the middle of the programme, instead at the end of it.
The last few minutes of a programme is normally taken up by short trailers of future stuff. That would be a better timeslot for things like that.

Besides the chopped audio sound seems awkward. They should switch the audio stream off altogether for the duration of those 2 minutes. :thinking:

O.K., that´s good to know, Neville. Thanks for letting me know.
So I´m not alone with this phenomenon.

Yes. you´re perfectly right. My thoughts as well.
I just wanted to provide every info I had at my disposal.

Thanks again. :heart:

@daniel.m.tripp

Fascinating stuff, Dan. :+1:
You came up with some great scripts.

Many greetings to all from Rosika :slightly_smiling_face:

2 Likes

That sounds a bit strange. There may be another explanation.

2 Likes

Hi Neville, :waving_hand:

yes, it´s a bit strange.
I´ll check it again today, just to make sure that the interruption of the programme indeed happens at the same time each day.

I wonder if it has anything to do with the fact that the website, or rather URL, is hosted in Yerevan. :thinking:
See my post #5.

Does it mean that that the server is running from that location :red_question_mark:

I don´t know enough about the background.

Cheers from Rosika :slightly_smiling_face:

2 Likes

Hi Rosika,
Yes, I think so.
Maybe they stop for prayers in Armenia.
Regards
Neville

2 Likes

Hi Neville, :waving_hand:

thanks for the confirmation.

Seems your suggestion:

is indeed the most probable explanation.
In the meantime I asked ChatGPT if it could make head or tail of it:

What it sounds like:

That behavior is very typical of scheduled switching or maintenance on the provider’s side—i.e., Ucom CJSC, the Armenian ISP hosting the stream. Here are some likely explanations:

1. Scheduled feed switching or maintenance

The color bars and distorted audio are classic signs of a feed dropout or signal switching. Broadcasters often use this kind of placeholder during:

  • Satellite or terrestrial feed realignment
  • Switching between live and recorded content
  • Rebooting or syncing automated systems Since it’s so regular, that points more to automation than a technical fault.

2. Ucom rebroadcasts BBC News via satellite

Ucom might be retransmitting BBC News via satellite, and the satellite feed they pull from may be experiencing a daily reset or realignment window. Some feeds do this daily to avoid drift, particularly if it’s a relay.

You could even be catching the tail end of a local broadcast automation system resetting itself, especially if Ucom is re-encoding or injecting local content at scheduled times (e.g., ads, news cut-ins, or legal ID slates).

3. Time zone and broadcast alignment

It’s also telling that the interruption occurs at 1:45 UTC, which is 5:45 PM Yerevan time. That could easily be a daily switch point or alignment for Ucom’s internal schedules—maybe shifting between bandwidth allocations or mirror feeds.

Since the dropout is almost certainly caused by Ucom’s backend switching process, possibly linked to scheduled maintenance or feed switching, there´s not much I can do about it, except looking for and trying out another BBC stream.

Thanks again, Neville. :heart:

Many greetings from Rosika :slightly_smiling_face:

P.S.:

Yes, that might be another possibility. :wink:

3 Likes

I reckon that’s probably unlikely - given they’re a mostly christian nation (one of the first to become christian) - and they had ~70 years of soviet rule where religion was generally frowned upon or discouraged. I sometimes listen to Armenian tradtional music (downloaded mostly) - I also sometimes listen to heavy “Armenian” music from the band System Of A Down (they’re all Armenian American - like the Kardashians).

Interesting little tidbit (to me anyway) - on The Who’s 1967 album - “The Who Sell Out” - the first song is “Armenia City in the Sky” - which doesn’t make much sense, and Daltrey pronounces it “uhm-enniah” - where as most people would pronounce it “ah-meeniya” or “ar-meeniya”… Not only but also - the songwriter, Speedy Keen, a friend of Pete Townshend - never wrote the song down - he just verballed it - and “Armenia City in the sky” was actually supposed to be “I’m an ear, sitting in the sky…”

Sorry for the tangent on your thread @Rosika :smile:

2 Likes

There are liturgical hours which are observed in some Christian communities.

2 Likes

@daniel.m.tripp :

No problem whatsoever, Dan.
Any content of yours is always appreciated.

Cheers from Rosika :slightly_smiling_face:

2 Likes

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