# create thumbnail from video (capture and write a frame) ffmpeg -i input.mp4 -ss 00:00:01.000 -vframes 1 output.png # rotate video ffmpeg -i Documents/Pixel8/Camera/PXL_20241114_222337620.mp4 -vf "transpose=2" Sandhills.mp4 For the transpose parameter you can pass: 0 = 90° counterclockwise and vertical flip (default) 1 = 90° clockwise 2 = 90° counterclockwise 3 = 90° clockwise and vertical flip Use -vf "transpose=2,transpose=2" for 180 degrees. # quickly check the integrity of video files inside a directory with ffmpeg find . -name "*.mp4" -exec sh -c "ffmpeg -v error -i '{}' -map 0:1 -f null - 2>'{}.log'" \; # extract audio track from movie $ ffmpeg -i $MOVIE -vn -acodec copy $AUDIO_MOVIE # extract audio track from reaction $ ffmpeg -i $REACTION -vn -acodec copy $AUDIO_REACTION $ ffmpeg -f lavfi -i color=size=1280x528:rate=24:duration=136 -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 -video_track_timescale 16k -shortest black.mp4 $ ffmpeg -f lavfi -i color=size=1280x528:rate=925:duration=136 -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=48000 -video_track_timescale 95k -shortest black.mp4 # # embed reaction into movie $ ffmpeg -i ./28.0.mp4 -i ./reaction-28.mp4 -filter_complex "[1:v]scale=500:-1[v2];[0:v][v2]overlay=main_w-overlay_w-5:5" -c:v libx264 -c:a copy "reaction-lotr-rotk.0.1.mp4" # # merge reaction / movie tracks $ ffmpeg -i reaction.0.aac -i movie.0.aac -filter_complex "[0][1]amerge=inputs=2,pan=stereo|FL