[Speex-dev] VLC only sees a fraction of Speex wrapped in OGG
tmatth at videolan.org
Thu Mar 5 13:35:43 PST 2015
On Thu, Mar 5, 2015 at 2:18 PM, SellBuy Sammamish <sellbuysam at gmail.com> wrote:
> My name is Igor, I am new to this forum.
> I have a peculiar problem with my OGG/Speex implementation: I encode a short
> PCM stream in OGG/Speex, but the result can not be read by VLC and MediaInfo
> reports that the file is too short (240ms). In reality the file contains
> about 2.7 sec worth of audio.
> Another interesting thing I noticed is that the file *can* be read
> successfully in Audacity. Yes, that is right, Audacity reads the file
> perfectly fine whereas all other tools only play a short swoosh.
> I am going to upload the files here: http://1drv.ms/1w7OPs6. The first one
> (GoToServer-Igor.ogg) is the problematic one. The second one
> (GoToServer_official.ogg) was generated using speexenc and plays just fine.
You will want to step through your implementation and see how it
behaves differently than speexenc, in this case.
> The third one (GoToServer1.wav) is the original source.
> How do you guys typically go about debugging such issues?
I usually do what you did, try different players until one works, and
then look at what they're doing differently.
> What OGG information is relevant to measuring the content length?
You might want to check out https://github.com/moumar/ruby-ogginfo or
other implementations that calculate the duration (I'm assuming that's
what you mean by "length") of ogg files.
> Any clues as to how come VLC can't read the file but Audacity can?
VLC has a plugin that wraps libspeex (for decoding) and a plugin that
wraps libogg (for demuxing). The issue might be in one or both of
these plugins. You can also force VLC to demux with libavformat and
decode with libavcodec (which I believe is what Audacity does in this
case), by doing:
vlc --demux avformat --codec avcodec GoToServer-Igor.ogg
If this works (whereas the default didn't), consider filing a bug with VLC:
More information about the Speex-dev