- TMP=.
- SRC=countdown.mp4
- DST=output.mp4
- FREEZE_S=10
- cd "$TMP"
- FRAMERATE=$(ffprobe -v 0 -of csv=p=0 -select_streams 0 -show_entries stream=r_frame_rate "$SRC")
- ffmpeg -i "$SRC" -vf "select='eq(n,364)'" -vframes 1 LAST_FRAME.PNG
- ffmpeg -loop 1 -framerate 1 -i LAST_FRAME.png -r "$FRAMERATE" -t "$FREEZE_S" -pix_fmt yuv420p LAST_FRAME.mp4
- printf "file %q\n" "$SRC" LAST_FRAME.mp4 > list.txt
- ffmpeg -y -f concat -safe 0 -i list.txt -c copy "$DST"