INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Gapless audio in Gizmo and WebGizmo  (Read 2185 times)

sgomes

  • Junior Woodchuck
  • **
  • Posts: 68
Gapless audio in Gizmo and WebGizmo
« on: August 21, 2012, 05:20:15 pm »

Hey guys,

Any chance of adding gapless audio to Gizmo and WebGizmo?

Since you're transcoding the audio anyway (to mp3, looks like), perhaps you could output a single continuous stream, instead of switching streams for every track? I'd have no problem with this being a toggle on either the server or the client.

Thanks! :)
Logged

MGD_King

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 548
  • It's not easy being me, but it sure is fun!
Re: Gapless audio in Gizmo and WebGizmo
« Reply #1 on: August 23, 2012, 08:01:40 am »

I totally love this idea! But I don't know how easy it would be to implement because Gizmo doesn't technically "stream" the tracks to the device, it sends it as one MP3 that the device plays at a time for each track.

And I'm not sure how much transcoding is going on because when I play a FLAC file through Web Gizmo (and save the file locally instead of playing it) the bitrate is 128kbps. But if I play a known 256 or 320kbps file (and save it locally) the file is the same bitrate as it is on my computer. That poses big problems on my Android when I'm only on 3G, and sometimes even on 4G because it has to download a 10MB file as it's trying to play it, and it can't download the data fast enough to play it.
Logged

sgomes

  • Junior Woodchuck
  • **
  • Posts: 68
Re: Gapless audio in Gizmo and WebGizmo
« Reply #2 on: August 24, 2012, 04:05:40 am »

Interesting, I guess I should have done some testing with MP3 files :)

The problem with MP3 is that to have true gapless, you need to add extra ID3v2 tags to them to point out where the track actually ends (due to a limitation in the MP3 format). MC handles this nicely, of course, but Gizmo/WebGizmo probably wouldn't, because they're dependent on the browser/phone OS... Of course, if you have a single file/stream, that's not a problem, hence my suggestion.

Vorbis is a nice alternative, but most frameworks probably don't support it natively. Perhaps AAC?

In any case, the gaps can be at least significantly reduced by some platform-specific tricks. In Android, they finally added an option to the framework in Jelly Bean (4.1): http://developer.android.com/about/versions/android-4.1.html#Gapless

In WebGizmo, you could use some of the newer HTML5 audio APIs to separate streaming and playback, so that you can start streaming the next file before the current one finishes, ensuring a smoother transition. Or you can just use an existing library like jPlayer or SoundManager, which should have functionality for that as well, and gracefully switch between Flash and HTML5 where available.
Logged
Pages: [1]   Go Up