1. Download the following three files first to www.3gpp.org:
-Http://www.3gpp.org/ftp/Specs/2004-03/Rel-5/26_series/26204-520.zip
-Http://www.3gpp.org/ftp/Specs/2004-03/Rel-5/26_series/26073-530.zip
-Http://www.3gpp.org/ftp/Specs/2004-03/Rel-5/26_series/26104-540.zip
Extract each of the following folders:
-26204-520.zip into Libavcodec/amrwb_float
-26073-530.zip into Libavcodec/amr
-26104-540.zip into Libavcodec/amr_float
2. Recompile ffmpeg, remember to add –ENABLE-AMR_NB–ENABLE-AMR_WB
3. Execute the following command to complete the conversion, the specific parameter meaning view man
Ffmpeg-i test.avi-y-B 20-s sqcif-r 10-acodec amr_wb-ab 23.85-ac 1-ar 16000 test.3gp
To intercept a picture as a thumbnail
Save the video in the back of the flv file after the third second as an image:
Ffmpeg-i "test.flv"-ss 3-vframes 1-r 1-ac 1-ab 2-s 160x120-f image2 "A.jpg"
//----------------------------------------------------
If you do not follow the steps above, you can convert the following files:
D:/project/test>ffmpeg-i test.avi-y-B 20-s sqcif-r test.3gp
FFmpeg version CVS, build 3342336, Copyright (c) 2000-2004 Fabrice Bellard
Configuration:--enable-memalign-hack--enable-mingw32--enable-mp3lame--ext
Ra-cflags=-i/local/include--extra-ldflags=-l/local/lib
Built on Aug 2006 13:44:13, gcc:3.2.3 (MinGW special 20030504-1)
Input #0, AVI, from ' Test.avi ':
duration:00:00:10.3, start:0.000000, bitrate:700 kb/s
Stream #0.0, 15.00 Fps:Video:cinepak, yuv420p, 128x128
Output #0, 3GP, to ' test.3gp ':
Stream #0.0, -1. #J fps:Video:h263, yuv420p, 128x96, q=2-31, kb/s
Stream Mapping:
Stream #0.0-> #0.0
[h263 @ 0071d920]removing Common factors from framerate
Frame= q=0.0 lsize= 44kB time=10.4 bitrate= 34.4kbits/s
VIDEO:42KB audio:0kb Global headers:0kb muxing overhead 3.574653%
However, you cannot convert audio and video files together:
D:/project/test>ffmpeg-i 123.3gp 123.avi
FFmpeg version CVS, build 3342336, Copyright (c) 2000-2004 Fabrice Bellard
Configuration:--enable-memalign-hack--enable-mingw32--enable-mp3lame--ext
Ra-cflags=-i/local/include--extra-ldflags=-l/local/lib
Built on Aug 2006 13:44:13, gcc:3.2.3 (MinGW special 20030504-1)
Input #0, mov,mp4,m4a,3gp,3g2, from ' 123.3gp ':
duration:00:01:20.0, start:0.000000, bitrate:192 kb/s
Stream #0.0:audio:mp4a/0x6134706d, 32000 Hz, stereo
Stream #0.1, 14.99 Fps:Video:mpeg4, yuv420p, 176x144
Output #0, AVI, to ' 123.avi ':
Stream #0.0, -1 #J fps:Video:mpeg4, yuv420p, 176x144, q=2-31, kb/s
Stream #0.1:AUDIO:MP2, 32000 Hz, stereo, kb/s
Stream Mapping:
Stream #0.1-> #0.0
Stream #0.0-> #0.1
[MPEG4 @ 0071d920]removing Common factors from framerate
Unsupported codec (id=86018) for input stream #0.0
Follow the action above, but the compiled Ffmpeg.exe cannot find the AMR_WB and AMR_NB commands