amarok lacks transcode support

Bug #1285729 reported by Aymeric
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
amarok (Ubuntu)
Confirmed
Medium
Rohan Garg

Bug Description

Amarok 2.8 in (K)Ubuntu trusty is unable to transcode files before copying them to an iPod.

When running amarok, on console we get the following error:
"amarok: [CollectionLocation] FFmpeg is not installed or does not support any of the required formats. "

As there is no more ffmpeg packages on Ubuntu, we can't install it to fix the problem this way.
I tried to make a symbolic link of avconv to ffmpeg (ln -s /usr/bin/avconv /usr/bin/ffmpeg) but that doesn't fix the problem.

I've also installed the following packages:
$ dpkg -l |grep -E '^ii[ ]+libav.*'
ii libav-tools 6:9.10-1ubuntu7 amd64 Multimedia player, server, encoder and transcoder
ii libavahi-client3:amd64 0.6.31-4ubuntu1 amd64 Avahi client library
ii libavahi-common-data:amd64 0.6.31-4ubuntu1 amd64 Avahi common data files
ii libavahi-common3:amd64 0.6.31-4ubuntu1 amd64 Avahi common library
ii libavahi-core7:amd64 0.6.31-4ubuntu1 amd64 Avahi's embeddable mDNS/DNS-SD library
ii libavahi-glib1:amd64 0.6.31-4ubuntu1 amd64 Avahi GLib integration library
ii libavbin0 7-1.4build1 amd64 cross-platform media decoding library
ii libavc1394-0:amd64 0.5.4-2 amd64 control IEEE 1394 audio/video devices
ii libavcodec-dev 6:9.10-1ubuntu7 amd64 Development files for libavcodec
ii libavcodec-extra 6:9.10-1ubuntu7 all Libav codec library (additional codecs meta-package)
ii libavcodec-extra-54:amd64 6:9.10-1ubuntu7 amd64 Libav codec library (additional codecs)
ii libavcodec53:amd64 6:0.8.7-1ubuntu2 amd64 Libav codec library
ii libavdevice-dev 6:9.10-1ubuntu7 amd64 Development files for libavdevice
ii libavdevice-extra-53 6:9.10-1ubuntu7 all Libav device handling library (transitional package)
ii libavdevice53:amd64 6:9.10-1ubuntu7 amd64 Libav device handling library
ii libavfilter-extra-3 6:9.10-1ubuntu7 all Libav filter library (transitional package)
ii libavfilter3:amd64 6:9.10-1ubuntu7 amd64 Libav video filtering library
ii libavformat-dev 6:9.10-1ubuntu7 amd64 Development files for libavformat
ii libavformat-extra-54 6:9.10-1ubuntu7 all Libav file format library (transitional package)
ii libavformat53:amd64 6:0.8.7-1ubuntu2 amd64 Libav file format library
ii libavformat54:amd64 6:9.10-1ubuntu7 amd64 Libav file format library
ii libavresample1:amd64 6:9.10-1ubuntu7 amd64 Libav audo resampling library
ii libavutil-dev 6:9.10-1ubuntu7 amd64 Development files for libavutil
ii libavutil-extra-52 6:9.10-1ubuntu7 all Libav utility library (transitional package)
ii libavutil51:amd64 6:0.8.7-1ubuntu2 amd64 Libav utility library
ii libavutil52:amd64 6:9.10-1ubuntu7 amd64 Libav utility library

Hopping that will fix the problem, but it still happen.

The step to reproduce are simple:
1) install amarok (2.8)
2) Put in your local collection somes audios file in flac/ogg/..
3) Try to copy flac/ogg/.. on a device (like iPod) which need transcoding.
4) You get the error message.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: amarok 2:2.8.0-0ubuntu3
ProcVersionSignature: Ubuntu 3.13.0-12.32-generic 3.13.4
Uname: Linux 3.13.0-12-generic x86_64
ApportVersion: 2.13.2-0ubuntu5
Architecture: amd64
CurrentDesktop: XFCE
Date: Thu Feb 27 16:18:46 2014
InstallationDate: Installed on 2014-02-26 (1 days ago)
InstallationMedia: Xubuntu 14.04 LTS "Trusty Tahr" - Alpha amd64 (20140121.1)
SourcePackage: amarok
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Aymeric (mulx) wrote :
Revision history for this message
Aymeric (mulx) wrote :

I've installed ffmpeg from the following ppa: https://launchpad.net/~jon-severinsson/+archive/ffmpeg and this fix the problem.

IMO, you must find a way to make transcoding working on amarok, out of the box, either by putting back ffmpeg into Trusty or by patching Amarok to use libav instead as this is an important feature…

Revision history for this message
Daniel Letzeisen (dtl131) wrote :

Did you try installing libavbin) package?

"AVbin is a thin wrapper around FFmpeg, providing binary compatibility for applications and languages that need it."

Revision history for this message
Daniel Letzeisen (dtl131) wrote :

Sorry, typo in last post, should have been libavbin0

Changed in amarok (Ubuntu):
status: New → Incomplete
Revision history for this message
Rohan Garg (rohangarg) wrote :

Amarok doesn't depend on ffmpeg/libav in Trusty, confirming

Changed in amarok (Ubuntu):
assignee: nobody → Rohan Garg (rohangarg)
importance: Undecided → Medium
milestone: none → ubuntu-14.04
status: Incomplete → Confirmed
Revision history for this message
Daniel Letzeisen (dtl131) wrote :

@rohangarg: No one answered my questions...

1. Does Amarok transcoding work by installing libavbin0?
2. If no to question1, does it work if it is built with libavbin-dev?

Only if those questions are both 'no' does it need explicitly patched for libav.

Changed in amarok (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Daniel Letzeisen (dtl131) wrote :

Okay, so the answer to question1 is no (sorry, just saw that OP already had it installed).

Revision history for this message
Daniel Letzeisen (dtl131) wrote : Re: amarok needs to build-depend on libav packages for transcode support

After further experimentation, libavbin-dev is not necessary. Amarok needs to build depend on the -dev packages of the following libav libraries

-- checking for module 'libavcodec'
-- found libavcodec, version 54.35.0
-- checking for module 'libavformat'
-- found libavformat, version 54.20.3
-- checking for module 'libavdevice'
-- found libavdevice, version 53.2.0
-- checking for module 'libavutil'
-- found libavutil, version 52.3.0
....
-- Found FFmpeg: /usr/lib/x86_64-linux-gnu/libavcodec.so;/usr/lib/x86_64-linux-gnu/libavformat.so;/usr/lib/x86_64-linux-gnu/libavutil.so

summary: - amarok unable to transcode
+ amarok needs to build-depend on libav packages for transcode support
Changed in amarok (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
Aymeric (mulx) wrote :

@Daniel, I'm not so sure that amarok really need to build with dev packages of libav libraries, because installing (official) ffmpeg from Jon Severinsson PPA fixed this issue.

Revision history for this message
Daniel Letzeisen (dtl131) wrote :

Okay, but adding a PPA with ffmpeg is probably not an acceptable solution since Ubuntu is still using libav (at least for now).

Revision history for this message
Rohan Garg (rohangarg) wrote :

On a clean system can you try and see if it works if you install kubuntu-restricted-extras? If it does not, then could you please provide a list of packages that you install after installing kubuntu-restricted-extras so that I can add those to k-r-e

Revision history for this message
Daniel Letzeisen (dtl131) wrote :

I cannot get the amarok transcode dialog to appear, even when moving some flac files around between collections. I didn't do a fresh install (working in a Xubuntu VM), but I do have all of the packages that k-r-e/k-r-a depend on. Is there some surefire way to trigger the transcode dialog?

Revision history for this message
Aymeric (mulx) wrote :

@Daniel, I agree with you, it's just maybe it's not a dependency building issue.

@Rohan, I tried to install k-r-e, amarok doesn't allow to transcode.
The only way, for me to have transcode working on amarok is to install the original ffmpeg...
If you have any idea of package not installed by k-r-e neither listed in the first comment, available in ubuntu repository (no ppa) that could make transcode works again in amarok, tell me I can try.

For all,
If you don't have an iPod (which is know by amarok to be limited in file support), you can reproduce the bug with any simple usb key.
If ffmpeg is installed, when you try to copy any song from "local collection" to the USB, amarok should ask in which format you want transcode.
If ffmpeg isn't installed, amarok will simply copy the song to usb key, without asking fro transcoding.

Revision history for this message
Daniel Letzeisen (dtl131) wrote :

I'm stumped.
Using the repo version, amarok will spit an error about missing ffmpeg to the console. No surprise there..

So I built my own version with the packages I mentioned, but I still cannot get the transcode window to appear even if I move flac's and wav files to my USB stick. However, this build of amarok does not complain about missing ffmpeg in console.

I wish I could help more with this bug, but I'll admit I find the Amarok interface and the whole "collection" concept confusing and unintuitive. Amarok's lack of control over the transcode dialog is simply maddening. I should just be able to right-click a track and have a transcode option.

I guess this is why I prefer Clementine for a "library" player...

Changed in amarok (Ubuntu):
status: Triaged → Confirmed
summary: - amarok needs to build-depend on libav packages for transcode support
+ amarok lacks transcode support
Revision history for this message
Myriam Schweingruber (myriam) wrote :

Did you try to build it against libav? Ubuntu doesn't use ffmpeg, and I think this is the issue here: this package was built against ffmpeg instead of libav. I very regularly build my own Amarok from git and with libav there is no problem, transcoding works.

Revision history for this message
Daniel Letzeisen (dtl131) wrote :

Myriam, yes, I built with libav packages mentioned in comment #8 and amarok's cmake configure said that ffmpeg was found. Unfortunately, I can't trigger the transcode dialog, but I'm not sure if something is wrong with my build or if I'm just too dumb to use amarok.. :\

Revision history for this message
Aymeric (mulx) wrote :

The error about missing ffmpeg, I got in console was during transferring songs in flac from local collection, to an iPod (which only support mp3/aac).
It's also show when copying to an other collection, at least when amarok is executed with --debug option.

After a some code lookup, I think I found the origin of this bug:
In src/core/transcoding/formats/ there is one files per file format supported with a line like:

    "return ffmpegOutput.contains( QRegExp( "^ .EA....*libvorbis" ));"

So, it seem amarok parse the output of "ffmpeg -codecs" (which is executed by /src/core/transcoding/TranscodingController.cpp) to guess which file format is supported.

There is two problems:
1. ffmpeg command doesn't exist anymore (libav doesn't provide any compatibility wrapper), so either amarok or libav-tools should be patched to make amarok looking for an existing command.
2. The ouput of "ffmpeg -codecs" and "avconv -codecs" differ which break the regex:
  The original ffmpeg put a space before listing available codecs:
  " DEA.L. vorbis Vorbis (decoders: vorbis libvorbis ) (encoders: vorbis libvorbis )"
  And avconv on Trusty doesn't:
  "DEA.L. vorbis Vorbis (encoders: vorbis libvorbis )"

Maybe amarok is not the only package affected by the switch made by avconv…

Mathew Hodson (mhodson)
Changed in amarok (Ubuntu):
milestone: ubuntu-14.04 → none
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.