FUN WITH LINUX

Preparing videos for the web(using ffmpeg)

15 January 2016

Convert video to different formats:

Mp4 (H.264 / ACC):

ffmpeg -i INPUTFILE -b 1500k -vcodec libx264 -vpre slow -vpre baseline -g 30 "OUTPUTFILE.mp4

Webm (VP8 / Vorbis):

ffmpeg -i "INPUTFILE" -b 1500k -vcodec libvpx -acodec libvorbis -ab 160000 -f webm -g 30 "OUTPUTFILE.webm"

Ogv (Theora / Vorbis):

ffmpeg -i "INPUTFILE" -b 1500k -vcodec libtheora -acodec libvorbis -ab 160000 -g 30 "OUTPUTFILE.ogv"

Rotate video 90 clockwise:

ffmpeg -i INPUTFILE.ogv -vf "transpose=1" -b 1500k -vcodec libtheora -acodec libvorbis -ab 160000 -g 30 "OUTPUTFILE.ogv"

Remove sound from video:

ffmpeg -i INPUTFILE.ogv -c copy -an OUTPUTFILE.ogv
[ Multimedia  ]
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution 3.0 Unported License.

Copyright 2015-present Hoti