Skip to content

Instantly share code, notes, and snippets.

@andrewschaaf
Last active August 29, 2015 14:06
Show Gist options
  • Save andrewschaaf/cedcab72bdefef2126d5 to your computer and use it in GitHub Desktop.
Save andrewschaaf/cedcab72bdefef2126d5 to your computer and use it in GitHub Desktop.

Revisions

  1. andrewschaaf revised this gist Oct 5, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    ### concatenated PPMs → MP4

    ```
    ffmpeg \
    ...ppms... | ffmpeg \
    -f image2pipe \
    -c ppm \
    -r 60 \ # 60 fps
  2. andrewschaaf revised this gist Oct 5, 2014. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,15 +1,15 @@
    ### concatenated PPMs -> MP4 (60fps, 10Mbit/s, resized to 1440x900)
    ### concatenated PPMs → MP4

    ```
    ffmpeg \
    -f image2pipe \
    -c ppm \
    -r 60 \
    -r 60 \ # 60 fps
    -i - \
    -b:v 10M \
    -s 1440x900 \
    -pix_fmt yuv420p \
    -movflags +faststart \
    -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
    ```

  3. andrewschaaf revised this gist Oct 5, 2014. 1 changed file with 15 additions and 2 deletions.
    17 changes: 15 additions & 2 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,21 @@
    ### concatenated PPMs -> MP4 (60fps, 10Mbit/s, resized to 1440x900)

    ```
    ffmpeg \
    -f image2pipe \
    -c ppm \
    -r 60 \
    -i - \
    -b:v 10M \
    -s 1440x900 \
    -pix_fmt yuv420p \
    -movflags +faststart \
    foo.mp4
    ```

    ### whatever → concatenated PPMs
    ffmpeg ... -f image2pipe -c ppm - | ...PPMs...

    ### concatenated PPMs → whatever
    ...PPMs... | ffmpeg -i image2pipe -c ppm ...

    ### PPM files → whatever
    ffmpeg -start_number 1 -i foo%02d.ppm ...
  4. andrewschaaf revised this gist Sep 17, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -5,5 +5,5 @@
    ...PPMs... | ffmpeg -i image2pipe -c ppm ...

    ### PPM files → whatever
    ffmpeg -start_number 1 -i img%02d.ppm ...
    ffmpeg -start_number 1 -i foo%02d.ppm ...
    # foo{01,02,03}.ppm
  5. andrewschaaf revised this gist Sep 17, 2014. 1 changed file with 7 additions and 4 deletions.
    11 changes: 7 additions & 4 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,9 @@
    ### PPMs → whatever
    ...PPMs... | ffmpeg -i image2pipe -c ppm ...
    ### whatever → concatenated PPMs
    ffmpeg ... -f image2pipe -c ppm - | ...PPMs...

    ### concatenated PPMs → whatever
    ...PPMs... | ffmpeg -i image2pipe -c ppm ...

    ### whatever → PPMs
    ffmpeg ... -f image2pipe -c ppm - | ...PPMs...
    ### PPM files → whatever
    ffmpeg -start_number 1 -i img%02d.ppm ...
    # foo{01,02,03}.ppm
  6. andrewschaaf created this gist Sep 17, 2014.
    6 changes: 6 additions & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    ### PPMs → whatever
    ...PPMs... | ffmpeg -i image2pipe -c ppm ...


    ### whatever → PPMs
    ffmpeg ... -f image2pipe -c ppm - | ...PPMs...