[FFmpeg-user] Selecting/dropping frames without re-encoding

Erik Dobberkau erik.dobberkau at gmail.com
Wed Oct 5 19:06:18 EEST 2016


> Hello,
>
> I have a camera recording which is an MXF file and the codec is DNxHD
> I suppose it is a single-frame codec so literally it is a container of
> images which are independently stored in the file.
> Recordings are taken at 50 fps progressive.


Hi Michail,

this is a TV standard, 720p50. Nothing exotic.


> Now what I want is to extract only half of the frames, so that it becomes
> 25 fps


Why would you want to do that?
You're getting standard-incompliant video. In other words: This is wrong.


> Note that I need to do it _without re-encoding_ for two reasons:
> 1. Conversion must be as fast as possible, files can be really huge
> 2. No changes to original information should occur
>
> Theoretically this is an elementary operation, it should just take
> every second frame from source and write to output
> leaving everything else as is.
> I have tried several options whith "-r ..." and added "-c:v copy"
> These commands I have tried:
>
> ffmpeg -i Capture0006V_720p.mxf -r 25 -c:v copy out1.mxf
> ffmpeg -r 50 -i Capture0006V_720p.mxf -r 25 -c:v copy out1.mxf
> ffmpeg -r 2 -i Capture0006V_720p.mxf -r 1 -c:v copy out1.mxf
>
> But they all produce again 50 fps video, so I suppose stream copy just
> ignores all "-r" options so I don't know what can I do to achieve
> what I want. I have searched a lot, so I've registered here
> hoping for solution.
>
> Is it possible that ffmpeg cannot do this without re-encoding?
> If no, how can one do this?
> Thanks in advance.
>

Stream Copy does that... it copies streams.
Dropping every second frame will destroy motion smoothness thus ruin your
video. But you can do that with another filter.

Erik


More information about the ffmpeg-user mailing list