sh 从电影#macosx #ffmpeg中提取图像

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 从电影#macosx #ffmpeg中提取图像相关的知识,希望对你有一定的参考价值。

#this script extracts frames for all movies (.mov) in the current folder. 
# one image per frame per second saved to disk

for MOVIE in *.mov
do
  if [ -f "$MOVIE" ]; then
    FILENAME="${MOVIE%.*}"
    echo $FILENAME
    if [ ! -d "$FILENAME" ]; then
      mkdir "$FILENAME"
    fi

    cd "$FILENAME"
    
    #modify fps if you want to extract more than one frame per second
    ffmpeg -i ../$MOVIE -vf fps=1 $FILENAME"_"%05d.png
    cd ..
  fi
done

以上是关于sh 从电影#macosx #ffmpeg中提取图像的主要内容,如果未能解决你的问题,请参考以下文章