Tube Ace for WordPress Theme & Plugin Now Available!

Documentation > Video Conversion Commands

Default ffmpeg command

/usr/bin/ffmpeg -y -i {input_file} -vcodec libx264 -vpre normal {output_file}

Flags explained

‘-i filename (input)’ - input file name

‘-y (global)’ - Overwrite output files without asking.

‘-copyts’ - Copy timestamps from input to output.

'-b' - bitrate

'-ar' - Set the audio sampling frequency. For output streams it is set by default to the frequency of the corresponding input stream. For input streams this option only makes sense for audio grabbing devices and raw demuxers and is mapped to the corresponding demuxer options.

'-s' - Set frame size. The format is ‘wxh’ (ffserver default = 160x128, ffmpeg default = same as source).

If you are experiencing video playback errors due to duration not being injected into video metadata, you may need to use flvtool2 to inject the duration into the video metadata.

flvtool2 duration injection example (in bold):

/usr/bin/ffmpeg -y -i {input_file} -vcodec libx264 -vpre normal {output_file};/usr/bin/flvtool2 -U -c -duration:{duration} {mobile_output_file}

more ffmpeg documentation