Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playback of file crashes when loading external SRT file #467

Open
jvl711 opened this issue Dec 17, 2021 · 3 comments
Open

Playback of file crashes when loading external SRT file #467

jvl711 opened this issue Dec 17, 2021 · 3 comments

Comments

@jvl711
Copy link
Contributor

jvl711 commented Dec 17, 2021

I think the important part of the log is below. There may have been a problem with the subtitle file. I think it would be a good idea to see if SageTV can handle this failure a little more cleanly.

Fri` 12/17 8:49:19.498 [VideoFrame-4a414f44444a@a55ffe2] openURL0(stv://192.168.0.5/\\brazil\movies\Christmas Story, A (1983)\A Christmas Story_1983_1080p_H264.mkv)
Fri 12/17 8:49:19.499 [VideoFrame-4a414f44444a@a55ffe2] Sigma video dim=java.awt.Dimension[width=720,height=480]
Fri 12/17 8:49:19.499 [VideoFrame-4a414f44444a@a55ffe2] setMute0()
Fri 12/17 8:49:19.501 [VideoFrame-4a414f44444a@a55ffe2] getDuration : 0
Fri 12/17 8:49:19.501 [VideoFrame-4a414f44444a@a55ffe2] VideoFrame.timeSelected2(Fri 11/16 10:40:58.807, true) currFile=MediaFile[id=55562695 A[56516593,55562696,"A Christmas Story",[email protected]:40,93,V] mask=V host=sagetv encodedBy= format=MATROSKA 1:33:23 12183 kbps [#0 Video[H.264 23.975986 fps 1904x1080 238:135 progressive id=0]#1 Audio[AC3 48000 Hz 1 channels 192 kbps idx=1 id=0 eng]#2 Subpic[SRT id=0 eng]#3 Subpic[SRT id=0 por]#4 Subpic[SRT id=0 spa]#5 Subpic[SRT path=\\brazil\movies\Christmas Story, A (1983)\A Christmas Story_1983_1080p_H264.srt]{MediaType=Movie, metadata.tmdb.id=850, metadata.lastupdated=1615213050195}] \\brazil\movies\Christmas Story, A (1983)\A Christmas Story_1983_1080p_H264.mkv, Seg0[Fri 11/16 10:40:58.807-Fri 11/16 12:14:21.847]] realDur=0
Fri 12/17 8:49:19.501 [VideoFrame-4a414f44444a@a55ffe2] playPush0()
Fri 12/17 8:49:19.503 [VideoFrame-4a414f44444a@a55ffe2] Channel Change Time=1639748959503 NOTE: Not valid if this was not a direct channel change!
Fri 12/17 8:49:19.503 [VideoFrame-4a414f44444a@a55ffe2] VIDEO FRAME EXCEPTION THROWN:java.lang.NullPointerException
Fri 12/17 8:49:19.504 [VideoFrame-4a414f44444a@a55ffe2] java.lang.NullPointerException
Fri 12/17 8:49:19.504 [VideoFrame-4a414f44444a@a55ffe2] java.io.File.<init>(Unknown Source)
Fri 12/17 8:49:19.504 [VideoFrame-4a414f44444a@a55ffe2] sage.media.sub.SRTSubtitleHandler.loadSubtitlesFromFiles(SRTSubtitleHandler.java:248)
Fri 12/17 8:49:19.504 [VideoFrame-4a414f44444a@a55ffe2] sage.media.sub.SRTSubtitleHandler.loadSubtitlesFromFiles(SRTSubtitleHandler.java:131)
Fri 12/17 8:49:19.504 [VideoFrame-4a414f44444a@a55ffe2] sage.media.sub.SubtitleHandler.createSubtitleHandler(SubtitleHandler.java:372)
Fri 12/17 8:49:19.504 [VideoFrame-4a414f44444a@a55ffe2] sage.VideoFrame.processJob(VideoFrame.java:2516)
Fri 12/17 8:49:19.504 [VideoFrame-4a414f44444a@a55ffe2] sage.VideoFrame.run(VideoFrame.java:1614)
Fri 12/17 8:49:19.504 [VideoFrame-4a414f44444a@a55ffe2] sage.Pooler$PooledThread.run(Pooler.java:254)
@Narflex
Copy link
Member

Narflex commented Dec 17, 2021

It looks like there may be a mix of internal SRT tracks and external SRT files...which if I recall, probably isn't supported. Get rid of the external subtitle file, rescan, and then try again to see if it works.

@jvl711
Copy link
Contributor Author

jvl711 commented Dec 17, 2021

@Narflex

You were correct. I renamed the external .srt file and the error went away. Is there something here I could fix?

Thanks,
Josh

@Narflex
Copy link
Member

Narflex commented Dec 17, 2021

I don't think there's an easy solution at all. You can likely make the crash less of a problem by having this catch Exception rather than IOException: https://github.com/google/sagetv/blob/master/java/sage/media/sub/SRTSubtitleHandler.java#L419

But then subtitles likely won't work with that file. I do recall this being a design decision at some point...subs had to be either external or internal for a file, not both. Although maybe for different sub formats, then they can be either external or internal possibly. I don't really remember anymore. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants