Skip to content

Instantly share code, notes, and snippets.

@jmcbee
Last active August 29, 2015 14:10
  • Select an option

Select an option

Revisions

  1. Xof Nagem revised this gist Dec 5, 2014. 1 changed file with 9 additions and 1 deletion.
    10 changes: 9 additions & 1 deletion ffmpeg.sh
    Original file line number Diff line number Diff line change
    @@ -1 +1,9 @@
    ffmpeg -c:v libx264 -profile:v baseline -preset veryfast -crf 23
    #!/bin/bash

    video=bbb_sunflower_2160p_60fps_normal.mp4

    ffmpeg -i "$video" -t 60 -c:v libx264 -profile:v baseline -preset veryfast -b:v 180k -maxrate 180k -vf scale="trunc(oh*a/2)*2:240" -crf 23 -c:a libvorbis -b:a 128k 240p.mp4
    ffmpeg -i "$video" -t 60 -c:v libx264 -profile:v baseline -preset veryfast -b:v 300k -maxrate 300k -vf scale="trunc(oh*a/2)*2:360" -crf 23 -c:a libvorbis -b:a 192k 360p.mp4
    ffmpeg -i "$video" -t 60 -c:v libx264 -profile:v baseline -preset veryfast -b:v 500k --maxrate 500k vf scale="trunc(oh*a/2)*2:480" -crf 23 -c:a libvorbis -b:a 256k 480p.mp4
    ffmpeg -i "$video" -t 60 -c:v libx264 -profile:v baseline -preset veryfast -b:v 1000k -maxrate 1000k -vf scale="trunc(oh*a/2)*2:720" -crf 23 -c:a libvorbis -b:a 256k 720p.mp4
    ffmpeg -i "$video" -t 60 -c:v libx264 -profile:v baseline -preset veryfast -b:v 2000k -maxrate 2000k -vf scale="trunc(oh*a/2)*2:1080" -crf 23 -c:a libvorbis -b:a 256k 1080p.mp4
  2. Xof Nagem created this gist Dec 4, 2014.
    1 change: 1 addition & 0 deletions ffmpeg.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    ffmpeg -c:v libx264 -profile:v baseline -preset veryfast -crf 23