Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001485MPDInput Plugins - Filepublic2007-04-24 20:432008-11-12 09:00
Reportern8gray 
Assigned Tocirrus 
PrioritylowSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Versiongit 
Summary0001485: mpd cannot play .m4a files
DescriptionAny time I try to play a .m4a file (ripped from a CD in iTunes OS X) I get the something like the following error:

Apr 24 18:32 : error decoding MP4 file: /mnt/spool/music/n8gray/The Orb/Orblivion/05 Molten Love.m4a
Apr 24 18:32 : faad2 error: No standard extension payload allowed in DRM

Running faad by hand, it appears that this is a *warning*, not an error. I don't understand why this warning is even happening -- there is no DRM on any of these files.
Additional Information[n8gray@alpaugh bin]$ mpd --version
mpd (MPD: Music Player Daemon) 0.12.1

Copyright (C) 2003-2006 Warren Dukes <warren.dukes@gmail.com>
This is free software; see the source for copying conditions. There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Supported formats:
mp3 mp2 ogg ogg flac wav au aiff aif m4a mp4 mpc amf dsm far gdm imf it med mod mtm s3m stm stx ult uni xm

Supported outputs:
alsa oss pulse shout

[n8gray@alpaugh bin]$ uname -a
Linux xxx.xxx.xxx.xxx 2.6.20-1.2312.fc5smp #1 SMP Tue Apr 10 15:30:02 EDT 2007 i686 i686 i386 GNU/Linux
TagsNo tags attached.
Attached Files? file icon test-file.m4a [^] (1,008,141 bytes) 2007-04-25 13:58

- Relationships

-  Notes
(0001391)
jat (administrator)
2007-04-25 13:18

Could you attach a file that's doing this so that I can test it?
(0001393)
n8gray (reporter)
2007-04-25 13:59

Try the test file I just attached.
THanks!
(0001394)
jat (administrator)
2007-04-25 14:47
edited on: 2007-04-25 14:48

I can't reproduce the error message with Gentoo's heavily patched faad2 2.0. What version of faad2 are you using? Please note what distribution you're using if you installed faad2 from your package manager, as most distributions patch faad2 extensively.

Also, this isn't a warning, but a frame decoding error. It seems that the faad command line decoder ignores frame errors and tries to continue decoding, while MPD stops on any frame error. Which is the correct way is somewhat debatable.

(0001396)
n8gray (reporter)
2007-04-25 15:51

I built mpd from the fc5 i386 *source* rpm at:
  http://dries.ulyssis.org/rpm/packages/mpd/info.html [^]

Here's the info on the faad2-devel it was built against:

"""
[n8gray@alpaugh mpd-0.12.1]$ rpm -qi faad2-devel
Name : faad2-devel Relocations: (not relocatable)
Version : 2.5 Vendor: ATrpms.net
Release : 7.fc5.at Build Date: Fri 24 Nov 2006 05:59:58 AM PST
Install Date: Wed 18 Apr 2007 06:04:09 PM PDT Build Host: octopus.physik.fu-berlin.de
Group : Development/Libraries Source RPM: faad2-2.5-7.fc5.at.src.rpm
Size : 353879 License: GPL
Signature : DSA/SHA1, Fri 24 Nov 2006 06:00:00 AM PST, Key ID 508ce5e666534c2b
Packager : ATrpms <http://ATrpms.net/> [^]
URL : http://www.audiocoding.com/ [^]
Summary : Development libraries of the FAAD 2 AAC decoder
Description :
FAAD 2 is a LC, MAIN and LTP profile, MPEG2 and MPEG-4 AAC decoder, completely
written from scratch.

This package contains development files and documentation for libfaad.
"""
(0001398)
jat (administrator)
2007-04-25 20:04

Ah, you're running faad2 2.5. That could be why I can't reproduce it.

In any case, I'm kind of hesitant to "fix" this. If frame decode errors are logged, but otherwise ignored, corrupt/non-MP4 files are likely to just spam the error log with lots of messages, while either playing static or just silence.
(0001399)
n8gray (reporter)
2007-04-25 23:46

A bit more data: my faad rpms came from ATrpms while my mpd rpm came from dries. I tried using faad 2.0 rpms from dries to see if it helped but it made no difference. In the end I've just patched the mpd code to comment out the error check. I've listened to a couple of albums with no problems.

I can understand your reluctance to hack around this, since it seems hard to distinguish "bad" errors from "good" ones. OTOH, lots of people have many m4a files thanks to iTunes, so it's really bad news if mpd can't handle them properly. It's hard to say if this is a problem with mpd, faad, or my configuration, so I would suggest waiting to see if anybody else reports this problem. In the meantime I'm getting by with my hacked-up code.

FWIW, searching for the error message "No standard extension payload allowed in DRM" revealed practically nothing, suggesting that maybe this is just a problem with my system.
(0001400)
jat (administrator)
2007-04-26 11:51

Well, I'm not going to do anything about this now. But I will leave the bug open in case anyone else has similar problems. If we get any more reports like this I'll see if there's some nicer way to work around it.
(0001418)
toft (reporter)
2007-05-17 15:02

Hi

I experience the same problem with faad2 2.5 (built from FreeBSD 6.2 ports) and mpd 0.12.2 (built manually from source):

May 17 20:59 : error decoding MP4 file: /home/mt/music/censored.m4a
May 17 20:59 : faad2 error: No standard extension payload allowed in DRM

mplayer plays the file just fine using the same faad2.

Trying to work around the problem, I commented out the frame check in inputPlugins/mp4_plugin.c, but now I get this error message instead:

May 17 21:29 : problems opening audio device while playing "censored.m4a"

The message indicates a problem with my audio device, but mpd plays my other files just fine (not in the m4a/aac format).

Failing to fix this myself or even working around it, I hope somebody will fix this in the near future :-) Thanks in advance.
(0001419)
toft (reporter)
2007-05-17 17:12

A follow-up to my previous post:

I've run mplayer with debug messages turned on to find out what's inside my .m4a files:

    mplayer -msglevel all=8 censored.m4a

It turns out that mplayer first identifies the .m4a file as a Quicktime/MOV file:

    Checking for MOV
    ISO: File Type Major Brand: ISO/IEC 14496-1 (MPEG-4 system) v2
    ISO: File Type Minor Version: 0
    ISO: File Type Compatible Brand #0: mp42
    ISO: File Type Compatible Brand #1: isom
    MOV: free space (len: 52413)
    s->pos=800 newpos=C800 new_bufpos=CCD5 buflen=0
    MOV: Movie DATA found!
    MOV: Movie data: start: ccdd end: aeb93e
    s->pos=D000 newpos=AEB800 new_bufpos=AEB93E buflen=0
    MOV: Movie DATA found!
    MOV: Movie data: start: aeb946 end: aeb946
    MOV: Movie header found!
    MOV: Movie header: start: aeb94e end: af866e
    s->pos=AEC000 newpos=AF8000 new_bufpos=AF866E buflen=0
    Quicktime/MOV file format detected.

It then reads approx 12,000 samples (doing apparently nothing with them), before it discovers an audio stream:

    [...]
    Sample 12270: pts=12564480 off=0x00AEB1FC size=929
    Sample 12271: pts=12565504 off=0x00AEB59D size=929
    ==> Found audio stream: 0
    Audio bits: 16 chans: 2 rate: 44100
    MOV: Found MPEG4 audio Elementary Stream Descriptor atom (54)!

Apparently, mplayer doesn't invoke faad until now:

    ==========================================================================
    Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
    dec_audio: Allocating 4608 bytes for input buffer.
    dec_audio: Allocating 49152 + 65536 = 114688 bytes for output buffer.
    FAAD: Decoder init done (0Bytes)!
    FAAD: Negotiated samplerate: 44100Hz channels: 2
    FAAD: got 320kbit/s bitrate from MP4 header!
    AUDIO: 44100 Hz, 2 ch, s16le, 320.0 kbit/22.68% (ratio: 40000->176400)
    Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio) decoder)
    ==========================================================================

And then it starts the playback:

    Starting playback...
    decaudio: minlen=65536 maxlen=131072 declen=65536 (max=114688)
    decaudio: decoding 65536 bytes, max: 114688 (49152)
    s->pos=AF866E newpos=C800 new_bufpos=CCDD buflen=0
    FAAD: Decoded zero samples!
    FAAD: Successfully decoded frame (4096 Bytes)!
    FAAD: Successfully decoded frame (4096 Bytes)!
    [...]

I guess it will require a lot of code to make mpd able to do all this magic. Mplayer works in mysterious ways, being able to identify and decode almost all formats... In my eyes, identifying a Quicktime/MOV file and walking through its contents isn't even in the realm of mpd (but maybe it has to be?).

This is just my 2 cents. I hope you are able to utilize the noise. Maybe it's just my particular .m4a files that are weird.
(0001502)
xmarcusx (reporter)
2007-07-09 12:30
edited on: 2007-07-09 13:31

hi!

i've experienced the same problem also with mpd v0.13.0.


Jul 09 19:16 : error decoding MP4 file: /mnt/public/[...].m4a
Jul 09 19:16 : faad2 error: No standard extension payload allowed in DRM


can you fix this? thanks in advance.

mpd: v0.13.0
faad2: 2.5-7 (faad2-2.5-7.src.rpm) -- atrpms

faad2 recompiled with: --with-drm & --with-mp4v2

--cut--

playlist: play 0:"Turbonegro/Party Animals/01 - Turbonegro - Intro- The Party Zone.m4a"
closeAllListenSockets called
closing listen socket 0
interface 0: closed
took 0.000000 to init player
decoder PID: 17813
copyMpdTagToOB: !acceptMetadata || !tag
interface 0: command returned 0

--cut--

faad2 error: No standard extension payload allowed in DRM
playlist: stop

--cut--

(0001848)
pbuelow (reporter)
2007-12-16 18:27

What do we need to do to fix this for the bigger distros? I'm using a personally built .13 with FC7 and the usual crowd of dependencies, specifically FAAD2 2.5.7. What's required to fix this, I'm willing to help. Most of the samples I have are from files purchased from iTunes that I'm trying to make work with mpd. It seems random that some of the files work but others don't.

As a side note, would it help if I removed and replaced faad with my own hand built version? It has some dependencies, so anything radical is probably out, but I'm willing to try different stuff. I'm having a party soon, and mpd is my music distribution player. Let me know what I can do to help out, code or otherwise?
(0002077)
dottout (reporter)
2008-09-23 13:03
edited on: 2008-09-23 13:06

hi, I have another issue with mp4 files.
relevant strings from mpd --version:
mpd (MPD: Music Player Daemon) 0.14.0
Supported formats:
mp3 mp2 ogg oga flac m4a mp4 aac mpc

when I launch mpd --create-db --verbose, it hangs on this kind of file, with no useful output. e.g:
explore: found: David Bowie - Let's Dance.mp4 (David Bowie - Let's Dance.mp4)
but..nothing happens, it just hangs

I have faad2-2.6.1 faac-1.26 libmp4v2-1.5. mplayer is able to play these files, they arent corrupted

(0002327)
cirrus (administrator)
2008-11-05 03:17

the test file works with the current git version, so I assume this has been fixed meanwhile.

- Issue History
Date Modified Username Field Change
2007-04-24 20:43 n8gray New Issue
2007-04-24 20:43 n8gray Status new => assigned
2007-04-24 20:43 n8gray Assigned To => Avuton Olrich
2007-04-25 13:18 jat Note Added: 0001391
2007-04-25 13:58 n8gray File Added: test-file.m4a
2007-04-25 13:59 n8gray Note Added: 0001393
2007-04-25 14:47 jat Note Added: 0001394
2007-04-25 14:48 jat Note Edited: 0001394
2007-04-25 15:51 n8gray Note Added: 0001396
2007-04-25 20:04 jat Note Added: 0001398
2007-04-25 23:46 n8gray Note Added: 0001399
2007-04-26 11:51 jat Note Added: 0001400
2007-05-17 15:02 toft Note Added: 0001418
2007-05-17 17:12 toft Note Added: 0001419
2007-05-17 17:17 toft Issue Monitored: toft
2007-07-09 12:30 xmarcusx Note Added: 0001502
2007-07-09 13:24 xmarcusx Note Edited: 0001502
2007-07-09 13:29 xmarcusx Note Edited: 0001502
2007-07-09 13:31 xmarcusx Note Edited: 0001502
2007-12-16 18:23 pbuelow Issue Monitored: pbuelow
2007-12-16 18:27 pbuelow Note Added: 0001848
2008-09-23 13:03 dottout Note Added: 0002077
2008-09-23 13:06 dottout Note Edited: 0002077
2008-10-25 13:00 Avuton Olrich Assigned To Avuton Olrich => cirrus
2008-10-25 13:53 Avuton Olrich Category => Input Plugins - File
2008-10-27 04:18 cirrus Priority normal => low
2008-10-27 04:18 cirrus Severity major => minor
2008-11-05 03:17 cirrus Note Added: 0002327
2008-11-05 03:17 cirrus Status assigned => resolved
2008-11-05 03:17 cirrus Fixed in Version => git
2008-11-05 03:17 cirrus Resolution open => fixed
2008-11-12 09:00 Avuton Olrich Status resolved => closed


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker