Certain m4a files with an embedded cover art jpeg stream are not playable

Bug #1408681 reported by James Lewis
36
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Confirmed
Undecided
Unassigned
Ubuntu Music App
Invalid
High
Unassigned
media-hub (Ubuntu)
Triaged
Medium
Unassigned
media-hub (Ubuntu RTM)
Triaged
Medium
Unassigned

Bug Description

One of my podcast feeds (http://static.aboveandbeyond.nu/grouptherapy/podcast.xml) used .m4a files (presumably containing aac audio) in it's feed... I've never had an issue with playing them, but the Ubuntu Music player on the Phone does not recognize them, and does not advertise that it can play them to the file manager.

I have no doubt that the codec to play these files is on the system, not least because it can play mp4 video, which is the same container, and the same audio codec, only with video added in a separate stream.

Revision history for this message
James Lewis (james-fsck) wrote :

Note, this is RTM stream, r12

Revision history for this message
James Lewis (james-fsck) wrote :

I would bet this also applies to .mka files (matroska audio).

Revision history for this message
Andrew Hayzen (ahayzen) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

I downloaded [0] to my device and mediascanner correctly scanned it [1]

However when coming to play the track I see this [2] in our application log, specifically this bit looking bad:
'Failed to start playback: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.'

Furthermore note that there is actually video within the file as well from the media-hub log [3] and from the properties displayed in nautilus. However I'm not sure if this is causing the problem, I think it could be likely that the size of the file (110MB) may be causing the timeout.

0 - http://traffic.libsyn.com/anjunabeats/ABGT111_73737747.m4a
1- http://pastebin.ubuntu.com/9694185/
2 - http://pastebin.ubuntu.com/9694164/
3 - http://pastebin.ubuntu.com/9694176/

Changed in music-app:
importance: Undecided → High
status: New → Triaged
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

Some further information [4], also marking as invalid in music as this is an issue 'higher up', therefore adding media-hub.

4 - http://pastebin.ubuntu.com/9694615/

Changed in music-app:
status: Triaged → Invalid
Jim Hodapp (jhodapp)
Changed in media-hub:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

Attached pngs of the pipeline when running on the desktop (utopic), created by running

export GST_DEBUG_DUMP_DOT_DIR=/tmp/gst-dump/
gst-launch-1.0 playbin uri=file:///path/to/file
dot -Tpng -O /tmp/gst-dump-desktop/*.dot

Revision history for this message
James Lewis (james-fsck) wrote :

I'm not sure how the media hub works, although I'm curious why the file manager app does not show the music app as able to play the file... does the media hub component actually check the content of the file or the MIME type before offering which apps can handle it?

It appears that the "Video" you are seeing in the stream is a single "JPEG Still Image", of the stream logo, I would assume this is a standard way to embed an image in this type of file since it appears to display correctly in other software I have tried.

Revision history for this message
Andrew Hayzen (ahayzen) wrote :

Filemanager doesn't recognise my pure m4a's as music either, it is likely that this is a bug in filemanager itself as it is missing in the map [0]. Could you report a separate bug against file manager for this issue?

0 - http://bazaar.launchpad.net/~ubuntu-filemanager-dev/ubuntu-filemanager-app/trunk/view/head:/src/app/qml/content-hub/contenttyperesolver.js#L33

Revision history for this message
James Lewis (james-fsck) wrote :

+Andrew Hayzen

I agree that there's a separate issue in the file manager ( I logged a separate bug as you suggested https://bugs.launchpad.net/ubuntu-filemanager-app/+bug/1411576), however if I navigate to this file within the music app, I am able to attempt to play it, but it fails to play, and also fails to play in podbird, so I guess it's correct to say that it's an issue in media-hub.

confirmed in r14.

Revision history for this message
Jim Hodapp (jhodapp) wrote :

@James Lewis: I did some preliminary looking into this bug with Andrew and it isn't that media-hub doesn't support playing .m4a files, it in fact does. The issue is that this file includes a jpeg image stream while most m4a files do not do this for cover art. So I believe what is going on is that it's trying to use the hardware decoder gstamc plugin to decode this stream when in fact it should be using a software GStreamer plugin to do this. Although I haven't proven this is what's happening yet, it's my current theory.

Revision history for this message
James Lewis (james-fsck) wrote :

I believe this will also affect .opus files, "Opus data can be encapsulated in Ogg containers. The content of such Ogg Opus streams should be specified as audio/ogg; codecs=opus and for Ogg Opus files the .opus filename extension is recommended."

http://tools.ietf.org/pdf/draft-ietf-codec-oggopus-06.pdf

I would be pretty sure this codec should be on the device since it's required for WebRTC.

Revision history for this message
Aaron Honeycutt (aaronhoneycutt) wrote :

@james-fsck

I tried to add the Rooster Teeth podcast to PodBird and it will not play and Mike Sheldon says that it plays m4a so it might effect PodBird as well.

Revision history for this message
James Lewis (james-fsck) wrote :

@aaronhoneycutt

This issue does impact podbird, infact podbird downloads the m4a file and attempts to play it, but the system appears to fail at that point, since it does not play, and cannot be stopped either.

Revision history for this message
James Lewis (james-fsck) wrote :

Also cannot recognize .flac files.

Revision history for this message
Andrew Hayzen (ahayzen) wrote :

90% of my music is flac and works correctly with the music-app, do you have an example file that does not work? Unless this flac file you are using has a JPEG image stream in it as well, therefore suffering the same issue as the m4a's?

Jim Hodapp (jhodapp)
summary: - music app does not recognise m4a files as playable.
+ Certain m4a files with an embedded cover art jpeg stream are not
+ playable
Revision history for this message
James Lewis (james-fsck) wrote :

It's worth adding that after trying to play one of these files media-hub often appears to stop working and no apps an play anything.

Revision history for this message
Jim Hodapp (jhodapp) wrote :

@James: are you trying this on a wily-based image, or the current stable vivid image?

Revision history for this message
James Lewis (james-fsck) wrote :

I'm running the current stable (vivid) image, although this was an issue for some time before I reported this bug... I waited for 15.04 to land before re-visiting this bug, I know a lot was/is going on.

Revision history for this message
Jim Hodapp (jhodapp) wrote :

I'll see if I can reproduce this on wily. I seem to remember fixing this bug already and it might be applied only to wily images at the moment. Either way I'll either confirm this or it'll be triaged for fixing in general.

Revision history for this message
James Lewis (james-fsck) wrote :

I'm running the current stable (vivid) image, although this was an issue for some time before I reported this bug... I waited for 15.04 to land before re-visiting this bug, I know a lot was/is going on.

Revision history for this message
James Lewis (james-fsck) wrote :

I have tested both with a file downloaded from ABGT, and in Podbird, on devel-proposed downloaded today....

1. File Manager does not recognise .m4a as a playable file.

2. Music App identifies the file as playable, and shows the cover art, but hangs for a period when trying to play. After attempting to play, it becomes unable to play any other file until killed and restarted.

3. Podbird tries to play the episode, but fails and hangs for a period...

~J

Revision history for this message
James Lewis (james-fsck) wrote :

This issue appears to affect more than just ABGT podcast feed.... AAC files (m4a) from the embedded 7digital store appear to have the same or similar issue.

Revision history for this message
James Lewis (james-fsck) wrote :
Download full text (4.8 KiB)

I stripped one of these m4a files into a raw audio file, and then re-encoded it to .m4a to strip any unusual metadata, images, etc... created a dummy .rss feed and it was able to play on podbird... however, the process of stripping down to PCM audio revealed the nature of the unexpected metadata.

It appears to contain Metadata including Chapter information for each track in the mix, as well as subtitles, and mjpeg video streams.. it's made with garageband, so perhaps if someone has that software they could see what data/images are actually there.

That said, it plays fine in every other player I've ever seen!

  Metadata:
    major_brand : M4A
    minor_version : 1
    compatible_brands: M4A mp42isom
    creation_time : 2015-06-29 17:05:42
    composer : Above & Beyond
    title : ABGT137
    artist : Above & Beyond
    album : Group Therapy
    encoder : GarageBand 6.0.5
  Duration: 02:00:00.16, start: 0.000000, bitrate: 194 kb/s
    Chapter #0.0: start 0.000000, end 357.100000
    Metadata:
      title : 1. Jason Ross ‘Ravenna’ (Anjunabeats)
    Chapter #0.1: start 357.100000, end 627.091667
    Metadata:
      title : 2. Sound Quelle & Max Meyer ‘Monolith’ (Statement)
    Chapter #0.2: start 627.091667, end 880.450000
    Metadata:
      title : 3. BT & Super8 & Tab ‘Aika’ (Anjunabeats)
    Chapter #0.3: start 880.450000, end 1201.850000
    Metadata:
      title : 4. ilan Bluestone ‘Bonsai’ (Anjunabeats) - Record Of The Week
    Chapter #0.4: start 1201.850000, end 1460.441667
    Metadata:
      title : 5. Sub Question ’Semiconductor’ (Elliptical Sun)
    Chapter #0.5: start 1460.441667, end 1684.766667
    Metadata:
      title : 6. Intrinity feat. Erika Faries ‘Don’t Look Back’ [Proglifter Dub Remix] (PHW)
    Chapter #0.6: start 1684.766667, end 1971.325000
    Metadata:
      title : 7. Otto Knows ‘Next To Me’ [Grum Remix] (Big Beat)
    Chapter #0.7: start 1971.325000, end 2181.333333
    Metadata:
      title : 8. Pierce Fulton ‘In Reality’ (White)
    Chapter #0.8: start 2181.333333, end 2515.751667
    Metadata:
      title : 9. Third Party feat. Daniel Gidlund ‘Collide’ (Release)
    Chapter #0.9: start 2515.751667, end 2748.236667
    Metadata:
      title : 10. Cuebrick ‘Demon’ [Kago Pengchi Remix] (Enhanced)
    Chapter #0.10: start 2748.236667, end 3033.583333
    Metadata:
      title : 11. Las Salinas ‘London’ (Vandit)
    Chapter #0.11: start 3033.583333, end 3338.591667
    Metadata:
      title : 12. Cosmic Gate & Mike Schmid ‘No One Can Touch You Now’ [Rodg Remix] (Wake Your Mind)
    Chapter #0.12: start 3338.591667, end 3593.911667
    Metadata:
      title : 13. Jean-Michel Jarre & M83 ‘Glory’ [Steve Angello Remix] (White)
    Chapter #0.13: start 3593.911667, end 3882.693333
    Metadata:
      title : 14. Above & Beyond feat. Zoë Johnston ‘Peace Of Mind’ [Arty Remix] (Anjunabeats) - Push The Button
    Chapter #0.14: start 3882.693333, end 4140.643333
    Metadata:
      title : 15. Max Freegrant & Digital Sketch...

Read more...

Revision history for this message
Jim Hodapp (jhodapp) wrote :

Indeed, this lends support to my findings from comment #9. This tries to instantiate a weird combination of gstreamer elements from playbin that are not supported. So this is a real bug that will need fixing.

Revision history for this message
James Lewis (james-fsck) wrote :

@jim

Have you been able to replicate this issue? We should mark it as confirmed.

Revision history for this message
Jim Hodapp (jhodapp) wrote :

Yes, it's more than confirmed...I triaged the bug and reproduced it.

James Lewis (james-fsck)
Changed in media-hub:
status: Triaged → Confirmed
Jim Hodapp (jhodapp)
Changed in media-hub:
status: Confirmed → Triaged
Revision history for this message
James Lewis (james-fsck) wrote :

Confirmed still present in OTA-6

Jim Hodapp (jhodapp)
no longer affects: media-hub
Changed in media-hub (Ubuntu):
importance: Undecided → Medium
Changed in media-hub (Ubuntu RTM):
importance: Undecided → Medium
Changed in media-hub (Ubuntu):
status: New → Triaged
Changed in media-hub (Ubuntu RTM):
status: New → Triaged
Revision history for this message
James Lewis (james-fsck) wrote :

Still affecting OTA-8

Revision history for this message
James Lewis (james-fsck) wrote :

Still affecting OTA-9

Revision history for this message
James Lewis (james-fsck) wrote :

Is this something thats likely to be resolved any tine soon, ABGT is arguably the No.1 podcast in its genre and their downloads are also Music, so this impacts both Podbird and Music App..... I guess there are a lot of other issues to deal with but it would be nice ti know if any of the planned workcovers this, especially since its been a year now.

Revision history for this message
Jim Hodapp (jhodapp) wrote :

There are no plans to work on this at this time. I'd be happy to help get any community member started in looking into this and fixing it in media-hub.

Revision history for this message
James Lewis (james-fsck) wrote :

Still affects OTA-10

It's quite obvious that a vast amount of work is going into producing the mobile product, but since all media playback must use Media Hub, it seems amazing that a bug which means it cannot play streams produced by one of the more popular Apple audio production tools can be outstanding for so long....

I have had to carry a separate device for listening to Podcasts since switching to Ubuntu phone, as it is one thing I am not prepared to sacrifice.....

Revision history for this message
Jim Hodapp (jhodapp) wrote :

@James: there is indeed a vast amount of work going into Ubuntu Touch and everyone is working quite diligently on it. Unfortunately there's not always enough developers who can work on all of the bugs, even some that seem obvious like this one. That being said, I'll make sure this comes up in this week's media sync-up meeting. It's the first of its kind of the media stack and the purpose is to let many interested stakeholders speak to areas of the media stack that are important to improve on and are synced together.

Jim Hodapp (jhodapp)
Changed in canonical-devices-system-image:
status: New → Confirmed
Revision history for this message
Uranicus (matthias.ritter) wrote :

Any news on this one? Getting some more audio codecs to work would be very nice!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.