Skip to content

Instantly share code, notes, and snippets.

@octipus
Last active April 22, 2022 11:49
Show Gist options
  • Save octipus/b9acb7707d5f6f2090d1c6fa069b31dd to your computer and use it in GitHub Desktop.
Save octipus/b9acb7707d5f6f2090d1c6fa069b31dd to your computer and use it in GitHub Desktop.

Revisions

  1. octipus revised this gist Apr 22, 2022. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -8,6 +8,11 @@

    ffmpeg -i input.mp4 -c:v libvpx-vp9 -b:v 1M target.webm

    ###Single File - webm compressor - losless compression

    ffmpeg -i input.mp4 -b:v 0 -crf 30 -pass 1 -an -f webm -y /dev/null
    ffmpeg -i input.mp4 -b:v 0 -crf 30 -pass 2 output.webm



    ### Batch Compression
  2. octipus revised this gist Oct 12, 2021. 1 changed file with 12 additions and 1 deletion.
    13 changes: 12 additions & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -4,6 +4,11 @@
    ffmpeg -i input.mp4 -vcodec libx265 -crf 28 output.mp4


    ### Single FIle - webm compressor

    ffmpeg -i input.mp4 -c:v libvpx-vp9 -b:v 1M target.webm



    ### Batch Compression

    @@ -13,4 +18,10 @@
    4. optional - change the CRF value to tweak with size(and quality)

    for %a in ("*.*") do (ffmpeg -i "%a" -vcodec libx265 -crf 28 "compressed\%~na.mp4")
    pause
    pause



    ### USEFUL FLAGS - can be used on any othe the above scripts

    -an - remove audio
  3. octipus revised this gist Oct 12, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@

    1. Create a new folder for all your videos
    2. Inside, create another folder called: compressed
    3. Run script via your CLI
    3. Run script via your CLI in your initial folder
    4. optional - change the CRF value to tweak with size(and quality)

    for %a in ("*.*") do (ffmpeg -i "%a" -vcodec libx265 -crf 28 "compressed\%~na.mp4")
  4. octipus created this gist Oct 12, 2021.
    16 changes: 16 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@

    ### Single File - default compressor - change the CRF value to tweak with size(and quality)

    ffmpeg -i input.mp4 -vcodec libx265 -crf 28 output.mp4



    ### Batch Compression

    1. Create a new folder for all your videos
    2. Inside, create another folder called: compressed
    3. Run script via your CLI
    4. optional - change the CRF value to tweak with size(and quality)

    for %a in ("*.*") do (ffmpeg -i "%a" -vcodec libx265 -crf 28 "compressed\%~na.mp4")
    pause