mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 19:37:55 +02:00
commit
6f1a300bde
2 changed files with 31 additions and 25 deletions
|
@ -155,6 +155,8 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
|||
var durationParam = " -t " + _mediaEncoder.GetTimeParameter(duration.Ticks);
|
||||
var inputModifiers = "-fflags +genpts -async 1 -vsync -1";
|
||||
var mapArgs = string.Equals(OutputFormat, "mkv", StringComparison.OrdinalIgnoreCase) ? "-map 0" : "-sn";
|
||||
// temporary
|
||||
mapArgs = "-sn";
|
||||
var commandLineArgs = "-i \"{0}\"{4} " + mapArgs + " {2} -map_metadata -1 -threads 0 {3} -y \"{1}\"";
|
||||
|
||||
long startTimeTicks = 0;
|
||||
|
|
|
@ -159,6 +159,10 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
{
|
||||
return "matroska";
|
||||
}
|
||||
if (string.Equals(container, "ts", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return "mpegts";
|
||||
}
|
||||
|
||||
return container;
|
||||
}
|
||||
|
@ -1482,33 +1486,33 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
//inputModifier += " -noaccurate_seek";
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(state.InputContainer))
|
||||
{
|
||||
var inputFormat = GetInputFormat(state.InputContainer);
|
||||
if (!string.IsNullOrWhiteSpace(inputFormat))
|
||||
{
|
||||
inputModifier += " -f " + inputFormat;
|
||||
}
|
||||
}
|
||||
//if (!string.IsNullOrWhiteSpace(state.InputContainer))
|
||||
//{
|
||||
// var inputFormat = GetInputFormat(state.InputContainer);
|
||||
// if (!string.IsNullOrWhiteSpace(inputFormat))
|
||||
// {
|
||||
// inputModifier += " -f " + inputFormat;
|
||||
// }
|
||||
//}
|
||||
|
||||
if (state.RunTimeTicks.HasValue)
|
||||
{
|
||||
foreach (var stream in state.MediaSource.MediaStreams)
|
||||
{
|
||||
if (!stream.IsExternal && stream.Type != MediaStreamType.Subtitle)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(stream.Codec) && stream.Index != -1)
|
||||
{
|
||||
var decoder = GetDecoderFromCodec(stream.Codec);
|
||||
//if (state.RunTimeTicks.HasValue)
|
||||
//{
|
||||
// foreach (var stream in state.MediaSource.MediaStreams)
|
||||
// {
|
||||
// if (!stream.IsExternal && stream.Type != MediaStreamType.Subtitle)
|
||||
// {
|
||||
// if (!string.IsNullOrWhiteSpace(stream.Codec) && stream.Index != -1)
|
||||
// {
|
||||
// var decoder = GetDecoderFromCodec(stream.Codec);
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(decoder))
|
||||
{
|
||||
inputModifier += " -codec:" + stream.Index.ToString(_usCulture) + " " + decoder;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (!string.IsNullOrWhiteSpace(decoder))
|
||||
// {
|
||||
// inputModifier += " -codec:" + stream.Index.ToString(_usCulture) + " " + decoder;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
return inputModifier;
|
||||
|
|
Loading…
Reference in a new issue