[FFmpeg-user] Converting numerous files to h264

neoculture23 neoculture23 at gmail.com
Sun Nov 11 06:25:08 CET 2012

On 10 November 2012 20:32, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

> neoculture23 <neoculture23 <at> gmail.com> writes:
> > ffmpeg -i old_file.<ext> -c:a copy -c:s copy -c:d copy
> > -c:t copy -c:v libx264 -preset slower old_file.mkv
> Completely apart from the fact that this is missing a bitrate
> and -map 0 (or similar to ensure all tracks are copied and
> not just one of each kind):
> I fear that what you want will not work in the general case
> because not all codecs are supported in all containers.
> (I mean specification-wise, additionally FFmpeg is not bug-
> free and you will find that for example stream copy from
> h264-in-mpegts to matroska will sometimes not work.)
> Not knowing your exact use case I would recommend that you
> keep the files as they are, if you have a particular "broken"
> one (one that is in a container you typically cannot play or
> don't like) remux it manually to make sure it works as
> expected.

I am in fact keeping the original file and creating a new file called
filename.x264.mkv - while this creates more files in the short run, I am
processing a few directories at a time... or at least the overnight script
will be once I am happy with the ffmpeg command line. If a general case
does not work with everything, I am happy to look at the exceptions
manually - the idea is to automatically convert the bulk if possible.

More information about the ffmpeg-user mailing list