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.6, FPSDivisor=1, SourceMatch=3, MatchEnhance=0.75, InputType=1)
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
Unique ID                                : 11798899974238232662079984027773616907 (0x8E062AEA0EE48A3941DA21266BEC30B)
Complete name                            : MMR-AZ038.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 1.77 GiB
Duration                                 : 1 h 57 min
Overall bit rate                         : 2 156 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 57 min
Bit rate                                 : 2 081 kb/s
Width                                    : 704 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 1.737
Original display aspect ratio            : 3:2
Frame rate mode                          : Constant
Frame rate                               : 29.970 (30000/1001) FPS
Standard                                 : NTSC
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.205
Stream size                              : 1.71 GiB (97%)
Default                                  : Yes
Forced                                   : No
Audio
ID                                       : 2
Format                                   : Opus
Codec ID                                 : A_OPUS
Duration                                 : 1 h 57 min
Bit rate                                 : 72.9 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 50.000 FPS (960 SPF)
Compression mode                         : Lossy
Delay relative to video                  : 83 ms
Stream size                              : 61.2 MiB (3%)
Default                                  : Yes
Forced                                   : No