These are approximate encoding settings.
from vapoursynth import core
import havsfunc as haf
clip = core.d2v.Source('index.d2v')
clip = haf.QTGMC(clip, Preset='Very Slow', Sharpness=0.4, FPSDivisor=1, SourceMatch=3, Lossless=2, MatchEnhance=0.75, TFF=True)
clip.set_output()
vspipe --y4m script.vpy - | ffmpeg -hide_banner -i pipe: -c:v libx264 -preset veryslow -tune film -crf 18 -x264-params ref=9:bframes=9:no-fast-pskip=1 video.mkv
ffmpeg -hide_banner -i audio.ac3 -c:a libopus -b:a 96k audio.mka
General
Unique ID : 238394527944518112946406995501653837517 (0xB3591DB1D3245DBF802A679B98CA46CD)
Complete name : TSDV-41671.mkv
Format : Matroska
Format version : Version 4
File size : 1.63 GiB
Duration : 1 h 21 min
Overall bit rate : 2 845 kb/s
Writing application : mkvmerge v38.0.0 ('The Silent Type') 64-bit
Writing library : libebml v1.3.9 + libmatroska v1.5.2
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.1
Format settings : CABAC / 9 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 9 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 1 h 21 min
Bit rate : 2 741 kb/s
Width : 720 pixels
Height : 480 pixels
Display aspect ratio : 16:9
Original display aspect ratio : 3:2
Frame rate mode : Variable
Frame rate : 52.845 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.150
Stream size : 1.57 GiB (96%)
Writing library : x264 core 157 r2945 72db437
Encoding settings : cabac=1 / ref=9 / deblock=1:-1:-1 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / psy_rd=1.00:0.15 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-3 / threads=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=9 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=crf / mbtree=1 / crf=18.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Default : Yes
Forced : No
Audio
ID : 2
Format : Opus
Codec ID : A_OPUS
Duration : 1 h 21 min
Bit rate : 99.2 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 50.001 FPS (960 SPF)
Compression mode : Lossy
Stream size : 58.1 MiB (3%)
Default : Yes
Forced : No