AppleScript C Perl Shell Xcode Other

Converting movies with ffmpeg

Post Reply
coding / other     Views: 1384Prev .. Next
Converting movies with ffmpegPosted: Sunday, November 2, 2014 [21:16:06] - 1
rootPosted by:rootMember Since:
June 16 2010
Posts: 128
There are many ways to convert movies from one format to another as well as there are many apps for Macs, paid and free.
Many of those apps use ffmpeg (check your processes while program of your choice converting video file).

If you haven't already, install ffmpeg with H.264 support using Terminal:
View Codesudo port install ffmpeg +gpl +postproc +lame +theora +libogg +vorbis +xvid +x264 +a52 +faac +faad +dts +nonfree


One of the hardest apps to find is to convert MKV video to QuickTIme MOV format. ffmpeg does it with ease. Two hours video file converted within 2 minutes.

If you want to convert MKV video to QuickTIme format with video and audio codecs intact just enter the following in your Terminal window:
View Codeffmpeg -i input.mkv -c copy output.mov


when you want to convert MKV video to QuickTime MOV format with ACC 5.1 audio:
View Codeffmpeg -i input.mkv -vcodec copy -c:a ac3 -ac 6 -b:a 640k output.mov


to chop MKV file
View Codeffmpeg -i input.mkv -ss 00:00:00.000 -t 00:10:00.000 -vcodec copy output.mkv

where -ss 00:00:00.000 stands for beginning timecode format of the input.mkv file
and -t 00:10:00.000 end time code in input.mkv
In example above first ten minutes of the input.mkv video will be duration of output.mkv video.

Path to input.xxx and output.xxx files should be fully qualified unless you "cd" to the folder where input.xxx file is. In this case output.xxx file will be created in the same folder.There's no place like ~
RE: Converting movies with ffmpegPosted: Sunday, November 2, 2014 [21:40:58] - 2
rootPosted by:rootMember Since:
June 16 2010
Posts: 128
Forgot to mention. To install MacPorts and save a lot of headache installing software, just visit the MacPorts at:
http://www.macports.orgThere's no place like ~
RE: Converting movies with ffmpegPosted: Sunday, December 11, 2016 [23:15:27] - 3
rootPosted by:rootMember Since:
June 16 2010
Posts: 128
Convert image sequence to a movie:
View Codeffmpeg -framerate 30 -pattern_type glob -i /image_folder/*.jpg' -c:v libx264 -crf 20 -preset slow Result_Movie.mov

Scale down movie:
View Codeffmpeg -i Bigger_Size_Movie.mov -vf "scale=1920:1080" -c:v libx264 -crf 20 -preset slow -pix_fmt yuv420p Scaled_Movie.1080.mov

Use Photoshop saved Curves to do a color correction:
View Codeffmpeg -i Original_Movie.mov -vf curves=psfile='/Photoshop_Filters/filter.acv' -pix_fmt yuv420p Corrected_Movie.mov

Color-balance and scale your movie:
View Codeffmpeg -i Original_Movie.mov -vf "scale=1920:1080, eq=contrast=1.2:brightness=-0.06:saturation=0.85, colorbalance=rm=.3:gm=.25:bm=.15:rm=.01:gm=.01:bh=.12:rs=.1:gm=.03:bh=-.06" -c:v libx264 -crf 20 -preset slow -pix_fmt yuv420p Corrected_Movie.1080.mov

to name just a few available ffmpeg video filters.There's no place like ~
coding / otherPrev .. Next
 
Post Reply
Home - Coding: AppleScript C Perl Shell Xcode Other