Skip to content

Instantly share code, notes, and snippets.

@andrewschaaf
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewschaaf/cedcab72bdefef2126d5 to your computer and use it in GitHub Desktop.
Save andrewschaaf/cedcab72bdefef2126d5 to your computer and use it in GitHub Desktop.
ffmpeg: using a stream of concatenated PPMs

concatenated PPMs → MP4

...ppms... | ffmpeg \
  -f image2pipe \
  -c ppm \
  -r 60 \                 # 60 fps
  -i - \
  -b:v 10M \              # 10 Mbit/s
  -s 1440x900 \           # resize to 1440x900
  -pix_fmt yuv420p \      # 4:2:0 chroma subsampling. QuickTime requires this, VLC does not.
  -movflags +faststart \  # Arrange metadata to help decoders understand the file ASAP
  foo.mp4

whatever → concatenated PPMs

ffmpeg ... -f image2pipe -c ppm - | ...PPMs...

PPM files → whatever

ffmpeg -start_number 1 -i foo%02d.ppm ...
# foo{01,02,03}.ppm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment