Tuesday, May 22, 2012

ffmpeg and h263

ffmpeg has support for 2 versions of H263: h263 and h263p (h263+ or h263-1998)
extension for output file must be .h263 . ffmpeg can't pack h263 stream in mp4 container.

converting in h263/h263p:
ffmpeg -i coastguard_cif.264 -vcodec h263  v1.h263
ffmpeg -i coastguard_cif.264 -vcodec h263p  v2.h263

changing resolution with -s:
ffmpeg -i akiyo_cif.264 -vcodec h263p -s qcif akiyo_qcif.h263

using quantification (higher scale number means higher compression, lower quality, lower bitrate)
ffmpeg -i coastguard_cif.264 -vcodec h263 -qscale 15 v.h263

encoding to a specified bitrate:
ffmpeg -i coastguard_cif.264 -vcodec h263  -b:v 500k v.h263

changing frame rate:
ffmpeg -i coastguard_cif.264 -vcodec h263  -r 24 v.h263

custom size (only for h263p):
ffmpeg -i coastguard_cif.264 -vcodec h263p  -s 300x200 -aspect 3:2  v.h263