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 > General > Newbies
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 12th December 2020, 21:48   #1  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,377
How to pipe a YUVA format ?

How to pipe a YUVA format ? (with alpha channel) Such as yuva444p or yuva420p ? or ayuv etc...

ffmpeg's yuv4mpegpipe does not support alpha

vspipe does not support alpha with --y4m headers


rawvideo pipes can work, but without headers, so this means the other application requires raw input support

Background: I'm trying to get a YUVA pipe (from avisynth or vapoursynth) into libavif (avifenc.exe) . Supposedly it " can already encode and decode all AOM supported YUV formats and bit depths (with alpha)."; and it supports stdin, but I can't get pipes in with alpha . It can read a RGBA png sequence and work from that (but then you have less control over how the RGB=> YUV conversion is performed)
poisondeathray is offline   Reply With Quote
Old 12th December 2020, 21:54   #2  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,420
The only other real alternative to yuv4mpegpipe is NUT (which is actually superior to y4m on several fronts*), but good luck finding something other than libavformat-based stuff that accepts it.

*NUT can do (Planar) RGB and audio. Seems to work with alpha formats too.
qyot27 is offline   Reply With Quote
Old 12th December 2020, 21:56   #3  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,377
Quote:
Originally Posted by qyot27 View Post
The only other real alternative to yuv4mpegpipe is NUT (which is actually superior to y4m on several fronts*), but good luck finding something other than libavformat-based stuff that accepts it.

*NUT can do (Planar) RGB and audio. Seems to work with alpha formats too.
Sorry, I forgot to mention already tried NUT too; it didn't work with avifenc
poisondeathray is offline   Reply With Quote
Old 12th December 2020, 22:37   #4  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
I can't believe it, poisondeathray and qyot27 posting in the Newbies subforum...

Two of THE EXPERTS in the Newbies forum???

Please have this moved to a more suitable subforum...
manolito is offline   Reply With Quote
Old 12th December 2020, 22:41   #5  |  Link
richardpl
Registered User
 
Join Date: Jan 2012
Posts: 271
y4m supports yuv444alpha, but not many implement this.
richardpl is offline   Reply With Quote
Old 13th December 2020, 01:26   #6  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,377
Quote:
Originally Posted by richardpl View Post
y4m supports yuv444alpha, but not many implement this.
Do you know of any y4m tools supporting read/write alpha that I can experiment with ? Google is not finding any

Can you please add it to ffmpeg when you have time ?
poisondeathray is offline   Reply With Quote
Old 13th December 2020, 09:44   #7  |  Link
richardpl
Registered User
 
Join Date: Jan 2012
Posts: 271
Code:
444alpha support in y4m layer (avifenc, avifdec)
As you can see, avif supports it already, I added demux support for yuva444 in y4m couple months ago. The only missing part is adding also muxing support.
richardpl is offline   Reply With Quote
Old 13th December 2020, 17:25   #8  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,377
Thanks, I'll keep an eye out for it when you add it

But how are the avif dev's testing this if the muxing support is not added ? What tools are they using ?
poisondeathray is offline   Reply With Quote
Old 13th December 2020, 21:56   #9  |  Link
richardpl
Registered User
 
Join Date: Jan 2012
Posts: 271
They use own implementation of y4m, not libavformat.
richardpl is offline   Reply With Quote
Old 13th December 2020, 23:01   #10  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,377
avs2pipemod-1.1.1 seems like it's close to working, the y4mp format is detected correctly YUV444 with alpha by avifenc, but avifenc says "Y4M frame header too large: (stdin)"

Code:
"avs2pipemod64" -y4mp  "YUVA444P.avs" | "avifenc" --speed 8 --stdin "out_speed8_avs2pipemod.avif"
Code:
avs2pipemod[info]: writing 30 frames of 10/1 fps, 256x256,
                   sar 0:0, YUVA-444-planar-8bit progressive video.
Successfully loaded: (stdin)
AVIF to be written: (Lossy)
 * Resolution     : 256x256
 * Bit Depth      : 8
 * Format         : YUV444
 * Alpha          : Present
 * Range          : Limited
 * Color Primaries: 1
 * Transfer Char. : 13
 * Matrix Coeffs. : 6
 * ICC Profile    : Absent (0 bytes)
 * XMP Metadata   : Absent (0 bytes)
 * EXIF Metadata  : Absent (0 bytes)
 * Transformations: None
Encoding with AV1 codec 'aom' speed [8], color QP [0 (Lossless) <-> 10 (High)],
alpha QP [0 (Lossless) <-> 0 (Lossless)], tileRowsLog2 [0], tileColsLog2 [0], 1
worker thread(s), please wait...
 * Encoding frame 1 [1/1 ts]: (stdin)
 * Encoding frame 1 [1/1 ts]: (stdin)
Y4M frame header too large: (stdin)
avs2pipemod[info]: finished, wrote 0 frames [0%].
avs2pipemod[info]: total elapsed time is 0.234 sec.
avs2pipemod[error]: only wrote 0 of 30 frames.
Any help debugging this or magic switches for avs2pipemod? qyot27 ? I tried the default video setting instead of y4mp in avs2pipemod64, same error

Last edited by poisondeathray; 13th December 2020 at 23:17.
poisondeathray is offline   Reply With Quote
Reply


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 01:12.


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