[FFmpeg-devel] [BUG] Cannot decode asf file with G.726 audio

Patrice Bensoussan patrice.bensoussan
Sun May 6 20:07:03 CEST 2007


Hello,

It seems ffmpeg cannot decode some asf files which have G.726 audio.  
Here is the output I get:

  > ./ffmpeg -i ~/Desktop/sample_g726.asf ~/Desktop/sample.mp4
FFmpeg version SVN-r8919, Copyright (c) 2000-2007 Fabrice Bellard, et  
al.
   configuration: --cc=gcc-3.3 --enable-pthreads --disable-network -- 
disable-vhook --enable-small --enable-libmp3lame --enable-libfaac -- 
disable-decoder=atrac3 --disable-decoder=cook --extra-ldflags=-L/ 
Users/patriceb/tmp/WMA/opt/lib --extra-cflags=-I/Users/patriceb/tmp/ 
WMA/opt/include --enable-gpl --enable-x264 --enable-liba52 --enable- 
libfaad
   libavutil version: 49.4.0
   libavcodec version: 51.40.4
   libavformat version: 51.12.1
   built on May  6 2007 18:00:14, gcc: 3.3 20030304 (Apple Computer,  
Inc. build 1819)

Seems stream 1 codec frame rate differs from container frame rate:  
1000.00 (1000/1) -> 5.00 (5/1)
Input #0, asf, from '/Users/patriceb/Desktop/sample_g726.asf':
   Duration: 00:01:30.4, start: 0.600000, bitrate: 488 kb/s
   Stream #0.0: Audio: g726, 32000 Hz, mono, 128 kb/s
   Stream #0.1: Video: mpeg4, yuv420p, 320x240,  5.00 fps(r)
Output #0, mp4, to '/Users/patriceb/Desktop/sample.mp4':
   Stream #0.0: Video: mpeg4, yuv420p, 320x240, q=2-31, 200 kb/s,   
5.00 fps(c)
   Stream #0.1: Audio: aac, 32000 Hz, mono, 64 kb/s
Stream mapping:
   Stream #0.1 -> #0.0
   Stream #0.0 -> #0.1
[g726 @ 0x37402c]G726: unsupported audio format
Error while opening codec for input stream #0.0

Looking more into g726.c here is what I could find out:

In g726_init, there is a test on the bit rate. This file uses 128000  
so the first test fails. If I understand the code correctly, it seems  
we are missing some tables in G726Tables_pool to support this bit rate.

I am not too familiar with G.726, so not sure which values should be  
added in this table... Anyone can have a look and see if this can be  
fixed? I have uploaded the sample file:

ftp://upload.mplayerhq.hu/MPlayer/incoming/sample_g726

Thanks,
Patrice





More information about the ffmpeg-devel mailing list