#FFmpeg Tips
##Table of Contents
- Convert .mov to .mp4
- Convert .mp4 to .ogv
- Convert .mp4 to .webm
- Convert .avi to mp4
- Optimize mp4
- Scalling (Resize)
- Create thumbnail from first video frame
###Convert .mov to .mp4
Command:
ffmpeg -i video_vivo.mov -qscale 0 -pix_fmt yuv420p output.mp4
###Convert .mp4 to .ogv
Command:
ffmpeg -i inputFile.mp4 -acodec libvorbis -ac 2 -ab 128k -ar 44100 -b:v 1200k -s 730x525 outputFile.ogv
###Convert .mp4 to .webm
Command:
ffmpeg -i input.mp4 -vcodec libvpx -acodec libvorbis -aq 5 -ac 2 -qmax 25 -b 900 output.webm
-acodec libvorbis for encoding with Vorbis audio codec
-aq 5 audio quality(0-10) with a higher number for better quality channel
-qmax 25 is maximum quantizer with lower value for better quality
-b 614400 specifies the bitrate ( 600 kbps video,600 x 1024 = 614400)
-s 1280x720 specifies the size in terms of width by height
###Convert .avi to mp4
Command:
ffmpeg -i input_file.avi -codec:v libx264 -profile:v high -preset slow -b:v 1236k -maxrate 900k -bufsize 1000k -threads 0 -codec:a libfdk_aac -b:a 128k output_file.mp4
Command:
ffmpeg -i input_file.mp4 -codec:v libx264 -profile:v high -preset slow -b:v 1236k -maxrate 900k -bufsize 1000k -threads 0 -codec:a libfdk_aac -b:a 128k output_file.mp4
Parameters:
-vf scale=884:502
Command:
ffmpeg -i input.flv -ss 00:00:00 -vframes 1 out.png
EOF: https://trac.ffmpeg.org/wiki/Create%20a%20thumbnail%20image%20every%20X%20seconds%20of%20the%20video