SellBuy Sammamish
2015-Mar-05 19:18 UTC
[Speex-dev] VLC only sees a fraction of Speex wrapped in OGG
Friends, 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 <http://mediaarea.net/nn/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. The third one (GoToServer1.wav) is the original source. Questions: 1. How do you guys typically go about debugging such issues? 2. What OGG information is relevant to measuring the content length? 3. Any clues as to how come VLC can't read the file but Audacity can? Thank you so much. Igor D. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20150305/fdac3250/attachment.htm
Tristan Matthews
2015-Mar-05 21:35 UTC
[Speex-dev] VLC only sees a fraction of Speex wrapped in OGG
Hi, On Thu, Mar 5, 2015 at 2:18 PM, SellBuy Sammamish <sellbuysam at gmail.com> wrote:> Friends, > > 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. > > Questions: > > 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: https://wiki.videolan.org/Report_bugs Best, Tristan
SellBuy Sammamish
2015-Mar-23 23:56 UTC
[Speex-dev] VLC only sees a fraction of Speex wrapped in OGG
Just wanted to update the thread. The problem has been resolved. The following tools mentioned here ( http://en.flossmanuals.net/ogg-theora/command-line-editing/analysing-ogg/) were particularly helpful: oggz-validate and oggz-dump. On Thu, Mar 5, 2015 at 1:35 PM, Tristan Matthews <tmatth at videolan.org> wrote:> Hi, > > On Thu, Mar 5, 2015 at 2:18 PM, SellBuy Sammamish <sellbuysam at gmail.com> > wrote: > > Friends, > > > > 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. > > > > Questions: > > > > 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: > https://wiki.videolan.org/Report_bugs > > Best, > Tristan >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20150323/5b065e83/attachment.htm