Skip to content

Instantly share code, notes, and snippets.

@munrocket
Last active March 4, 2024 01:37
Show Gist options
  • Select an option

  • Save munrocket/4dad529a78dd4b94cfe61273409b2393 to your computer and use it in GitHub Desktop.

Select an option

Save munrocket/4dad529a78dd4b94cfe61273409b2393 to your computer and use it in GitHub Desktop.

Revisions

  1. munrocket revised this gist Mar 4, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion webm_conversion.md
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@ ffmpeg -r 30 -i "img%02d.png" -pix_fmt yuv420p -movflags +faststart perfectloop.

    trim first 5 second
    ```console
    ffmpeg -ss 00:00:05 -i 1.mov 2.mov
    ffmpeg -ss 00:00:05 -t 00:00:10 -i 1.mov 2.mov
    ```

    webm -> mp4
  2. munrocket revised this gist Mar 1, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion webm_conversion.md
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@ ffmpeg -r 30 -i "img%02d.png" -pix_fmt yuv420p -movflags +faststart perfectloop.
    ```

    trim first 5 second
    ```
    ```console
    ffmpeg -ss 00:00:05 -i 1.mov 2.mov
    ```

  3. munrocket revised this gist Mar 1, 2023. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions webm_conversion.md
    Original file line number Diff line number Diff line change
    @@ -3,6 +3,11 @@ N png -> mp4
    ffmpeg -r 30 -i "img%02d.png" -pix_fmt yuv420p -movflags +faststart perfectloop.mp4
    ```

    trim first 5 second
    ```
    ffmpeg -ss 00:00:05 -i 1.mov 2.mov
    ```

    webm -> mp4
    ```console
    ffmpeg -i capture.webm -vcodec libx264 -pix_fmt yuv420p -strict -2 -acodec aac capture.mp4
  4. munrocket revised this gist Jan 16, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion webm_conversion.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    N png -> mp4
    ```console
    ffmpeg -r 30 -i "frame%02d.png" -pix_fmt yuv420p -movflags +faststart perfectloop.mp4
    ffmpeg -r 30 -i "img%02d.png" -pix_fmt yuv420p -movflags +faststart perfectloop.mp4
    ```

    webm -> mp4
  5. munrocket revised this gist Jan 1, 2023. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions webm_conversion.md
    Original file line number Diff line number Diff line change
    @@ -20,11 +20,11 @@ ffmpeg -y -i capture.webm -i palette.png -filter_complex paletteuse -r 10 captur
    ```

    mov -> mp4
    ```
    ```console
    ffmpeg -i 1.mov -vcodec h264 -acodec mp2 1.mp4
    ```

    trim video
    ```
    ```console
    ffmpeg -i 1.mp4 -ss 00:00:01 -t 00:00:08 -async 1 2.mp4
    ```
  6. munrocket revised this gist Jan 1, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion webm_conversion.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    N png -> mp4
    ```
    ```console
    ffmpeg -r 30 -i "frame%02d.png" -pix_fmt yuv420p -movflags +faststart perfectloop.mp4
    ```

  7. munrocket revised this gist Jan 1, 2023. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions webm_conversion.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,8 @@
    N png -> mp4
    ```
    ffmpeg -r 30 -i "frame%02d.png" -pix_fmt yuv420p -movflags +faststart perfectloop.mp4
    ```

    webm -> mp4
    ```console
    ffmpeg -i capture.webm -vcodec libx264 -pix_fmt yuv420p -strict -2 -acodec aac capture.mp4
  8. munrocket revised this gist Dec 2, 2022. 1 changed file with 10 additions and 0 deletions.
    10 changes: 10 additions & 0 deletions webm_conversion.md
    Original file line number Diff line number Diff line change
    @@ -12,4 +12,14 @@ webm -> gif
    ```console
    ffmpeg -y -i capture.webm -vf palettegen palette.png
    ffmpeg -y -i capture.webm -i palette.png -filter_complex paletteuse -r 10 capture.gif
    ```

    mov -> mp4
    ```
    ffmpeg -i 1.mov -vcodec h264 -acodec mp2 1.mp4
    ```

    trim video
    ```
    ffmpeg -i 1.mp4 -ss 00:00:01 -t 00:00:08 -async 1 2.mp4
    ```
  9. munrocket revised this gist Oct 15, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion webm_conversion.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    webm -> mp4
    ```
    ```console
    ffmpeg -i capture.webm -vcodec libx264 -pix_fmt yuv420p -strict -2 -acodec aac capture.mp4
    ```

  10. munrocket revised this gist Oct 15, 2021. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion webm_conversion.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,9 @@
    first frame in video
    webm -> mp4
    ```
    ffmpeg -i capture.webm -vcodec libx264 -pix_fmt yuv420p -strict -2 -acodec aac capture.mp4
    ```

    first frame
    ```console
    ffmpeg -i capture.webm -vframes 1 capture.jpg
    ```
  11. munrocket revised this gist Oct 15, 2021. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions webm_conversion.md
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,10 @@
    first frame in video
    ```sh
    ```console
    ffmpeg -i capture.webm -vframes 1 capture.jpg
    ```

    webm -> gif
    ```sh
    ```console
    ffmpeg -y -i capture.webm -vf palettegen palette.png
    ffmpeg -y -i capture.webm -i palette.png -filter_complex paletteuse -r 10 capture.gif
    ```
  12. munrocket revised this gist Oct 15, 2021. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions webm_conversion.md
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,10 @@
    first frame in video
    ```
    ```sh
    ffmpeg -i capture.webm -vframes 1 capture.jpg
    ```

    webm -> gif
    ```
    ```sh
    ffmpeg -y -i capture.webm -vf palettegen palette.png
    ffmpeg -y -i capture.webm -i palette.png -filter_complex paletteuse -r 10 capture.gif
    ```
  13. munrocket renamed this gist Oct 15, 2021. 1 changed file with 9 additions and 1 deletion.
    10 changes: 9 additions & 1 deletion webm2gif.sh → webm_conversion.md
    Original file line number Diff line number Diff line change
    @@ -1,2 +1,10 @@
    first frame in video
    ```
    ffmpeg -i capture.webm -vframes 1 capture.jpg
    ```

    webm -> gif
    ```
    ffmpeg -y -i capture.webm -vf palettegen palette.png
    ffmpeg -y -i capture.webm -i palette.png -filter_complex paletteuse -r 10 capture.gif
    ffmpeg -y -i capture.webm -i palette.png -filter_complex paletteuse -r 10 capture.gif
    ```
  14. munrocket revised this gist Dec 3, 2020. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion webm2gif.sh
    Original file line number Diff line number Diff line change
    @@ -1 +1,2 @@
    ffmpeg -y -i capture.webm -vf palettegen palette.png && ffmpeg -y -i capture.webm -i palette.png -filter_complex paletteuse -r 10 capture.gif
    ffmpeg -y -i capture.webm -vf palettegen palette.png
    ffmpeg -y -i capture.webm -i palette.png -filter_complex paletteuse -r 10 capture.gif
  15. munrocket renamed this gist Dec 3, 2020. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  16. munrocket created this gist Dec 3, 2020.
    1 change: 1 addition & 0 deletions convert.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    ffmpeg -y -i capture.webm -vf palettegen palette.png && ffmpeg -y -i capture.webm -i palette.png -filter_complex paletteuse -r 10 capture.gif