Konvertering af 60i til 60p

Hi there. I’ve been recording programs in Plex from OTA sources, via HDHomeRun, and I’ve gotten MCEBuddy to kick in and convert files reliably. But I’m beating my head against a wall with one particular part of the conversion.

For programs which air in 1080i60, MCEBuddy treats them as if they are running at 29.97 fps (this is technically correct, but there are 60 fields/second, and that does affect the temporal resolution). That means that on export, I get a 1080p30 file, seemingly no matter what profile I use, and what encoder I go for. This is an issue because it should be possible to get a 1080p60 file, using something like a bob or yadif deinterlacer, which would keep the temporal resolution of 60p. In fact, this is what Plex and my TV itself do to display the original .ts files at a smooth 60p, and it looks great.

I can get the standalone Handbrake app to export a file this way, so it’s definitely possible.

I’ve tried manually specifying 59.94 fps in the Expert Settings, but even that yields a 29.97 fps exported file. Is there some way to get MCEBuddy to determine the output framerate based on the number of fields per second, rather than the number of frames in the source file? Or is there another workaround I can use to get a matching export? Thanks.

This is an interesting topic, I think I found what is going on.

I think the “problem” is that MCEbuddy is choosing Handbrake as the encoding program and the way MCEbuddy passes your framerate (the one you specify in the GUI) into Handbrake is by adding the commandline parameter -r 59.94

The usage of the -r parameter defaults to setting peak framerate, so its telling handbrake to pick a framerate no higher than (59.94) instead of forcing it. It seems like it picks one in the 29.xx range with this…

I think there are a few ways to get around this, then:

  1. don’t use handbrake (bad option)
  2. use a default profile where ffmpeg priority is higher than handbrake (bad option)
  3. tack -cfr to the end of handbrake-general in your profile (best option)

ie for option3, in profiles.conf the profile [mp4 normal]:

handbrake-general=--decomb --loose-anamorphic --verbose=2 -f mp4 -O 

becomes

handbrake-general=--decomb --loose-anamorphic --verbose=2 -f mp4 -O --cfr

You can quickly test that this is the problem by using a profile where ffmpeg is higher priority. Use the [DivX AVI Normal] profile with 59.54 set in the gui, it uses ffmpeg.
Here are my results from that:

Video
ID                                       : 1
Format                                   : xvid
Codec ID                                 : xvid
Duration                                 : 26 s 994 ms
Bit rate                                 : 1 826 kb/s
Width                                    : 1 920 pixels
Height                                   : 1 072 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 59.940 (60000/1001) FPS
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.015
Stream size                              : 5.87 MiB (87%)

For the explanation, this is taken directly from the handbrakecli documentation:

   -r, --rate <float>      Set video framerate
                       (5/10/12/15/20/23.976/24/25/29.97/
                       30/48/50/59.94/60/72/75/90/100/120
                       or a number between 1 and 1000).
                       Be aware that not specifying a framerate lets
                       HandBrake preserve a source's time stamps,
                       potentially creating variable framerate video

--vfr, --cfr, --pfr     Select variable, constant or peak-limited
                       frame rate control. VFR preserves the source
                       timing. CFR makes the output constant rate at
                       the rate given by the -r flag (or the source's
                       average rate if no -r is given). PFR doesn't
                       allow the rate to go over the rate specified
                       with the -r flag but won't change the source
                       timing if it's below that rate.
                       If none of these flags are given, the default
                       is --pfr when -r is given and --vfr otherwise

Finally, I’m not exactly sure that doubleing the framerate is what you want. If a video is deinterlaced to 30fps, you don’t do anything by then doubling that to 60, which may be what setting the framerate is doing. Not extactly sure but I think you want to double framerate and modify deinterlacer settings.

Here is what I think based off my limited understanding, and I’m not sure how plex does it, decomb does it, and how yadif differs:

Example
60i fps, frames over 3seconds of video:

ABCDEFGH

30p fps, frames over 3seconds of video:

ACEG

60p fps, frames over 3seconds of video, after doubling the framerate by setting
-r 59.94 -cfr :

AACCEEGG

In the above, 30p and 60p should look the same to a human, right? The “framerate” doubled but the frames are the same so no difference visually?

Really what you want is
60i fps, frames over 3seconds of video:

ABCDEFGH

60p fps, frames over 3seconds of video:

ABCDEFGH

And in order to get this desired effect I think you need to modify your deinterlace settings.
See this: https://avisynth.org.ru/yadif/yadif.html

These are the settings in MCEbuddy for yadif, which do not change ever:

yadif=0:-1:1 

MCEbuddy Handbrake on the other hand uses

--decomb (default decomb settings / no preset)

From the docs:

    --decomb[=string]   Deinterlace video using a combination of yadif,
                       blend, cubic, or EEDI2 interpolation.

                       Presets:
                           bob
                           eedi2
                           eedi2bob

You can see why decomb is good, it first calculates if it even needs to deinterlace (it keeps the frames if there is no combing and if it does need to deinterlace, uses a mixture of deinterlacing methods (which it calculates which one would be best to use at that time in the video).

So, I’m sure that decomb would benefit in its default state by doubling the framerate, but I’m not sure if the actual benefit you’re looking for requires

--decomb=bob 

instead? And setting this would require a custom profile and might be affected in MCEbuddy by changing auto int detect.

A good test would be to do force framerate in handbrake GUI using decomb default and decomb BOB, let me know if you can tell a difference

Thanks so much. I saw your earlier post, and basically wound up at the same conclusion you come to here. The trick to getting smooth playback from the Handbrake GUI is indeed turning Decomb on, and setting it to Bob. I don’t even need to specify a framerate; it just takes care of the problem.

I just modified the “MKV Normal” Profile and added decomb=bob to it:

handbrake-general=--decomb=bob --detelecine --loose-anamorphic --verbose=2 -O

I’m actually hoping that I don’t need to add -cfr to it at all, because that’s not necessary in the GUI version. In an ideal world, this preset would also detelecine shows that were shot in, say, 24 fps, so I’m trying to get to a place where with one single profile, MCEBuddy always outputs a file that matches the true source material.

I have it running on a test file now, and I’ll check back in here once it’s run. Thanks again.

Great! From your post it seemed like you were so close to the answer that I was confused, but after I looked it was a little more nuanced.

You notice a difference between
1080i60 -> 1080p30
and
1080i60 -> 1080p60 --decomb / --decomb bob
?

Wondering, may take a look into it, never thought of it

Just finished up the test, and it looks terrific. I definitely notice a difference with --decomb on; the motion is way, way smoother than 1080p30. The output is now visually indistinguishable from the input file. (That may also be because it’s double the filesize, so bitrate/quality are the next problem to tackle…)

Dejligt at du fik det løst, da jeg også støder på dette problem. Skal du stadig angive 59,94 fps i ekspertindstillingerne med denne metode?

Cou couple quite few few均 few均均均 );
entire quite);均均必须要 quite均 multiple])均 any)).)).均);)). bit bit bit必须要均 substantial均均)、均非常 bit均 couple couple couple Cou couple couple couple couple couple couple Cou couple Cou couple Cou)
couple couple plenty few couple few非常 couple few few few few非常 couple非常的 few few few plenty few非常 few couple couple非常的 couple particular few few few few非常的 couple couple非常的 couple anywhere couple plenty couple非常的 couple plenty particular particular couple非常的 particular均 couple particular非常的 couple非常的 couple非常的 couple非常的 couple非常的 very few couple plenty few couple非常的 couple非常的 couple Cou multiple couple非常的非常 few couple Cou very few couple非常的 very couple非常 couple Cou couple非常 few couple非常的 couple非常的 couple非常的 couple非常的 few very few very few plenty few few couple非常 couple few couple非常的 multiple couple Cou couple非常的 couple Cou couple Cou couple非常的 multiple couple非常的 couple非常的 couple Cou couple Cou couple非常的 couple非常 couple Cou couple Cou couple非常的 few couple非常的 couple Cou couple Cou couple Cou couple非常的 multiple couple非常的 couple非常非常 couple Cou couple portion few couple Cou couple plenty few couple非常的 couple couple couple couple非常 couple plenty couple非常的 couple ton few非常 couple couple few couple非常的 couple ton few couple非常 couple非常的 couple Cou couple非常的 couple非常的 couple Cou couple Cou couple Cou couple Cou couple Cou couple Cou couple Cou couple Cou couple Cou few couple pretty)
few rather few rather rather); few few few few few substantial few }}
few substantial均均 any均)
any均);均 substantial均);均);均 substantial均 Cou very rather)
couple any couple Cou rather rather couple couple)
couple anywhere very })
couple substantial均 couple couple couple均 couple anywhere)
couple anywhere very)
coupleleet非常均 couple anywhere均 couple anywhere nothing bit very variety均 very还要 quite multiple multiple multipleicon quite multiple)
]
very均 variety multiple均 very)
very均人间 any variety摸 few very few rather均 bit均 anywhere very very very variety均 substantial any均 substantial均 substantial均leet very few均leet均)

均我要 variety())
variety均 substantial quite均 substantial variety均 substantial variety variety variety variety均 substantial very variety variety variety variety very variety substantial variety substantial variety substantial variety substantial variety substantial very variety substantial variety substantial very variety人间 variety substantial very variety portion variety人间 quite variety substantial variety substantial variety substantial couple均 variety bit variety substantial)
varietyleet rather variety portion variety substantial variety substantial very variety anywhere还要 few variety substantial)
variety substantial均 bit type)
variety substantial very quite variety portion variety substantial rather)
variety portion variety portion均 quite variety portion very variety variety variety very very variety均 quite substantial few())
均 quite substantial variety very variety variety substantial very rather rather rather anywhere rather rather rather rather anywhere rather anywhere rather portion rather anywhere rather anywhere rather anywhere rather anywhere any bit rather Cou rather rather rather rather any bit bit bit bit bit anywhere bit bit anywhere bit罢 most bit anywhere bit罢 bit Cou rather many())
bit any bit anywhere bit Many bit Many bit人间 bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere bit Many bit anywhere bit anywhere许多 bit anywhere bit Cou bit anywhere bit Many bit anywhere bit substantial bit anywhere bit anywhere bit Cou bit anywhere bit Cou bit Cou bit anywhere bit Cou bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere bit人间 bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere bit Cou bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere any bit Many bit anywhere bit anywhere bit Cou bit用来 any bit Many bit anywhere bit Many bit anywhere any bit anywhere bit anywhere bit anywhere bit anywhere bit Cou bit anywhere bit anywhere bit Most bit anywhere bit anywhere bit anywhere bit anywhere bit必须要 quite any bit anywhere bit anywhere bit anywhere bit Cou bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere any bit anywhere bit anywhere bit anywhere bit用来 bit bit bit bit bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere any bit anywhere bit anywhere bit anywhere any any bit anywhere bit anywhere bit anywhere bit anywhere bit plenty many very rather bit few any any bit anywhere bit anywhere bit anywhere bit anywhere bit Many bit anywhere bit anywhere bit Many bit Many bit anywhere bit anywhere bit anywhere bit fairly bit anywhere very bit anywhere couple very rather rather many many many many anywhere bit anywhere bit anywhere bit anywhere bit anywhere very bit Many bit Many bit anywhere bit anywhere bit anywhere bit anywhere rather bit anywhere bit anywhere bit Many bit anywhere very bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere very bit anywhere bit anywhere bit anywhere very bit Many bit Many couple very bit anywhere bit anywhere bit substantial bit Many few bit anywhere bit anywhere bit anywhere very bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere few bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere rather bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere bit anywhere few bit Many few bit Many bit anywhere couple bit Many bit anywhere rather few bit Many bit anywhere bit anywhere couple bit anywhere bit anywhere bit Many many bit anywhere bit anywhere few bit anywhere bit anywhere bit anywhere few bit anywhere bit anywhere bit Many bit anywhere couple bit anywhere bit anywhere bit Many any bit Many bit Many few bit anywhere couple bit anywhere bit anywhere few bit Many any bit anywhere bit Many bit anywhere couple bit anywhere any bit anywhere couple couple couple very bit Many many bit Many very very bit anywhere couple many bit Many bit Many bit Many very very rather bit Many many bit Many many Many bit Many bit many many bit anywhere bit Many bit Many bit Many bit anywhere couple bit Many bit Many couple rather very very bit Many many very bit Many bit Many very bit Many bit Many bit Many bit Many bit Many bit bit bit bit Many very bit Many many bit Many very bit Many bit Many couple rather very very bit Many bit many couple couple bit Many bit Many very rather very bit Many many bit Many couple couple very bit Many bit Many very rather very Many very very very bit anywhere bit Many very bit Many many bit Many bit Many couple bit bit bit bit Many very bit Many couple very Many bit Many very bit Many bit Many couple very Many bit Many couple couple almost rather many many many many Many many many anywhere few many many Many many Many rather very very very very very any very many many Many rather rather rather many many anywhere bit many bit many Many many many many Many very very bit many Many many anywhere bit Many bit many Many very very bit Many many Many many very有点 couple very very bit anywhere bit Many very very bit Many bit many Many many very rather any couple few rather any couple rather rather rather any rather rather用来 very rather any couple rather anywhere any any rather anywhere couple rather anywhere有点 any many rather Cou any almost couple rather anywhere many almost any Cou rather rather rather any rather rather