VLC Web Plugin: Teletext Subtitles crash
Posted: 23 Sep 2014 01:15
Hi,
I'm using the vlc web plugin to play transport streams as files. The files contain Teletext Subtitles. I have the following workaround for displaying subtitles:
After playing the file I wait until vlc.input.state changes to 3 (PLAYING)
At that point I select the subtitles:
vlc.subtitle.track = 1 (or vlc.input.state = vlc.subtitle.count - 1)
Note: From vlc 2.0.8 this has changed to:
vlc.subtitle.track = 3005 (the subtitle PID in the files)
In my case I know the subtitle PID. This defect is still present in 2.1.5 and is listed here: https://trac.videolan.org/vlc/ticket/9715
For Teletext Subtitles this does not yet display anything. I'm not sure why this would be (at least in <= 2.0.5) - I had expected that it react the same as the stand alone version and the selection of the track would display the subtitles.
I need the additional step:
vlc.video.teletext = 801; (the teletext page where subtitles appear)
The last step causes the vlc plugin to crash if done too soon. It seems some internal state is not initialised.
I can set this to any teletext page number to cause the crash.
My code waits about 1/2 a second after setting vlc.subtitle.track in order to avoid the crash. After that I can select any page without crash (even those that don't exist)
Here is a short sample file: https://www.dropbox.com/s/qvo38qw8uw22z ... ST.ts?dl=1
The workaround suits me fine, I still see a rare crash, but not enough to annoy me. I'm sure if I wait longer the issue would not be present.
I'm using the vlc web plugin to play transport streams as files. The files contain Teletext Subtitles. I have the following workaround for displaying subtitles:
After playing the file I wait until vlc.input.state changes to 3 (PLAYING)
At that point I select the subtitles:
vlc.subtitle.track = 1 (or vlc.input.state = vlc.subtitle.count - 1)
Note: From vlc 2.0.8 this has changed to:
vlc.subtitle.track = 3005 (the subtitle PID in the files)
In my case I know the subtitle PID. This defect is still present in 2.1.5 and is listed here: https://trac.videolan.org/vlc/ticket/9715
For Teletext Subtitles this does not yet display anything. I'm not sure why this would be (at least in <= 2.0.5) - I had expected that it react the same as the stand alone version and the selection of the track would display the subtitles.
I need the additional step:
vlc.video.teletext = 801; (the teletext page where subtitles appear)
The last step causes the vlc plugin to crash if done too soon. It seems some internal state is not initialised.
I can set this to any teletext page number to cause the crash.
My code waits about 1/2 a second after setting vlc.subtitle.track in order to avoid the crash. After that I can select any page without crash (even those that don't exist)
Here is a short sample file: https://www.dropbox.com/s/qvo38qw8uw22z ... ST.ts?dl=1
The workaround suits me fine, I still see a rare crash, but not enough to annoy me. I'm sure if I wait longer the issue would not be present.