Meniu

Cum convertesti rapid fisier .mov la .mp4, .webm, .ogg cu FFMPEG

Am avut nevoie recent sa convertesc un fisier Quicktime .mov in format .mp4. Exista o serie de instrumente on-line, dar este mai rapid si mai sigur sa convertesti fisierul din terminal!

.mov to .mp4

ffmpeg -i video.mov -vcodec h264 -acodec mp2 video.mp4

.mov to .webm

ffmpeg -i video.mov -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis video.webm

.mov to .ogg

ffmpeg -i video.mov -codec:v libtheora -qscale:v 7 -codec:a libvorbis -qscale:a 5 video.ogg

Sau puteti face o bucla in bash:

for f in *.mov; do
  ffmpeg -i "$f" -vcodec h264 -acodec mp2 "${f%".mov"}.mp4"
done;

Sau poti alege rezolutia de iesire:

MP4 - 1080p

ffmpeg -i input.mov -preset slow -codec:a libfdk_aac -b:a 128k -codec:v libx264 -pix_fmt yuv420p -b:v 4500k -minrate 4500k -maxrate 9000k -bufsize 9000k -vf scale=-1:1080 output.mp4

MP4 - 720p

ffmpeg -i input.mov -preset slow -codec:a libfdk_aac -b:a 128k -codec:v libx264 -pix_fmt yuv420p -b:v 2500k -minrate 1500k -maxrate 4000k -bufsize 5000k -vf scale=-1:720 output.mp4

MP4 - 480p

ffmpeg -i input.mov -preset slow -codec:a libfdk_aac -b:a 128k -codec:v libx264 -pix_fmt yuv420p -b:v 1000k -minrate 500k -maxrate 2000k -bufsize 2000k -vf scale=854:480 output.mp4

MP4 - 360p

ffmpeg -i input.mov -preset slow -codec:a libfdk_aac -b:a 128k -codec:v libx264 -pix_fmt yuv420p -b:v 750k -minrate 400k -maxrate 1000k -bufsize 1500k -vf scale=-1:360 output.mp4

Plus bonus:

.AVI VIDEO TO .MPG

# FFmpeg –i video.mpg video.avi

.MP4 to .WMV

# FFmpeg –i  – video.mp4  final_video.wmv
# FFmpeg –i  – video.wmv final_video.mp4

.AVI to Uncompressed Animated Gifs

# FFmpeg –i  – video.avi gif_uncompressed.gif

.AVI to .FLV

# FFmpeg –i  – video.avi –f Flv video.flv

.AVI to DV

# FFmpeg –i  – video.avi -s pal -r pal -aspect 4:3 -ar 48000 -ac 2 video.dv

FFmpeg CRF

# FFmpeg –i  –input –c:v libx264 –preset fast –crf 22 –c:a copy video.mkv

Andreea

"Rome wasn't built in a day" !
  • | 120 articole

Nici un comentariu inca. Fii primul!
  • powered by Verysign