Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  gapless in Winamp - not gapless in Rockbox?
« previous next »
  • Print
Pages: [1] 2

Author Topic: gapless in Winamp - not gapless in Rockbox?  (Read 4606 times)

Offline nieroster

  • Member
  • *
  • Posts: 61
gapless in Winamp - not gapless in Rockbox?
« on: September 30, 2009, 04:16:40 PM »
I have a question regarding gapless playback in Rockbox. I've downloaded a live album from http://www.coldplay.com/lrlrl/lr.html and played it back in Winamp: no problem! I played it back on my H140 using Rockbox: small gaps between the tracks.

I investigated a litte and found out that the mp3 files have been encoded by FhG. They play gapless in Winamp, but not in foobar2000. When I edit the gapless information in foobar2000 and set the encoder delay to 576, they also play gapless in foobar, but not on my H140.

Does Rockbox ignore the encoder delay tag when a file is not encoded by lame? Why does Winamp play the tracks gapless if they aren't?

Logged

Offline yapper

  • Rockbox Expert
  • Member
  • *
  • Posts: 794
Re: gapless in Winamp - not gapless in Rockbox?
« Reply #1 on: September 30, 2009, 05:59:36 PM »
See http://www.rockbox.org/wiki/GaplessHowTo which includes the following warning:
Quote
If your format of choice remains MP3, then you can still have gapless playback by using any recent version of the LAME encoder, which will encode gapless by default. From LAME v3.90.3 upwards Rockbox will decode gapless, files encoded by older versions or other encoders are not guaranteed to playback gapless in Rockbox.
Logged
G2 iPod 20GB / Sansa c240 v1 + 2GB microSD / Sansa c250 v1 / Sansa e250 v1 + 8GB microSDHC / Sansa Fuze v2 + 32GB microSDHC

Offline nieroster

  • Member
  • *
  • Posts: 61
Re: gapless in Winamp - not gapless in Rockbox?
« Reply #2 on: September 30, 2009, 06:32:22 PM »
Quote from: yapper on September 30, 2009, 05:59:36 PM
See http://www.rockbox.org/wiki/GaplessHowTo which includes the following warning:
Quote
If your format of choice remains MP3, then you can still have gapless playback by using any recent version of the LAME encoder, which will encode gapless by default. From LAME v3.90.3 upwards Rockbox will decode gapless, files encoded by older versions or other encoders are not guaranteed to playback gapless in Rockbox.

I've read this of course and I know that I can reencode the files, but this is not an elegant solution.

If for whatever reason a player can play them gapless, why can't rockbox?
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: gapless in Winamp - not gapless in Rockbox?
« Reply #3 on: October 01, 2009, 01:30:52 AM »
Because nobody has implemented any other *accurate* gapless methods for Rockbox.

Many players will attempt "gap removal" type functions by attempting to detect "silence" (not always true silence) at the end of a track, or other methods to approximate near-gapless or gapless-sounding playback.

Rockbox uses special tags lame adds to identify where the encoded audio actually ends and gets as near true gapless as possible on MP3.

If you know the exact methods these other programs use to handle gapless playback in non-lame MP3 files, it's possible one could be implemented, but it's somewhat unlikely the "approximately gapless" methods many use will be accepted.
Logged

Offline markun

  • Developer
  • Member
  • *
  • Posts: 462
Re: gapless in Winamp - not gapless in Rockbox?
« Reply #4 on: October 01, 2009, 03:41:44 AM »
The files are encoded with iTunes which also adds tags for gapless playback. We already support these tags in AAC. Since ID3 tag handling has been moved to apps/metadata in the source tree it should be easier to add support for it.

EDIT: good news :) I manged to add support for iTunes gapless. The code is not clean enough to be committed, but I can post a patch on the patch tracker lateron. I tested it with your coldplay album and there are no gaps.

EDIT: patch added: http://www.rockbox.org/tracker/task/10629
« Last Edit: October 01, 2009, 08:04:16 AM by markun »
Logged

Offline nieroster

  • Member
  • *
  • Posts: 61
Re: gapless in Winamp - not gapless in Rockbox?
« Reply #5 on: October 01, 2009, 09:01:08 AM »
Well thanks a lot! I did not expect that the issue will be treated so quickly!

Thanks again, I will test.

EDIT: It works great! I've also tested another album encoded in iTunes: no gaps!

!!GREAT WORK!!
« Last Edit: October 01, 2009, 02:19:34 PM by nieroster »
Logged

Offline markun

  • Developer
  • Member
  • *
  • Posts: 462
Re: gapless in Winamp - not gapless in Rockbox?
« Reply #6 on: October 02, 2009, 05:25:32 AM »
I made a second patch (don't know if you tried that one or the first one) and it's now in SVN.
Logged

Offline zfox

  • Member
  • *
  • Posts: 6
Re: gapless in Winamp - not gapless in Rockbox?
« Reply #7 on: October 02, 2009, 10:38:59 AM »
A popular AAC codec w/out gapless playback support by Rockbox is Nero AAC http://www.nero.com/eng/downloads-nerodigital-nero-aac-codec.php

Adding support to Rockbox would be nice. The Apple firmware supports gapless playback with this Nero codec.
Logged

Offline markun

  • Developer
  • Member
  • *
  • Posts: 462
Re: gapless in Winamp - not gapless in Rockbox?
« Reply #8 on: October 02, 2009, 06:30:19 PM »
Do you have some test files for me?
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: gapless in Winamp - not gapless in Rockbox?
« Reply #9 on: October 02, 2009, 08:46:39 PM »
I asked one of the Nero developers ages ago about how they stored their gapless info and he said the documentation is the faad source code.
Logged

Offline zfox

  • Member
  • *
  • Posts: 6
Re: gapless in Winamp - not gapless in Rockbox?
« Reply #10 on: October 02, 2009, 11:22:02 PM »
Quote from: markun on October 02, 2009, 06:30:19 PM
Do you have some test files for me?

http://users.auth.gr/~kyriak/temp/
Logged

Offline markun

  • Developer
  • Member
  • *
  • Posts: 462
Re: gapless in Winamp - not gapless in Rockbox?
« Reply #11 on: October 03, 2009, 04:45:06 AM »
Thanks for the files.

I see 4 Nero specific atoms in the mp4 files: "ndrm", "flags" and "chpl". Not sure of any of those is used to store the gapless information. I can't find much information online.
Logged

Offline zfox

  • Member
  • *
  • Posts: 6
Re: gapless in Winamp - not gapless in Rockbox?
« Reply #12 on: October 03, 2009, 01:39:35 PM »
Making a question I got the following reply...

The gapless data is in the chapter list "chpl". MP4Box can handle this, so that's an example of how to read it. Basically, the chapter describes when the track starts in the decoded data and when it ends.
« Last Edit: October 03, 2009, 01:57:36 PM by zfox »
Logged

Offline markun

  • Developer
  • Member
  • *
  • Posts: 462
Re: gapless in Winamp - not gapless in Rockbox?
« Reply #13 on: October 04, 2009, 06:29:36 AM »
I made a test file and get the following info:

with mp4box -info:
Code: [Select]
... Duration 00:00:31.059
... 1338 samples

with mp4box -diso:

Code: [Select]
  <ChapterListBox>
  <BoxInfo Size="26" Type="chpl" />
  <FullBoxInfo Version="1" Flags="0" />
  <Chapter name="" startTime="00:00:00.059" />
  </ChapterListBox>

in foobar2000:

Code: [Select]
Duration : 0:31.000 (1367100 samples)

Do you think these 0.059 seconds should be trimmed from the end or the beginning? Well, we can just implement it and test both of course.
Logged

Offline zfox

  • Member
  • *
  • Posts: 6
Re: gapless in Winamp - not gapless in Rockbox?
« Reply #14 on: October 04, 2009, 08:54:20 AM »
Decoding my files to wav with winamp (no gapless playback for nero files) you see the gap (with a wav editor) at the beginning.
Logged

  • Print
Pages: [1] 2
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  gapless in Winamp - not gapless in Rockbox?
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.105 seconds with 14 queries.