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 20th September 2020, 23:15   #1  |  Link
anton_foy
Registered User
 
Join Date: Dec 2005
Location: Sweden
Posts: 165
Encode UHD prores 444(4)

Hi, I am trying to encode a UHD (3840x2160) video filtered with Avisynth+ and encode prores444 (or 4444) but the only thing I can get is the Prores as "YUV 8-bit 4:2:0" to work and the needed info gets lost.

This is how it looks in "External encoder";
-> "Edit external encoder profile", Command Arguments: -f rawvideo -s %(width)x%(height) -r %(fpsnum)/%(fpsden) -i - -c:v prores_ks -profile:v 4 -pix_fmt yuv444p10 "%(tempvideofile)"
Under the "video"-tab I want to use "yuv444p16le - 16-bit YUV 4:4:4" but this just makes VDUB2 crash instantly when trying to encode.
Error: Oops -- VirtualDub has crashed... Or out of memory error.

Just for test I have tried "yuv444p - 8-bit YUV 4:4:4", this gives me a green-blueish tinted image and "yuv422p - 8-bit YUV 4:2:2"
gives me a green-tinted image.

Is it even possible to encode in higher than 8-bit and 4:4:4 prores (or DNXHR) in VirtualDub2 (Build 44282)?

Thanks
anton_foy is offline   Reply With Quote
Old Yesterday, 02:43   #2  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,324
Don't use the external encoder.

Use the vdub2 FFMpeg / Apple ProRes option under video=>compression
poisondeathray is offline   Reply With Quote
Old Yesterday, 09:49   #3  |  Link
shekh
Registered User
 
Join Date: Mar 2015
Posts: 754
This should work, no idea the for the reason of crash. Do you run x64 version? Otherwise low memory could be the issue.

For the command line you have to also put pix_fmt of the rawvideo:

example ffv1
Code:
-f rawvideo -pix_fmt %(pix_fmt) -s %(width)x%(height) -r %(fpsnum)/%(fpsden) -i - -c:v ffv1 %(tempvideofile)
prores
Code:
-f rawvideo -pix_fmt %(pix_fmt) -s %(width)x%(height) -r %(fpsnum)/%(fpsden) -i - -c:v prores_ks -profile:v 4 -pix_fmt yuv444p10 "%(tempvideofile)"
__________________
VirtualDub2
shekh is offline   Reply With Quote
Old Yesterday, 16:19   #4  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,324
Or why not use ffmpeg directly with avs input ? What is the reason for the intermediate vdub2 step ?
poisondeathray is offline   Reply With Quote
Old Yesterday, 18:46   #5  |  Link
anton_foy
Registered User
 
Join Date: Dec 2005
Location: Sweden
Posts: 165
Thank you both.

@poisondeathray
When I use the vdub2 FFMpeg / Apple ProRes option under video=>compression and "save video" as video.mov I get memory error "Out of memory (unable to allocate 66359312 bytes)". Too old computer?

I would love to use ffmpeg directly with avs input but all I get is error when I try it: "ffmpeg outputfile #0 does not contain any stream" and it doesn't write any frames.
Code:
ffmpeg prorestest.avs prores_ks -c:v -profile:v 4 -pix_fmt yuv444p10 test.mov
@shekh
I used your line
Code:
-f rawvideo -pix_fmt %(pix_fmt) -s %(width)x%(height) -r %(fpsnum)/%(fpsden) -i - -c:v prores_ks -profile:v 4 -pix_fmt yuv444p10 "%(tempvideofile)"
But I get "Out of memory (unable to allocate 49766415 bytes)".

Last edited by anton_foy; Yesterday at 18:49.
anton_foy is offline   Reply With Quote
Old Yesterday, 18:53   #6  |  Link
shekh
Registered User
 
Join Date: Mar 2015
Posts: 754
If you have to run 32-bit, maybe look at Option->Performance->Video buffering (change to minimum 4)
Not sure what else could help to save memory.
__________________
VirtualDub2
shekh is offline   Reply With Quote
Old Yesterday, 19:04   #7  |  Link
anton_foy
Registered User
 
Join Date: Dec 2005
Location: Sweden
Posts: 165
Quote:
Originally Posted by shekh View Post
If you have to run 32-bit, maybe look at Option->Performance->Video buffering (change to minimum 4)
Not sure what else could help to save memory.
Thanks but I get the same memory error. It does not even letting me export as png-sequence...
If I edit my avs-file to 8-bit I have no problem but as soon as I change it to deep color it refuses.
anton_foy is offline   Reply With Quote
Old Yesterday, 21:00   #8  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,324
Quote:
Originally Posted by anton_foy View Post

I would love to use ffmpeg directly with avs input but all I get is error when I try it: "ffmpeg outputfile #0 does not contain any stream" and it doesn't write any frames.
Code:
ffmpeg prorestest.avs prores_ks -c:v -profile:v 4 -pix_fmt yuv444p10 test.mov

Typos ?

It should be like this
Code:
Code:
ffmpeg -i prorestest.avs -c:v prores_ks  -profile:v 4 -pix_fmt yuv444p10 test.mov
poisondeathray is offline   Reply With Quote
Old Yesterday, 21:17   #9  |  Link
anton_foy
Registered User
 
Join Date: Dec 2005
Location: Sweden
Posts: 165
@poisondeathray
Thanks, I probably do it wrong somehow but I have the avs-script in the same folder as ffmpeg.exe and in the Command Prompt I pasted your line but I now get error:
prorestest.avs: unknown error occured I found another person here in the forums getting this and he renamed ffmpeg.exe to ffmpeg32.exe to make it work but it does not work for me.
anton_foy is offline   Reply With Quote
Old Yesterday, 21:37   #10  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,324
Your avisynth build has to match the ffmpeg binary in terms of x86 vs. x64 . eg. If you had avisynth x86 installed, you'd need a ffmpeg x86 binary
poisondeathray is offline   Reply With Quote
Old Yesterday, 22:08   #11  |  Link
anton_foy
Registered User
 
Join Date: Dec 2005
Location: Sweden
Posts: 165
@poisondeathray
Thank you now it works !!! I had dragged and dropped the exe-file in the wrong place, the old x64 was still there and I mixed them up.
But should it say below input: Stream #0:0 Video: rawvideo (Y3[11][16] / 0x100B3359), yuv420p16le...?
The encoding section shows yuv444p10le which is fine I guess ( because FFMPEG cannot encode prores 4444 in higher than 10 bit?)

Last edited by anton_foy; Yesterday at 22:24.
anton_foy is offline   Reply With Quote
Old Yesterday, 22:57   #12  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,324
all ffmpeg prores encoders currently only support 10bit (prores 4444 and 4444xq are supposed to be 12bit) ; this is well documented and requests have been made to extend proper 12bit support
poisondeathray is offline   Reply With Quote
Old Yesterday, 23:02   #13  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,324
Quote:
Originally Posted by anton_foy View Post
But should it say below input: Stream #0:0 Video: rawvideo (Y3[11][16] / 0x100B3359), yuv420p16le...?
The encoding section shows yuv444p10le which is fine I guess ( because FFMPEG cannot encode prores 4444 in higher than 10 bit?)
What are you sending in the avs script ? what does info() say ?

It should be yuv444p10le, not yuv420p16le . Otherwise you are letting ffmpeg downconvert the bit depth and upsample the chroma, instead of specifying how you want it to be done. e.g. what algorithm are you using to upscale ? Did you want to dither down ? What algorithm to dither (or not)

Code:
    Stream #0:0: Video: rawvideo (Y3[0][10] / 0xA003359), yuv444p10le, 3840x2160
, 24 fps, 24 tbr, 24 tbn, 24 tbc

Last edited by poisondeathray; Yesterday at 23:05.
poisondeathray is offline   Reply With Quote
Old Yesterday, 23:23   #14  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,731
10 bit is perfectly valid for 4444 and 4444 XQ, they both just happen to support 10 and 12 bit encoding
Blue_MiSfit is offline   Reply With Quote
Old Today, 07:32   #15  |  Link
anton_foy
Registered User
 
Join Date: Dec 2005
Location: Sweden
Posts: 165
Quote:
Originally Posted by poisondeathray View Post
What are you sending in the avs script ? what does info() say ?

It should be yuv444p10le, not yuv420p16le . Otherwise you are letting ffmpeg downconvert the bit depth and upsample the chroma, instead of specifying how you want it to be done. e.g. what algorithm are you using to upscale ? Did you want to dither down ? What algorithm to dither (or not)

Code:
    Stream #0:0: Video: rawvideo (Y3[0][10] / 0xA003359), yuv444p10le, 3840x2160
, 24 fps, 24 tbr, 24 tbn, 24 tbc
My avs-script ends with:

Code:
ConverttoYUV444()
Convertbits(10, dither=1)
I can post the full script when I come home from work.
anton_foy 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 18:28.


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