sudo apt update
sudo apt install ffmpeg
ffmpeg -version
ffmpeg -i my_video.mp4
To turn a video to number of images, run the command below. The command generates the files named image_1.jpg, image_2.jpg and ...
ffmpeg -i my_video.mp4 image_%d.jpg
Turn number of images to a video sequence, use the following command. This command will transform all the images from the current directory (named image_1.jpg, image_2.jpg, etc…) to a video file named my_new_video.mp4
ffmpeg -f image2 -i image_%d.jpg my_new_video.mp4
ffmpeg -i my_video.mp4 -vn -ar 44100 -ac 2 -ab 192 -f mp3 my_audio.mp3
ffmpeg -i my_video.mp4 my_new_video.mpg
for f in *.mkv; do ffmpeg -i "$f" -c copy "${f%.mkv}.mp4"; done
ffmpeg -i example.mkv -c copy example.mp4
ffmpeg -i my_audio.mp3 -i my_video.mp4 my_video_audio_mix.mp4
ffmpeg -i my_video.mp4 -c copy -an my_soundless_video.mp4
ffmpeg -i my_video.mp4 -vf "setpts=0.5*PTS" my_highspeed_video.mp4
ffmpeg -i video.mpg -vf "setpts=4.0*PTS" lowerspeed.mpg -hide_banner
ffmpeg -loop 1 -i my_image.png -i my_audio.mp3 -c:v libx264 -c:a aac -strict experimental -b:a 192k -shortest my_audio_and_image.mp4
ffmpeg -i my_video.mp4 -i my_subtitle.srt -map 0 -map 1 -c copy -c:v libx264 -crf 23 -preset veryfast my_video_with_subtitle.mp4
ffmpeg -i my_video.mp4 -s 720x480 -c:a copy output.mp4