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:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  Using MP4Box to fix iTunes-downloaded mp4 files
« previous next »
  • Print
Pages: [1] 2

Author Topic: Using MP4Box to fix iTunes-downloaded mp4 files  (Read 15587 times)

Offline Bockrox

  • Member
  • *
  • Posts: 26
Using MP4Box to fix iTunes-downloaded mp4 files
« on: August 28, 2010, 02:01:59 PM »
I've noticed that Rockbox is unable to play some mp4 files that were downloaded with iTunes. When I attempt to play any of these files, it skips over them without playing any music.

I've done some research, and this seems to be related to the way metadata is stored in these files. Rockbox requires all metadata to be at the start of the file, but this is not always the case with iTunes music. Please correct me if I am wrong about this.

I've seen two solutions proposed for this problem -- using mp4creator --optimize on the files and using some tool provided by MP4Box on the files.

Does anyone have any experience using MP4Box to solve this issue? I try using MP4Box -flat filename.mp4, but I get the following message and the file is not altered:
Code: [Select]
[iso file] Box "stsd" has [some number] extra bytes

Any insight would be greatly appreciated. Thanks!
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Using MP4Box to fix iTunes-downloaded mp4 files
« Reply #1 on: August 28, 2010, 02:15:41 PM »
Quote from: Bockrox on August 28, 2010, 02:01:59 PM
I've noticed that Rockbox is unable to play some mp4 files that were downloaded with iTunes. When I attempt to play any of these files, it skips over them without playing any music.

I've never heard of this problem.  Post one of the files.

Quote from: Bockrox on August 28, 2010, 02:01:59 PM
I've done some research, and this seems to be related to the way metadata is stored in these files. Rockbox requires all metadata to be at the start of the file, but this is not always the case with iTunes music. Please correct me if I am wrong about this.

This should be fixed in r24147:

http://svn.rockbox.org/viewvc.cgi?view=rev;revision=24147
Logged

Offline Bockrox

  • Member
  • *
  • Posts: 26
Re: Using MP4Box to fix iTunes-downloaded mp4 files
« Reply #2 on: August 28, 2010, 02:23:50 PM »
Thank you for the info, saratoga.

I believe these were the two primary threads that led me to this understanding. They discuss a very similar issue to the one I am having and recommend mp4creator --optimize as a solution.
http://forums.rockbox.org/index.php?topic=14368.msg115048#msg115048
http://forums.rockbox.org/index.php?topic=6748.0

The only problem my distro doesn't (seem) to provide mp4creator. I was hoping I could accomplish the same task using MP4Box, but as I said I seem to be having some problems with that tool.
Logged

Offline AlexP

  • Global Moderator
  • Member
  • *
  • Posts: 3688
  • ex-BigBambi
Re: Using MP4Box to fix iTunes-downloaded mp4 files
« Reply #3 on: August 28, 2010, 02:24:39 PM »
What version of Rockbox do you have?
Logged
H140, F60, S120, e260, c240, Clip, Fuze v2, Connect, MP170, Meizu M3, Nano 1G, Android

Offline Bockrox

  • Member
  • *
  • Posts: 26
Re: Using MP4Box to fix iTunes-downloaded mp4 files
« Reply #4 on: August 28, 2010, 02:29:24 PM »
I'm currently running Rockbox 3.6.
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Using MP4Box to fix iTunes-downloaded mp4 files
« Reply #5 on: August 28, 2010, 02:31:08 PM »
Post one of the files or its unlikely anyone can help you.
Logged

Offline Bockrox

  • Member
  • *
  • Posts: 26
Re: Using MP4Box to fix iTunes-downloaded mp4 files
« Reply #6 on: August 28, 2010, 02:46:21 PM »
Hello again, saratoga. Thanks for the suggestion. I was a bit hesitant to submit a music file for obvious reasons.

Linked below is a music file that plays fine with most players (Totem, VLC, etc.) but cannot be played with Rockbox. I will most likely be removing it after this issue is resolved.

http://drop.io/hidden/8prkgfmoc8wvpdr/asset/YnJva2VuLW00YS1tNGE%253D

One additional thing I just remembered -- this file didn't come directly from iTunes. It was first downloaded from iTunes but then cracked with a DRM-removal tool (hymn, I believe).
Logged

Offline Buschel

  • Developer
  • Member
  • *
  • Posts: 190
Re: Using MP4Box to fix iTunes-downloaded mp4 files
« Reply #7 on: August 29, 2010, 04:44:15 AM »
The issue is located in libm4a/demux.c. I cannot say whether there is a bug in the code or the header of the file...
Logged
iPod 5.5G 30GB, iPod nano 2G 8GB, 97% MPC and growing...
 

Offline Lear

  • Developer
  • Member
  • *
  • Posts: 533
Re: Using MP4Box to fix iTunes-downloaded mp4 files
« Reply #8 on: August 29, 2010, 09:04:34 AM »
demux.c expects a single atom in stsd, but there are two (mp4a and free) - making the following for-loop kind of silly. :) Don't know what the standard says, but it seems reasonable to ignore free chunks here.

Working on a fix... [edit] And fixed in r27938.
« Last Edit: August 29, 2010, 10:44:54 AM by Lear »
Logged

Offline Bockrox

  • Member
  • *
  • Posts: 26
Re: Using MP4Box to fix iTunes-downloaded mp4 files
« Reply #9 on: August 29, 2010, 11:47:41 AM »
Interesting. So I guess this was an unknown bug after all...

Is there an expected release date for 3.7? If not, I can try upgrading to the current build and report my results, as long as the current build is stable enough for day-to-day usage.
Logged

Offline AlexP

  • Global Moderator
  • Member
  • *
  • Posts: 3688
  • ex-BigBambi
Re: Using MP4Box to fix iTunes-downloaded mp4 files
« Reply #10 on: August 29, 2010, 12:40:28 PM »
It is.  It is very rare that the current build is broken.
Logged
H140, F60, S120, e260, c240, Clip, Fuze v2, Connect, MP170, Meizu M3, Nano 1G, Android

Offline Bockrox

  • Member
  • *
  • Posts: 26
Re: Using MP4Box to fix iTunes-downloaded mp4 files
« Reply #11 on: August 29, 2010, 05:33:27 PM »
Bad news. :-(

I installed r27943, but the issue was not fixed. Rockbox still skips the m4a song I posted (and all other songs on that album). In fact, r27943 even caused some issues with my theme, but that may be my own fault.
Logged

Offline soap

  • Member
  • *
  • Posts: 1678
  • Creature of habit.
Re: Using MP4Box to fix iTunes-downloaded mp4 files
« Reply #12 on: August 29, 2010, 05:47:01 PM »
Just to be sure...
You overwrote the entire .rockbox directory and not just the main file?

(no offense intended)
Logged
Rockbox Forum Guidelines
The Rockbox Manual
How to Ask Questions the Smart Way

Offline Buschel

  • Developer
  • Member
  • *
  • Posts: 190
Re: Using MP4Box to fix iTunes-downloaded mp4 files
« Reply #13 on: August 29, 2010, 05:57:46 PM »
I see some strange behaviour as well. On PCSim the fix is indeed working very well. On my iPod Video the fix is not working.

(Same is happening with another fix I submitted: r27939/r27940. Works fine on PCSim but not on target...)
Logged
iPod 5.5G 30GB, iPod nano 2G 8GB, 97% MPC and growing...
 

Offline Bockrox

  • Member
  • *
  • Posts: 26
Re: Using MP4Box to fix iTunes-downloaded mp4 files
« Reply #14 on: August 29, 2010, 06:14:35 PM »
Quote from: Buschel on August 29, 2010, 05:57:46 PM
On my iPod Video the fix is not working.

I am also using iPod Video 5G.

Quote from: soap on August 29, 2010, 05:47:01 PM
You overwrote the entire .rockbox directory and not just the main file?

No offense taken. I used the Rockbox Utility to install r27943. That overwrites the entire directory, right?

Thanks again for staying on top of this with me.
Logged

  • Print
Pages: [1] 2
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  Using MP4Box to fix iTunes-downloaded mp4 files
 

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

Page created in 0.105 seconds with 16 queries.