User Tools

Site Tools


ffmpeg

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

ffmpeg [2014/11/24 01:14] (current)
0.0.0.0 created
Line 1: Line 1:
 +====== Ffmpeg ======
  
 +===== ffmpeg transcoding options =====
 +All of these were tested on Ubuntu 9.10.  It's possible that other distributions don't have the same video presets (-vpre) available.
 +
 +The "​-crf"​ option can be adjusted slightly if lower quality is acceptable (remember that a higher value results in lower quality). ​ 18 works very well for cartoon-style content (e.g. Futurama, Family Guy, etc.), while 20 or 22 is acceptable for live-action video.
 +
 +==== Audio/​Subtitles Note ====
 +It is important to remember that none of the below commands specify what to do with the audio stream if one exists. ​ If you're transcoding an input file that contains **just** video, this is not a problem, however if there is an audio stream, ffmpeg will default to 64kbps MP2.  Transcoding the audio stream is often unnecessary,​ in which case you can simply tell ffmpeg to copy the audio stream(s) unchanged by inserting this into the command (before the output filename):
 + ​-acodec copy
 +
 +Alternatively you can use:
 + -an
 +to tell it to skip audio streams entirely. ​ The same applies with subtitle streams:
 + -sn
 +
 +==== 720p H.264 ====
 + ​ffmpeg -i //<​input.avi>//​ -vcodec libx264 -vpre hq -crf 18 -s 1280x720 -acodec copy -threads 0 //<​output.avi>//​
 +
 +==== 1080p H.264 ====
 + ​ffmpeg -i //<​input.avi>//​ -vcodec libx264 -vpre hq -crf 18 -s 1920x1080 -acodec copy -threads 0 //<​output.avi>//​
 +
 +==== iPod-Friendly H.264 ====
 + ​ffmpeg -i //<​input.avi>//​ -vcodec libx264 -vpre hq -vpre ipod640 -crf 18 -s 320x240 -acodec copy -threads 0 //<​output.avi>//​
 +
 +==== Transcoding full DVD mkv streams to reduce filesize ====
 +  ffmpeg -i t00_in.mkv -acodec copy -scodec copy -vcodec libx264 -vpre hq -crf 18 -threads 0 t00_out.mkv
ffmpeg.txt · Last modified: 2014/11/24 01:14 by 0.0.0.0