alfianrahmn / xuggle

Automatically exported from code.google.com/p/xuggle
0 stars 0 forks source link

streams which request 16kHz sample rate fail to find coder #214

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. run audio transcoder demo 
2. attach to it via publisher app
3. select an audio frequency between 12kHz and 17kHz

note that when it does work properly that the frequency is not any
arbitrary value but quantized to some value like [8000, 11025, 22050, etc.]
and not the exact value specified in publisher.

What is the expected output?

no exception! :)

What do you see instead?

[ERROR] [Transcoder[x]] com.xuggle.red5.Transcoder - could not find codec
for audio stream: 1, CODEC_ID_NONE,
com.xuggle.xuggler.IStreamCoder@669132528[codec=null;time base=1/1000;frame
rate=0/0;sample rate=5512;channels=1;]
[ERROR] [Transcoder[x]] com.xuggle.red5.Transcoder - uncaught exception:
Could not find codec for audio stream
java.lang.RuntimeException: Could not find codec for audio stream
    at com.xuggle.red5.Transcoder.openInputCoders(Transcoder.java:624)
    at com.xuggle.red5.Transcoder.transcode(Transcoder.java:440)
    at com.xuggle.red5.Transcoder.run(Transcoder.java:386)
    at java.lang.Thread.run(Thread.java:637)
[ERROR] [Transcoder[x]] com.xuggle.red5.io.Red5Handler - got uncaught
exception: {}
java.lang.RuntimeException: error parsing tag header: size mismatch
    at com.xuggle.red5.io.Red5Handler.parseFLVTag(Red5Handler.java:510)
[xuggle-xuggler-red5.jar:3.1.915]
    at com.xuggle.red5.io.Red5Handler.unsafe_write(Red5Handler.java:366)
[xuggle-xuggler-red5.jar:3.1.915]
    at com.xuggle.red5.io.Red5Handler.write(Red5Handler.java:938)
[xuggle-xuggler-red5.jar:3.1.915]
    at com.xuggle.xuggler.XugglerJNI.IContainer_writeTrailer(Native Method)
[xuggle-xuggler.jar:3.3.927]
    at com.xuggle.xuggler.IContainer.writeTrailer(IContainer.java:778)
[xuggle-xuggler.jar:3.3.927]
    at com.xuggle.red5.Transcoder.closeContainer(Transcoder.java:762)
[xuggle-xuggler-red5.jar:3.1.915]
    at com.xuggle.red5.Transcoder.run(Transcoder.java:395)
[xuggle-xuggler-red5.jar:3.1.915]
    at java.lang.Thread.run(Thread.java:637) [na:1.6.0_13]

Original issue reported on code.google.com by tre...@gmail.com on 23 Sep 2009 at 9:16

GoogleCodeExporter commented 8 years ago
Just to give full data (Robert found this):

It appears that setting a sample-rate in the Red5 publisher application to any 
value
>= 12 and <= 17 causes this error.  RTMP/FLV does not send actual sample-rates 
in the
streams -- they send index values that correspond to look-up tables that Adobe 
has
published in the FLV spec.  The values differ depending on the codec, so 
NellyMoser
has a different value than speex for some sample-rates.

The bug here is likely in Red5Message or Red5Handler not correctly changing 
FLV's
'index' value to the actual sample-rate (e.g. 8000, 16000, 11025, etc).

Original comment by art.cla...@gmail.com on 23 Sep 2009 at 9:33