[FFmpeg-user] Slicing a 4K video to images and then encoding them back using the same codec

Kieran O Leary kieran.o.leary at gmail.com
Wed Oct 21 22:53:10 CEST 2015

On Wed, Oct 21, 2015 at 9:08 PM, Liran Sharoni
<Liran.Sharoni at sandisk.com> wrote:
> Forget what mediainfo I posted , I am a new user and I am asking for advice:
> How can I re-encode a video after changing it while keeping it as identical as possible?
> I guess I need help evaluating the parameters for " identical" so I am consulting with you guys :
> I want to keep the timestamps , quality and the file-type
> Is there  anything else I am forgetting  ?

In order to evaluate the parameters for "identical", it will help to
do what Moritz and myself have asked on numerous occasions:post your
full uncut console output. It tells us a lot about your input is, and
it will influence the settings required for the output. To just get
the input info, run FFMPEG -i YOURFILE.mp4 and post that output here.

You cannot use -vcodec copy when using a filter, so the nearest that
you will get when using a filter is a lossless codec. Research
framemd5s and do some test encodes without your filter if you're
paranoid about lossnessless. We already mentioned ffv1. it sounds like
your input codec is h264, so why not use libx264 lossless if you want
to stay as close to your original as possible? keep in mind that your
file size will increase significantly. I'd recommend ffv1 as it will
mostly like produce a smaller file with a quicker encode. The file
type of your input seems like a lossy implementation of h264. In order
to use the same "file-type" and settings, you will get generational
loss and reduced quality. A lossless codec will produce an identical
bitstream minus your filtering.
You can try a production codec like prores which will probably result
in a very similar quality, again with a much larger file size. You
could also try experimenting with lossy h264 settings, perhaps crf
presets so that the output looks identical to you.

More information about the ffmpeg-user mailing list