ffmpeg/memcode who like to convert video to 3gp?

who like to convert video to 3gp?

problem: all the time wrote that he could not find the audio.

how to fix it?

Code:
ffmpeg -i test.avi -vcodec h263 -acodec libmp3lame -ac 1 -ar 8000 -r 25 -ab 32 -y outputfile.3gp

Code:
ffmpeg -i test.avi  -vcodec h263 -acodec libmp3lame -ac 1 -ar 8000 -r 25 -ab 32 -y outputfile.3gp
FFmpeg version SVN-r14424, Copyright (c) 2000-2008 Fabrice Bellard, et al.
  configuration: --cc=cc --prefix=/usr/local --disable-debug --enable-memalign-hack --enable-shared --enable-postproc
 --extra-cflags=-I/usr/local/include/vorbis -I/usr/local/include --extra-ldflags=-L/usr/local/lib -la52 --extra-libs=-
pthread --enable-gpl --enable-pthreads --enable-swscale --mandir=/usr/local/man --enable-liba52 --enable-liba52bin 
--enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libamr-nb --enable-nonfree --enable-libamr-wb 
--enable-nonfree --disable-mmx --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis 
--enable-libx264 --enable-libxvid
  libavutil version: 49.7.0
  libavcodec version: 51.61.0
  libavformat version: 52.18.0
  libavdevice version: 52.0.0
  built on Dec  5 2009 13:18:43, gcc: 4.2.1 20070719  [FreeBSD]
[mp3 @ 0x4971a010]Could not find codec parameters (Audio: mp2, 64 kb/s)
test.avi: could not find codec parameters
 
Try the simplest form:
$ ffmpeg -i test.avi outputfile.3gp

You'll see if this is a problem with the source avi or your command.

Here the output I got (where ffmpeg -i test.avi outputfile.3gp were successful):
Code:
/home/dereckson ] ffmpeg -i test.avi -vcodec h263 -acodec libmp3lame -ac 1 -ar 8000 -r 25 -ab 32 -y outputfile.3gp
FFmpeg version 0.6, Copyright (c) 2000-2010 the FFmpeg developers
  built on Sep 10 2010 21:33:37 with gcc 4.2.1 20070719  [FreeBSD]
  configuration: --prefix=/usr/local --mandir=/usr/local/man --enable-shared --enable-gpl --enable-postproc
 --enable-avfilter --enable-avfilter-lavf --enable-pthreads --enable-x11grab --enable-memalign-hack --cc=cc
 --extra-cflags=-I/usr/local/include/vorbis -I/usr/local/include --extra-ldflags=-L/usr/local/lib --extra-libs=-pthread
 --disable-debug --disable-sse --disable-mmx --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libdirac
 --disable-libfaac --enable-libfaad --enable-libfaadbin --disable-libgsm --enable-libmp3lame --disable-libopenjpeg
 --enable-libschroedinger --disable-ffplay --disable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx
 --enable-libx264 --enable-libxvid
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.19. 0 /  1.19. 0
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0
Input #0, avi, from 'test.avi':
  Duration: 00:00:21.91, start: 0.000000, bitrate: 2098 kb/s
    Stream #0.0: Video: mjpeg, yuvj420p, 320x240, 19.62 tbr, 19.62 tbn, 19.62 tbc
    Stream #0.1: Audio: pcm_u8, 22050 Hz, 1 channels, u8, 176 kb/s
WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s
[B][3gp @ 0x29641010]track 1: could not find tag, codec not currently supported in container[/B]
Output #0, 3gp, to 'outputfile.3gp':
  Metadata:
    encoder         : Lavf52.64.2
    Stream #0.0: Video: h263, yuv420p, 320x240, q=2-31, 200 kb/s, 25 tbn, 25 tbc
    Stream #0.1: Audio: libmp3lame, 8000 Hz, 1 channels, s16, 0 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Could not write header for output file #0 (incorrect codec parameters ?)

It so seems you can't specify an audio codec for .3gp files.

Furthermore, the English Wikipedia article 3GP and 3G2 indicates the audio codes supported are “AMR-NB, AMR-WB, AMR-WB+, AAC-LC, HE-AAC v1 or Enhanced aacPlus (HE-AAC v2)”, giving the ISO specifications as source for this information.
 
this's my mencoder script work fine for me
Code:
#!/bin/sh

if [ "$#" -lt 2 ]
then
	echo "example:"
	echo "$0 saveto.3gp source.mpg -ofps 25";
	exit 1;
fi

mencoder \
	-noconfig all \
	-oac lavc \
	-ovc lavc \
	-lavcopts vcodec=h263p:vbitrate=200:acodec=libamr_nb:abitrate=10200 \
	-of lavf \
	-ofps 15 \
	-srate 8000 \
	-af lavcresample=8000,channels=1,volnorm \
	-o $1 \
	$2 $3 $4

don't forget with "audio/libamrnb" support.
 
Back
Top