fix merge conflict
This commit is contained in:
parent
e8010955dc
commit
7c7f05e6e2
|
@ -97,22 +97,6 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
FFMpegPath = ffMpegPath;
|
||||
}
|
||||
|
||||
public void SetAvailableEncoders(List<string> list)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private List<string> _decoders = new List<string>();
|
||||
public void SetAvailableDecoders(List<string> list)
|
||||
{
|
||||
_decoders = list.ToList();
|
||||
}
|
||||
|
||||
public bool SupportsDecoder(string decoder)
|
||||
{
|
||||
return _decoders.Contains(decoder, StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the encoder path.
|
||||
/// </summary>
|
||||
|
@ -346,7 +330,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
EnableRaisingEvents = true
|
||||
};
|
||||
|
||||
_logger.Info("{0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments);
|
||||
_logger.Debug("{0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments);
|
||||
|
||||
using (process)
|
||||
{
|
||||
|
@ -372,7 +356,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
|
||||
process.WaitForExit();
|
||||
|
||||
_logger.Info("Keyframe extraction took {0} seconds", (DateTime.UtcNow - start).TotalSeconds);
|
||||
_logger.Debug("Keyframe extraction took {0} seconds", (DateTime.UtcNow - start).TotalSeconds);
|
||||
//_logger.Debug("Found keyframes {0}", string.Join(",", lines.ToArray()));
|
||||
return lines;
|
||||
}
|
||||
|
@ -499,6 +483,9 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: Output in webp for smaller sizes
|
||||
// -f image2 -f webp
|
||||
|
||||
// Use ffmpeg to sample 100 (we can drop this if required using thumbnail=50 for 50 frames) frames and pick the best thumbnail. Have a fall back just in case.
|
||||
var args = useIFrame ? string.Format("-i {0} -threads 1 -v quiet -vframes 1 -vf \"{2},thumbnail=30\" -f image2 \"{1}\"", inputPath, "-", vf) :
|
||||
string.Format("-i {0} -threads 1 -v quiet -vframes 1 -vf \"{2}\" -f image2 \"{1}\"", inputPath, "-", vf);
|
||||
|
@ -618,7 +605,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
vf += string.Format(",scale=min(iw\\,{0}):trunc(ow/dar/2)*2", maxWidthParam);
|
||||
}
|
||||
|
||||
FileSystem.CreateDirectory(targetDirectory);
|
||||
Directory.CreateDirectory(targetDirectory);
|
||||
var outputPath = Path.Combine(targetDirectory, filenamePrefix + "%05d.jpg");
|
||||
|
||||
var args = string.Format("-i {0} -threads 1 -v quiet -vf \"{2}\" -f image2 \"{1}\"", inputArgument, outputPath, vf);
|
||||
|
|
Loading…
Reference in New Issue
Block a user