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 > VirtualDub, VDubMod & AviDemux

Reply
 
Thread Tools Search this Thread Display Modes
Old 6th April 2021, 07:10   #1  |  Link
Hotte
Registered User
 
Join Date: Oct 2014
Posts: 209
VDub2 Canopus HQX 16-bit negotiation issue

Hi,
I've recently started to pass HBD-Footage (i.e. 10 bit) through AVS+ with VDub2 de- and recompressing with the Canopus HQX codec. Everything worked fine with 8-bit. The clip is export from Edius-X NLE using the Canopus (Grassvalley) HQX Codec which is capable of up to 8K, 10bit, 4:2:2 all-intra in AVI-Containers.

They arrive as YUV422P16 in AVS+ (due to info() and ffmpeg -i) loaded with FFmpegSource2(FILNAM, atrack=-1), further processing works fine. Results appear correctly in VDub2. The trouble starts with "Save as AVI" with constant "Video format negoation error". Output codec again is HQX, mode ist Fast Recompress.

Menu > Video > Decode Format... shows P216 as current format. Whatever I select as at least 10bit-output format: Error persists. Compression menu shows: "Valid pixel formats RGB RGBA YUY2" although the codec is listed under "Similar to Source: P216".

Any ideas ?

Last edited by Hotte; 7th April 2021 at 02:43.
Hotte is offline   Reply With Quote
Old 6th April 2021, 16:50   #2  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
You might want to say which version VD2 you got.
[Latest is build 44282, 19 Mar 2020:- https://sourceforge.net/projects/vdf.../version%2020/ ]
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 6th April 2021, 18:06   #3  |  Link
Hotte
Registered User
 
Join Date: Oct 2014
Posts: 209
Hi StainlessS,
installed latest build 44282, no improvements
Hotte is offline   Reply With Quote
Old 6th April 2021, 18:11   #4  |  Link
Richard1485
Guest
 
Posts: n/a
Quote:
Originally Posted by Hotte View Post
They arrive as YUV422P16 in AVS+ (due to info() and ffmpeg -i) loaded with FFmpegSource2(FILNAM, atrack=-1), further processing works fine. Results appear correctly in VDub2. The trouble starts with "Save as AVI" with constant "Video format negoation error". Output codec again is HQX, mode ist Fast Recompress.
Are you doing this further processing in VirtualDub2? Depending on the filter, you might not be able to use "fast recompress". Try another mode.
  Reply With Quote
Old 6th April 2021, 18:38   #5  |  Link
Hotte
Registered User
 
Join Date: Oct 2014
Posts: 209
@Richard
all processing / Filtering is done in the avs file, I only use VDub2 as AVS+ host.

Even the following avs:
Code:
FFmpegSource2("F:\myhqx.avi", atrack=-1)
Return info(last)
Will not be saved with fast recompress due to the negotiation error - although info() shows that YUV422P16 is being returned.

I`d be happy to change the mode to "Normal recompress" and adjust "Video > Decode format...", but I cannot find a 10-16bit mode that does not return "Unable to initialize video compression. Check that the video codec is compatible with the video frame size and that the settings are correct.."

This message seems inappropriate.

EDIT:
I was retrying to load the hqx-Exportfile directly (without avs+) into VDub2 to do a Fast Recompress with the same codec, no filters. This time HQX it is NOT in the P216 list.
But I am pretty sure the codec must be able to handle this as it produces YUV422P16 itselves. Maybe the handshake information is false or misinterpreted ?

Last edited by Hotte; 6th April 2021 at 19:04.
Hotte is offline   Reply With Quote
Old 6th April 2021, 20:18   #6  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,843
Quote:
Originally Posted by Hotte View Post
Hi,
I've recently started to pass HBD-Footage (i.e. 10 bit) through AVS+ with VDub2 de- and recompressing with the Canopus HQX codec. Everything worked fine with 8-bit. The clip is export from Edius-X NLE using the Canopus (Grassvalley) HQX Codec which is capable of up to 8K, 10bit, 4:2:2 all-intra in AVI-Containers.

They arrive as YUV422P16 in AVS+ (due to info() and ffmpeg -i) loaded with FFmpegSource2(FILNAM, atrack=-1), further processing works fine. Results appear correctly in VDub2. The trouble starts with "Save as AVI" with constant "Video format negoation error". Output codec again is HQX, mode ist Fast Recompress.

Menu > Video > Decode Format... shows P216 as current format. Whatever I select as at least 10bit-output format: Error persists. Compression menu shows: "Valid pixel formats RGB RGBA YUY2" although the codec is listed under "Similar to Source: P216".

Strange enough: VDub2 has absolutely no problem to take any 10/16bit "hqxin.avi" and save it as "hqxout.avi" without AVS+ as Fast recompress with the same codec.

Any ideas ?
There must be some false detection/reporting.
VFW/DirectShow etc. version of Canopus HQX doesn't support anything above 8bit. It never did. Only Edius and Resolve can export/read 8bit+ data for HQX.
kolak is offline   Reply With Quote
Old 6th April 2021, 20:32   #7  |  Link
Hotte
Registered User
 
Join Date: Oct 2014
Posts: 209
Kolak, meanwhile I have the same impression: In vfw the HQX-codec is somehow false-detected:

VDub2 reports the codec with: Valid pixel formats: rgb rgba yuy2. This was true for its predecessors (Canopus-HQ/HQ lossless) but not for HQX.

Of course the producer is asked but they won´t probably give a damn about vfw and VDub...

So is there a way to override the check in VDub2 and just let compression go ?

Last edited by Hotte; 6th April 2021 at 20:36.
Hotte is offline   Reply With Quote
Old 6th April 2021, 22:51   #8  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,843
Force YUY2 as pixel format. This will work.
There is no way to do any 8bit+ pixel formats with HQX- nothing you can do about it. It's the way how VFW/directshow codec is written.
Resolve uses native support over low level integration- it doesn't touch VFW/directshow.

rgb rgba yuy2 are still only valid pixels formats for HQX. Well- last time I touched it was was years ago, but I doubt anything changed. VFW/directshow are not very good technologies and pro companies don't touch them anymore.
As I said- HQX outside Edius (Resolve) is 8bit only.

Last edited by kolak; 6th April 2021 at 22:55.
kolak is offline   Reply With Quote
Old 7th April 2021, 00:03   #9  |  Link
Hotte
Registered User
 
Join Date: Oct 2014
Posts: 209
Thanks kolak.

I have had a look at other high-quality 10-bit all-intra codecs and there we have:

huffyuv, FV1
not compatible with Edius

cineform
compatible but very bad timeline performance

ProRes
compatible, relatively good timeline performance, very fast encoding, 422HQ has IQ pretty close to HQX at highest quality setting (to split hair: HQX superfine has a close to invisible advantage in preserving detail)

DNxHD
compatible but not available

Any other suggestions ?
HEVC / H.264 are not all intra so probably not the best intermediate choice...

My questions:
ProRes could be an candidate. I wonder why this proprietary codec is available in vfw from a technical pov (I thought vfw could not manage >8 bit ?) and from a license pov ? I mean 422HQ is pretty good and XQ freely available - how come ?
Are there any other hq-codecs available and installable - how does that work ?

Thanks for some elucidation
Hotte is offline   Reply With Quote
Old 7th April 2021, 00:25   #10  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,345
Quote:
Originally Posted by Hotte View Post
cineform
compatible but very bad timeline performance
Interesting, it's faster in other programs than HQX. Probably the fastest CPU based high quality intermediate . (There are faster GPU ones, like Daniel2, NotchLC)

Quote:

DNxHD
compatible but not available
You can use ffmpeg as alternative (unless you require something specific in vdub2 ?)

Quote:
Any other suggestions ?
HEVC / H.264 are not all intra so probably not the best intermediate choice...
HEVC will be too slow to decode.

h264 can be set intra, but even with the fastest decode settings (tune fastdecode, intra) , is typically more sluggish on the timeline (high latency) compared to prores, cineform. (However, some editors can use GPU accelerated decoding of h264, but usually not 10bit422, only the 8bit variants)

But x264 can be significantly higher quality at qp 1 than prores xq4444 or HQX - PSNR is typically ~8-15 db higher)

Quote:
My questions:
ProRes could be an candidate. I wonder why this proprietary codec is available in vfw from a technical pov (I thought vfw could not manage >8 bit ?) and from a license pov ? I mean 422HQ is pretty good and XQ freely available - how come ?
Are there any other hq-codecs available and installable - how does that work ?
The prores version in vdub2 is the libavcodec/ffmpeg version . It's not VFW.
poisondeathray is offline   Reply With Quote
Old 7th April 2021, 02:01   #11  |  Link
Richard1485
Guest
 
Posts: n/a
I'd go with ProRes over DNxHD, which can cause problems with levels/gamma. It's a shame that Cineform gives you slow performance with Edius. Normally, I'd have picked that.
  Reply With Quote
Old 7th April 2021, 02:25   #12  |  Link
shekh
Registered User
 
Join Date: Mar 2015
Posts: 775
Hi,
maybe the issue with "Similar to Source: P216" was because the codec was selected before choosing "Similar to source"? This filtering of codecs does not remove the selected one even if it appears inappropriate.
__________________
VirtualDub2
shekh is offline   Reply With Quote
Old 7th April 2021, 02:32   #13  |  Link
Hotte
Registered User
 
Join Date: Oct 2014
Posts: 209
Thanks posiondeathray and Richard.

Tried cineform again with other settings - doesn`t help: Too bad: Horribly slow on the timeline. Btw. Cineform is either interleaved YUV oder RGB - right ?

X264 wouldn't play at all if settings are very HQ / all-Intra but that might need more testing in detail.

DNxHD (generated with ffmpeg) is by far the fastest on the timeline - of course, it is the native codec of Grassvalley. Cannot see levels / gamma issues at first sight, but I will watch out for that, also I will be doing more detail comparison with ProRes - thanks Richard.

My question to @poisondeathray: With ffmpeg you mean I should call ffmpeg from outside taking the avs-script as input and output to DNxHD - right ?
For some setup reason I`d prefer to continue using VDub2 as host. So the question is if there is a way to integrate ffmpeg-DNxHD into the compression list of VDub2 ?
Hotte is offline   Reply With Quote
Old 7th April 2021, 02:36   #14  |  Link
Hotte
Registered User
 
Join Date: Oct 2014
Posts: 209
Quote:
Originally Posted by shekh View Post
Hi,
maybe the issue with "Similar to Source: P216" was because the codec was selected before choosing "Similar to source"? This filtering of codecs does not remove the selected one even if it appears inappropriate.
Yes that could pretty much have been the case. It does not appear anymore if I do things right.
Hotte is offline   Reply With Quote
Old 7th April 2021, 02:49   #15  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,345
Quote:
Originally Posted by Hotte View Post
My question to @poisondeathray: With ffmpeg you mean I should call ffmpeg from outside taking the avs-script as input and output to DNxHD - right ?
For some setup reason I`d prefer to continue using VDub2 as host. So the question is if there is a way to integrate ffmpeg-DNxHD into the compression list of VDub2 ?
Yes, ffmpeg directly, with avs input

It should be possible to implement DNxHD in avlib-1.vdplugin (I don't know how to write vdub plugin - it would have to be shekh or someone else)
poisondeathray is offline   Reply With Quote
Old 7th April 2021, 07:54   #16  |  Link
Hotte
Registered User
 
Join Date: Oct 2014
Posts: 209
Yeah! ***** The DNxHD would be a great addition to the compression menu as it seems to play some not unimportant role in professional video exchange and looks like being an excellent codec, also encoding is fully supported by ffmpeg.

I'd be ready to support that in any way that makes sense. I`d be happy to hear Shekh`s evaluation of the matter. I have no idea if that is a lot of work to do.


What I haven't quite understood is how you guys work with lossless codecs that are not supported by our NLEs ? I mean its nice to have encoders like huffyuv, FV1,Daniel2(?), NotchLC(?)... But how do you use these ? VDub2 is a great host but a very basic editor - isn`t it ?

Could somebody try to explain that to me?
Hotte is offline   Reply With Quote
Old 7th April 2021, 16:45   #17  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,345
Quote:
Originally Posted by Hotte View Post
What I haven't quite understood is how you guys work with lossless codecs that are not supported by our NLEs ? I mean its nice to have encoders like huffyuv, FV1,Daniel2(?), NotchLC(?)... But how do you use these ? VDub2 is a great host but a very basic editor - isn`t it ?

Could somebody try to explain that to me?
(Daniel2 and NotchLC are not "lossless")

It depends on which ones - what codec, what NLE host, and what versions of the NLE host. Each editor has little quirks, and sometimes certain point releases of each editor might change behaviour

Many "lossless" codecs, especially "YUV" lossless, are not lossless in some NLE's. Many get converted to RGB for example - Huffyuv is a prime example. I don't know of any professional NLE that treats huffyuv as lossless (some ffmpeg based ones do, such as shotcut)

eg. Edius has a YUV capable timeline (some editors do not, such as resolve, vegas) , but some formats are converted to RGB in Edius.

e.g Premiere has a YUV capable timeline too, but all "lossless YUV" codecs do not work as lossless - they get converted to RGB. The exception is x264 lossless in certain point releases
for certain pixel formats

Float RGB can technically be lossless for anything (including conversion to/from YUV), but only if the program handles it correctly everywhere. For example, Resolve uses float RGB internally, but it does not do the timeline RGB to YUV conversion correctly, so exported YUV assets lose precision. You have to use full float formats, such as EXR image sequences to maintain true lossless in/out

What you should do is perform some tests in the editor that you're using
poisondeathray is offline   Reply With Quote
Old 7th April 2021, 17:57   #18  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
Many "lossless" codecs, especially "YUV" lossless, are not lossless in some NLE's. Many get converted to RGB for example - Huffyuv is a prime example. I don't know of any professional NLE that treats huffyuv as lossless (some ffmpeg based ones do, such as shotcut)
I'm currently not able to use HuffYUV on W7, [tried install but not showing up in VD2/VDMod].
But cant you just select "Fast Recompress" and in HuFFYUV select "Convert To YUV", "Predict Median", [or I think also 2 other modes]
or something like that [for lossless].
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 7th April 2021, 18:24   #19  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,345
Quote:
Originally Posted by StainlessS View Post
I'm currently not able to use HuffYUV on W7, [tried install but not showing up in VD2/VDMod].
Was it for x64 ? There is a procedure to install it, I can't recall the exact steps

I think something like this
https://forum.videohelp.com/threads/...7-%5Bsolved%5D


Quote:
But cant you just select "Fast Recompress" and in HuFFYUV select "Convert To YUV", "Predict Median", [or I think also 2 other modes]
or something like that [for lossless].
The problem is not the codec. It's not just huffyuv, it's all VFW based "lossless" codecs

eg. They work fine in ffmpeg, avisynth , or libavcodec/ffmpeg based programs like shotcut

The problem is how other programs treat UT Video, huffyuv, lagarith, magicyuv, etc... in YUV mode
poisondeathray is offline   Reply With Quote
Old 7th April 2021, 19:37   #20  |  Link
Hotte
Registered User
 
Join Date: Oct 2014
Posts: 209
Thanks for all your contributions.
Just a short Question: DNxHR (which is the successor of DNxHD) is not supported by ffmpeg. If you buy that codec is there a way to use ffmpeg as host with it ?
Hotte 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 10:02.


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