View Full Version : Sane ProRes 422 to RAW 10-bit YUV?
Daemon404
5th September 2011, 07:17
Okay, so, I have a 10-bit 4:2:2 clip in ProRes format. My goal is to IVTC it without converting to 8-bit at any point.
Currently, I'm simply trying to get raw 10-bit YUV from the ProRes file (v210 is acceptable, and so is p210). Once I get that, I can write my own app and/or plugin to apply IVTC based on e.g. a fieldhints override file, while still working in a 10-bit colorspace.
Keep in mind I do not have a Mac, so I cannot use Final Cut Pro to do this. Adobe After Effects can work in a 32 bpc colorspace internally, and render to v210... however it also only works in RGB internally, so there is an unnecessary conversion to RGB in between. Premier claims to support high bit depth YUV internally, but when I've tried in practice, it always seems to convert to 8-bit internally anyway, even with "Max Dit Depth" enabled. (I confirmed this by comparing histograms).
Then there is QTInput, but that seems to ALWAYS output ProRes as 8-bit YUV, even if I want to just dump the raw YUV by modifying its sources.
My question is... is there any possible way to get ANY form of raw 10-bit YUV out of a ProRes encoded file on Windows? I know it IS possible, using the QuickTime API, but I do not know if anything at all is able to do this without adding any other unnecessary conversions (e.g. to RGB) in between.
I do not have enough knowledge of the QuickTime API to patch QTInput to dump, e.g. v210 from a ProRes input.
Sorry if this is in the wrong forum... the problem is a bit ambiguous.
Help is much appreciated :).
jmac698
5th September 2011, 13:39
That's why I wrote Deepcolor Utilities. Now Sashimi supports it as well, I believe.
http://avisynth.org/mediawiki/High_bit-depth_Support_with_Avisynth
Interesting, I forgot to mention my own script on the wiki...
poisondeathray
5th September 2011, 14:35
That's why I wrote Deepcolor Utilities. Now Sashimi supports it as well, I believe.
http://avisynth.org/mediawiki/High_bit-depth_Support_with_Avisynth
Interesting, I forgot to mention my own script on the wiki...
Can you export 10bit now without truncating? The last time I tested , only import worked - has something changed ?
@Daemon404 - Quicktime Pro on the PC can convert prores422 => v210, keeping 10bit YUV
mp3dom
5th September 2011, 15:42
Is it also actually possible to:
1) Import a v210 (AVI or MOV) as a true 10bit
2) Add additional debanding in 16bit
3) Dither down the 16bit clip to a final 8bit clip?
Daemon404
5th September 2011, 16:16
Can you export 10bit now without truncating? The last time I tested , only import worked - has something changed ?
@Daemon404 - Quicktime Pro on the PC can convert prores422 => v210, keeping 10bit YUV
You cannot import prores422 with deepcolor utils, as far as I can see. Only v210.. and even that gets truncated to 9-bit. In fact, QTInput doesn't even seem capable of returning 10-bit from prores.
Also, Quicktime Pro cannot seem to export v210... easily anyway on PC? I looked and all I could find was "None", which is RGB. v210 isn't even listed as an option. Is it perhaps hidden somewhere?
Edit: In fact, QuickTime on Windows (the player) can't even play v210. (I'm trying to play your ramp clips).
poisondeathray
5th September 2011, 16:30
You cannot import prores422 with deepcolor utils, as far as I can see. Only v210.. and even that gets truncated to 9-bit. In fact, QTInput doesn't even seem capable of returning 10-bit from prores.
That's what I mean . You can open it up, but cannot get 10bit out . As soon as it touches avisynth it's no longer 10-bit
Also, Quicktime Pro cannot seem to export v210... easily anyway on PC? I looked and all I could find was "None", which is RGB. v210 isn't even listed as an option. Is it perhaps hidden somewhere?
You need exteral library e.g. aja codecs, blackmagic codecs, drastic codecs. v210 will show up in export menu of QTPro
Prores is closed proprietary format. The only way to decode it 10bit is through Apple software. But supposedly there is a patch for mplayer / mencoder floating around for Prores support, but I've found nothing as of yet
Edit: In fact, QuickTime on Windows (the player) can't even play v210. (I'm trying to play your ramp clips).
Do you have "Pro" installed and/or one of the v210 codecs listed above?
Daemon404
5th September 2011, 16:34
You need exteral library e.g. aja codecs, blackmagic codecs, drastic codecs. v210 will show up in export menu of QTPro
Where should I go looking for this?
Prores is closed proprietary format. The only way to decode it 10bit is through Apple software. But supposedly there is a patch for mplayer / mencoder floating around for Prores support, but I've found nothing as of yet
Yes, and it is annoying as hell.
Do you have "Pro" installed and/or one of the v210 codecs listed above?
I do have QuickTime Pro (yes, pro) installed.
poisondeathray
5th September 2011, 16:37
Where should I go looking for this?
They come with capture card hardware, but I think you can you can download the codecs for free off the manufacturer's site
Daemon404
5th September 2011, 17:00
They come with capture card hardware, but I think you can you can download the codecs for free off the manufacturer's site
I found BlackMagic's free codec install, however, when trying to export a sample prores file as blakcmagic 10-bit, I get:
Error -8961: an unknown error occurred
The sample in question is here: http://samples.mplayerhq.hu/V-codecs/HCPA/AppleProRes422.mov
Google says perhaps it has to do with res/framerate?
ganymede
5th September 2011, 17:05
Prores is closed proprietary format. The only way to decode it 10bit is through Apple software. But supposedly there is a patch for mplayer / mencoder floating around for Prores support, but I've found nothing as of yetYes, and it is annoying as hell.The ProRes decoder for mplayer can be downloaded from here : http://samples.mplayerhq.hu/drivers32/new/AppleProResDecoder.qtx. It must be copied in the "codecs" folder.
poisondeathray
5th September 2011, 17:10
The ProRes decoder for mplayer can be downloaded from here : http://samples.mplayerhq.hu/drivers32/new/AppleProResDecoder.qtx. It must be copied in the "codecs" folder.
Thanks!
I not that familiar with mplayer, does this prores decoder work on PC ?
I'm fiddling with mplayer and -vf help lists some IVTC filters, but I don't know if /how well they work . Anybody have experience with them ?
ivtc inverse telecine
detc de-telecine filter
divtc inverse telecine for deinterlaced video
Daemon404
5th September 2011, 17:24
Thanks!
I not that familiar with mplayer, does this prores decoder work on PC ?
I'm fiddling with mplayer and -vf help lists some IVTC filters, but I don't know if /how well they work . Anybody have experience with them ?
ivtc inverse telecine
detc de-telecine filter
divtc inverse telecine for deinterlaced video
I haven't really been able to get it to work / or get much useful out of it, personally. All of its filters work in 8-bit afaik, and I'm not sure mplayer would ever even see the 10-bit video.
Now back to stabbign quicktime to work...
poisondeathray
5th September 2011, 17:26
I found BlackMagic's free codec install, however, when trying to export a sample prores file as blakcmagic 10-bit, I get:
Error -8961: an unknown error occurred
The sample in question is here: http://samples.mplayerhq.hu/V-codecs/HCPA/AppleProRes422.mov
Google says perhaps it has to do with res/framerate?
Conversion is not working for me either. Other prores files (straight from camera, aja ki pro, fcp work fine) . I suspect something is "different" in that sample causing QTPro on windows to not like it
EDIT: in fact other formats don't export either like animation, png - I suspect it's the Windows Prores decoder implementation or something peculiar about that file
Daemon404
5th September 2011, 17:30
Conversion is not working for me either. Other prores files (straight from camera, aja ki pro, fcp work fine) . I suspect something is "different" in that sample causing QTPro on windows to not like it
EDIT: in fact other formats don't export either like animation, png - I suspect it's the Windows Prores decoder implementation
The strange part is that I can export to None.
Update: I can indeed export to PNG and Animation here.
poisondeathray
5th September 2011, 17:35
The strange part is that I can export to None.
Yeah, I just tried that "none" and it's hanging too
Then I tried other Prores files and it works.
Not sure what's going on...
Daemon404
5th September 2011, 17:40
Yeah, I just tried that "none" and it's hanging too
Then I tried other Prores files and it works.
Not sure what's going on...
Have you tried any BFF/TFF files? Files with non-square pixels?
I don't have an abundance of samples with me at this very moment.
Either way, thank you.
poisondeathray
5th September 2011, 17:50
Have you tried any BFF/TFF files? Files with non-square pixels?
I don't have an abundance of samples with me at this very moment.
Not really, everything I deal with is usally HD, progressive
If you think it's BM causing the issue on your end, you can try one of the other v210 codecs
Daemon404
5th September 2011, 17:55
Not really, everything I deal with is usally HD, progressive
If you think it's BM causing the issue on your end, you can try one of the other v210 codecs
Sure. Im not sure who else makes QT-compatible v210 codecs though. Adobe wrote their own, but it is only accessibly from within their apps.
poisondeathray
5th September 2011, 17:58
Sure. Im not sure who else makes QT-compatible v210 codecs though. Adobe wrote their own, but it is only accessibly from within their apps.
Drastic is free too
http://www.drastictech.com/download_codec.html
Daemon404
5th September 2011, 18:11
Drastic is free too
http://www.drastictech.com/download_codec.html
That one works with the problem clip, but ironically fails on stuff that worked with BM. lol.
jmac698
5th September 2011, 18:39
kona 4.2.1, blackmagic design 7.9, cineform 3.2.2.185, dtcodecs3.0.0, drastic
ffvideosource() will open v210 in mov or avi , but it will become 8-bit
if you have drastic codecs installed, avisource() will open v210 in avi
qtinput, can also dither to 8 bit
qtsource, it'll open v210 in mov or avi
Virtualdub reads v210 directly
Sashimi reads v210 and output in 16bit within avisynth
http://www.videohelp.com/tools/ffmbc#features
support decoding or encoding v210
ffmpeg encodes v210 or more - this is recent. need to check.
Is it also actually possible to:
1) Import a v210 (AVI or MOV) as a true 10bit
2) Add additional debanding in 16bit
3) Dither down the 16bit clip to a final 8bit clip?
Yes, dither or flash3kyuu_deband does the processing, encode to 10bit with this, for example:
avs2yuv -raw "script.avs" -o - | x264-10bit --demuxer raw --input-depth 16 --input-res 1280x720 --fps 24 --output "out.mp4"
The script itself needs to return a special stacked 16bit video format, the function for this included in the plugins/scripts.
Give me a sample in v210 at least (even some simple animation in 24->30fps) to IVTC and I can work it out.
ps the actual script to read v210 to high bit depth is here
http://forum.doom9.org/showthread.php?p=1486552
It returns an 8 bit image by default, a few lines of code would be necessary to put it into the proper stacked 16bit format. Looks like a little bit of work and testing. Also the link to download sashimi is dead :(
mp3dom
5th September 2011, 20:29
Sashimi can be downloaded from here: https://sites.google.com/site/ourenthusiasmsasham/open-source-software#TOC-Sashimi
The latest version is 0.81b. By the way I've tried the ReadV210 function posted in the same thread but the result is a pure green/pink image (I've tried on a 23.98p v210 source with true 10bit informations).
My needs are not to encode 10bit AVC but to postprocess a v210 file at 16bit level (to have the max precision) and dither to 8bit at the very end to encode at 8bit AVC.
Strangely I have found that if I have a 10bit video with bands and I dither to 8bit with Floyd-Steinberg + random noise, the final 8bit clip will keep the banding (this is normal, as the bands is on the source) but makes successive dithering (with dither or flash3kyuu) ineffective (the dither is not applied, probably due to the random noise). Ironically I'm getting better results with truncating 10bit to 8bit and then applying dither or flash. So my idea was now to deband at 16bit level prior of bit-depth dithering (or try to dither without random noise)
kolak
5th September 2011, 23:41
If you have ProRes or DNxHD 10bit you will be better using After Effect and converting it to v210 QT or AVI. AE does see 10bit in both and can output common v210. From here it my be easier to get somewhere with avisynth.
Episode from TeleStream (500$, Winodws version) can convert v210 to ProRes keeping 10bit- at least this what I have been told by their support just few days ago. I assume it can do opposite also.
Free DaVinci Lite should be also able to convert ProRes to v210 QT keeping 10bit, but you need MAC.
Andrew
kolak
5th September 2011, 23:48
Strangely I have found that if I have a 10bit video with bands and I dither to 8bit with Floyd-Steinberg + random noise, the final 8bit clip will keep the banding (this is normal, as the bands is on the source) but makes successive dithering (with dither or flash3kyuu) ineffective (the dither is not applied, probably due to the random noise). Ironically I'm getting better results with truncating 10bit to 8bit and then applying dither or flash. So my idea was now to deband at 16bit level prior of bit-depth dithering (or try to dither without random noise)
It means your 10bit source file is crap and has nothing to do with 10bit :) It already went through 8bit chain and you need tools to mask banding (as you found out).
MS XScaler filter does nice job on real 10bit sources when going to 8bit.
It was/is part of PEP encoder, which was given for free some time ago. You could try contacting MS (Ben?)- maybe you can get it for free.
Andrew
Daemon404
5th September 2011, 23:50
If you have ProRes or DNxHD 10bit you will be better using After Effect and converting it to v210 QT or AVI. Ae does see 10bit in both and can output common v210. From here it my be easier to get somewhere with avisynth.
Episode from TeleStream (500$, Winodws version) can convert v210 to ProRes keeping 10bit- at least this what I have been told by their support just few days ago. I assume it can do opposite also.
Free DaVinci Lite should be also able to convert ProRes to v210 QT keeping 10bit, but you need MAC.
Andrew
As I mentioned earlier in this thread, using AE isn't really a good idea, since it works internally with RGB, so you are introducing an unnecessary colorspace conversion. I ended up using QT Pro + BM v210, then writing my own code to apply IVTC (worked btw!).
kolak
6th September 2011, 00:11
You can set working colorspace in AE and than even if it goes to RGB mode it won't matter (AE works in very high precision).
Your final files will be fine- as far as remember I've tried it and everything was fine. It's also quite fast- real time or faster on good PC.
Does conversion in QT Pro preserves 10bit? I'm not sure about it.
I have some DNxHD 10bit file which I need to convert to v210- can I simply use QT PRO?
Andrew
jmac698
6th September 2011, 00:51
So where does that leave us? Is the main problem just reading in a 10bit file? If you post a sample I will update my deepcolor tools to work with it, and also make it more compatible with dither etc.
kolak
6th September 2011, 01:23
YES- reading is the main issue!
We have few filters which could do something with 10bit source, but we can't read 10bit source :)
I can create some samples- eg. v210, DNxHD, ProRes movs.
poisondeathray
6th September 2011, 01:38
Does conversion in QT Pro preserves 10bit? I'm not sure about it.
yes it does
I have some DNxHD 10bit file which I need to convert to v210- can I simply use QT PRO?
You can, but QT treats DNxHD as RGB, and you will get gamma shift as well
YES- reading is the main issue!
We have few filters which could do something with 10bit source, but we can't read 10bit source :)
I can create some samples- eg. v210, DNxHD, ProRes movs.
You can read 10bit sources right now, I think the problem is keeping 10bit and not truncating the data
right now:
10bit => 8bit maybe 9bit? => 16 bit => final format
ideal:
10bit => 16 bit => final format
Daemon404
6th September 2011, 02:46
You can set working colorspace in AE and than even if it goes to RGB mode it won't matter (AE works in very high precision).
The fact that AE can work in 32 bpc RGB is not relevant. It is still doing and unnecessary conversion from YUV -> RGB -> YUV. That is not acceptable in many cases. :)
Mug Funky
6th September 2011, 02:50
@ Kolak: the conversion from 4:2:2 to RGB and back again introduces horizontal blur. there's not really a way around that.
mp3dom
6th September 2011, 08:13
It means your 10bit source file is crap and has nothing to do with 10bit :) It already went through 8bit chain and you need tools to mask banding (as you found out).
Quite possible :)
It's animation so while it contains true (verified) 10bit informations, they probably have switched back and forth using different color space or bit-depth prior to finally output the data to HDCAM-SR. So now I have a 10bit data with banding present on source.
MS XScaler filter does nice job on real 10bit sources when going to 8bit.
It's exactly the tool I've used :)
jmac698
6th September 2011, 08:32
I assure you you can read true 10bit, there was some mention in the description of Deepcolor Utils of 9 bit, but there is a mode to work around that. It's because I'm reading the file raw, and have to guess the header size. If you want fully automatic reading, the best I can do is 9bit for now (though I know a way around that).
I only need a sample of a v210 file that you can't read.
Conversion of 'rgb safe' colors to/from yuv is lossless with 2 extra bits. I know this because I derived the SMTPE colors bars for avisynth 2.56, and I noticed the color yellow needed 10 bits. For 10bit yuv I'd assume you need 12bits rgb. What does 'rgb safe' mean? The color -I (a kind of purple, from YIQ) gives negative red which can't be displayed, we picked the same tint with reduced saturation to represent it.
If there's a problem in the conversion, it's in the implementation. If there's an attempt to upscale the chroma in converting to RGB, it won't be mathematically accurate anymore to convert back. So yes, I'd avoid conversions unless you know what it's doing.
kolak
6th September 2011, 12:00
The fact that AE can work in 32 bpc RGB is not relevant. It is still doing and unnecessary conversion from YUV -> RGB -> YUV. That is not acceptable in many cases. :)
Yes- I would prefer direct conversion in YUV, but if I can't see any difference on 4x zoomed frame than for me it's fine.
kolak
6th September 2011, 12:04
@ Kolak: the conversion from 4:2:2 to RGB and back again introduces horizontal blur. there's not really a way around that.
I'm going to check it today- all grading software works in RGB (not?).
I think I have seen in in QT conversions, but not AE.
I think I already checked it in AE and I have not seen any blur- I zoom frames 4x. If there is some change below this than I don't really care- it will became 4:2:0 on BD anyway.
kolak
6th September 2011, 12:08
yes it does
You can, but QT treats DNxHD as RGB, and you will get gamma shift as well
Hmmm- DNxHD imported to Edius does not introduce any shifts, even if Edius sees RGB data coming (I also compared it to QT read by avisynth qtinput in YUY). Some time ago there were shifts- latest DNxHD decoder seams to be different.
kolak
6th September 2011, 15:57
Actually nothing works properly- nightmare :)
Can't convert to v210 in any way which would keep colors/gamma intact.
Daemon404
6th September 2011, 16:15
Actually nothing works properly- nightmare :)
Can't convert to v210 in any way which would keep colors/gamma intact.
Have you tried ffmbc?
Link: http://code.google.com/p/ffmbc/
kolak
6th September 2011, 22:20
I don't know how to compile it. If someone can provide exe file that would be nice.
I think I managed to do it with Premiere (surprise:) ), but need to check it properly.
Thanks,
Andrew
mp3dom
6th September 2011, 23:11
FFmbc 0.6 x86: http://www.mediafire.com/?z5g7ez123o9k5qh
FFmbc 0.6 x64: http://www.mediafire.com/?wu5w2cwqmimqjum
Let me know how it perform with v210. Thanks.
kolak
6th September 2011, 23:31
OK- thanks.
Nope- DNxHD in ffmbc is only 8bit currently- decoding and encoding:(
Mainconcept has VC-3 decoder with v210 output pin- going to try this (even if it's a demo version). It also supports DNxHD in MXF.
Andrew
Gser
7th September 2011, 00:44
Sounds like it would just be more easier to dual boot windows and OSX or just use it as a virtual OS.
smok3
7th September 2011, 08:13
FFmbc 0.6 x86: http://www.mediafire.com/?z5g7ez123o9k5qh
FFmbc 0.6 x64: http://www.mediafire.com/?wu5w2cwqmimqjum
Let me know how it perform with v210. Thanks.
interesting projects, but with the lack of any realy documentation/'give me 35 examples' also utterly useless (yes i know about the -h switch).
Yellow_
7th September 2011, 08:43
MpegStreamclip?
Out of interest when AE & Premiere are discussed is this version 5 or 5.5 or earlier?
kolak
7th September 2011, 10:38
Yes- CS 5 (correction from CS5.5)
I converted with Compressor (and FCP) and v210 was not real V210 (just 8bit in v210) and also problems with colors in case of FCP- real nightmare :)
kolak
7th September 2011, 15:44
Looks like my DNxHD file at home was 8bit.
Tried different one and have some message that DNxHD is 10bit, but conversion does not happen- video pixel format is unknown error.
Any suggestion?
Andrew
kolak
9th September 2011, 20:58
Ok- after 3 days of testing/trying I managed to convert DNxHD to v210 preserving 10bit/colors/gamma. Only one way which I found to work is AE, but.....don't use latest AVID 2.3.4 codecs. There seams to be bug in this version- as far as 8bit works fine, after switching AE to 16/32bit there is small color shift (at least with AE CS5). Going to Avid codecs ver. 2.2.1 solves issue. Conversion is quite slow, but seams to work fine- I don't see any blur or even smallest color difference even at 400% zoom.
I also got an update about Telestream's Episode- version 6.2 will expand 10bit possibility and will preserve 10bit between DNxHD, ProRes, v210 conversion.
Another bad news is that Mainconcept MXF demuxer (ver 9) is not working anymore with AVID MXF DNxHD streams. It was working after Mainconcept fixed it some time ago, but it looks like AVID has changed something again.
FFmbc does not work with AVID MXF DNxHD files neither (neither with 1:1x codec even if this is just simple 2vuy stream).
What a pain in the xxxx :)
Andrew
jmac698
9th September 2011, 21:01
Great, now if you can post a sample I can IVTC it...
kolak
9th September 2011, 21:09
??
I'm talking about something different, but ProRes should work fine in AE. I had 10bit DNxHD file, which I needed to dither to 8bit.
Andrew
jmac698
9th September 2011, 23:17
Your first post,
Once I get that, I can write my own app and/or plugin to apply IVTC based on e.g. a fieldhints override file, while still working in a 10-bit colorspace.
I thought you still needed to process in Avisynth. But if you have this v210 file and it works in other pro tools, I'm sure they can IVTC and dither?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.