Benjamin Larsson <[email protected]> added the comment:

Mark wrote:
> New submission from Mark <[email protected]>:
>
> With some flv files using the nellymoser codec, ffmpeg does not 
> correctly identify the sampling frequency. ffmpeg then produces files 
> with low and deep audio. Here are a couple examples of files ffmpeg 
> won't correctly convert:
>
> http://video.whothaman.net/010/250/10250/10250.orig
> http://video.whothaman.net/010/969/10969/10969.orig
>
> Using a tool called yamdi to insert metadata fixes the problem. It's at 
> http://yamdi.sourceforge.net/
>   

This issue could be valid.

The demuxer must let the codec probe sample rates using this code if the 
stream is identified to have this sample rate:

Stream #0.1: Audio: nellymoser, 5512 Hz, mono,

168 <#l168>     switch (buf_size) {
169 <#l169>         case 64:    // 8000Hz
170 <#l170>             blocks = 1; break;
171 <#l171>         case 128:   // 11025Hz
172 <#l172>             blocks = 2; break;
173 <#l173>         case 192:   // 16000Hz
174 <#l174>             blocks = 3; break;
175 <#l175>         case 256:   // 22050Hz
176 <#l176>             blocks = 4; break;
177 <#l177>         case 512:   // 44100Hz
178 <#l178>             blocks = 8; break;
179 <#l179>         default:
180 <#l180> 
            av_log(avctx, AV_LOG_DEBUG, "Tag size %d.\n", buf_size);
181 <#l181>             return buf_size;
182 <#l182>     }

My proposed fix to this issue is to let the demuxer set the samplerate 
to 0 when it finds a 5512 samplerate for nellymoser. And then add a 
check in nellymoserdec that checks if the samplerate is 0 and if it is 
triggered set the samplerate based on the blocksize based on the code 
from above.

MvH
Benjamin Larsson

_____________________________________________________
FFmpeg issue tracker <[email protected]>
<https://roundup.ffmpeg.org/roundup/ffmpeg/issue1319>
_____________________________________________________

Reply via email to