Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/jellyfin/commit/9230472056ea92a54a3f47bcb10142310ae0200e
You should set ROOT_URL correctly, otherwise the web may not work correctly.
3 changed files with
23 additions and
5 deletions
@ -458,8 +458,6 @@ public class VideosController : BaseJellyfinApiController
return BadRequest ( $"Input protocol {state.InputProtocol} cannot be streamed statically" ) ;
}
var outputPath = state . OutputFilePath ;
// Static stream
if ( @static . HasValue & & @static . Value & & ! ( state . MediaSource . VideoType = = VideoType . BluRay | | state . MediaSource . VideoType = = VideoType . Dvd ) )
{
@ -478,7 +476,7 @@ public class VideosController : BaseJellyfinApiController
// Need to start ffmpeg (because media can't be returned directly)
var encodingOptions = _serverConfigurationManager . GetEncodingOptions ( ) ;
var ffmpegCommandLineArguments = _encodingHelper . GetProgressiveVideoFullCommandLine ( state , encodingOptions , outputPath , "superfast" ) ;
var ffmpegCommandLineArguments = _encodingHelper . GetProgressiveVideoFullCommandLine ( state , encodingOptions , "superfast" ) ;
return await FileStreamResponseHelpers . GetTranscodedFile (
state ,
isHeadRequest ,
@ -225,7 +225,7 @@ public static class StreamingHelpers
var ext = string . IsNullOrWhiteSpace ( state . OutputContainer )
? GetOutputFileExtension ( state , mediaSource )
: ( "." + state. OutputContainer ) ;
: ( "." + GetContainerFileExtension( state. OutputContainer ) ) ;
state . OutputFilePath = GetOutputFilePath ( state , ext , serverConfigurationManager , streamingRequest . DeviceId , streamingRequest . PlaySessionId ) ;
@ -559,4 +559,23 @@ public static class StreamingHelpers
}
}
}
/// <summary>
/// Parses the container into its file extension.
/// </summary>
/// <param name="container">The container.</param>
private static string? GetContainerFileExtension ( string? container )
{
if ( string . Equals ( container , "mpegts" , StringComparison . OrdinalIgnoreCase ) )
{
return "ts" ;
}
if ( string . Equals ( container , "matroska" , StringComparison . OrdinalIgnoreCase ) )
{
return "mkv" ;
}
return container ;
}
}
@ -6541,13 +6541,14 @@ namespace MediaBrowser.Controller.MediaEncoding
return " -codec:s:0 " + codec + " -disposition:s:0 default" ;
}
public string GetProgressiveVideoFullCommandLine ( EncodingJobInfo state , EncodingOptions encodingOptions , string outputPath, string defaultPreset)
public string GetProgressiveVideoFullCommandLine ( EncodingJobInfo state , EncodingOptions encodingOptions , string defaultPreset)
{
// Get the output codec name
var videoCodec = GetVideoEncoder ( state , encodingOptions ) ;
var format = string . Empty ;
var keyFrame = string . Empty ;
var outputPath = state . OutputFilePath ;
if ( Path . GetExtension ( outputPath . AsSpan ( ) ) . Equals ( ".mp4" , StringComparison . OrdinalIgnoreCase )
& & state . BaseRequest . Context = = EncodingContext . Streaming )