GNOME Bugzilla – Bug 591172
Inconsistent transcoding of iTunes AAC files.
Last modified: 2010-02-23 00:29:03 UTC
Please describe the problem: I am trying to use gstreamer to transcode unprotected iTunes AAC files into FLAC. The results are inconsistent. Steps to reproduce: gst-launch filesrc location=TEST.m4a ! decodebin ! audioconvert ! flacenc ! filesink location=TEST.flac Actual results: Sometimes the resulting FLAC file sounds right. Often, though, the result sounds incorrect, as if the tempo is off. Expected results: Consistent audio. Does this happen every time? Yes. Other information: I am trying to play the resulting files using VLC 0.9.8 on Mac OS X 10.4. I have tried running the GStreamer pipeline on both Mac OS X and Fedora 11. On Mac OS X, I am using the following:
Created attachment 140227 [details] Test AAC fragment that encodes PROPERLY This file transcodes properly when using the pipeline noted above.
Created attachment 140228 [details] Test AAC fragment that encodes IMPROPERLY This file does not transcode properly when using the pipeline noted above. The resulting FLAC file is severely distorted. Both this and the previous fragment are encoded using the same format and came from the same source.
I've done some more testing and have found: "faad FOO.m4a" creates FOO.wav and this sounds FINE. "faad FOO.m4a" followed by "flac FOO.wav" sounds FINE. But, using GStreamer: "/opt/local/bin/gst-launch filesrc location=FOO.wav ! decodebin ! audioconvert ! flacenc ! filesink location=FOO.flac" creates a FLAC audio file that is DISTORTED. Although: "/opt/local/bin/gst-launch filesrc location=FOO.m4a ! decodebin ! audioconvert ! wavenc ! filesink location=FOO.wav" creates a WAV audio file that sounds FINE.
I can't hear a difference between just playing the second AAC file and between transcoding it to FLAC and then playing the resulting FLAC file. Which versions of gstreamer, gst-plugins-base, gst-plugins-good and FLAC are you using? What's the output if you add "-v" to your transcoding pipeline (for both cases, the distorted FLAC encoding and the non-distorted FLAC encoding).
Created attachment 141006 [details] Output from clear transcoding
Created attachment 141007 [details] Output from distorted transcoding
FYI, the distortion I hear is very heavy. You can't miss it. So, I think you did not have my problem when you did your transcode. I am using the following packages from MacPorts: gst-plugins-bad @0.10.12 gnome/gst-plugins-bad gst-plugins-bad @0.10.12 gnome/gst-plugins-bad gst-plugins-base @0.10.23 gnome/gst-plugins-base gst-plugins-base @0.10.23 gnome/gst-plugins-base gst-plugins-good @0.10.15 gnome/gst-plugins-good gstreamer @0.10.23 gnome/gstreamer flac @1.2.1 audio/flac faac @1.28 audio/faac faad2 @2.6.1 audio/faad2
A recent update has fixed this on both Fedora and Mac OS X 10.6.2. On Mac OS X, I am now using: gst-plugins-bad @0.10.17 gnome/gst-plugins-bad gst-plugins-base @0.10.25 gnome/gst-plugins-base gst-plugins-good @0.10.17 gnome/gst-plugins-good gst-plugins-ugly @0.10.13 gnome/gst-plugins-ugly gstreamer @0.10.25 gnome/gstreamer
(Marking as obsolete instead, since we don't really know what fixed it where and when)