imtiyazkhalani / xuggle

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

Speex encoding doesnt work using Xuggle FFMPEG #195

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
ffmpeg.exe -i input.wav -f ogg -acodec libspeex ff.spx

Output:
a ff.spx file which is unplayable by Foobar2000, and it badly garbled in 
VLC.

Foorbar2000 displays in its console: could not enumerate tracks 
(Unsupported format or corrupted file) on ff.spx

Speexdec output:
C:\Program Files\Xuggle\bin>speexdec.exe ff.spx ff.wav
Decoding 8000 Hz audio using narrowband mode (stereo)
Invalid/corrupted comments

Console Output:

FFmpeg version SVN-r19668-xuggle-3.2.814, Copyright (c) 2000-2009 Fabrice 
Bellard, et al.
  built on Aug 19 2009 09:34:25, gcc: 4.2.4 (TDM-1 for MinGW)
Input #0, wav, from 'input.wav':
  Duration: 00:00:57.33, bitrate: 128 kb/s
    Stream #0.0: Audio: pcm_mulaw, 8000 Hz, 2 channels, s16, 128 kb/s
Output #0, ogg, to 'ff.spx':
    Stream #0.0: Audio: libspeex, 8000 Hz, 2 channels, s16, 24 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
size=     219kB time=57.36 bitrate=  31.2kbits/s
video:0kB audio:179kB global headers:0kB muxing overhead 21.908491%

What operating system and JVM version are you using.
Windows XP SP3

Original issue reported on code.google.com by ra...@raisoftware.ro on 25 Aug 2009 at 10:27

GoogleCodeExporter commented 8 years ago
Please jpost your input file online somewhere, and paste a link to it here.

Original comment by art.cla...@gmail.com on 25 Aug 2009 at 5:36

GoogleCodeExporter commented 8 years ago
Hello Art,

The TestSpeex.zip file is attached. Package contents:

pcm_8k_stereo.wav - original input file
pcm_8k_stereo_speexenc.spx - input file transcoded with speexenc.exe
pcm_8k_stereo_ffmpeg.spx - transcoded file to speex using Xuggle-FFMpeg. This 
file 
cannot be opened by Foobar2000 and is garbled in VLC. It is also double the 
size of 
the SpeexEnc encoded file.

pcm_8k_mono.wav - stereo file converted to mono
pcm_8k_mono_speexenc.spx - reference file transcoded with speexenc.exe
pcm_8k_mono_ffmpeg.spx - transcoded file to speex using Xuggle-FFMpeg. This 
file is 
NOT garbled but still cannot be opened by Foobar2000. Again, double the size of 
the 
SpeexEnc file

In summary, there are three issues:
1. Garbled sound when using stereo.
2. Invalid comment in header.
3. FFMpeg uses non-default Speex bitrate.

Original comment by ra...@raisoftware.ro on 26 Aug 2009 at 9:14

Attachments:

GoogleCodeExporter commented 8 years ago
Hi there,

You're right, and I can reproduce the echo -- I believe it has to do with the 
quality
settings that FFmpeg uses.

However, when encoding using the Xuggler API I'm not seeing similar issues.

I added speex encoding to FFmpeg primarily so it could be used through the 
Xuggler
API, so I'm afraid this is low priority to fix at the moment.

Other comments: (1) I only added support for encoding to FLV and OGG 
containers, not
SPX, so I wouldn't expect that to work; (2) eventually the FFmpeg (Justin in
particular) will add speex encoding proper to FFmpeg, and then I'll drop my
implementation in favor of theirs, so again, not likely to fix it in the free 
product.

Original comment by art.cla...@gmail.com on 2 Sep 2009 at 4:32

GoogleCodeExporter commented 8 years ago
Hey Art,

Thanks for the answer. Can you please post your Xuggle test code as attachment?

> You're right, and I can reproduce the echo -- I believe it has to do with the
> quality settings that FFmpeg uses.

It works with mono files, it doesn't work with stereo input files.

> (1) I only added support for encoding to FLV and OGG containers,
> not SPX, so I wouldn't expect that to work;

SPX container *IS* Ogg, it just have the extension changed. You get the same 
result 
with:
ffmpeg.exe -i pcm_8k_stereo.wav -acodec libspeex ff.ogg

Regards,
Rares

Original comment by ra...@raisoftware.ro on 2 Sep 2009 at 11:16

GoogleCodeExporter commented 8 years ago
Hmm....actually my test code just does mono.  I'll look at the stereo thing, 
that
might be easier to fix.

Original comment by art.cla...@gmail.com on 2 Sep 2009 at 2:11