{"action":"created","issue":{"url":"https://api.github.com/repos/pithos/pithos/issues/171","labels_url":"https://api.github.com/repos/pithos/pithos/issues/171/labels{/name}","comments_url":"https://api.github.com/repos/pithos/pithos/issues/171/comments","events_url":"https://api.github.com/repos/pithos/pithos/issues/171/events","html_url":"https://github.com/pithos/pithos/issues/171","id":67572688,"number":171,"title":"Network buffering, doing it right?/User adjustable buffer size in preferences.","user":{"login":"JasonLG1979","id":6667703,"avatar_url":"https://avatars.githubusercontent.com/u/6667703?v=3","gravatar_id":"","url":"https://api.github.com/users/JasonLG1979","html_url":"https://github.com/JasonLG1979","followers_url":"https://api.github.com/users/JasonLG1979/followers","following_url":"https://api.github.com/users/JasonLG1979/following{/other_user}","gists_url":"https://api.github.com/users/JasonLG1979/gists{/gist_id}","starred_url":"https://api.github.com/users/JasonLG1979/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JasonLG1979/subscriptions","organizations_url":"https://api.github.com/users/JasonLG1979/orgs","repos_url":"https://api.github.com/users/JasonLG1979/repos","events_url":"https://api.github.com/users/JasonLG1979/events{/privacy}","received_events_url":"https://api.github.com/users/JasonLG1979/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":42,"created_at":"2015-04-10T11:24:59Z","updated_at":"2015-04-24T14:46:02Z","closed_at":"2015-04-24T14:46:02Z","body":"I've been reading up on network stream buffering with Gstreamer and Pithos doesn't seem to be doing it as well as it could. http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/section-buffering-strategies.html seems to suggest that when buffering network streams you should start the pipeline in the paused state and wait for the async_done message before even caring if the buffer is full. Using the default buffer size also seems to be a bad idea as it seems to be way to small for the 192 kbit/s stream and to large for the 64/32 kbit/s the result is that while initially buffering the 192 stream (on Gsteamer 1.4 at least) the buffer fills and drains a couple times before playback begins. And 64/32 kbit/s streams seem to buffer more than needed. Setting the buffer size to match the stream bitrate with set_property('buffer-size') (self.player.set_property('buffer-size', 192000) for the 192 stream for example) so that it buffers 1 sec of audio before it tries to begin playback seems to work pretty good for me, but it would be nice to have a UI option to adjust the buffer size in seconds.\r\n\r\nMy experimental branch has code (among other things) that automatically adjusts the buffer-size based on stream bitrate.\r\nhttps://github.com/JasonLG1979/pithos/tree/JasonLG1979-experimental      "},"comment":{"url":"https://api.github.com/repos/pithos/pithos/issues/comments/95952356","html_url":"https://github.com/pithos/pithos/issues/171#issuecomment-95952356","issue_url":"https://api.github.com/repos/pithos/pithos/issues/171","id":95952356,"user":{"login":"JasonLG1979","id":6667703,"avatar_url":"https://avatars.githubusercontent.com/u/6667703?v=3","gravatar_id":"","url":"https://api.github.com/users/JasonLG1979","html_url":"https://github.com/JasonLG1979","followers_url":"https://api.github.com/users/JasonLG1979/followers","following_url":"https://api.github.com/users/JasonLG1979/following{/other_user}","gists_url":"https://api.github.com/users/JasonLG1979/gists{/gist_id}","starred_url":"https://api.github.com/users/JasonLG1979/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JasonLG1979/subscriptions","organizations_url":"https://api.github.com/users/JasonLG1979/orgs","repos_url":"https://api.github.com/users/JasonLG1979/repos","events_url":"https://api.github.com/users/JasonLG1979/events{/privacy}","received_events_url":"https://api.github.com/users/JasonLG1979/received_events","type":"User","site_admin":false},"created_at":"2015-04-24T14:46:02Z","updated_at":"2015-04-24T14:46:02Z","body":"Working on this. Closing it."}}