Log in

View Full Version : Why TxPlus plugin cannot join two videos in yuv420, but works with yuv444?


dma_k
24th May 2025, 02:20
Dear all,

When I use Marbles() (http://www.avisynth.nl/users/vcmohan/TxPlus/docs/Marbles.html) plugin in the following script


SetLogParams("avisynth.log", LOG_INFO)

LoadPlugin("C:\Applications\Video\AviSynthPlus\plugins64+\ffms2.dll")
LoadPlugin("C:\Applications\Video\AviSynthPlus\plugins64+\TxPlus.dll")

frameRate=30
targetAudioRate=48000

# originally 1080x1920 29.911fps
file="20250523_200414.mp4"
FFIndex(file)

clip1=AudioDub(FFVideoSource(file), FFAudioSource(file)).TurnRight().ConvertFPS(frameRate)

# originally 4000x3000
img1=ImageSource("20250523_185014.jpg", start=0, end=150, fps=frameRate).LanczosResize(1440, 1080).AddBorders((1920 - 1440) / 2, 0, (1920 - 1440) / 2, 0).TurnRight()
img1=AudioDub(img1, BlankClip(img1, audio_rate=targetAudioRate, channels=2, sample_type="float")).ConvertToYUV420()

Marbles(clip1, img1, 2) # works fine when replaced with clip1+img1


it reports the following problem:


ERROR: Marbles:Clips have differing pixel_types

however the expression

clip1+img1

works just fine.

clip1 from above script has video I420 1080x1920 30fps [V: rawvideo, yuv420p, 1080x1920].

The script that works fine converts the video to yuv444 (rgb32 also works fine):

SetLogParams("avisynth.log", LOG_INFO)

LoadPlugin("C:\Applications\Video\AviSynthPlus\plugins64+\ffms2.dll")
LoadPlugin("C:\Applications\Video\AviSynthPlus\plugins64+\TxPlus.dll")

frameRate=30
targetAudioRate=48000

file="20250523_200414.mp4"
FFIndex(file)

clip1=AudioDub(FFVideoSource(file), FFAudioSource(file)).ConvertToYUV444().TurnRight().ConvertFPS(frameRate)

img1=ImageSource("20250523_185014.jpg", start=0, end=150, fps=frameRate).LanczosResize(1440, 1080).AddBorders((1920 - 1440) / 2, 0, (1920 - 1440) / 2, 0).TurnRight()
img1=AudioDub(img1, BlankClip(img1, audio_rate=targetAudioRate, channels=2, sample_type="float")).ConvertToYUV444()

Marbles(clip1, img1, 2).ConvertToYUV420()


Any ideas how to make it working without intermediate conversion to yuv444?

Thanks in advance!

real.finder
24th May 2025, 03:10
try ask here https://forum.doom9.org/showthread.php?t=174399

anyway maybe it's the yv12 vs i420 again https://forum.doom9.org/showthread.php?p=1938472#post1938472