Recovering original frame rate from 60fps capture

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
eshwayri
Posts: 3
Joined: Mon Sep 14, 2020 10:19 pm

Recovering original frame rate from 60fps capture

Post by eshwayri »

1080p x 60fps h.265 capture of source material that appears to be originally 1080p x 25fps, and that is up-converted to 60fps for display (and therefore capture); when individual frames are viewed in VirtalDub, every 60 frames are composed of 25 original frames and 35 duplicates. Frame arrangement is ODODDODODODDODODDODODDODODODDODODDODODODDODODDODODODDODODDOD. I set the maximum frame rate on my first test encode in Handbrake to 60fps, and the output remained at 60fps. I then set the maximum frame rate on the encode to 25 fps, and it seemed to intelligently pick the 25 original frames and drop all the duplicates. It looks like it doesn't remove duplicate frames unless it has to. I saw the same behavior on source material that was at 24fps and 30fps. Can I count on this behavior? or was I just lucky, and I am mis-understanding what Handbrake is actually doing?

If the original source material had been interlaced, I assume the 60 fps up-conversion on the recording would look very different. I am actually not sure how the streamer would handle the up-conversion. Since it is forced to output at 60fps, the easiest for it would be to double the frame rate and create merged frames with the top and bottom halves alternating their updates. For 25fps source material, it would also have to sprinkle 10 duplicate frames within the 60 frame window. This is a guess since I haven't run into this situation yet. If I do, and it looks like what I think, what would be the advisable method to generate a progressive encode that minimizes duplicate frames? I was thinking of using 60 fps for 30 fps interlaced source, and 50 fps for 25 fps interlaced source. I think everything I have can accommodate both frame rates.
musicvid
Veteran User
Posts: 3814
Joined: Sat Jun 27, 2009 1:19 am

Re: Recovering original frame rate from 60fps capture

Post by musicvid »

Try setting your output at 25 fps, fixed frame rate. Beyond that, there is little you can do in Handbrake. The detelecine filters are not set to handle that.

Since your output frame rate is not an exact multiple of the source, you have created a "frankenfile." If you had 50p output from 25p source, it would be fairly straightforward.
eshwayri
Posts: 3
Joined: Mon Sep 14, 2020 10:19 pm

Re: Recovering original frame rate from 60fps capture

Post by eshwayri »

I set the encode for VFR 25 and all filters disabled. Resulting output file is 25fps according to MediaInfo. I also went through the file with VirtualDub, and every frame is unique -- no duplicates. Based on the speed and the filters being disabled, the only thing it could have done is drop duplicate frames. Network usage during the encode shows high bandwidth usage (450 MB/sec) during the early stages of the encode, followed by very low usage for the remainder as it did the HEVC part. I wonder if it was flagging duplicate frames during a first pass. I may have a "franken" file as you put it, but if the streamer/recording was at 30fps (my only other option), then I would have to let HB do software IVTC to get back down to 25fps, and that seems to be a much more compute intensive task than identifying duplicates. The encode speed is running a couple of times faster this way than when I have the filters set on Default.
musicvid
Veteran User
Posts: 3814
Joined: Sat Jun 27, 2009 1:19 am

Re: Recovering original frame rate from 60fps capture

Post by musicvid »

If your video is not interlaced telecine, IVTC is irrelevant. I would opt for fixed 25, not variable. Glad it dropped the right frames.
Rorchach91
Posts: 17
Joined: Fri Aug 14, 2020 4:13 am

Re: Recovering original frame rate from 60fps capture

Post by Rorchach91 »

Just for curiousity. If I have a video source which transferred from PAL analog, like a VHS tape stuff to digital, it keeps original framerate (25f pers)
Will Handbrake infer or "add" frames so I could make the video to a 30fps video by adjusting parameters in the "Video" tag (framerate)?
musicvid
Veteran User
Posts: 3814
Joined: Sat Jun 27, 2009 1:19 am

Re: Recovering original frame rate from 60fps capture

Post by musicvid »

Handbrake will drop or dupe frames to achieve the new frame rate. It will not interpolate.
Since 30 is not a multiple of 25, the output will stutter: ABCDEE
Sigward003
Posts: 9
Joined: Tue Sep 15, 2020 5:49 am

Re: Recovering original frame rate from 60fps capture

Post by Sigward003 »

Understood, thank you
I've seen many videos that show how AI increase the video frame from 30 to 60 by adding interpolate frame generated by AI algorithm, that's pretty cool
eshwayri
Posts: 3
Joined: Mon Sep 14, 2020 10:19 pm

Re: Recovering original frame rate from 60fps capture

Post by eshwayri »

60 fps doesn't stutter since it can spread out the duplicates a lot more evenly. I now understand why streamers like the AppleTV lock on to 60 fps for output; it makes conversion from 24/25/30 so much easier and smoother for the person watching. Luckily for me, it also makes recording and returning to the source fps equally much easier.
Post Reply