Page 1 of 1

vlc started from command line not showing subtitles when streaming HLS from URL

Posted: 26 Jan 2022 15:52
by eddsor
I am trying to migrate from OMXplayer to vlc on a RPI3 without X.
Playing local videos from command line with subtitles is successfully done as

Code: Select all

cvlc video.mp4 --sub-file=subtitles.srt
Streaming a video from a HLS URL without subtitles is also possible:

Code: Select all

cvlc https://nrk-od-79.akamaized.net/world/1302779/0/hls/dnpr63701115/1853524312-1203177498-prog_index.m3u8
However, if I try to the stream the video with subtitles after dovnloading the subtitles file as DNPR63701115.vtt

Code: Select all

cvlc https://nrk-od-79.akamaized.net/world/1302779/0/hls/dnpr63701115/1853524312-1203177498-prog_index.m3u8 --sub-file=DNPR63701115.vtt
the video is displayed without subtitles, and I get the errors

Code: Select all

[61d964c0] main demux error: option sub-original-fps does not exist [5d702568] ts demux error: libdvbpsi error (PSI decoder): TS discontinuity (received 2, expected 1) for PID 0 [5d702568] ts demux error: libdvbpsi error (PSI decoder): TS discontinuity (received 2, expected 1) for PID 32
Playlist: https://nrk-od-79.akamaized.net/world/ ... ylist.m3u8
Subtitles file: https://undertekst.nrk.no/prod/DNPR63/7 ... 701115.vtt

How can I get vlc show the subtitles when streaming a video from a HLS URL?
Is this a well known issue with vlc?

Re: vlc started from command line not showing subtitles when streaming HLS from URL

Posted: 26 Jan 2022 17:13
by Rémi Denis-Courmont
Subtitles need to be embedded in the HLS stream, AFAIK. Otherwise, time bases are different, so synchronisation will not work.

Re: vlc started from command line not showing subtitles when streaming HLS from URL

Posted: 26 Jan 2022 20:20
by eddsor
I have now discovered that if I open the m3u8 file in hlsplayer.net, the video plays vith subtitles. I think that means that the HLS stream has embedded subtitles.
What can I do to get VLC show the embedded subtitles in the HLS stream?

Re: vlc started from command line not showing subtitles when streaming HLS from URL

Posted: 26 Jan 2022 20:33
by Rémi Denis-Courmont
Select the subtitle track you want?

Re: vlc started from command line not showing subtitles when streaming HLS from URL

Posted: 26 Jan 2022 22:36
by eddsor
--sub-track=0 or 1 makes no difference. There is only one sub-track (norwegian).
The m3u8 file has an item SUBTITLES="100wvtt.vtt". Does anybody know what that means?

I also have found that VLC for Windows desktop has exactly the same problem. The HLS video plays, but no subtitles.

Re: vlc started from command line not showing subtitles when streaming HLS from URL

Posted: 01 Feb 2022 15:32
by daniellemill
I have a similar problem too(((( Is there only this solution to this problem? Are there any other options?

Re: vlc started from command line not showing subtitles when streaming HLS from URL

Posted: 01 Feb 2022 18:37
by unidan
I don't see a SUBTITLES line in the m3u8 and I don't see any subtitle tracks in the PMT:

Code: Select all

[00007efe80001580] ts demux debug: PATCallBack called [00007efe80001580] ts demux debug: new PAT ts_id=1 version=1 current_next=1 [00007efe80001580] ts demux debug: * number=1 pid=32 [00007efe80001580] ts demux debug: temporary receiving program 1 [00007efe80001580] ts demux debug: PMTCallBack called for program 1 [00007efe80001580] ts demux debug: new PMT program number=1 version=1 pid_pcr=33 [00007efe80001580] ts demux debug: * pid=33 type=0x1b AVC video stream as defined in ITU-T Rec. H.264 [00007efe80001580] ts demux debug: => pid 33 has now es fcc=h264 [00007efe80001580] ts demux debug: Default program is 1 [00007efe80001580] ts demux debug: * pid=34 type=0xf ISO/IEC 13818-7 Audio with ADTS transport [00007efe80001580] ts demux debug: - SL/FMC descriptor not found/matched [00007efe80001580] ts demux debug: => pid 34 has now es fcc=mp4a [00007efe80001580] ts demux debug: * pid=17 listening for SDT [00007efe80001580] ts demux debug: enabling pid 33 from program 1 [00007efe80001580] ts demux debug: enabling pid 34 from program 1 [00007efe80001580] ts demux debug: enabling pcr pid 33 from program 1
Do you have such sample somewhere?

Re: vlc started from command line not showing subtitles when streaming HLS from URL

Posted: 02 Feb 2022 20:37
by eddsor
The playlist I refered to is https://nrk-od-79.akamaized.net/world/1 ... ylist.m3u8
As I have written above, hlsplayer.net can play the wideo with subtitles in norwegian, but not vlc.

Re: vlc started from command line not showing subtitles when streaming HLS from URL

Posted: 11 Mar 2024 07:18
by zhshs
Has this problem been solved?

Re: vlc started from command line not showing subtitles when streaming HLS from URL

Posted: 13 Oct 2024 14:15
by eddsor
In VLC 3.0.21 this is not longer a problem.