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

Marcelo Boufleur mboufleur at gmail.com
Thu Oct 22 14:54:37 CEST 2015

>From what I understood from Liran's original post, he meant to grab the
original file encoding parameters, and use them to encode the processed
video than has undergone through ffmpeg's filter chain. The "same quality"
in this case would be better translated as "same encoding parameters".

If that is the case, one could retrieve some of the original encoding
parameters using ffprobe, and use these for the ffmpeg command line. I've
seen posts from people with similar issues trying to trim content using
ffmpeg, but it seems there is no definitive answer.

2015-10-21 18:53 GMT-02:00 Kieran O Leary <kieran.o.leary at gmail.com>:

> 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.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user

More information about the ffmpeg-user mailing list