FFMpeg

From XPUB & Lens-Based wiki
Revision as of 17:57, 16 January 2012 by Michael Murtaugh (talk | contribs) (→‎mov to .ogv (Theora video / Vorbis audio))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Converting pictures to a video

ffmpeg -y -r 3 -b 1800 -sameq -i frames/%06d.png foo.mp4


Combining video + sound into a single movie

ffmpeg -i audio.wav -i video.mpeg final.mpeg




Video Transcoding

mov to mp4

ffmpeg -i infile.mov \
  -acodec libfaac -ab 96k \
  -vcodec libx264 -b 345k -bt 345k \
  -threads 0 -s 640x360 outfile.mp4

explained:

  • -ab audio bit-rate: 96kbits/sec
  • -b video bitrate: 345k
  • -bt bitrate tolerance: 345k
  • -s size: 640x360


mov to .ogv (Theora video / Vorbis audio)

ffmpegtotheora myfile.mov

or

ffmpeg -i infile.mov \
  -acodec libvorbis -ac 2 -ab 96k -ar 44100 \
  -b 345k -s 640x360 outfile.ogv

more arguments:

  • -ac audio channels: 2
  • -ar audio sample rate: 44100 Hz


Source: http://paulrouget.com/e/converttohtml5video/