theKindOfMe

August 23, 2011

Batch Video Conversion to 3gp using ffmpeg

Filed under: Uncategorized — Tags: — yasi8h @ 6:46 am

Some notes for self reference.

Batch video conversion

Using some a simple loop (in bash)

for f in *.mp4; do ffmpeg -i “${f}” -b 4000k -s 4cif -vcodec h263 -acodec aac -y “${f}_4000.3gp”; done;

Converts all mp4 files in the current folder

Original file name: file_one.mp4

Converted file name: file_one.mp4_4000.3gp

Convert to 3gp

ffmpeg -i file_name -s 4cif -vcodec h263 -acodec aac -y converted.3gp

Convert to with a set bit-rate

When the set bit rate is 4000k (kilo bits)
ffmpeg -i file_name -b 4000k -s 4cif -vcodec h263 -acodec aac -y converted.3gp

Setting resolution

Use the -s flag to set the resoultion. For possible values refer: http://ffmpeg.org/ffmpeg-doc.html

About these ads

1 Comment »

  1. Thank for you tut!
    But how can I specify amr format for -acodec option? I’ve tried some codec such as `amrnb` and `amrwb`, but both got fault!

    Comment by xuansamdinh — August 13, 2012 @ 5:45 am


RSS feed for comments on this post.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Silver is the New Black Theme Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: