Possible to tell Subsonic Android App how much to buffer?

General discussions.

Moderator: moderators

Possible to tell Subsonic Android App how much to buffer?

Postby jensonc » Sat Jul 09, 2011 7:00 pm

First off, I am a HUGE fan of this software and it has been running on my Win7 x64 box w/1.5TB RAID1 just flawlessly the past few months. My only real hang-up is the frequent buffer pauses while I'm streaming in my car over my Verizon 3g connection. I know this isn't really a 'problem' with any of the Subsonic pieces, it's more of a shoddy 3g connection than anything.

That being said, I was wondering if it would be possible to configure or mod SS to force it to buffer a certain amount of the song before it starts playing. I believe that the songs start playing too fast, so 10-20 seconds after the song starts, it has to pause so it can buffer more. I'd like to be able to tell subsonic to not start playing the song in the first place until it's buffered x% of the song. I would rather wait a little longer for my song to start playing, as opposed to having it start sooner and having it pause partway into the song :)

This also might be an issue of compression at the server level. I tried Google Music for a day or 2 and noticed that my songs buffered WAY fast, therefore I wouldn't get any skips or pauses while streaming to my phone. However, due to my concern of privacy, I disabled GM the same day and will continue to use SS quite happily.

I really think this would be a cool thing to be able to do. Maybe this belongs in the Feature Requests forum? I'll let one of the mods move it if they feel it belongs in there instead. Just thought more folks would see it in General :)

Cheers!!
jensonc
 
Posts: 17
Joined: Mon Mar 21, 2011 7:08 pm

Postby GJ51 » Sun Jul 10, 2011 5:36 am

I transcode everything for mobile use to ogg at a lower bit rate to get better results and eliminate the buffering on 3g.

http://forum.subsonic.org/forum/viewtop ... nscode+ogg
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Postby jensonc » Tue Jul 12, 2011 2:07 pm

Thanks Gary! That mp3 > ogg transcoder works nicely, although I'm not sure how to resample at a lower bitrate. Does that command already do it for me? I'm still getting the buffering pauses over 3g, but I think it's mostly to do with my horrible Verizon data reception from inside my house. But the ogg transcoding is working in my Android player, I can see that much.

I tried to add the lame step 2 for resample, but it errored out, presumably because lame can only resample mp3's? Not sure why else it would fail. And I don't have any flac's, so I don't think the flac > ogg steps are applicable here.

Thanks for the tip man!!
jensonc
 
Posts: 17
Joined: Mon Mar 21, 2011 7:08 pm

Postby GJ51 » Tue Jul 12, 2011 2:40 pm

The q parameter affects the bitrate. The lower you set q the lower the bitrate. You can experiment until you get a good balance between bitrate and quality that will accomodate your bandwidth over 3g. q2 should work over most poor 3g connections, but if it doesn't try 1. q0 is about 64kbps, if it doesn't work there it's time to switch your carrier.


Quality 0 is roughly equivalent to 64kbps average, 5 is roughly 160kbps, and 10 gives about 400kbps. Most people seeking very-near-CD-quality audio encode at a quality of 5 or, for lossless stereo coupling, 6. The default setting is quality 3, which at approximately 110kbps gives a smaller filesize and significantly better fidelity than .mp3 compression at 128kbps

Here's my mp3 > ogg string

It's one Step:

ffmpeg -v 0 -i %s -f ogg -vn -acodec libvorbis -ar 44100 -aq 5 -ac 2 -map_meta_data 0:0 -

You can see here that I'm using q 5 (aq 5) which works pretty well for my 3g. You can go much lower and still get good music quality if you need to. I used q2 for a while and found it acceptable.

Uncheck the setting as "default" and be sure to check it for use on your mobile player definition.
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Postby jensonc » Tue Jul 12, 2011 5:07 pm

You the man Gary. I will give that a try when I get home. Thanks for the help.

So, ogg is a better quality format than mp3 I take? I will just have to play around and see what works for me and my setup. The main reason I listen to SS over 3g is to stream it to my Moto T505 when I'm driving so I can listen to my SS library over my car speakers. But I'm guessing that the little bit of radio static coming from the T505 FM transmitter will outweigh the loss in quality of me going from a 128kb bitrate mp3 to a 64 ogg.
jensonc
 
Posts: 17
Joined: Mon Mar 21, 2011 7:08 pm

Postby GJ51 » Tue Jul 12, 2011 7:02 pm

That's true. I have a T505 in my Suburban, that I use on road trips. I have to search a new FM setting about every 50 miles to keep the interference down. SS works way better over Bluetooth when I use it in my car.

Ogg seems to be able to maintain better quality at lower transfer rates than other formats. It was actually some other users that first tipped me off to the advantages of ogg.
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Postby jensonc » Tue Jul 12, 2011 9:13 pm

Well, I tried adjusting the q down to 1 and 0, but my buffering is still pretty bad over 3g. The song sounds fine for 10-20 seconds, but then it will stop and buffer some more. I have verified in the SS logs that the transcoder is using -aq 0. I guess my 3g is just that bad in Des Moines. It's really spotty and in a lot of spots I'll only have 1 or 2 bars. Terrible. You would think the biggest "city" in Iowa would have better coverage. I have absolutely no problems with wifi, it works like a dream.

Would you mind logging into my server with your SS app and testing the streaming over your 3g? I'll make a test username and password for you and PM you the creds and server address after I tweak the android[test] player to use the mp3>ogg step.
jensonc
 
Posts: 17
Joined: Mon Mar 21, 2011 7:08 pm

Postby GJ51 » Tue Jul 12, 2011 11:33 pm

Sure, just send me the credentials on a pm, and by all means test your phone on my server below.

I'd also recommend installing speedtest.net app from the market to test your bandwidth. 3g has been getting worse on Sprint ever since the EVO's became popular, I usually get about 256-512 down, but sometimes it's way worse. Time of day is also a factor as user demand ebbs and flows.
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Postby HeWhoIsLunchbox » Wed Jul 20, 2011 11:37 pm

The mp3 > ogg transcode works great for my music (which is mostly 256 kbps mp3 or better) using q5. It doesn't work well for low bitrate stuff, which is all of my podcasts and audiobooks. It doubles the size of my files that are 64 kbps mp3. Is there way to fix this other than lowering the ogg quality?
HeWhoIsLunchbox
 
Posts: 22
Joined: Wed Jul 20, 2011 11:21 pm


Return to General

Who is online

Users browsing this forum: No registered users and 19 guests