Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple buffer underrun if using VLC back-end #157

Closed
Clementine-Issue-Importer opened this issue Dec 6, 2013 · 11 comments
Closed

Multiple buffer underrun if using VLC back-end #157

Clementine-Issue-Importer opened this issue Dec 6, 2013 · 11 comments

Comments

@Clementine-Issue-Importer

From kadaimx on April 05, 2010 02:05:41

What steps will reproduce the problem? 1. Play an MP3 using the
2. The file will heard clipped. What is the expected output? What do you see instead? Playing as normal. What version of the product are you using? On what operating system? Revision 576 on Kubuntu 4.4.2 Please provide any additional information below. Console output:

[0x90bee40] main audio output warning: output date isn't PTS date,
requesting resampling (42480)
[0x90bee40] main audio output warning: audio drift is too big (121362),
dropping buffer
[0x90bee40] mpgatofixed32 audio output debug: libmad error: bad
main_data_begin pointer
[0x90bee40] main audio output warning: output date isn't PTS date,
requesting resampling (43238)
[0x90bee40] main audio output warning: audio drift is too big (137819),
dropping buffer
[0x90bee40] mpgatofixed32 audio output debug: libmad error: bad
main_data_begin pointer
[0x90bee40] main audio output debug: audio output is starving (23639),
playing silence
[0x90bee40] alsa audio output debug: recovered from buffer underrun

Aside from that, the file did not finished to play and the console was
spammed with the next output:

[0xadb00600] main audio output warning: audio drift is too big (133827),
dropping buffer
[0xadb00600] mpgatofixed32 audio output debug: libmad error: bad
main_data_begin pointer
[0xadb00600] mpgatofixed32 audio output debug: libmad error: bad
main_data_begin pointer
[0xadb00600] main audio output warning: output date isn't PTS date,
requesting resampling (1306112)
[0xadb00600] main audio output warning: audio drift is too big (1413498),
dropping buffer
[0xadb00600] main audio output warning: audio drift is too big (1387376),
dropping buffer

Original issue: http://code.google.com/p/clementine-player/issues/detail?id=157

@Clementine-Issue-Importer
Copy link
Author

From kadaimx on April 04, 2010 17:26:53

Additional to it, clementine does not keep playing files once a track is finished,
assuming that the playlist just finished, even if it is not.

@Clementine-Issue-Importer
Copy link
Author

From davidsansome on April 05, 2010 06:39:53

I've fixed the bug where it doesn't move to the next track once one has finished in r581 .

About the clipped sound, I've tried to fix it in r582 by increasing the size of the
buffer. Could you let me know if that works? If not, try increasing the size of the
buffer some more by changing src/engines/vlcengine.cpp line 46 (the one that says "--
file-caching=500"), and let me know how big you need to make it for it to play
smoothly.
Thanks!

Status: Accepted

@Clementine-Issue-Importer
Copy link
Author

From kadaimx on April 05, 2010 09:44:37

Well, using the default 500 appeared to work at the beggining, but then, after
stopping the playback, and restarting it (with the same file) the issue was pretty
clear, even, I got a message saying "Broken Pipe":

[0x8d51710] main audio output warning: resampling stopped after 9994870 usec (drift:
-40736)
[0x8d51710] main audio output warning: buffer is 40917 late, triggering upsampling
[0x8d51710] main audio output warning: output date isn't PTS date, requesting
resampling (42462)
[0x8d51710] main audio output warning: timing screwed, stopping resampling
[0x8d51710] main audio output warning: buffer is 83379 late, triggering upsampling
[0x8d51710] main audio output debug: audio output is starving (23418), playing silence
[0x8d51710] alsa audio output debug: recovered from buffer underrun
[0x8d51710] alsa audio output error: cannot write: Broken pipe <--------
[0x8d51710] alsa audio output debug: recovered from buffer underrun
[0x8d51710] main audio output debug: audio output is starving (486741), playing silence
[0x8d51710] main audio output warning: output date isn't PTS date, requesting
resampling (40009)
[0x8d51710] main audio output debug: audio output is starving (23366), playing silence
[0x8d51710] main audio output debug: audio output is starving (23290), playing silence
[0x8d51710] alsa audio output debug: recovered from buffer underrun

I'm going to test it with increments of 100 until the playback seems to work fine.

@Clementine-Issue-Importer
Copy link
Author

From kadaimx on April 05, 2010 10:06:06

Not sure if this is related, but whenever I compile clementine, I get this very same
warning:

[ 5%] Building CXX object src/CMakeFiles/clementine_lib.dir/engines/vlcengine.cpp.o

/home/kadai/Compile/clementine/src/engines/vlcengine.cpp: In member function ‘virtual
const Engine::Scope& VlcEngine::scope()’:
/home/kadai/Compile/clementine/src/engines/vlcengine.cpp:240: warning: comparison
between signed and unsigned integer expressions
/home/kadai/Compile/clementine/src/engines/vlcengine.cpp:244: warning: comparison
between signed and unsigned integer expressions

I just say this because in the console sometimes it is said that there is a bad pointer:

[0x8ba26b8] main audio output warning: output date isn't PTS date, requesting
resampling (41095)
[0x8ba26b8] main audio output warning: audio drift is too big (132906), dropping buffer
[0x8ba26b8] mpgatofixed32 audio output debug: libmad error: bad main_data_begin pointer
[0x8ba26b8] main audio output warning: output date isn't PTS date, requesting
resampling (41706)
[0x8ba26b8] main audio output warning: audio drift is too big (145700), dropping buffer

And, so far, I have modified "file-caching" to 4000.

But what I have seen, is that the playback sometimes plays correctly (just on the 1st
track player whenever started clementine, after two buffers overrun), and when I stop
and restart the problem returns.

@Clementine-Issue-Importer
Copy link
Author

From kadaimx on April 05, 2010 10:23:59

Ups... I just realized that I had not been installing the project after each compile x.x;

Gonna restart it again XDu

@Clementine-Issue-Importer
Copy link
Author

From kadaimx on April 05, 2010 10:35:57

Well, this time (checking that I installed the project each time) even with a value
as high as 16000 the issue was yet present.

No idea then why the buffer starves, or if someone else had a similar issue.

Used the revision 584 for this, on Kubuntu 9.10 running KDE SC 4.4.2 with VLC media
player installed (and not sure if that is the issue)

@Clementine-Issue-Importer
Copy link
Author

From kadaimx on April 05, 2010 15:15:11

I have made a discovery.

This error is reproducible if I enter this on the console:
vlc -I dummy --ignore-config --extraintf=logger --verbose=2
--audio-filter=clementine_scope --no-plugins-cache --aout=alsa 10.mp3

So, I'm thinking that the problem is in one of those arguments, and not in the file
caching.

Attached the vlc-log.txt file for extended details.

Attachment: vlc-log.txt

@Clementine-Issue-Importer
Copy link
Author

From himynameiszacHandiamapirate on April 05, 2010 15:21:16

Hey, I was just about to post about this. I just got an svn build (not built to
debug, but it's still pumping out a lot of info), and I'm getting these skippy
issues, with multiple filetypes. I'll attach a log of one run I made with an ogg
file, I stopped the track after a while. Hope this helps?

Attachment: vlc-log.txt

@Clementine-Issue-Importer
Copy link
Author

From kadaimx on April 05, 2010 15:30:10

Here is the solution:
Go to src/engines/vlcengine.cpp
Open the file and go to the line 50, it should look like this:

"--aout=alsa",        // The default, pulseaudio, is buggy

Then, comment the line to make look like this:

// "--aout=alsa", // The default, pulseaudio, is buggy

Compile and install clementine then.

Play your files normally and it will not clip anymore, more than a couple of times on
the very first file you play.

At least this worked for me.
But I need to check what audio system I have (I think alsa) so this can be a solution
for some or for all.

@Clementine-Issue-Importer
Copy link
Author

From davidsansome on April 06, 2010 09:59:28

I couldn't fix this in the end, and it looks like a fairly fundamental problem with
vlc and audio - there are lots of forum posts with people complaining about the same
thing, with no solutions.

Next experiment: gstreamer!

Status: Invalid

@Clementine-Issue-Importer
Copy link
Author

From kadaimx on April 06, 2010 10:06:58

Saw the same, but as a bug in launchpad for ubuntu.
Maybe this was related to a specific library of they, or as a kernel thing that I readed somewhere.

Anyway, thanks for this!
Gonna give gstreamer a hit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant