将 60i 转换为 60p

這是個有趣的話題,我想我找到問題所在了。

我認為「問題」在於 MCEbuddy 選擇了 Handbrake 作為編碼程式,而 MCEbuddy 把你在 GUI 裡設定的幀率傳給 Handbrake 的方式,是加上命令列參數 -r 59.94

使用 -r 參數時,預設行為是設定「峰值幀率」,所以它告訴 Handbrake 不要超過 59.94 fps,而非強制鎖定。結果它通常會選到 29.xx 左右…

因此,有幾種解法:

  1. 別用 Handbrake(爛選項)
  2. 改用預設設定檔,把 ffmpeg 的優先順序調得比 Handbrake 高(也不理想)
  3. 在設定檔的 handbrake-general 尾巴加上 --cfr(最佳選項)

以選項 3 為例,在 profiles.conf 裡的 [mp4 normal]:

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

改成

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

你可以快速驗證:改用 ffmpeg 優先的設定檔,例如 [DivX AVI Normal],並在 GUI 裡設 59.94,它就會走 ffmpeg。
我的結果如下:

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%)

說明部分直接引用 HandbrakeCLI 文件:

   -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

最後,我不確定「直接把幀率翻倍」真的是你要的。如果影片已經去交錯成 30fps,再硬拉到 60 其實沒意義,可能只是重複影格。我認為你真正該動的是去交錯設定。

根據我粗淺的理解,加上 Plex、decomb、yadif 的差異:

Example
60i fps,3 秒內的影格:

ABCDEFGH  

30p fps,3 秒內的影格:

ACEG  

60p fps,3 秒內的影格,透過 -r 59.94 -cfr 翻倍後:

AACCEEGG  

上面 30p 與 60p 對人眼應該沒差,因為只是重複影格?

真正要的是
60i fps:

ABCDEFGH  

60p fps:

ABCDEFGH  

想達到這效果,我認為 得改去交錯參數。
參考:Yadif deinterlace

MCEbuddy 裡 yadif 設定永遠是:

yadif=0:-1:1  

Handbrake 則用:

--decomb (default decomb settings / no preset)

文件說明:

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

                       Presets:
                           bob
                           eedi2
                           eedi2bob  

decomb 會先判斷是否需要去交錯,需要的話再自動挑最佳方法,所以預設狀態下加倍幀率應該有幫助,但能否達到你想要的「每個場都保留」效果,可能得改用

--decomb=bob  

?這就得自訂設定檔,且可能會被 MCEbuddy 的自動偵測影響。

一個簡單測試:在 Handbrake GUI 裡分別用 decomb 預設與 decomb=BOB 並強制幀率,看看能否看出差異。