I've been having problems getting videos with subs to stream. Checking "Definitely disable subs" does what it says but the video will still transcode unnecessarily. There are currently 2 problematic ways to get around this:
1) Use "StreamExtension=" in the renderers configuration file. This interferes with "Supported=" lines thus reducing the benefits of using "MediaInfo=True". This would need to be done for each renderer on the network which supports the video format.
2) Use the "Skip Transcode" option in the PS3MS configuration. This is a global setting and can interfere when using several different renderers simultaneously.
Proposed solution:
1) If "Definitely disable subs" is checked: Modify DLNAResource.getChild() method so that, when deciding if media should be streamed or transcoded, it should skip/fail the subtitle tests. See "Solution Part 1".
2) If "Definitely disable subs" is not checked: Perform the original subtitle test and give an option to stream supported videos from the #Transcode# folder. This option only appears properly on the PS3 (Edit: correction). We would also need to deal with the case when default subtitle = "Off". I might look into this part of the solution but it is not a priority for me... I prefer to disable subs.
Solution Part 1:
Notice that the proposed solution is consistent with statement 4 (line 549 below). "Definitely disable subs" is checked implies that we don't intend to deal with subs.
Original DLNAResource.java, lines 545 - 553:
- Code: Select all
545 // Force transcoding if
546 // 1- MediaInfo support detected the file was not matched with supported codec configs and no SkipTranscode extension forced by user
547 // or 2- ForceTranscode extension forced by user
548 // or 3- FFmpeg support and the file is not ps3 compatible (need to remove this ?) and no SkipTranscode extension forced by user
549 // or 4- There's some sub files or embedded subs to deal with and no SkipTranscode extension forced by user
550 if (forceTranscode || !isSkipTranscode() && (forceTranscodeV2 || (!parserV2 && !child.getExt().ps3compatible()) || (PMS.getConfiguration().getUseSubtitles() && child.isSrtFile()) || hasEmbeddedSubs)) {
551 child.setPlayer(pl);
552 LOGGER.trace("Switching " + child.getName() + " to player: " + pl.toString());
553 }
Subtitles are checked by (from line 550):
- Code: Select all
(PMS.getConfiguration().getUseSubtitles() && child.isSrtFile()) || hasEmbeddedSubs
"Logical AND" the subtitle check statement with !PMS.getConfiguration().isMencoderDisableSubs() to skip/fail the subtitle check when "Definitely disable subs" is checked:
- Code: Select all
550 if (forceTranscode || !isSkipTranscode() && (forceTranscodeV2 || (!parserV2 && !child.getExt().ps3compatible()) || (!PMS.getConfiguration().isMencoderDisableSubs() && ((PMS.getConfiguration().getUseSubtitles() && child.isSrtFile()) || hasEmbeddedSubs)))) {
This partially fixes Stream/Transcode decision logic when dealing with subtitles, and does not affect any of the other decision logic. Part 2 of the solution could potentially complete the fix.
