AkarinVS / L-SMASH-Works

Works based on L-SMASH project; This repo focuses on the common portion and the VapourSynth plugin. AviSynth users please use https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works. ffmpeg 5.0+ please use ffmpeg-4.5 branch.
47 stars 11 forks source link

Dolby Vision P5: Clip is missing `DolbyVisionRPU` prop for Dolby Vision mapping! #32

Closed Ravencentric closed 12 months ago

Ravencentric commented 1 year ago

Running this:

import vapoursynth as vs
from vapoursynth import core
from awsmfunc import FrameInfo
from vspreview import set_output

##Hold shift and right click your file, select copy as path and paste it here
clip1 = core.lsmas.LWLibavSource(r"Invasion.2021.S02E01.Somethings.Changed.2160p.ATVP.WEB-DL.DDP5.1.Atmos.DV.H.265-FLUX.mkv")
clip2 = core.resize.Bicubic(clip1, format=vs.YUV444P16)
clip2 = core.placebo.Tonemap(clip2, dynamic_peak_detection=1, tone_mapping_function=2, tone_mapping_mode=1, src_csp=3, dst_csp=0, gamut_mode=0, use_dovi=1)
grp1 = "ATVP DV P5"
grp2 = "ATVP DV P5 (Tonecope)"

##Uncomment as needed if you need to trim your clips
clip1 = clip1[0:]
clip2 = clip2[0:]

##Displays the frame number, type and group name
clip1= FrameInfo(clip1, grp1)
clip2= FrameInfo(clip2, grp2)

##Slow.pics labelling
clip1 = clip1.std.SetFrameProp('Name', data = grp1)
clip2 = clip2.std.SetFrameProp('Name', data = grp2)

set_output(clip1, name=grp1)
set_output(clip2, name=grp2)

Results in:

Traceback (most recent call last):
  File "C:\Users\raven\Videos\comp\.venv\Lib\site-packages\vspreview\main\window.py", line 716, in switch_output
    self.switch_frame(self.current_output.last_showed_frame)
  File "C:\Users\raven\Videos\comp\.venv\Lib\site-packages\vspreview\main\window.py", line 676, in switch_frame
    self.current_output.render_frame(frame, output_colorspace=self.display_profile)
  File "C:\Users\raven\Videos\comp\.venv\Lib\site-packages\vspreview\core\types\video.py", line 444, in render_frame
    vs_frame = vs_frame or self.prepared.clip.get_frame(frame.value)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "src\cython\vapoursynth.pyx", line 2025, in vapoursynth.VideoNode.get_frame
vapoursynth.Error: placebo.Tonemap: Clip is missing `DolbyVisionRPU` prop for Dolby Vision mapping!

This is not the case with https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/releases/tag/1129.0.1.0, which works without error: python_0e8AG7IEpW

AkarinVS commented 12 months ago

are you using the ffmpeg 5 build? (vA.5 series?) DV is only supported ffmpeg 5+.

Ravencentric commented 12 months ago

I installed lsmas with vsrepo which gave me https://github.com/AkarinVS/L-SMASH-Works/releases/download/vA.3j/release-i686-cachedir-cwd.zip

I just tested with https://github.com/AkarinVS/L-SMASH-Works/releases/tag/vA.5b and the issue was solved. Thank you.