Skip to content
Snippets Groups Projects
ffmpeg.texi 30.9 KiB
Newer Older
  • Learn to ignore specific revisions
  • 
    For extracting images from a video:
    @example
    ffmpeg -i foo.avi -r 1 -s WxH -f image2 foo-%03d.jpeg
    @end example
    
    This will extract one video frame per second from the video and will
    output them in files named @file{foo-001.jpeg}, @file{foo-002.jpeg},
    etc. Images will be rescaled to fit the new WxH values.
    
    If you want to extract just a limited number of frames, you can use the
    above command in combination with the -vframes or -t option, or in
    combination with -ss to start extracting from a certain point in time.
    
    For creating a video from many images:
    @example
    ffmpeg -f image2 -i foo-%03d.jpeg -r 12 -s WxH foo.avi
    @end example
    
    The syntax @code{foo-%03d.jpeg} specifies to use a decimal number
    composed of three digits padded with zeroes to express the sequence
    number. It is the same syntax supported by the C printf function, but
    only formats accepting a normal integer are suitable.
    
    
    @item
    You can put many streams of the same type in the output:
    
    
    @example
    ffmpeg -i test1.avi -i test2.avi -vcodec copy -acodec copy -vcodec copy -acodec copy test12.avi -newvideo -newaudio
    @end example
    
    In addition to the first video and audio streams, the resulting
    output file @file{test12.avi} will contain the second video
    and the second audio stream found in the input streams list.
    
    The @code{-newvideo}, @code{-newaudio} and @code{-newsubtitle}
    options have to be specified immediately after the name of the output
    file to which you want to add them.
    
    Stefano Sabatini's avatar
    Stefano Sabatini committed
    @include eval.texi
    
    @include encoders.texi
    
    @include demuxers.texi
    
    Stefano Sabatini's avatar
    Stefano Sabatini committed
    @include muxers.texi
    
    @include indevs.texi
    @include outdevs.texi
    
    Stefano Sabatini's avatar
    Stefano Sabatini committed
    @include protocols.texi
    
    @include bitstream_filters.texi
    
    Anton Khirnov's avatar
    Anton Khirnov committed
    @include metadata.texi
    
    @settitle ffmpeg video converter
    
    ffplay(1), ffprobe(1), ffserver(1) and the Libav HTML documentation
    
    The Libav developers