Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 6th February 2020, 00:27   #1  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,377
Convert To YUVA420P8 ?

From a RGBA source, what is the proper way to convert to YV12 with alpha (YUVA420P8)

YUVA420P8 is listed as supported , but how to convert to it ?

http://avisynth.nl/index.php/Convert
http://avisynth.nl/index.php/Avisynthplus_color_formats

I tried ConvertToYUVA420P8 , ConvertToYUVA, ConvertToYUVA420, and other combinations, but not working



Thanks
poisondeathray is offline   Reply With Quote
Old 6th February 2020, 01:06   #2  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,420
It seems someone was a little overzealous adding that to the wiki. There are no ConvertToYUVA functions.

The way to do it from RGBA/RGB32 is:
Code:
Version()
ConvertToPlanarRGBA()
ConvertToYUV420()
Running ConvertToYUV420() on RGB32 drops the alpha channel. Granted, I don't know if this PlanarRGBA passthrough trick retains it either, but FFmpeg is reporting that the pix_fmt it receives from AviSynth+ in that case is yuva420p.
qyot27 is offline   Reply With Quote
Old 6th February 2020, 01:17   #3  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,377
Thanks qyot27 ; it works .

Info() looks correct as well for yuva420p

And ShowAlpha() shows the alpha is retained and valid too

And ffmpeg encoding that script to a yuva420p format (eg. webp) works too (valid alpha)



What are the pros/cons to having some of those steps rolled into some internal function ? Maybe it's not worth it , it's not going to be used that often.
But maybe the docs should be clarified a bit

Last edited by poisondeathray; 6th February 2020 at 01:23.
poisondeathray is offline   Reply With Quote
Old 6th February 2020, 10:56   #4  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,314
Quote:
Originally Posted by poisondeathray View Post
What are the pros/cons to having some of those steps rolled into some internal function ? Maybe it's not worth it , it's not going to be used that often.
But maybe the docs should be clarified a bit
Or you can use AddAlphaPlane
http://avisynth.nl/index.php/Combine...#AddAlphaPlane
pinterf is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:48.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.