mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 03:26:07 +02:00
use probe size for image extraction
This commit is contained in:
parent
8d7aa644a7
commit
51bc4edbb0
1 changed files with 7 additions and 1 deletions
|
@ -727,10 +727,16 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder
|
||||||
throw new ArgumentNullException("outputPath");
|
throw new ArgumentNullException("outputPath");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var args = type != InputType.Dvd ? string.Format("-i {0} -threads 0 -v quiet -vframes 1 -filter:v select=\\'eq(pict_type\\,I)\\' -f image2 \"{1}\"", inputPath, outputPath) :
|
var args = type != InputType.Dvd ? string.Format("-i {0} -threads 0 -v quiet -vframes 1 -filter:v select=\\'eq(pict_type\\,I)\\' -f image2 \"{1}\"", inputPath, outputPath) :
|
||||||
string.Format("-i {0} -threads 0 -v quiet -vframes 1 -f image2 \"{1}\"", inputPath, outputPath);
|
string.Format("-i {0} -threads 0 -v quiet -vframes 1 -f image2 \"{1}\"", inputPath, outputPath);
|
||||||
|
|
||||||
|
var probeSize = GetProbeSizeArgument(type);
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(probeSize))
|
||||||
|
{
|
||||||
|
args = probeSize + " " + args;
|
||||||
|
}
|
||||||
|
|
||||||
if (offset.HasValue)
|
if (offset.HasValue)
|
||||||
{
|
{
|
||||||
args = string.Format("-ss {0} ", Convert.ToInt32(offset.Value.TotalSeconds)) + args;
|
args = string.Format("-ss {0} ", Convert.ToInt32(offset.Value.TotalSeconds)) + args;
|
||||||
|
|
Loading…
Reference in a new issue