Discussion:
[FFmpeg-user] Re-packing video in new container file really working for all container types (AVI, MP4 MKV, WMV) and codecs?
Ben
2018-11-05 10:59:42 UTC
Permalink
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?

"Lossless" means without re-encoding the video and audio content.
Meta data values are obviously lost when "downgrading" e.g. from MP4 to AVI.

Can someone please confirm that the target file (AVI, MP4, MKV, WMV) will be full compliant with container definition and not just a dirty workaround from ffmpeg.

Is this lossless re-packing possible for all types of video codecs (e.g. H.264, H.265, VP9 and Xvid) and audio codecs (MP3, AAC) or are there any restrictions
which require a re-encoding anyway?

Thank you
Ben
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ
Carl Eugen Hoyos
2018-11-05 11:26:55 UTC
Permalink
2018-11-05 11:59 GMT+01:00, Ben <bxstover-at-***@ffmpeg.org>:

Splitting the answers to make sure that can be no misunderstanding
about the first one;-)
Post by Ben
Is this lossless re-packing possible for all types of video codecs
We call it "remuxing" and it makes sense to use this word here.
Post by Ben
(e.g. H.264, H.265, VP9 and Xvid) and audio codecs (MP3, AAC)
or are there any restrictions which require a re-encoding anyway?
Not all containers allow all codecs and not all codecs in all
containers (that would be allowed) are necessarily implemented
in FFmpeg.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org wi
Carl Eugen Hoyos
2018-11-05 11:24:06 UTC
Permalink
Post by Ben
Can someone please confirm that the target file (AVI, MP4, MKV,
WMV) will be full compliant with container definition and not just
a dirty workaround from ffmpeg.
Please read the final clauses of the (L)GPL again, nobody can
confirm what you request.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org with subject
Kieran O Leary
2018-11-05 11:49:00 UTC
Permalink
Hi,
Post by Ben
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
Post by Ben
"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.
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@f

Loading...