Iina: 如果可能,可不可以增加制作视频缩略图的功能?

Created on 10 Mar 2018  ·  3Comments  ·  Source: iina/iina

可以可以增加之所视频缩略图的功能呢?有时候需要做缩略图,就是那种4x4格子总共从影片前到后截图16次的那种图?

System and IINA version:

  • macOS 10.13.2
  • IINA 0.0.15
question

Most helpful comment

我不认为这种功能是播放器应该做的,你完全可以通过其他简单的工具组合完成这一目的,比如:

#! /bin/bash

duration=$(ffprobe -i "$1" -select_streams v:0 -show_entries stream=duration -v quiet -of csv | cut -f2 -d, | cut -f1 -d.)
destination=$(mktemp -d)

for i in {1..15}; do
    time=$((i * duration / 16))
    ffmpeg -ss $time -skip_frame nokey -i "$1" -vsync 0 -vframes 1 -vf scale=iw/2:ih/2 -c:v mjpeg -v quiet $destination/thumb_$i.jpg
done

montage $destination/*.jpg -geometry +2+2 thumbs.jpg
rm -r $destination

Output:
thumbs

All 3 comments

对啊,强烈建议增加,类似这种的,这是在 win 平台上用 potplayer 生成的。

一看就是nga的

我不认为这种功能是播放器应该做的,你完全可以通过其他简单的工具组合完成这一目的,比如:

#! /bin/bash

duration=$(ffprobe -i "$1" -select_streams v:0 -show_entries stream=duration -v quiet -of csv | cut -f2 -d, | cut -f1 -d.)
destination=$(mktemp -d)

for i in {1..15}; do
    time=$((i * duration / 16))
    ffmpeg -ss $time -skip_frame nokey -i "$1" -vsync 0 -vframes 1 -vf scale=iw/2:ih/2 -c:v mjpeg -v quiet $destination/thumb_$i.jpg
done

montage $destination/*.jpg -geometry +2+2 thumbs.jpg
rm -r $destination

Output:
thumbs

Was this page helpful?
0 / 5 - 0 ratings