OpusGang / awsmfunc

awesome VapourSynth functions
MIT License
18 stars 4 forks source link

Issue with memory leak when using MapDolbyVision #29

Closed sayou112 closed 8 months ago

sayou112 commented 8 months ago
src =core.ffms2.Source(r'bl.hevc',)

el = core.ffms2.Source(r'el.hevc',)

src=awf.MapDolbyVision(src,el,rpu='RPU.bin')

clip=Depth(src,10)

clip.set_output(0)

Command line as follows:

cmd = r'vspipe "00000.vpy" -c y4m - | x265 --y4m --preset 7 --no-open-gop -D 10 -i 1 -I 240 -b 8 --rc-lookahead 72 --ctu 64 --ref 3 --limit-refs 1 --rskip 0 --deblock -1:-1 --me 3 --merange 36 --subme 5 --level-idc 5.1 --max-merge 5 --no-rect --no-amp --no-sao --no-weightb --no-strong-intra-smoothing --vbv-maxrate 64000 --vbv-bufsize 72000 --vbv-init 0.9 --crf-max 0.0 --crf-min 0.0 --ipratio 1.40 --pbratio 1.30 --psy-rd 2 --psy-rdoq 0 --rdoq-level 1 --ipratio 1.3 --pbratio 1.2 --cbqpoffs -2 --crqpoffs -2 --range full --colorprim bt2020 --min-luma 0 --max-luma 4095 --transfer smpte2084 --colormatrix bt2020nc --chromaloc 2 --crf 18 --aq-mode 3 --aq-strength 1.0 --qcomp 0.6 --no-hdr10  --dolby-vision-profile 5.0 --dolby-vision-rpu RPU.bin --qpfile "00000.qpfile" --output "00000.hevc" -'

F6 check script is normal, but F5 preview will report an error Core freed but 25153536 bytes still allocated in framebuffers, and also Error on frame 0 request: placebo.Tonemap: Clip is missing DolbyVisionRPU prop for Dolby Vision mapping!

After clicking start encoding, the following errors will occur: Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors. Error: Failed to retrieve frame 0 with error: placebo.Tonemap: Clip is missing DolbyVisionRPU prop for Dolby Vision mapping! Output 32 frames in 4.89 seconds (6.55 fps)

I have updated awsmfunc and installed 96GB of memory, but the problem still persists.

quietvoid commented 8 months ago

Sounds like the leak is in vs-placebo when there's an error. Your BL clip is required to contain the Dolby Vision RPU metadata, which it seems to be missing. It's mentioned in the doc comments for MapDolbyVision.

The error is quite clear.

placebo.Tonemap: Clip is missing DolbyVisionRPU prop for Dolby Vision mapping!

quietvoid commented 8 months ago

Anyways this isn't a awsmfunc issue.

sayou112 commented 8 months ago

无论如何,这不是问题。awsmfunc https://github.com/quietvoid/vs-nlq I have confirmed that it can't be previewed directly, but F6 is successful. I directly used someone else's compiled .dll file and placed it in the \vapoursynth64\plugins folder. May I know what is missing from my path?

sayou112 commented 8 months ago

无论如何,这不是问题。awsmfunc I see poly_mmr = core.placebo.Tonemap( base_16, src_csp=3, dst_csp=1, ) Tonemap need bl and rpu https://github.com/quietvoid/dovi_tool I demuxed only bl.hevc the other question is ` poly_mmr = core.resize.Spline36(poly_mmr, format=vs.YUV420P16, chromaloc_in_s="top_left", chromaloc_s="top_left")

` After Tonemap,poly_mmr will changed YUV444P16,Is it need " chromaloc_in_s="top_left""?