ffmpeg : how to determine frame rate automatically?
问题 I use this simple script to convert video to images using ffmpeg , but frame rate is fixed, how can I determine it automatically? FRAME_RATE="30" SEPARATOR='/' VIDEO_PATH=$1 VIDEO_BASE_DIR=`dirname $1` FRAMES_DIR=$VIDEO_BASE_DIR$SEPARATOR"Frames" rm -rf $FRAMES_DIR mkdir $FRAMES_DIR #Convert video to images ./ffmpeg -r $FRAME_RATE -i $VIDEO_PATH $FRAMES_DIR$SEPARATOR"image%d.png" UPDATE: By ffprobe I checked that my 1st video frame rate is 30. Also results are the same (339 frames are