続・3gp->flv

出来た!出来たっつの!ちゃんと音も出てる。。おかーさーん!!
長い道のりでした。。協力してくれたタロさんthx!
なかなか日本語の文献がないんですよね。こういうのって。
これでやっとモイモラさんのmovlogぽいのが作れる。。ヒヒヒ
備忘録書こうと思ったけどどこからかけばいいかわかんないや

– download ffmpeg from CVS.. please check http://ffmpeg.sf.net for how to do this.
– then you need to download AMR codec from www.3gpp.org (you can download the newest ones if you find new release, instead listed below):
– 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
– you need to place those 3gpp files into libavcodec directory in ffmpeg source
(please read “configure” file, to find out what are respective directories name). in my ffmpeg version, it should be:
– 26204-520.zip into libavcodec/amrwb_float
– 26073-530.zip into libavcodec/amr
– 26104-540.zip into libavcodec/amr_float
– you need to edit makefile inside amr source-code. here i copy-paste what it said:
“You must also add -DMMS_IO and remove -pedantic-errors to/from CFLAGS in libavcodec/amr/makefile,
i.e. CFLAGS = -Wall -I. ?$(CFLAGS_?$(MODE)) -D?$(VAD) -DMMS_IO”

– you need to modify libavcodec/Makefile and libavformat/Makefile,
if you want to compile both amr_wb and amr_nb (from my experience, amr_wb can’t be recognized by Helix
) these are the diff against 2004.05.18:
$ cvs diff -D 2004-05-18 libavcodec/Makefile libavformat/Makefile
Index: libavcodec/Makefile
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/Makefile,v
retrieving revision 1.142
diff -r1.142 Makefile)=
46c46,51
< OBJS+= amr.o amrwb_float/dec_acelp.o amrwb_float/dec_dtx.o amrwb_float/dec_gain.o ? --- > ifneq ($(AMR_NB),yes)
> ifneq ($(AMR_NB_FIXED),yes)
> OBJS+= amr.o
> endif
> endif
> OBJS+= amrwb_float/dec_acelp.o amrwb_float/dec_dtx.o amrwb_float/dec_gain.o ?
52d56
< endif 53a58 > endif
Index: libavformat/Makefile
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/Makefile,v
retrieving revision 1.71
diff -r1.71 Makefile
28c28
< endif --- > else
31c31
< endif --- > else
34a35,36
> endif
> endif
========================END HERE=====================================

ffmpeg : ./configure –enable-amr_nb –enable-amr_wb –enable-mp3lame
ffmpeg -formatsでmp3とかamrがDEならOK
一旦avi変換 : ffmpeg -y -i in.3gp -f avi -vcodec mjpeg -acodec pcm_s16le out.avi
次にflv : ffmpeg -y -i out.avi -vcodec flv -acodec mp3 out.flv
0302追記:一旦aviにしなくてもそのまま行けるっぽい。考えたら必要なcodec入れたんだからいけてあたりまえですね。