[FFmpeg-user] Specifying Video Stream with V instead of v

Moritz Barsnick barsnick at gmx.net
Mon Nov 9 16:28:21 CET 2015


On Mon, Nov 09, 2015 at 16:07:44 +0100, Nicolas George wrote:
> Yes, there was a word missing (connectbot on a phone, sorry): you are not
> specifying the codec for the attached images. By default, the codec for
> video in Matroska files is libx264 if it is available, so writing -c:v
> libx264 or not is the same (but if you want x264, then by all means write
> it, do not rely on the default). You need to specify the codec for the
> streams.

I think the point Josh was trying to make is what is documented as
such, regarding "last matching c option":

    For each stream, the last matching c option is applied, so
      ffmpeg -i INPUT -map 0 -c copy -c:v:1 libx264 -c:a:137 libvorbis OUTPUT
    will copy all the streams except the second video, which will be
    encoded with libx264, and the 138th audio, which will be encoded
    with libvorbis.

He was using:

$ ffmpeg -i filename.mkv -map 0 -c copy -c:V libx265 265_filename.mkv

and according to the quoted documentation:
    'V' only matches video streams which are not attached pictures,
    video thumbnails or cover arts.

this would result in all streams being copied, with exception of the
actual non-still-image video stream. At least that's what could be
expected from the docs. The last "-c:V" option should only match the
non-still-image.

(Note, which the example above uses explicit numerical stream
specifiers, I know that it works for "-c copy -c:N bla" as well.)

Moritz


More information about the ffmpeg-user mailing list