tags:

views:

2400

answers:

2

I have converted any video format to 3gp file format using ffmpeg on one server. But on another server it not works.

Following is my script:

exec("ffmpeg -i test.flv -sameq -acodec libmp3lame -ar 22050 -ab 96000
    -deinterlace -nr 500 -s 320x240 -aspect 4:3 -r 20 -g 500 -me_range 20
    -b 270k -deinterlace -f flv -y test.3gp ");

Can anyone tell me what is wrong in script?

Following is my ffmpeg setting:

root@ninja [~]# ffmpeg -formats ffmpeg version CVS, build 3277056, Copyright (c) 2000-2004 Fabrice Bellard configuration: --enable-mp3lame --enable-libogg --enable-gpl --disable-mmx --enable-shared built on Jun 17 2009 10:51:43, gcc: 4.1.2 20080704 (Red Hat 4.1.2-44)

A: 

Are you not able to capture any error messages from your script?

I assume that output is from your first server? check that the version of ffmpeg on the second server supports flv and 3gp, I know some versions of linux ship with a crippled version of ffmpeg due to patent concerns in some countries.

Colin Pickard
A: 

The "-f flv" isn't right. You're encoding to 3gp, not flv. I think the acodec should be aac, and vcodec should be h263, unless the 3gp codec is broader than I thought.

A third thing is that at some version they changed the naming of the codecs. If you have an old version of ffmpeg (it says 2004), it might be "mp3" instead of "libmp3lame", unless my memory is backwards.

You have some conflicting parameters too, but ffmpeg probably just goes with the last. -sameq (match quality of source) conflicts with -b (adjust quality for constant bitrate), and you have -deinterlace twice.

David