Use FFmpeg concat for DVD and BD folder playback

This commit is contained in:
Shadowghost
2023-02-04 00:08:51 +01:00
parent ddfdec7f46
commit edf3909157
4 changed files with 64 additions and 2 deletions

View File

@@ -941,8 +941,18 @@ namespace MediaBrowser.Controller.MediaEncoding
arg.Append(canvasArgs);
}
arg.Append(" -i ")
.Append(GetInputPathArgument(state));
if (state.MediaSource.VideoType == VideoType.Dvd || state.MediaSource.VideoType == VideoType.BluRay)
{
var tmpConcatPath = options.TranscodingTempPath + "/" + state.MediaSource.Id + ".concat";
_mediaEncoder.GenerateConcatConfig(state.MediaSource, tmpConcatPath);
arg.Append(" -f concat -safe 0 ");
arg.Append(" -i " + tmpConcatPath + " ");
}
else
{
arg.Append(" -i ")
.Append(GetInputPathArgument(state));
}
// sub2video for external graphical subtitles
if (state.SubtitleStream is not null