[FFmpeg-user] Re-packing video in new container file really working for all container types (AVI, MP4 MKV, WMV) and codecs?

Kieran O Leary kieran.o.leary at gmail.com
Mon Nov 5 13:49:00 EET 2018


Hi,

On Mon, Nov 5, 2018 at 10:59 AM Ben <bxstover-at-yahoo.co.uk at ffmpeg.org> wrote:
>
> As I read I can lossless re-package an existing video from a source container file into a different target container file by issuing e.g. the following command:
>
> FFmpeg.exe -i sample.mp4 -acodec copy -vcodec copy sample.avi
>
> or
>
> FFmpeg.exe -i sample.avi -acodec copy -vcodec copy sample.mkv
>
> So the target container type is simply identified by the target file extension.
> No additional parameter is required.
> Correct?

Pretty much, but you might want to add `-map 0` so that all tracks in
your source file make their way into your output file. By default,
ffmpeg will only map one track of each type (audio/video etc).
https://trac.ffmpeg.org/wiki/Map

>
> "Lossless" means without re-encoding the video and audio content.
> Meta data values are obviously lost when "downgrading" e.g. from MP4 to AVI.
>
This loss of metadata is definitely something to watch out for.

Best,

Kieran.


More information about the ffmpeg-user mailing list