Skip to content

Instantly share code, notes, and snippets.

@5a494d
Last active August 29, 2015 14:12
Show Gist options
  • Save 5a494d/8f2aa6a75fcacda4a8e2 to your computer and use it in GitHub Desktop.
Save 5a494d/8f2aa6a75fcacda4a8e2 to your computer and use it in GitHub Desktop.
ffmpeg tools
#!/bin/bash
# Video are resized to 640x360 with a bitrate of 345k.
ffmpeg -i input.mov -acodec libfaac -ab 96k -vcodec libx264 -vpre slower -vpre main -level 21 -refs 2 -b 345k -bt 345k -threads 0 -s 640x360 output.mp4
#!/bin/bash
# Video are resized to 640x360 with a bitrate of 345k.
ffmpeg -i input.mov -acodec libvorbis -ac 2 -ab 96k -ar 44100 -b 345k -s 640x360 output.ogv
#!/bin/bash
#take a snapshot to 00:10:20 with 400x300 image
ffmpeg -ss 00:10:20 -t 1 -s 400x300 -i <INPUT_FILE> -f mjpeg <OUTPUT_FILE>
#!/bin/bash
# Video are resized to 640x360 with a bitrate of 345k.
ffmpeg -i input.mov -acodec libvorbis -ac 2 -ab 96k -ar 44100 -b 345k -s 640x360 output.webm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment