diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-03-26 00:22:30 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-03-26 00:22:30 -0400 |
| commit | 690ab4a2dc5f0e26e2133d42c78838e8fd1b7e97 (patch) | |
| tree | 665faaf832accf58679807be3e1674c4c2c2128f | |
| parent | e6178a65f949cfdcbe6e77c945250343506f80cc (diff) | |
update recording mp4 args
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs index 0567bdfd9..6cc5b6920 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs @@ -163,7 +163,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV var durationParam = " -t " + _mediaEncoder.GetTimeParameter(duration.Ticks); var inputModifiers = "-fflags +genpts -async 1 -vsync -1"; - var commandLineArgs = "-i \"{0}\"{5} {2} -map_metadata -1 -threads 0 {3}{4} -y \"{1}\""; + var commandLineArgs = "-i \"{0}\"{5} {2} -map_metadata -1 -threads 0 {3}{4}{6} -y \"{1}\""; long startTimeTicks = 0; //if (mediaSource.DateLiveStreamOpened.HasValue) @@ -193,7 +193,11 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV var subtitleArgs = CopySubtitles ? " -codec:s copy" : " -sn"; - commandLineArgs = string.Format(commandLineArgs, inputTempFile, targetFile, videoArgs, GetAudioArgs(mediaSource), subtitleArgs, durationParam); + var outputParam = string.Equals(Path.GetExtension(targetFile), ".mp4", StringComparison.OrdinalIgnoreCase) ? + " -f mp4 -movflags frag_keyframe+empty_moov" : + string.Empty; + + commandLineArgs = string.Format(commandLineArgs, inputTempFile, targetFile, videoArgs, GetAudioArgs(mediaSource), subtitleArgs, durationParam, outputParam); return inputModifiers + " " + commandLineArgs; } |
