ffmpeg: Unrecognized option 'map_channel'

Bug #1004174 reported by thom
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
libav
Fix Released
Medium

Bug Description

Ubuntu 12.04 server

context:
apt-get install ffmpeg results in installing avconv
when invoking ffmpeg, avconv is started

avconv is presented as a drop-in replacement for ffmpeg
but avconv can't handle a lot of important commandline switches of ffmpeg
If ubuntu insist that avconv is a ffmpeg drop-in replacement
then i will bugreport on it as if it were ffmpeg
therefore the buglist is extremely long (so i'll report one at a time).
Let's start with a REAL showstopper.

try this (copied from the ffmpeg documetation):
ffmpeg -i stereo.wav -map 0:0 -map 0:0 -map_channel 0.0.0:0.0 -map_channel 0.0.1:0.1 -y out.ogg

expected:
this should convert a stereo-audiostream into two mono-audiostreams

but instead:
Unrecognized option 'map_channel'

so:
ffmpeg can't map channels anymore

result:
ffmpeg lost the ability to convert to XDCAM 422HD MXF (50Mb/s) because the national broadcast standard dictates 8 mono audio channels while most sourcematerial has one stereochannel......without remapping (and adding six empty "-newchannel -ac 1") this is impossible. (that is, without an external demuxer, audio channel splitter and remuxer and the hope that it stays in sync)

bugfix:
merge audiomapping back into the code or add the funcion "asplit" which should do the opposite of "amerge" so i can rewrite my program code again (which i am getting used to with every other update as a long time ffmpeg user, so no worries)

alternative bugfix:
give me ffmpeg or ffmbc when i apt-get install ffmpeg and give me avconv when i apt-get install avconv

Revision history for this message
Reinhard Tartler (siretart) wrote : Re: [Bug 1004174] [NEW] ffmpeg: Unrecognized option 'map_channel'

On Do, Mai 24, 2012 at 23:01:36 (CEST), thom wrote:
> context:
> apt-get install ffmpeg results in installing avconv
> when invoking ffmpeg, avconv is started
>
> avconv is presented as a drop-in replacement for ffmpeg
> but avconv can't handle a lot of important commandline switches of
> ffmpeg

Best solution, link your application directly against libavcodec, etc.,
or adapt your scripts to avconv.

> If ubuntu insist that avconv is a ffmpeg drop-in replacement
> then i will bugreport on it as if it were ffmpeg
> therefore the buglist is extremely long (so i'll report one at a
> time).

the installed binary /usr/bin/ffmpeg is a conserved version of the
ffmpeg program at the time avconv was introduced. The version that is
available from http://ffmpeg.org has evolved, added new features and
changed existing behavior that are not supported in ubuntu.

FYI, the upcoming version of ubuntu is not going to provide a
/usr/bin/ffmpeg binary at all.

> Let's start with a REAL showstopper.
>
> try this (copied from the ffmpeg documetation):
> ffmpeg -i stereo.wav -map 0:0 -map 0:0 -map_channel 0.0.0:0.0
> -map_channel 0.0.1:0.1 -y out.ogg

What FFmpeg documentation are you referring to?

[...]

> bugfix:
> merge audiomapping back into the code or add the funcion "asplit" which
> should do the opposite of "amerge" so i can rewrite my program code
> again (which i am getting used to with every other update as a long time
> ffmpeg user, so no worries)

please see the avconv documentation for this.

> alternative bugfix:
> give me ffmpeg or ffmbc when i apt-get install ffmpeg and give me avconv
> when i apt-get install avconv

This is more complicated to implement than you might think. You are
welcome to propose concrete proposals and patches to implement this, but
be assured, packaging and providing both Libav and FFmpeg simultaneously
has been found to be unfeasible maintenance-wise.

--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4

Revision history for this message
thom (tsk) wrote :
Download full text (3.6 KiB)

Dear Reinhard,

Thank you for your comments

>> avconv is presented as a drop-in replacement for ffmpeg
>> but avconv can't handle a lot of important commandline switches of
>> ffmpeg

>Best solution, link your application directly against libavcodec, etc.,
>or adapt your scripts to avconv.

no, because avconv/libavcodec set is not able to split stereo in dual mono
while the current ffmpeg actually can. (which, as i explained, is highly needed for i.e. XDCAM 422HD MXF)
The only solution for me at the moment would be installing ffmbc (not in repository) or ffmpeg (from PPA)
but then I would have to find a way to remove avconv from the repository because it is using the ffmpeg name and therefore it will be very unpredictable which will be installed if it doesn't clash rightaway.

(and that is a bug.)

>The version that is
>available from http://ffmpeg.org has evolved, added new features and
>changed existing behavior that are not supported in ubuntu.

exactly, so i expect to get ffmpeg when i do "apt-get install ffmpeg"
otherwise I would have done "apt-get install avconv" to get avconv
and I would get my docs from http://libav.org

>FYI, the upcoming version of ubuntu is not going to provide a
>/usr/bin/ffmpeg binary at all.

that is good news, it will be /usr/bin/avconv all the way then. That will at least solve some confusion.
and also it will solve a lot of problems when adding the real ffmpeg via a PPA.

>> try this (copied from the ffmpeg documetation):
>> ffmpeg -i stereo.wav -map 0:0 -map 0:0 -map_channel 0.0.0:0.0
>> -map_channel 0.0.1:0.1 -y out.ogg

>What FFmpeg documentation are you referring to?

The official ffmpeg documentation:
http://ffmpeg.org/ffmpeg.html#Advanced-options

> bugfix:
>> merge audiomapping back into the code or add the funcion "asplit" which
>> should do the opposite of "amerge"

> please see the avconv documentation for this.

I did extensively and avconv has none such a functionality at the moment.
ffmpeg does, so actually avconv should stop pretending to be ffmpeg.
avconv/libav is not (or no longer) a drop-in replacement for ffmpeg but a full grown high quality codec suite in it's own right.
hell, it can even do interlaced resizing nowadays....avconv IS really great.
(but its name is not ffmpeg)

>> alternative bugfix:
>> give me ffmpeg or ffmbc when i apt-get install ffmpeg and give me avconv
>> when i apt-get install avconv

>This is more complicated to implement than you might think. You are
>welcome to propose concrete proposals and patches to implement this, but
>be assured, packaging and providing both Libav and FFmpeg simultaneously
>has been found to be unfeasible maintenance-wise.

I know that it can be a hassle to give someone <packet-name> when someone is doing "apt-get install <packet-name>"
I therefore have a big respect that it works for most of the other 28000+ packages in the repository and don't blame libav that they slip-up.

I assume that the biggest problem is providing both ffmpeg and avconv
In that case: Libav shouldn't change the current situation but drop the name "ffmpeg" because it is a bit misleading and could give some serious unintended consequences when adding the real ffmpeg via ...

Read more...

Revision history for this message
Reinhard Tartler (siretart) wrote : Re: [Bug 1004174] Re: ffmpeg: Unrecognized option 'map_channel'

On Fr, Mai 25, 2012 at 17:42:37 (CEST), thom wrote:

>>What FFmpeg documentation are you referring to?
>
> The official ffmpeg documentation:
> http://ffmpeg.org/ffmpeg.html#Advanced-options

I see.

well that documentation does not apply to the ubuntu libav package.

>> bugfix:
>>> merge audiomapping back into the code or add the funcion "asplit" which
>>> should do the opposite of "amerge"
>
>> please see the avconv documentation for this.
>
> I did extensively and avconv has none such a functionality at the
> moment.

Could you please file a bug in the libav upstream bugtracker then,
please?

http://bugzilla.libav.org

> ffmpeg does, so actually avconv should stop pretending to be ffmpeg.

It doesn't pretend that. The included ffmpeg binary is simply kept for
compatibility reasons with *programs* *in* *ubuntu*, and does not aim to
replicate newly introduced behavior from http://ffmpeg.org

> I assume that the biggest problem is providing both ffmpeg and avconv
> In that case: Libav shouldn't change the current situation but drop
> the name "ffmpeg" because it is a bit misleading and could give some
> serious unintended consequences when adding the real ffmpeg via a PPA
> to a packetmanager

This is what's going to happen in future version of ubuntu.

--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4

Changed in libav:
importance: Undecided → Wishlist
Revision history for this message
thom (tsk) wrote :

Dear Reinhard,

Thank you for your advice. I commited a bug report at:

http://bugzilla.libav.org

it is registered as:
Bug 298 - avconv can merge dual-mono to stereo but can't split stereo to dual-mono (edit)

Herzliches gruessen,

Thom

Changed in libav:
importance: Wishlist → Unknown
status: New → Unknown
Revision history for this message
thom (tsk) wrote :

Dear Reinhard,

you wrote:
>The version that is available from http://ffmpeg.org has evolved,
>added new features and changed existing behavior
>that are not supported in ubuntu.

Libav's ffmpeg claims:
---
This program is not developed anymore and is only provided for compatibility. Use avconv instead (see Changelog for the list of incompatible changes).
---

The above statements are mutual exclusive.
So since I believe you, I filed a bug ( #1007769 ) against libav's ffmpeg claim.

Revision history for this message
Reinhard Tartler (siretart) wrote :

On Sa, Jun 02, 2012 at 12:11:38 (CEST), thom wrote:

> Dear Reinhard,
>
> you wrote:
>>The version that is available from http://ffmpeg.org has evolved,
>>added new features and changed existing behavior
>>that are not supported in ubuntu.
>
> Libav's ffmpeg claims:
> ---
> This program is not developed anymore and is only provided for compatibility. Use avconv instead (see Changelog for the list of incompatible changes).
> ---
>
> The above statements are mutual exclusive.

I don't think so. However, the fact that both the tool name and the
project name are identical does not help to avoid some confusion. It
merely says that the tool /usr/bin/ffmpeg originates from the FFmpeg
project, but is not futher updated anymore to match the latest features
from the FFmpeg project.

> So since I believe you, I filed a bug ( #1007769 ) against libav's
> ffmpeg claim.

What bugtracker is that?

--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4

Revision history for this message
thom (tsk) wrote :

ffmpeg has a tool named ffmpeg
libav has no tool named ffmpeg, it has a tool named avconv.

I like the creative interpretation by which you're streching the language beyond imagination.
You are not corkscrewing yourself out of it, and you bloody well know it.

here's the link for the bugtracker :
https://bugs.launchpad.net/ubuntu/+source/libav/+bug/1007769

and it seems that it was a duplicate already:
https://bugs.launchpad.net/ubuntu/+source/libav/+bug/1005536

Revision history for this message
Reinhard Tartler (siretart) wrote :

On Sa, Jun 02, 2012 at 20:03:30 (CEST), thom wrote:

> ffmpeg has a tool named ffmpeg
> libav has no tool named ffmpeg, it has a tool named avconv.

Libav does ships both tools, ffmpeg and avconv. Check the sources
yourself:

http://git.libav.org/?p=libav.git;a=tree;h=refs/heads/release/0.8;hb=release/0.8

Compare the file avconv.c to ffmpeg.c

--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4

Revision history for this message
thom (tsk) wrote :

Dear Reinhard,

With all my respect for you as someone who offers his valuable time for packaging libav , and i really have to thank you for that, I definitely do not agree with your point of view, I have very strong arguments against it but it seems to me that it would be proper to discuss that somewhere else (to prevent sidetracking of the original bug here).

I propose further debate would be more appropriate in Bug #1005536 which seems 100% targeted to the controversial "ffmpeg-is-not-developed-anymore" text and it's unforseen consequences.

The original bug in this bugreport was about: ffmpeg/avconv missing (audio)subchannelmapping

Meanwhile, I took de bug upstream myself and there was a fairly quick response from a developer
<quote>
Anton Khirnov 2012-06-12 21:42:44 CEST

Implemented as a 'channelsplit' audio filter in
d6251368772a170987387bdc508433c8fcf54cda.
</quote>

So...are we going to see the fix soon in an update or do we have to wait until we can backport it from Quantal Quetzal ?

Revision history for this message
Reinhard Tartler (siretart) wrote :

That's very unlikely:

09:51 <siretart> do you think that af_channelsplit is something that we should backport to 0.8?
09:52 <elenril> no
09:52 <elenril> there is no audio filtering support in 0.8 at all
09:52 <elenril> so i'd have to backport it all
09:53 <elenril> that's a huge thing
09:53 <elenril> and avconv changes too
09:53 <elenril> which depend on complex filtergraphs....
09:53 <elenril> so we end up backporting half of current git master

Quantal will also ship libav 0.8, so won't have this either. 0.9 will have it, and we are working on a beta. if you need updated packages for your applications, please have a look at https://launchpad.net/~motumedia/+archive/libav-daily. If you do not need to link your application against an af_channelsplit filter enabled libavfilter.so, I'd suggest to compile from git HEAD without shared libraries.

Revision history for this message
thom (tsk) wrote :

Dear Reinhard,

I suspected something like that. Backporting would be hell on wheels.

I already switched to FFmbc (since that better supported MXF and channelmapping) with libraries statically compiled to avoid conflicts.

I presume I will do the same with FFmpeg and delete the libav-ffmpeg binary to avoid conflicts.
I leave the libav libs shared for the other applications....not really elegant but it works.

I presume I can flag this bugreport as a "won't fix" since no backporting is practical.

Thanks so far for the valuable time you spend on this.

Changed in libav:
importance: Unknown → Medium
status: Unknown → Fix Released
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.