Page 1 of 1

Audio stutter -- Lost audio buffers when playing MP2

Posted: 13 Sep 2008 14:41
by macbelly
When VLC plays an MEPG-2 transport stream I regularly get stuttered audio (most audible with music). I see that VLC reports lost buffers for the audio at the moments the sound stutters. When I play the same stream using MPEG Streamclip there is no problem, nor is there a problem if convert the MPEG-2 to MPEG-4 using again MPEG Streamclip.

The original transport stream was received as DVB-S via a Dreambox-7025. I use MPEG Streamclip to trim the movie beginning and end and to remove commercials.

Any suggestions what I can do to make VLC play the files without stutter?

Thanks,
Erik

Re: Audio stutter -- Lost audio buffers when playing MP2

Posted: 17 Sep 2008 16:37
by eweri
Same for me - playing video files via NFS from a linux box running VDR (DVB-S reciever and recording solution http://www.vdr-portal.de) and there was no problem with 0.8.6 but with the new 0.9.2 the audio stutters round about every 5-10 seconds.
(MacBook Pro 2,4GHz 4GB RAM, MacOS X 10.5.4)

Hope someone finds a solution, bye,
eweri

Re: Audio stutter -- Lost audio buffers when playing MP2

Posted: 20 Sep 2008 12:23
by The DJ
We implemented a new mmap module in place of the file module. The mmap module caches what you have already read. Unfortunately, the developer that implemented it, forgot to add the READ AHEAD flag that the file module has. As such it ran out of data before the read could be executed over the network. This should be fixed in 0.9.3 when it is released.

Re: Audio stutter -- Lost audio buffers when playing MP2

Posted: 09 Oct 2008 21:25
by macbelly
... This should be fixed in 0.9.3 when it is released.
0.9.3 and 0.9.4 still have the same problem. About 25% of the audio buffers are lost when playing a .ts file. The problem is even worse than on 0.8.? versions.

regards,
Erik

Re: Audio stutter -- Lost audio buffers when playing MP2

Posted: 21 Oct 2008 21:37
by eweri
0.9.4 did not change any thing - every audio still stutters. This is what I get in the messages window:

Code: Select all

... ps debug: force SCR: 41435231400 ps debug: force SCR: 41435389944 ps debug: force SCR: 41435375400 ps debug: force SCR: 41435442044 ps debug: force SCR: 41435549944 ps debug: force SCR: 41435519388 ps debug: force SCR: 41435610044 ps debug: force SCR: 41435709944 main warning: computed PTS is out of range (98553), clearing out main warning: PTS is out of range (98707), dropping buffer main warning: output PTS is out of range (114715), clearing out main warning: PTS is out of range (74719), dropping buffer main warning: PTS is out of range (50723), dropping buffer main warning: PTS is out of range (26726), dropping buffer main warning: PTS is out of range (2782), dropping buffer main warning: PTS is out of range (-21214), dropping buffer ps debug: force SCR: 41435663400 ps debug: force SCR: 41435778044 ps debug: force SCR: 41435869944 ps debug: force SCR: 41435807400 ps debug: force SCR: 41435946044 ps debug: force SCR: 41435951400 ps debug: force SCR: 41436029944 ps debug: force SCR: 41436114044 ps debug: force SCR: 41436095388 ps debug: force SCR: 41436189944 ps debug: force SCR: 41436282044 ps debug: force SCR: 41436239400 ps debug: force SCR: 41436349944 ps debug: force SCR: 41436383388 ps debug: force SCR: 41436450044 ps debug: force SCR: 41436509944 ...
I tried it against 0.8.6h and had no problems, no stutter and the statistic shows only a few dropped audio frames and I can scroll - also only a few dropped audio frames. Then I checked the same thing with 0.9.4 and surprise - it did not stutter any more. That maks me wonder what was going on and tried it again.
Looks to me that 0.8.6h does some prefetching or MacOS X does some sort of caching, because if I open the same video-file with 0.9.4 AFTER I had it opened with 0.8.6h there is no stutter for sometime (the first few minutes of the video) after that stutter starts again and statistic show only dropped audio frames - video plays smoothly.

Hope this helps to debug this error, bye
eweri

P.S. Just downloaded vlc-git-intel-20081012-0054 from the nightly-builds and NO stutter any more :D
P.S.S. This nightly build crashes often when I try to scroll forward/backward - well it is a nightly build

0.9.5-still not solved--Lost audio buffers when playing MP2

Posted: 25 Oct 2008 18:15
by macbelly
0.9.5 problem persists despite earlier messages (since 0.9.2) that problem had been identified and would be solved in next release ... :cry:
Erik

Re: Audio stutter -- Lost audio buffers when playing MP2

Posted: 26 Oct 2008 10:38
by trek1s
Hello,

I'm suffering from the same trouble when playing back mp3 files.

Code: Select all

[...] main warning: PTS is out of range (-36371), dropping buffer mpgatofixed32 debug: libmad error: bad main_data_begin pointer main warning: computed PTS is out of range (40101), clearing out main warning: PTS is out of range (40157), dropping buffer main warning: output PTS is out of range (51777), clearing out main warning: PTS is out of range (14055), dropping buffer main warning: PTS is out of range (-12057), dropping buffer main warning: PTS is out of range (-38171), dropping buffer main warning: computed PTS is out of range (44355), clearing out main warning: PTS is out of range (44398), dropping buffer main warning: output PTS is out of range (47309), clearing out main warning: PTS is out of range (18291), dropping buffer main warning: PTS is out of range (-7825), dropping buffer main warning: PTS is out of range (-33926), dropping buffer mpgatofixed32 debug: libmad error: bad main_data_begin pointer main warning: output date isn't PTS date, requesting resampling (-40040) main warning: buffer is 40040 in advance, triggering downsampling main warning: resampling stopped after 9580624 usec (drift: -572)
With 0.8.6h it worked just fine.

Does anybody know if there is any bug report open related to this? If not, I can try to create a new one.

Regards.

Re: Audio stutter -- Lost audio buffers when playing MP2

Posted: 03 May 2009 00:18
by Zet
Preferences » Input / Codecs » Access Modules » File » [click the 'Advanced' checkbox].
change the value for 'Caching value in ms.' to 600 (.6 seconds) fixed the stutter.
I read solution from internet.