Skip to content

SubtitleDecoderException appears to prevent the video from starting #6885

@casolorz

Description

@casolorz

I'm using ExoPlayer 2.10.8. When I set a bad subtitle, playback fails. Is there a way to make subtitles not do that? Exception below.

Also, is it possible to set subtitles on the fly without restarting the player?

Thanks.

E/ExoPlayerImplInternal: Playback error.
    com.google.android.exoplayer2.ExoPlaybackException: com.google.android.exoplayer2.text.SubtitleDecoderException: com.google.android.exoplayer2.ParserException: Expected WEBVTT. Got   <!DOCTYPE html>
        at com.google.android.exoplayer2.text.TextRenderer.render(TextRenderer.java:171)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:575)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:326)
        at android.os.Handler.dispatchMessage(Handler.java:98)
        at android.os.Looper.loop(Looper.java:154)
        at android.os.HandlerThread.run(HandlerThread.java:61)
     Caused by: com.google.android.exoplayer2.text.SubtitleDecoderException: com.google.android.exoplayer2.ParserException: Expected WEBVTT. Got   <!DOCTYPE html>
        at com.google.android.exoplayer2.text.webvtt.WebvttDecoder.decode(WebvttDecoder.java:69)
        at com.google.android.exoplayer2.text.webvtt.WebvttDecoder.decode(WebvttDecoder.java:31)
        at com.google.android.exoplayer2.text.SimpleSubtitleDecoder.decode(SimpleSubtitleDecoder.java:78)
        at com.google.android.exoplayer2.text.SimpleSubtitleDecoder.decode(SimpleSubtitleDecoder.java:26)
        at com.google.android.exoplayer2.decoder.SimpleDecoder.decode(SimpleDecoder.java:224)
        at com.google.android.exoplayer2.decoder.SimpleDecoder.run(SimpleDecoder.java:189)
        at com.google.android.exoplayer2.decoder.SimpleDecoder.access$000(SimpleDecoder.java:25)
        at com.google.android.exoplayer2.decoder.SimpleDecoder$1.run(SimpleDecoder.java:67)
     Caused by: com.google.android.exoplayer2.ParserException: Expected WEBVTT. Got   <!DOCTYPE html>
        at com.google.android.exoplayer2.text.webvtt.WebvttParserUtil.validateWebvttHeaderLine(WebvttParserUtil.java:44)
        at com.google.android.exoplayer2.text.webvtt.WebvttDecoder.decode(WebvttDecoder.java:67)
        at com.google.android.exoplayer2.text.webvtt.WebvttDecoder.decode(WebvttDecoder.java:31) 
        at com.google.android.exoplayer2.text.SimpleSubtitleDecoder.decode(SimpleSubtitleDecoder.java:78) 
        at com.google.android.exoplayer2.text.SimpleSubtitleDecoder.decode(SimpleSubtitleDecoder.java:26) 
        at com.google.android.exoplayer2.decoder.SimpleDecoder.decode(SimpleDecoder.java:224) 
        at com.google.android.exoplayer2.decoder.SimpleDecoder.run(SimpleDecoder.java:189) 
        at com.google.android.exoplayer2.decoder.SimpleDecoder.access$000(SimpleDecoder.java:25) 
        at com.google.android.exoplayer2.decoder.SimpleDecoder$1.run(SimpleDecoder.java:67) 

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions