HomeOfAviSynthPlusEvolution / L-SMASH-Works

Forked from VFR-maniac/L-SMASH-Works; hydra3333/L-SMASH-Works; l33tmeatwad/L-SMASH-Works; HolyWu/L-SMASH-Works; AkarinVS/L-SMASH-Works.
89 stars 15 forks source link

lsmas: pal8 is not supported #52

Closed Selur closed 11 months ago

Selur commented 11 months ago
# Imports
import vapoursynth as vs
# getting Vapoursynth core
core = vs.core
# Loading Plugins
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
# source: 'C:\Users\Selur\Desktop\clip.avi'
# current color space: YUV420P8, bit depth: 8, resolution: 160x120, fps: 12, color matrix: 470bg, yuv luminance scale: limited, scanorder: progressive
# Loading C:\Users\Selur\Desktop\clip.avi using LWLibavSource
clip = core.lsmas.LWLibavSource(source="C:/Users/Selur/Desktop/clip.avi", format="YUV420P8", stream_index=0, cache=0, threads=1, prefer_hw=0)
# Setting detected color matrix (470bg).
clip = core.std.SetFrameProps(clip, _Matrix=5)
# Setting color transfer info (470bg), when it is not set
clip = clip if not core.text.FrameProps(clip,'_Transfer') else core.std.SetFrameProps(clip, _Transfer=5)
# Setting color primaries info (), when it is not set
clip = clip if not core.text.FrameProps(clip,'_Primaries') else core.std.SetFrameProps(clip, _Primaries=5)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# making sure frame rate is set to 12
clip = core.std.AssumeFPS(clip=clip, fpsnum=12, fpsden=1)
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=0) # progressive
# adjusting output color from: YUV420P8 to YUV420P10 for x265Model
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, range_s="limited")
# set output frame rate to 12fps (progressive)
clip = core.std.AssumeFPS(clip=clip, fpsnum=12, fpsden=1)
[clip.zip](https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/files/13587662/clip.zip)

# Output
clip.set_output()

calling:vspipe "c:\Users\Selur\Desktop\Testing.vpy" -c y4m --progress test I get:

Warning: setVideoInfo: Video filter LWLibavSource has more than one output node but only the first one will be returned
Script evaluation done in 0.01 seconds

and a zero byte file is created. Opening the script in vsviewer crashes the viewer. Without format="YUV420P8"I get: Python exception: lsmas: pal8 is not supported using "ffms2.Source" the source is decoded fine. Here's the source file: clip.zip


I'm using https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/releases/tag/1156.0.0.0 on Windows 11

Asd-g commented 11 months ago

With format="YUV420P8" the error disappears but the output is wrong. The palettized formats (like PAL8) needs palette data and this is discarded when format=xxx is used. It needs quite L-SMASH-Works design rework to add support for such formats and I wouldn't do this.

kedaitinh12 commented 11 months ago

You can ask AkarinVS https://github.com/AkarinVS/L-SMASH-Works/issues