[FFmpeg-user] Audio Stream Mapping issue

Clément Bœsch ubitux at gmail.com
Tue Nov 15 18:20:03 CET 2011


On Tue, Nov 15, 2011 at 05:03:53PM +0000, Tim Nicholson wrote:
> On 15/11/11 16:33, Clément Bœsch wrote:
> >[...]
> >
> >OK, let's quote this:
> >
> >     By default ffmpeg tries to pick the "best" stream of each type present
> >     in input files and add them to each output file. For video, this means
> >     the highest resolution, for audio the highest channel count. For
> >     subtitle it's simply the first subtitle stream.
> >
> >"pick the best stream of each type [...] For video, [...], for audio
> >[...]"
> >
> >I'm not sure where the confusion comes from…
> >
> 
> I think the fact that, for audio a single channel, can be packaged
> either in its own stream, or be combined with others into a multi
> channel stream leads sometimes to thinking of one audio "item" as a
> single channel, and at other times as a single stream. The
> transition between these ways of thinking occurring subliminally and
> leading to confusion (That's my excuse anyway).
> 

The N mono channel to 1 stream can't really be autodetected, this is why
the -map_channel option now exists btw :)

> >>I am happy to contribute to better wording, once I understand what
> >>the "correct" behaviour is.
> >>
> >
> >Quickly looking at ffmpeg.c (around L3934), the audio stream picking is
> >what we already suggested: it loops against all stream, pick the one with
> >the most number of channels (and thus *ignore* "score" equality) and add
> >it.
> >
> 
> With your help I think I have it sorted in my own mind, now. But I
> think the doc could be improved.
> 

Certainly, and such changes are always welcome.

> >So if you want to fix the documentation, you should IMO just reword in a
> >sense to explicit the "only one pick per stream type". I'm not a native
> >English speaker so I'm sure you will be able to propose a better wording
> >than me; feel free to send a patch on ffmpeg-devel. If you don't, I'll
> >take the time to of course.
> 
> Never tried submitting a patch so will haver to bone up on how to do it...
> 

For such a trivial patch you can just write here the new paragraph, I'll
write the patch and put your name in the credits. You can also try the
"hard way": http://ffmpeg.org/developer.html#Submitting-patches-1

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20111115/b55f1a08/attachment.asc>


More information about the ffmpeg-user mailing list