How to start in 1280x720 resolution when playing a HLS stream

*nix specific usage questions
eddsor
Blank Cone
Blank Cone
Posts: 12
Joined: 23 Jan 2022 20:20

How to start in 1280x720 resolution when playing a HLS stream

Postby eddsor » 16 Oct 2024 21:01

I am using VLC 3.0.21 Vetinari from command line without X on a RPI3B+.

Code: Select all

cvlc https://nrk-od2.telenorcdn.net/open/ps/dnpr/dnpr63701115/d0bc193d-1.smil/index.m3u8
starts the video in low resolution. After a short time, the display goes black before the video continues in 1280x720 resolution.
The audio is correct from the beginning.

The content of the m3u8 file is:

Code: Select all

#EXTM3U #EXT-X-VERSION:4 #EXT-X-INDEPENDENT-SEGMENTS # AUDIO groups #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aud1",LANGUAGE="un",NAME="Unknown",CHANNELS="2",AUTOSELECT=YES,DEFAULT=YES,URI="sc-gaFEAQ/a0_index.m3u8" # SUBTITLES groups #EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="sub1",LANGUAGE="no",NAME="Norsk",AUTOSELECT=YES,DEFAULT=YES,URI="sc-gaFEAQ/s0_index.m3u8" # Variants #EXT-X-STREAM-INF:BANDWIDTH=383136,AVERAGE-BANDWIDTH=272510,CODECS="avc1.42c00c,mp4a.40.2",RESOLUTION=320x180,FRAME-RATE=25.000,AUDIO="aud1",SUBTITLES="sub1" sc-gaFEAQ/v0_index.m3u8 #EXT-X-STREAM-INF:BANDWIDTH=689856,AVERAGE-BANDWIDTH=446361,CODECS="avc1.42c015,mp4a.40.2",RESOLUTION=480x270,FRAME-RATE=25.000,AUDIO="aud1",SUBTITLES="sub1" sc-gaFEAQ/v1_index.m3u8 #EXT-X-STREAM-INF:BANDWIDTH=1147520,AVERAGE-BANDWIDTH=689816,CODECS="avc1.4d401e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=25.000,AUDIO="aud1",SUBTITLES="sub1" sc-gaFEAQ/v2_index.m3u8 #EXT-X-STREAM-INF:BANDWIDTH=2380368,AVERAGE-BANDWIDTH=1387251,CODECS="avc1.4d401f,mp4a.40.2",RESOLUTION=960x540,FRAME-RATE=25.000,AUDIO="aud1",SUBTITLES="sub1" sc-gaFEAQ/v3_index.m3u8 #EXT-X-STREAM-INF:BANDWIDTH=3912392,AVERAGE-BANDWIDTH=2362153,CODECS="avc1.64001f,mp4a.40.2",RESOLUTION=1280x720,FRAME-RATE=25.000,AUDIO="aud1",SUBTITLES="sub1" sc-gaFEAQ/v4_index.m3u8

However,

Code: Select all

cvlc https://nrk-od2.telenorcdn.net/open/ps/dnpr/dnpr63701115/d0bc193d-1.smil/sc-gaFEAQ/v4_index.m3u8
starts the video in 1280x720 resolution, but no audio.

This can partly be solved by starting two instances of VLC:

Code: Select all

cvlc https://nrk-od2.telenorcdn.net/open/ps/dnpr/dnpr63701115/d0bc193d-1.smil/sc-gaFEAQ/v4_index.m3u8 --control netsync --netsync-master & cvlc https://nrk-od2.telenorcdn.net/open/ps/dnpr/dnpr63701115/d0bc193d-1.smil/sc-gaFEAQ/a0_index.m3u8 --control netsync --netsync-master-ip 127.0.0.1
Jumping forward or backward in the video in this case gives an audio out of sync.

I hope anybody can tell me how to solve the problem by starting only one instance of VLC.

eddsor
Blank Cone
Blank Cone
Posts: 12
Joined: 23 Jan 2022 20:20

Re: How to start in 1280x720 resolution when playing a HLS stream

Postby eddsor » 08 Nov 2024 22:43

Now I see that starting two instances of CVLC as shown above, is a good solution. There is usually no sync problems when jumping forward or backward in the video.


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 12 guests