mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-17 06:23:03 +03:00
Add probe / direct-stream / transcoding support for BluRays
This commit (and ffmpeg built with libbluray support), adds support for playback of bluray images (bd-iso) and bluray folders.
This commit is contained in:
@@ -10,7 +10,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
{
|
||||
public static class EncodingUtils
|
||||
{
|
||||
public static string GetInputArgument(IReadOnlyList<string> inputFiles, MediaProtocol protocol)
|
||||
public static string GetInputArgument(string inputPrefix, IReadOnlyList<string> inputFiles, MediaProtocol protocol)
|
||||
{
|
||||
if (protocol != MediaProtocol.File)
|
||||
{
|
||||
@@ -19,15 +19,16 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
return string.Format(CultureInfo.InvariantCulture, "\"{0}\"", url);
|
||||
}
|
||||
|
||||
return GetConcatInputArgument(inputFiles);
|
||||
return GetConcatInputArgument(inputFiles, inputPrefix);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the concat input argument.
|
||||
/// </summary>
|
||||
/// <param name="inputFiles">The input files.</param>
|
||||
/// <param name="inputPrefix">The input prefix.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
private static string GetConcatInputArgument(IReadOnlyList<string> inputFiles)
|
||||
private static string GetConcatInputArgument(IReadOnlyList<string> inputFiles, string inputPrefix)
|
||||
{
|
||||
// Get all streams
|
||||
// If there's more than one we'll need to use the concat command
|
||||
@@ -39,15 +40,16 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
}
|
||||
|
||||
// Determine the input path for video files
|
||||
return GetFileInputArgument(inputFiles[0]);
|
||||
return GetFileInputArgument(inputFiles[0], inputPrefix);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the file input argument.
|
||||
/// </summary>
|
||||
/// <param name="path">The path.</param>
|
||||
/// <param name="inputPrefix">The path prefix.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
private static string GetFileInputArgument(string path)
|
||||
private static string GetFileInputArgument(string path, string inputPrefix)
|
||||
{
|
||||
if (path.IndexOf("://", StringComparison.Ordinal) != -1)
|
||||
{
|
||||
@@ -57,7 +59,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
// Quotes are valid path characters in linux and they need to be escaped here with a leading \
|
||||
path = NormalizePath(path);
|
||||
|
||||
return string.Format(CultureInfo.InvariantCulture, "file:\"{0}\"", path);
|
||||
return string.Format(CultureInfo.InvariantCulture, "{1}:\"{0}\"", path, inputPrefix);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user