【问题标题】:Create thumbnails tile for time range of video为视频的时间范围创建缩略图图块
【发布时间】:2014-03-14 17:25:29
【问题描述】:

我需要从视频中创建 12 个缩略图,但在开头和结尾跳过 10%。我找到了this 的东西,但它只需要每 1000 帧。在我的情况下,这个范围是可变的,如果它以秒为单位会更好。不知道如何用 ffmpeg 做到这一点,不要用它太多。

【问题讨论】:

    标签: ffmpeg


    【解决方案1】:
    ffmpeg -ss $skip_time -i $input_path -vframes 1 -vf select=isnan(prev_selected_t)+gte(t-prev_selected_t\,$screenshot_time), scale=iw*min($width/iw\,$height/ih):ih*min($width/iw\,$height/ih),pad=($width):($height):($width-iw)/2):($height-ih)/2),tile=3x4 -vcodec mjpeg $output_filename
    

    $skip_time - 从头开始​​跳过的时间 $screenshot_time - 截屏的时间间隔

    这些值应该是预先计算好的,我使用ffprobe 来获取视频时长。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-01-25
      • 2023-03-17
      • 1970-01-01
      • 2011-08-23
      • 2012-02-24
      • 2018-05-15
      • 2011-04-24
      • 1970-01-01
      相关资源
      最近更新 更多