Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 181642 - media-video/ffmpeg-0.4.9_p20070330 - amr does not work
Summary: media-video/ffmpeg-0.4.9_p20070330 - amr does not work
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-11 12:29 UTC by Markus Rathgeb
Modified: 2008-10-22 05:17 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Rathgeb 2007-06-11 12:29:24 UTC
Installed versions:  0.4.9_p20070330(08:12:00 PM 04/09/2007)(X a52 aac -altivec amr -debug -doc dts encode ieee1394 imlib mmx network ogg -oss sdl -test theora threads truetype v4l vorbis x264 xvid zlib)

the amr codec is not working anymore.

when I am playing 3gp files with ffplay there is no audio output.

also the creation of 3gp files is not working.

ffmpeg -i test.avi -ar 8000 -ac 1 -ab 12 -acodec amr_nb -vcodec h263 -s 176x144 -r 12 -b 30 test.3gp

FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --enable-static --enable-shared --cc=i686-pc-linux-gnu-gcc --disable-altivec --disable-debug --disable-audio-oss --disable-opts --enable-libmp3lame --enable-libvorbis --enable-libogg --enable-libtheora --enable-libogg --enable-liba52 --enable-dc1394 --enable-pthreads --enable-xvid --enable-x11grab --enable-libogg --enable-libdts --enable-x264 --enable-libfaad --enable-libfaac --enable-amr-nb --enable-amr-wb --enable-amr-if2 --enable-gpl --enable-pp --disable-strip
  libavutil version: 49.4.0
  libavcodec version: 51.40.2
  libavformat version: 51.11.0
  built on Apr  9 2007 20:06:06, gcc: 4.1.2 (Gentoo 4.1.2)
Input #0, avi, from 'test.avi':
  Duration: 00:00:35.1, start: 0.000000, bitrate: 1255 kb/s
  Stream #0.0: Video: msvideo1, pal8, 400x300, 15.00 fps(r)
  Stream #0.1: Audio: pcm_u8, 22050 Hz, mono, 176 kb/s
PIX_FMT_YUV420P will be used as an intermediate format for rescaling
Output #0, 3gp, to 'test.3gp':
  Stream #0.0: Video: h263, yuv420p, 176x144, q=2-31, 0 kb/s, 12.00 fps(c)
  Stream #0.1: Audio: amr_nb, 8000 Hz, mono, 0 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
[amr_nb @ 0xb7dcb0e8]bitrate not supported
Error while opening codec for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height


Reproducible: Always
Comment 1 Markus Rathgeb 2007-06-12 11:30:17 UTC
I tested version 0.4.9_p20070525.
the use-flag "amr" was set but ffmpeg do not know the codec.

fmpeg -i test.flv -ar 8000 -ac 1 -ab 12 -acodec amr_nb -vcodec h263 -s 176x144 -r 12 -b 30 test.3gp
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --enable-static --enable-shared --cc=i686-pc-linux-gnu-gcc --disable-altivec --disable-debug --disable-audio-oss --disable-opts --enable-libmp3lame --enable-libvorbis --enable-libogg --enable-libtheora --enable-libogg --enable-liba52 --enable-dc1394 --enable-pthreads --enable-xvid --enable-x11grab --enable-libogg --enable-x264 --enable-libfaad --enable-libfaac --enable-libamr-nb --enable-libamr-wb --enable-gpl --enable-pp --disable-strip
  libavutil version: 49.4.0
  libavcodec version: 51.40.4
  libavformat version: 51.12.1
  built on Jun 12 2007 10:37:35, gcc: 4.1.2 (Gentoo 4.1.2)

Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 25.00 (25/1)
Input #0, flv, from 'test.flv':
  Duration: 00:00:33.2, start: 0.000000, bitrate: 64 kb/s
  Stream #0.0: Video: flv, yuv420p, 192x144, 25.00 fps(r)
  Stream #0.1: Audio: mp3, 22050 Hz, mono, 64 kb/s
Unknown codec 'amr_nb'

Comment 2 Markus Rathgeb 2007-06-12 11:36:54 UTC
v0.4.9_p20070525
ffmpeg -formats | grep amr

FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --enable-static --enable-shared --cc=i686-pc-linux-gnu-gcc --disable-altivec --disable-debug --disable-audio-oss --disable-opts --enable-libmp3lame --enable-libvorbis --enable-libogg --enable-libtheora --enable-libogg --enable-liba52 --enable-dc1394 --enable-pthreads --enable-xvid --enable-x11grab --enable-libogg --enable-x264 --enable-libfaad --enable-libfaac --enable-libamr-nb --enable-libamr-wb --enable-gpl --enable-pp --disable-strip
  libavutil version: 49.4.0
  libavcodec version: 51.40.4
  libavformat version: 51.12.1
  built on Jun 12 2007 10:37:35, gcc: 4.1.2 (Gentoo 4.1.2)
 DE amr             3gpp amr file format
 DEA    libamr_nb
 DEA    libamr_wb

so when i use libamr_nb instead of amr_nb i get

[libamr_nb @ 0xb7e2e0c8]bitrate not supported: use one of 4.75k, 5.15k, 5.9k, 6.7k, 7.4k, 7.95k, 10.2k or 12.2k
Error while opening codec for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height

so i changed 12 to 12.2k - for me the problem is solved.
Comment 3 Marcin Kryczek (RETIRED) gentoo-dev 2007-06-21 19:01:06 UTC
This bug should not be closed. v0.4.9_p20070525 is hard masked and does not build on my system. the newest "usable" version is ffmpeg-0.4.9_p20070330 and it has problems with amr
Comment 4 Markus Rathgeb 2007-06-21 19:33:26 UTC
Because I use now the newer version i cannot test it.
Could you test:

ffmpeg -i test.avi -ar 8000 -ac 1 -ab 12.2k -acodec amr_nb -vcodec h263 -s 176x144
-r 12 -b 30 test.3gp

(amr_nb with a bitrate 12.2k)
Comment 5 William L. Thomson Jr. (RETIRED) gentoo-dev 2008-06-30 02:14:00 UTC
It seems there is a problem with specifying channels. I am trying to decode from 3gp, to anything else, like mp4. However I keep running into

[libamr_wb @ 0x2ac068c45b40]amr_wb: multichannel decoding not supported

Even when I specify -ac 1, it still shows up as stereo, and thus the drivers code throws that error when channels are > 1. Not sure why it's ignoring the channels command. I have even tried 0, etc and nothing works :(
Comment 6 William L. Thomson Jr. (RETIRED) gentoo-dev 2008-07-09 19:53:04 UTC
Scratch my comments on this, problem wasn't with amr at all but another codec
Comment 7 jippie 2008-09-06 19:00:55 UTC
encoding amr used to work with media-video/ffmpeg-0.4.9_p20070129 on my system; please refer to my wiki pakge http://wirespeed.xs4all.nl/mediawiki/index.php/Convert_MP3_to_Nokia_6630_ringtone_(amr)

With the current version media-video/ffmpeg-0.4.9_p20080326 I just get:$ ffmpeg -i 8k.wav -acodec amr output.amr
FFmpeg version UNKNOWN, Copyright (c) 2000-2008 Fabrice Bellard, et al.
  configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --enable-static --enable-shared --cc=i686-pc-linux-gnu-gcc --disable-altivec --disable-debug --disable-ffplay --disable-ipv6 --disable-optimizations --disable-encoders --enable-liba52 --enable-x11grab --enable-libfaad --enable-libamr-nb --enable-libamr-wb --enable-nonfree --enable-gpl --enable-postproc --enable-avfilter --enable-avfilter-lavf --enable-swscale --disable-stripping
  libavutil version: 49.6.0
  libavcodec version: 51.53.0
  libavformat version: 52.12.0
  libavdevice version: 52.0.0
  libavfilter version: 0.0.0
  built on Jul 19 2008 11:37:02, gcc: 4.1.2 (Gentoo 4.1.2 p1.1)
Input #0, wav, from '8k.wav':
  Duration: 00:00:06.5, bitrate: 128 kb/s
    Stream #0.0: Audio: pcm_s16le, 8000 Hz, mono, 128 kb/s
Unknown encoder 'amr'
Comment 8 Alexis Ballier gentoo-dev 2008-10-22 05:17:51 UTC
ffmpeg -i audiodump.wav -ar 8000 -ac 1 -ab 12.2k -acodec libamr_nb toto.3gp

this worksforme(tm)
probably your docs/wikis need updating, amr_nb has been renamed to libamr_nb as stated before.