Buffering on mp3, not FLAC - Android

Need help? Post your questions here.

Moderator: moderators

Buffering on mp3, not FLAC - Android

Postby boar » Tue Jul 12, 2011 11:38 pm

Hello,
First, awesome project. Thank you sindre.

Managed to set up server (Windows 7) / android client (CDMA HTC Desire, 2.1 stock) - app/server are latest version as of yesterday...

Read many threads about transcoding, one very helpful one in particular was here: http://forum.subsonic.org/forum/viewtop ... c&start=60

Also, for 1st time setup, I think the FAQ should include a couple other pointers that I had to dig around the forums for (or, more 'stickied' pointers perhaps), but that's for another thread ;)

Got FLAC transcoding to OGG and it works fine most times.
MP3, however, still pauses. I've tried all bitrates on the Android. Even w/full signal, it stops around 5 seconds into a song.

Tried transcoding MP3 > OGG, and it still stops and must re-buffer anywhere from 5-20 seconds into a song (VBR MP3 source, haven't tried any CBR files yet as I don't have many).

I find it strange that transcoding FLAC to OGG works nearly perfect, while MP3, or even transcoded MP3 suffers. In one thread (can't find it now) I recall reading something about Android (especially HTC w/Sense) having issues with a read buffer that's too small, and rooting enables some form of workaround. My phone's not rooted, nor do I intend to root it (at least, not anytime soon).

Just looking to see if there is any way to either fix the app to buffer a bit more on MP3 (it seems to buffer more data when FLAC > OGG is played...), or otherwise tweak this to work better. It's a great bit of programming, I'm just hopeful it can be fixed to operate more smoothly...

Tried changing quality setting (OGG) to 1 (don't want to dare try 0 ...yet...), and bitrate settings with little effect. Pausing still occurs on MP3 files, transcoded or not - - any help appreciated!!! :)

---

Transcoder settings:
FLAC > OGG:
oggenc2 --quiet --quality=1 -o - %s -s 1

MP3 > OGG:
ffmpeg -v 0 -i %s -f ogg -vn -acodec libvorbis -ar 44100 -aq 1 -ac 2 -map_meta_data 0:0 -

Code: Select all
[7/12/11 5:59:27 PM CDT]

DEBUG

InputStreamReaderThread

(c:\subsonic\transcode\ffmpeg) Stream #0.0: Audio: vorbis, 44100 Hz, 2 channels, s16, 64 kb/s



[7/12/11 5:59:27 PM CDT]

DEBUG

InputStreamReaderThread

(c:\subsonic\transcode\ffmpeg) Stream mapping:



[7/12/11 5:59:27 PM CDT]

DEBUG

InputStreamReaderThread

(c:\subsonic\transcode\ffmpeg) Stream #0.0 -> #0.0



[7/12/11 5:59:27 PM CDT]

DEBUG

InputStreamReaderThread

(c:\subsonic\transcode\ffmpeg) Press [q] to stop encoding



[7/12/11 5:59:27 PM CDT]

DEBUG

InputStreamReaderThread

(c:\subsonic\transcode\ffmpeg) size= 2840kB time=256.26 bitrate= 90.8kbits/s



[7/12/11 5:59:28 PM CDT]

DEBUG

InputStreamReaderThread

(c:\subsonic\transcode\ffmpeg)



[7/12/11 5:59:28 PM CDT]

DEBUG

InputStreamReaderThread

(c:\subsonic\transcode\ffmpeg) video:0kB audio:2399kB global headers:4kB muxing overhead 18.203760%
boar
 
Posts: 9
Joined: Tue Jul 12, 2011 11:16 pm

Postby boar » Wed Jul 13, 2011 10:29 pm

Tried older client (2.5) and still had issues.

Also, my carrier (U.S. Cellular) did release Android 2.2 for my phone, but it has a rather borked implementation of the audio which made Rhapsody (and other streaming services) unlistenable... I ended up getting a replacement phone w/2.1 on it due to this, and other issues, so I'm hesitant to update again since my phone operates pretty well right where it is.

It does look like there's a possibly slightly updated version online, so I might see how it is on a phone in the stores...
boar
 
Posts: 9
Joined: Tue Jul 12, 2011 11:16 pm

Postby boar » Mon Jul 25, 2011 7:13 pm

Still having issues.

Carrier 2.2 for my phone is same version with bad implementation of Stagefright which I refuse to updated to. Also still not ready to root my phone...

Updated to most current Subsonic app, and stuttering is now present with FLAC at any bitrate.
(edit: listenable bitrate... 32kbps works. 96kbps does not... [3g])

Any suggestions on different transcoding that doesn't suck on android 2.1?

If direct mp3 playback is bad, transcoded ogg is bad, what other option(s) do I have?

A whole new phone?

Giving up?

I'd LOVE to donate to this project, but I'm afraid that stuttering streaming on my phone is a huge negative point on this.
boar
 
Posts: 9
Joined: Tue Jul 12, 2011 11:16 pm

Postby GJ51 » Tue Jul 26, 2011 3:19 am

If the best you can get is 32kbps ... it's time for a new carrier.
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 boar » Tue Jul 26, 2011 9:59 pm

haha, my carrier's fine. I can stream "HQ" Rhapsody streams (192kbps IIRC) just fine. Same for video clips.

Network monitor app shows good throughput, even at around half signal strength - 40-100KB/s (kiloBYTES/sec) easily.

Think the problem is with how the app buffers, at least on this particular droid/OS (2.1) combo.
boar
 
Posts: 9
Joined: Tue Jul 12, 2011 11:16 pm

Postby GJ51 » Wed Jul 27, 2011 12:09 am

Test your phone on my site.

http://maplegrovepartners.subsonic.org

guest
guest

It could be the Droid, we've seen a lot of reported issues with the Droid series.
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 boar » Wed Jul 27, 2011 5:14 pm

Same pausing / buffering after a few seconds. Thanks for letting my try though :)

I've had another user PM me on testing my server side of things, which worked fine for them...

At this point, I'd say it has to be the droid/OS.

It seems FLAC > OGG works without stuttering, but only at "0" quality (which still sounds tolerable). Even upping that to '1' causes pauses in the stream.

What bothers me is that MP3 > OGG still stutters at the same bitrate (128kbps). Of course, I'd rather not transcode an MP3 file, as it doesn't seem like it should be needed.

Is there any possible way to tweak the code (and/or add an option somewhere) to use some other method of buffering so that it copies the completed download to the SD card afterwards?
Essentially - give the software a way to cache the current track in local memory (RAM instead of SD card), and only copy the complete file from memory after it is done downloading???

Not sure if that's even possible, just a thought.. Not sure if other apps use RAM to buffer directly, again, just a thought..
boar
 
Posts: 9
Joined: Tue Jul 12, 2011 11:16 pm

Postby GJ51 » Wed Jul 27, 2011 5:41 pm

Unfortunately, it seems that the problem is with Stagefright on the Droid series. We have seen this before and you might try a search here for Stagefright to see if any of the threads offer a solution you can live with.
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


Return to Help

Who is online

Users browsing this forum: No registered users and 5 guests