GNOME Bugzilla – Bug 149158
[qtdemux/faad] MP4 file encoded Nero AAC Codec 2.6.2.0 is not played
Last modified: 2005-03-10 15:29:53 UTC
The file is 30mb so I attached 1MB start of it as BBB requested.
Couldn't upload but this url has the file http://www.laaxo.pp.fi/TeeSummerTranceMix2004.mp4
running this file with latest CVS for everything gives me : ERROR (0x8109fe8 - 303207:43:44.030271000) qtdemux( 2981) qtdemux.c(1318):qtdemux_type_get: unknown QuickTime node type iods ERROR (0x8109fe8 - 303207:43:44.030568000) qtdemux( 2981) qtdemux.c(1318):qtdemux_type_get: unknown QuickTime node type ctts ERROR (0x8109fe8 - 303207:43:44.030637000) qtdemux( 2981) qtdemux.c(1318):qtdemux_type_get: unknown QuickTime node type nmhd ERROR (0x8109fe8 - 303207:43:44.030693000) qtdemux( 2981) qtdemux.c(1318):qtdemux_type_get: unknown QuickTime node type mp4s ERROR (0x8109fe8 - 303207:43:44.030748000) qtdemux( 2981) qtdemux.c(1318):qtdemux_type_get: unknown QuickTime node type mpod ERROR (0x8109fe8 - 303207:43:44.030817000) qtdemux( 2981) qtdemux.c(1318):qtdemux_type_get: unknown QuickTime node type nmhd ERROR (0x8109fe8 - 303207:43:44.030872000) qtdemux( 2981) qtdemux.c(1318):qtdemux_type_get: unknown QuickTime node type mp4s ERROR (0x8109fe8 - 303207:43:44.030968000) qtdemux( 2981) qtdemux.c(1318):qtdemux_type_get: unknown QuickTime node type iods ERROR (0x8109fe8 - 303207:43:44.031045000) qtdemux( 2981) qtdemux.c(1318):qtdemux_type_get: unknown QuickTime node type ctts ERROR (0x8109fe8 - 303207:43:44.031109000) qtdemux( 2981) qtdemux.c(1318):qtdemux_type_get: unknown QuickTime node type nmhd ERROR (0x8109fe8 - 303207:43:44.031165000) qtdemux( 2981) qtdemux.c(1318):qtdemux_type_get: unknown QuickTime node type mp4s ERROR (0x8109fe8 - 303207:43:44.031220000) qtdemux( 2981) qtdemux.c(1318):qtdemux_type_get: unknown QuickTime node type mpod ERROR (0x8109fe8 - 303207:43:44.031275000) qtdemux( 2981) qtdemux.c(1318):qtdemux_type_get: unknown QuickTime node type nmhd ERROR (0x8109fe8 - 303207:43:44.031330000) qtdemux( 2981) qtdemux.c(1318):qtdemux_type_get: unknown QuickTime node type mp4s ERROR (0x85905c0 - 303207:43:44.474263000) default( 2981) gstfaad.c(371):gst_faad_chain:<faad0> Failed to decode buffer: Maximum number of scalefactor bands exceeded codec not in qtdemux codec list ?
Faad2 ( version 2.0 ) can correctly decodes this to wav with : faad -d TeeSummerTranceMix2004.mp4 Also mplayer plays the file fine.
The error indicates that the decoderspecificdata (what's in codec_data in the caps) was not provided correctly. Maybe that's what mp4s is? The audio tag is supposed to be called mp4a, no?
yes, it's supposed to be mp4a for audio and mp4v for video could this be a MPEG system stream ? (even if they aren't supposed to be versionned ?) i must say i'm lost between all the different MPEG stream types that exists (program, transport, elementary, video, audio, ...) mplayer says that about this file : Playing TeeSummerTranceMix2004.mp4. Cache fill: 0,00% (0 bytes) ISO: File Type Major Brand: ISO/IEC 14496-1 (MPEG-4 system) v2 QuickTime/MOV file format detected. -------------- MOV track #0: 4428 chunks, 97397 samples Audio bits: 16 chans: 2 rate: 44100 MOV: Found MPEG4 audio Elementary Stream Descriptor atom (54)! Fourcc: mp4a -------------- MOV track #1: 1 chunks, 0 samples Generic track - not completely understood! (id: 1) -------------- MOV track #2: 1 chunks, 0 samples Generic track - not completely understood! (id: 2) -------------- MOV: longest streams: A: #0 (97397 samples) V: #-1 (0 samples) ========================================================================== Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding) FAAD: compressed input bitrate missing, assuming 128kbit/s! AUDIO: 44100 Hz, 2 ch, 16 bit (0x10), ratio: 16000->176400 (128,0 kbit) Selected audio codec: [faad] afm:faad (FAAD AAC (MPEG2/MPEG4 Audio) decoder) as a side note, i am unable to play any of the MOV files i have, and it looks like qtdemux has a lot a problems reading zlib compressed headers (not the case for this particular bug, for which headers aren't compressed at all)
Can you please re-provide the file?
I longer have this file. Sorry.
find plenty of samples there : http://www.nerodigital.com/eng/Trailers.html
with those 'trailers', i've got this error : (and no video/audio) HDTV : ERROR (0x84e9608 - 306492:06:31.582992000) default(29329) gstfaad.c(604):gst_faad_chain:<faad0> Failed to decode buffer: Maximum number of bitstream elements exceeded or this one : Mobile : ERROR (0x84e9630 - 306492:08:05.122819000) default(29333) gstfaad.c(604):gst_faad_chain:<faad0> Failed to decode buffer: Negative scalefactor found, should be impossible Cinema/Portabe : play, but sound is choppy Standard : plays ok, video and audio
found the original TeeSummerTransMix2004.mp4 file, putting it in your ftp account, in /ISO_mp4/
I am experiencing a similar error with m4a files encoded with iTunes. I'm using Fedora Core 3 and latest freshrpms version of everything: ERROR (0x9b59a98 - 306573:52:12.253468000) qtdemux( 7501) qtdemux.c(1396 ):qtdemux_type_get: unknown QuickTime node type disk ERROR (0x9b59a98 - 306573:52:12.253916000) qtdemux( 7501) qtdemux.c(1396 ):qtdemux_type_get: unknown QuickTime node type \uffffday ERROR (0x9b59a98 - 306573:52:12.254058000) qtdemux( 7501) qtdemux.c(1396 ):qtdemux_type_get: unknown QuickTime node type mean ERROR (0x9b59a98 - 306573:52:12.254161000) qtdemux( 7501) qtdemux.c(1396 ):qtdemux_type_get: unknown QuickTime node type name ERROR (0x9b59a98 - 306573:52:12.254262000) qtdemux( 7501) qtdemux.c(1396 ):qtdemux_type_get: unknown QuickTime node type mean ERROR (0x9b59a98 - 306573:52:12.254360000) qtdemux( 7501) qtdemux.c(1396 ):qtdemux_type_get: unknown QuickTime node type name ERROR (0x9b59a98 - 306573:52:12.254578000) qtdemux( 7501) qtdemux.c(1396 ):qtdemux_type_get: unknown QuickTime node type disk ERROR (0x9b59a98 - 306573:52:12.254744000) qtdemux( 7501) qtdemux.c(1396 ):qtdemux_type_get: unknown QuickTime node type \uffffday ERROR (0x9b59a98 - 306573:52:12.267662000) qtdemux( 7501) qtdemux.c(1396 ):qtdemux_type_get: unknown QuickTime node type mean ERROR (0x9b59a98 - 306573:52:12.267729000) qtdemux( 7501) qtdemux.c(1396 ):qtdemux_type_get: unknown QuickTime node type name ERROR (0x9b59a98 - 306573:52:12.267768000) qtdemux( 7501) qtdemux.c(1396 ):qtdemux_type_get: unknown QuickTime node type mean ERROR (0x9b59a98 - 306573:52:12.267805000) qtdemux( 7501) qtdemux.c(1396 ):qtdemux_type_get: unknown QuickTime node type name rhythmbox: symbol lookup error: /usr/lib/gstreamer-0.8/libgstfaad.so: undefined symbol: NeAACDecOpen
Recompile the faad plugin with -lfaad. It's unrelated to this bug.
I'm kind of new to this. do you think you could give me more detailed comments as to how to do that exactly?
Re-run ./configure in gst-plugins and make sure that it detects the FAAD library correctly. Ask on IRC if you need more help, bugzilla isn't exactly suited for this kind of stuff. ;).
I get "Could not decode stream. Additional debug info: gstfaad.c(397): gst_faad_chain: /work_thread/autoplugger/faad0: Failed to decode buffer: Maximum number of scalefactor bands exceeded"" from gst-player when attempting to play http://64.202.105.38/videos/cash_h.mp4 I don't know how stable that URL is, it's the video embedded in http://www.markromanek.com/video/14_video.html
FWIW, I have very similar thing in MKV: http://mathrick.org/files/Arc%20the%20Lad%20-%20(01)%20%5bax%5d%5bsub%5d.mkv . MPlayer plays it fine, but so far I wasn't able to track any differences in the way we initialise FAAD compared to mplayer, nor in the way we pass data. I'm currently debugging it, I hope to come up with fix soon, if it's indeed the same issue it should also fix qtdemux.
If I'm not mistaken, I have found the cause of this bug, and it's gonna get ugly. The reason is as follows: sometimes, there will be something like 210 bytes of data in muxed stream, but only 209 of this will get consumed by faad. Now here's the problem: we will save that byte (in fact, we won't even know about it, it'll look like the rest of buffer) and pass it to faad, while in fact it's spurious NULL[0] value, which will distort real data and cause faad to barf. We have no way to know about that, as all we get is single contigous 4K buffer, not series of 200-something byte chunks. MPlayer gets around this because they're tangled mess, and explicitly call demuxer from inside decoder, which is supposed to know about every possible codec, and then return *packetised* (as it's inside container) AAC data in nice chunks. So, they also pass 210 bytes of which 209 is consumed and spurious NULL appended, but they don't even notice that because next decode will operate on next pulled chunk, which again starts with real data and so NULLs are simply skipped. It's cheap for them to get chunk-by-chunk, as it's only 3 or 4 nested simple funcalls. However, we don't operate this way. Our decoders don't call directly into demuxers, so getting data exactly when needed is not that easy. So the solution would be to either somehow know beforehand which bytes in buffer are "fake", which I don't think is possible for demuxer, as it's, uh, the decoder's job to interpret the data, and demuxer only passes what *is* in stream[1]; or to pass around ridiculously small buffers, sized of single 200 bytes chunk, but that's going to generate insane amounts of context switches. Dunno what's be good way out here. [0] In fact I don't know if it's necessarily NULL, I only worked on that mkv I linked above, where it is NULL indeed. [1] I'd like to know why the hell it's there, the spurious NULL. If it's supposed to be some padding, then it doesn't work so hot... Maybe there is some info about those bytes which would allow us to strip them off before inserting into outbuffer, that would be perfect.
Also, I'll try to poke around tomorrow, and test with other files to confirm explanation. But in case of my MKV, the cause of failure is certainly presence of byte that's not supposed to be decoded, despite being in stream for some reason.
Created attachment 37749 [details] [review] Proposed fix. This patch fixes mkv case. Please test with qt to see if it's indeed the same issue
Ok, so qt still bails out. Will debug more, commiting MKV fix for now.
It seems that qt fails because AFAICS it doesn't pass codec_data, code to do that is #if 0'd (d'oh). I'll look around and see why exactly it was disabled (simply uncommenting it doesn't make it work yet, qt is processed in rather magic way :)
Like I said in one of my first comments, the qt file has mp4s atoms instead of mp4a atoms for its esds data. It should be easy to add but I did not do that yet.
Created attachment 38199 [details] [review] faad "fix" This is part one of a fix. It should probably not be committed because it's not right, but with this you will be able to play it back using "gst-launch filesrc location=~/Media/bugs/TeeSummerTranceMix2004.mp4 ! ffdemux_mov_mp4_m4a_3gp ! faad ! audioconvert ! audioscale ! alsasink device=dmix". The time=0 is always output on MPEG-4 audio by ffmpeg. That needs fixing in there, hence the hack. Now, for the real fix, qtdemux never passes codec_data. Never. Ever. I've tested all my files, nada. Nothing. Once we fix that, those files will work. Dave?
Created attachment 38206 [details] [review] qtdemux patch This seems to work for this specific file. Not sure if version 0x00010000 needs +0x34 anyway. Dave, please reply.
Fixed.