mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-07 10:14:14 -04:00
Merge pull request #4751 from nyanmisaka/mpegts-batchsize
(cherry picked from commit 9e601ba7317bd8948072ef1a60a7001b33b507a5) Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
parent
26993e39f7
commit
b32f15ab1e
@ -603,16 +603,19 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
}
|
||||
|
||||
// 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.
|
||||
// mpegts need larger batch size otherwise the corrupted thumbnail will be created. Larger batch size will lower the processing speed.
|
||||
var enableThumbnail = useIFrame && !string.Equals("wtv", container, StringComparison.OrdinalIgnoreCase);
|
||||
if (enableThumbnail)
|
||||
{
|
||||
var useLargerBatchSize = string.Equals("mpegts", container, StringComparison.OrdinalIgnoreCase);
|
||||
var batchSize = useLargerBatchSize ? "50" : "24";
|
||||
if (string.IsNullOrEmpty(vf))
|
||||
{
|
||||
vf = "-vf thumbnail=24";
|
||||
vf = "-vf thumbnail=" + batchSize;
|
||||
}
|
||||
else
|
||||
{
|
||||
vf += ",thumbnail=24";
|
||||
vf += ",thumbnail=" + batchSize;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user