After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 732790 - Ripping to m4a format produces files that cannot be played by VLC and Rhythmbox
Ripping to m4a format produces files that cannot be played by VLC and Rhythmbox
Status: RESOLVED FIXED
Product: sound-juicer
Classification: Applications
Component: ripping
unspecified
Other Linux
: Normal major
: ---
Assigned To: Sound Juicer Maintainers
Sound Juicer Maintainers
Depends on: 732945
Blocks:
 
 
Reported: 2014-07-06 00:12 UTC by BruceC
Modified: 2014-07-11 09:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Debug log from gstreamer for m4a encoding profile (13.59 KB, text/plain)
2014-07-07 17:47 UTC, Phillip Wood
Details
Pipeline diagram from GST_DEBUG_DUMP_DOT_DIR (189.91 KB, image/png)
2014-07-09 10:13 UTC, Phillip Wood
Details

Description BruceC 2014-07-06 00:12:11 UTC
Sound Juicer: 3.5.0
OS: Ubuntu 14.04 LTS

Bug: ripping to m4a format produces corrupted files.  

* I say the files are corrupted because VLC and Rhythmbox cannot play them.  VLC and Rhythmbox have no trouble playing other m4a files, including m4a files produced earlier on the same computer using Sound Juicer under Ubuntu 12.10 before I upgraded to Ubuntu 14.04.

* I have Ubuntu restricted extras installed. 
 
* Sound Juicer rips to mp3 and flac format files that play fine.  

* When Sound Juicer rips a CD to m4a format, no errors are reported, ripping consumes about a minute per track as I would expect, and *.m4a files of the size I would expect are produced -- the files just do not play.

* The avconv application on my Ubuntu 14.04 system produces m4a files the play fine with VLC and Rhythmbox.
Comment 1 André Klapper 2014-07-06 11:13:57 UTC
[Resetting bug summary to "Ripping to m4a format produces files that cannot be played by VLC and Rhythmbox" because everything else is speculation.]
Comment 2 Phillip Wood 2014-07-07 17:47:30 UTC
Created attachment 280079 [details]
Debug log from gstreamer for m4a encoding profile

Thank you for taking the time to report this bug. I've tested it locally and I can reproduce the problem, when I try to play the extracted track in totem or mplayer they complain that the audio stream is missing. I've attached a debug log from running 

GST_DEBUG=*:3,encodebin:5,faac:5 ./sound-juicer

There are a couple of lines which say

faac gstfaac.c:521:gst_faac_open_encoder:<faac1> average bitrate: 0 kbps

I wonder if that might be the problem but I don't know enough about gstreamer, perhaps Christophe of Bastien can shed more light on this.
Comment 3 Phillip Wood 2014-07-08 13:37:28 UTC
(In reply to comment #2)
> There are a couple of lines which say
> 
> faac gstfaac.c:521:gst_faac_open_encoder:<faac1> average bitrate: 0 kbps
> 
> I wonder if that might be the problem but I don't know enough about gstreamer,
> perhaps Christophe of Bastien can shed more light on this.

Ignore that it's not the problem. Encoding with

gst-launch-1.0 cdda://1 ! faac ! mp4mux ! filesink location=/tmp/test.m4a

gives a file that can be played and is almost identical to the one created by sound-juicer which does not play. There are a handful of different bytes in 4 or 5 locations, apart from that the files are the same. Comparing the debug output from gst-launch and sound-juicer the faac lines are the same. However sound-juicer has some lines from qtdmux

0:00:09.985932136 27666 0x7f864c0b72d0 WARN                 qtdemux qtdemux.c:3060:gst_qtdemux_loop_state_header:<qtdemux0> warning: Invalid atom size.
0:00:09.986054913 27666 0x7f864c0b72d0 WARN                 qtdemux qtdemux.c:3060:gst_qtdemux_loop_state_header:<qtdemux0> warning: Header atom 'mdat' has empty length
0:00:09.986282757 27666 0x7f864c0b72d0 WARN                 qtdemux qtdemux.c:573:gst_qtdemux_post_no_playable_stream_error:<qtdemux0> error: This file contains no playable streams.
0:00:09.986329653 27666 0x7f864c0b72d0 WARN                 qtdemux qtdemux.c:573:gst_qtdemux_post_no_playable_stream_error:<qtdemux0> error: no known streams found
0:00:09.989815393 27666 0x7f864c0b72d0 WARN                 qtdemux qtdemux.c:573:gst_qtdemux_post_no_playable_stream_error:<qtdemux0> error: This file contains no playable streams.
0:00:09.990205993 27666 0x7f864c0b72d0 WARN                 qtdemux qtdemux.c:573:gst_qtdemux_post_no_playable_stream_error:<qtdemux0> error: no known streams found
0:00:19.077658053 27666 0x7f8670004cf0 WARN                   qtmux gstqtmux.c:1649:gst_qt_mux_start_file:<muxer> downstream did not handle seeking query
0:00:19.077709467 27666 0x7f8670004cf0 WARN                   qtmux gstqtmux.c:1658:gst_qt_mux_start_file:<muxer> warning: Downstream is not seekable and headers can't be rewritten

Which don't appear in the log from gst-launch, I'm not sure what's creating the qtdmux element, but the warnings about and invalid atom and no streams found match the errors from mplayer when I try to play the extracted file.
Comment 4 Phillip Wood 2014-07-09 10:13:25 UTC
Created attachment 280218 [details]
Pipeline diagram from GST_DEBUG_DUMP_DOT_DIR
Comment 5 Phillip Wood 2014-07-11 09:10:48 UTC
This is a bug in gstreamer that has been fixed in version 1.3.91.

Bruce you could trying filing a ubuntu bug to see if they will patch gstreamer for you (commit e8d176c for gst-plugins-base). As a work around you could use sound-juicer to rip to flac files and then convert those to m4a. You can do this in a terminal by running

for f in *.flac ; do gst-launch filesrc location="$f" ! decodebin ! audioconvert ! audioresample ! faac ! mp4mux ! filesink location="${f%.flac}.m4a" && rm "$f" ; done 

in the directory containing the flac files.