-
Notifications
You must be signed in to change notification settings - Fork 202
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
audio stops after some ammount of listening + strange thing with threads #12
Comments
(Sorry for the delay. Was travelling and had limited access to the computer). |
I verified, that the thread-increase even happens with the latest gstreamer1.0 version. I'll try to boild it down to a simple binary to be able to debug what is going on gstreamer (gmrender does not explicitly create new threads). (This could as well be the reason for the random stops of gmrender you observe, but I couldn't reproduce that yet on my development machine.) |
thank you for your investigation! maybe i can send you any logs to help? |
At least the thread increase I can reproduce, so no need for logs for that. But I haven't reproduced when it stops working (crashing?). It could be due to many threads (essentially running out of resources), but maybe there is another reason. I will try to do that on my RPi later. If I can't reproduce, then I'll ask you to run it in gdb to gather some evidence. |
ok. see you later then =) |
so it looks like a bug in Gstreamer? |
Yes; I could reproduce this and made an example code https://github.com/hzeller/gstreamer-gapless-test gstreamer0.10 (most common in current distributions) shows this behavior with the thread leak, but unfortunately, this version is not supported anymore, so didn't file a bug. I'll try see if I can find the reason and provide a patch. So I tried it with the upcoming gstreamer1.0 version - this one is broken for gapless playing of URIs it seems, so I filed a bug |
Yes please if you can find a problem in 0.10 version and fix it would be cool! Because it must take some time for Gstreamer team to fix that bug you filed for 1.0 version. Official repositories for RPi's Debian Weezy dont have even 1.0 version yet. |
found 2 more bug reports like yours: |
found 2 more bug reports like yours: Interesting. This seems to see trouble in 0.10, which seems to work though This could indeed be related to our |
Hi! Any news on gstreamer? |
On 5 May 2013 19:27, gunbro notifications@github.com wrote:
Someone from the gstreamer team was at least confirming the gstreamer 1.0 I have a one question. When i restart gmrender when he stuck full of
|
Ok i will try to ask him, seems like he a nice guy, maybe he help with this. |
" However, I am playing around with gstreamer 1.0 now and it looks as well like it eats threads :/" |
On 5 May 2013 19:54, gunbro notifications@github.com wrote:
All that streaming logic is built into gstreamer, that I don't want to One could think of a fuse filesystem that does that transparently. However, |
" However, I am playing around with gstreamer 1.0 now and it looks as well
Yes, working on a program to reproduce this. |
" However, I think it is easer to fix directly in gstreamer as it is clearly broken, so that should be fixed there. Yes, working on a program to reproduce this." |
So good news: The gstreamer bug https://bugzilla.gnome.org/show_bug.cgi?id=699794 is fixed! If it is possible to compile gstreamer from git, you can try that (the fix is in gst-plugins-base); otherwise we've to wait until packages show up to see if the 'audio stops after some amount of listening' is fixed with it as well. |
Yeah i saw, i was watching for this bug almost every day!) "Gapless playback using "about-to-finish" doesn't work with http URIs" must be fixed too for normal using? Shame on me i don't have skills to compile it from git. |
I presume, the change will show up in 1.0.8 (at least this is the target milestone marked in the bug). The 'about-to-finish' bug is more subtle and will probably not affect things in daily use (at home, i am using 1.0.6 now and it seems to work for regular use). You will have to re-compile gmrender-resurrect to make use of 1.0 library (the ./configure script will check for different versions). Once compiled for 1.0, incremental changes in updates to gstreamer will be picked up by virtue of dynamic linking. Regarding the configuration strings: yes, probably this is the case; personally, I like to set the sink directly via commandline flags, such as --gstout-audiosink=pulsesink |
So 'about-to-finish' bug must not affect gapless playing?? |
about-to-finish might affect the gapless playing, yes. But if you don't use that feature, things should be fine (and even if, as this is a race condition that might, uhm, often work). gmrender starts with the volume the system has initially, and I don't remember providing an option to pre-set it to something else. The configuration flags look about right. |
Maybe any chance to add that patch they used for 1.0 version to 0.10? |
The patch was a one-liner. So if the 0.10 code in that area is very |
Can you look in code of 0.10 and fix it when you have a time? |
"gmrender starts with the volume the system has initially, and I don't remember providing an option to pre-set it to something else." |
I just fix 0.10 by adding decoder->queue = queue; in the same file gsturidecodebin.c like in 1.0 and compile it to .deb and thread leaks stops now! :P |
Wonderful! |
How about your gstreamer-gapless-test ? Did you try it? |
Im also get rid of unnecessary pulseaudio. But alsa was resample by default to 16bit & 48khz and sound clicks and pops on usb dac, especially when i used foobar @ 24 bits. So i add: ctl.!default { cat /proc/asound/card0/pcm0p/sub0/hw_params cat /proc/asound/card0/pcm0p/sub0/hw_params |
I tried again on ICS phone this night and all was ok! |
Can you write up a bit more in default what you configured on the RPi to make things work smoothly in Alsa ? So what files to edit, what parameters to give to gmrender-resurrect. I'd like to have that as a reference to point people to. How are things otherwise, does the player still work with gapless and no-threads collecting and stuff ? If so, we can probably close this particular issue (we're still waiting for the gstreamer folks to catch up on the 1.0 bugs, but that is probably orthogonal). |
(Also, I did a lot of little changes recently, can you test if things still work fine in your set-up with a fresh git checkout ?) |
"Can you write up a bit more in default what you configured on the RPi to make things work smoothly in Alsa ? So what files to edit, what parameters to give to gmrender-resurrect. I'd like to have that as a reference to point people to." 1> I install https://github.com/Hexxeh/rpi-update and then update to special test branch sudo BRANCH=fiq_split rpi-update that containing the USB FIQ driver, this is meant to fix problems like:
2> i connect small usb dac (http://goo.gl/lxGea) to powered usb-hub pcm.!default { ctl.!default { 5> set gstreamer to use alsa: So i think thats all. |
"How are things otherwise, does the player still work with gapless and no-threads collecting and stuff ?" "(Also, I did a lot of little changes recently, can you test if things still work fine in your set-up with a fresh git checkout ?)" |
I try now fresh git and first problem appears that foobar cant play to gmrender again like some time ago, i tells: [UPnP] Stream address: http://192.168.1.109:50057/stream.wav |
ah, interesting. I changed the LastChange event to be proper XML with <?xml (can you give me an output of a logfile as described in I'll change that and let you know. On 22 May 2013 11:31, gunbro notifications@github.com wrote:
|
I have now changed the XML output. Can you try again ? On 22 May 2013 11:39, gunbro notifications@github.com wrote:
|
now its just: |
On 22 May 2013 12:00, gunbro notifications@github.com wrote:
Ok, did another change that might be related. Can you try again ? (I have Do you know if there is a way to get more log information out of foobar ? |
Now i works with 24bits: https://dl.dropboxusercontent.com/u/26402232/gmrender24bits.log But also it starts to work with 16bit LPCM but for first seconds, and then it stops: https://dl.dropboxusercontent.com/u/26402232/gmrender16bitsLPCM.log [UPnP] Stream address: http://192.168.1.109:52679/stream.l16 |
"Do you know if there is a way to get more log information out of foobar ?" |
Interesting, it doesn't seem to receive the time. It always says "Returned I'll add a bit more debug info to track this down. Hope you have time to On 22 May 2013 12:26, gunbro notifications@github.com wrote:
|
Ok, I have enabled more detailed action logging. Also I have found a place Can you try again ? (sorry for the inconvenience). |
now its: https://dl.dropboxusercontent.com/u/26402232/gmrenderLPCM.log [UPnP] Stream address: http://192.168.1.101:58495/stream.l16 |
for 24bit WAV: https://dl.dropboxusercontent.com/u/26402232/gmrenderWAV.log [UPnP] Stream address: http://192.168.1.101:59301/stream.wav |
So from the logs it looks like it is working now - did you actually hear On 22 May 2013 13:18, gunbro notifications@github.com wrote:
|
Only first few seconds, than sound stops. |
Are you look exactly in this log? > https://dl.dropboxusercontent.com/u/26402232/gmrenderLPCM.log |
Are you look exactly in this log: I was looking at the wav-log and it seems that foobar actively sent a stop In the LPCM log, there is an "Internal data flow error."; something |
"Did this work before ?" "I was looking at the wav-log and it seems that foobar actively sent a stop signal at position 00:17:09.842730" So again something with gstreamer? |
"Also, apparently there is never the full time of the track that it can determine." |
On 22 May 2013 15:00, gunbro notifications@github.com wrote:
The time is extracted from the stream by gstreamer. Maybe there is no such But to confirm: at least now you don't get any XML errors anymore and |
"But to confirm: at least now you don't get any XML errors anymore and things work at least as before." |
What I changed:
BTW, I now reverted one change that I did in the middle of figuring out what was going on with the XML ... that I thought should've been unrelated. So I've submitted that now (see change below) and it should still work. |
Slightly off-topic (but since I don't have your email address, I'll update this bug) I have started a wiki page to track the compatibility with control points. Since I know that you're using Foobar (and maybe other controllers), can you update the table with controllers you tested ? Thanks! |
I cant update to latest version yet, but i write some info on wiki. |
Thank you for gmrender! I use it on Raspberry Pi but i have one problem. Please help me!
When i listen to 2 or 3 albums in a row or long gapless mix (like this for example http://goo.gl/PmMAk) using BubbleUPnP on phone or tablet , its never plays till then end, just stops on random time but mostly about more than 1 hour. If i restart gmrender than its just well play again for next ~2 hours. I try to push songs from MiniDLNA on Pi, Home Media Server on Win7 or just directly from BubbleUPnP local media server and always same problem. Also gmrender create new thread after each song. Is this OK?
here is the log file i can get, dont know where to see else:
Action 'GetPositionInfo' was a success!
Action 'GetPositionInfo' was a success!
Action 'GetPositionInfo' was a success!
GStreamer: Got tags from element flacparse18
Action 'GetPositionInfo' was a success!
Action 'GetPositionInfo' was a success!
Action 'GetPositionInfo' was a success!
GStreamer: Got tags from element flacparse18
Action 'GetPositionInfo' was a success!
Action 'GetPositionInfo' was a success!
GStreamer: Got tags from element flacparse18
HZ: about-to-finish cb: setting uri http://192.168.1.111:8200/MediaItems/7295.flac
---------------------------------- Done playing....1
HZ: notify all uris changed ------
HZ:
upnp:classobject.item.audioItem.musicTrack/upnp:classdc:titleInner Disbelief (Acapella)/dc:titledc:creatorD-Bridge/dc:creatorupnp:artistD-Bridge/upnp:artistupnp:albumArtURIhttp://192.168.1.111:8200/AlbumArt/4613-7295.jpg/upnp:albumArtURIupnp:genreExperimental/upnp:genreupnp:albumFabricLive. 50/upnp:albumupnp:originalTrackNumber19/upnp:originalTrackNumberdc:date2010-01-01/dc:datehttp://192.168.1.111:8200/MediaItems/7295.flac
GStreamer: src: unhandled message type 8192 (stream-status)
GStreamer: src: unhandled message type 8192 (stream-status)
GStreamer: src: unhandled message type 8192 (stream-status)
GStreamer: src: unhandled message type 8192 (stream-status)
GStreamer: src: unhandled message type 8192 (stream-status)
GStreamer: src: unhandled message type 8192 (stream-status)
GStreamer: src: unhandled message type 8192 (stream-status)
GStreamer: src: unhandled message type 8192 (stream-status)
GStreamer: src: unhandled message type 8192 (stream-status)
GStreamer: src: unhandled message type 8192 (stream-status)
GStreamer: src: unhandled message type 8192 (stream-status)
GStreamer: src: unhandled message type 8192 (stream-status)
GStreamer: src: unhandled message type 8192 (stream-status)
GStreamer: src: unhandled message type 8192 (stream-status)
GStreamer: src: unhandled message type 8192 (stream-status)
GStreamer: src: unhandled message type 8192 (stream-status)
GStreamer: src: unhandled message type 8192 (stream-status)
GStreamer: src: unhandled message type 8192 (stream-status)
GStreamer: source: unhandled message type 262144 (duration)
The text was updated successfully, but these errors were encountered: