gpt4 book ai didi

ffmpeg 1 多帧图像

转载 作者:行者123 更新时间:2023-12-04 23:26:00 25 4
gpt4 key购买 nike

是否可以使用这种格式的 ffmpeg 创建视频缩略图:

enter image description here

我需要每 10 秒输出一张带有垂直镜头的图像。

我只知道如何用一帧创建一个图像:

 <?php 

$ffmpeg = '/usr/local/bin/ffmpeg';

$video = '1.mp4';

$image = '1.png';

$interval = 1;

$size = '300x210';

$cmd = "$ffmpeg -i $video -deinterlace -an -ss $interval -f mjpeg -t 1 -r 1 -y -s $size $image 2>&1";
$return = `$cmd`;

?>

最佳答案

你可以用一个 ffmpeg命令。

例子

Alone in the Wilderness

ffmpeg -i alone_in_the_wilderness.mp4 -filter_complex \
"select='isnan(prev_selected_t)+gte(t-prev_selected_t\,10)',yadif,scale=240:-1,tile=1x3" \
-vframes 1 -t 30 -q:v 4 strip.jpg

带边框的示例

Example with borders
tile=1x3:margin=10:padding=10

另见
  • select , yadif , scale , tile过滤器文档
  • Combine multiple images to form a strip of images ffmpeg
  • FFmpeg output screenshot gallery
  • 关于ffmpeg 1 多帧图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47705754/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com