Finding / filtering 25 fps content on a 720p50 TS video, while preserving 50 fps content as 50 fps
I often record films on TV using "TV Headend" and use ffmpeg (h.264 with
-crf18) do compress the videos to better file sizes for permanent storage.
Source is a public service TV channel, permanentely transmitting in 720p50.
The recorded files are *.ts files in 720p50, video is aac / h.264 encoded.
Now, some newer films have true 50 frames per second, so that's okay.
Some older films, esp. filmed on chemical film stock and hires-scanned to
video, have effectively 25 true *different* frames per second, allthough
the video stream is still in 50 fps. These videos save file size, if I can
re-code them with only 25 fps, thus throwing away the 25 redundant "filler"
I would like to have a generic re-coding engine, where I just drop the
files and the script analyzes the file and calls ffmpeg with the needed
Currently I watch a part of each film frame by frame, and if I see changes
in only every second frame, I add the option "-framerate 25" th the ffmpeg
Is there a generic filter option in ffmpeg, to say:
"Transcode 50p stream with 50 different fps and keep 50 fps, while in 50p
stream with 25 different is downgraded to 25 fps video."?
Or is there a way for ffprobe to tell me, if the video has effectively 25
or 50 fps, even if the video stream is allways in p50?
In this way, I could first determine the real fps and include an option
"-framerate 25" in the following ffmpeg call, if needed.