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. |
7th May 2012, 21:47 | #3 | Link |
Registered User
Join Date: Nov 2004
Location: Poland
Posts: 2,843
|
There use to be a bug in ffmpeg and DNxHD 10bit decoding in ffmpeg, so I assume there is one in ffmpegsource. I thought it was fixed, but recently saw it in latest LAV filters, so I assume it's still in ffmpeg itself. Problem appears in high contrast areas and can be missed. If you want just detect black frames than it's not an issue in your case, but for decoding itself it can be.
Use QT input instead. |
17th June 2012, 02:23 | #4 | Link |
契約者
Join Date: Jun 2008
Posts: 1,576
|
I just used mentioned FFMS2 and opened my 10bit DNxHD correctly. Did some tests to verify it and all was alright. You just need to make sure that DNxHD encoder doesn't set to scale levels and remember that it uses bt709 colorimetry but avisynth (and some other opensource stuff) works in bt601, so you will see wrong colors if you open script lets say in VirtualDub... Don't know about LAVfilters.
Back to business, opening DNxHD is not that hard, but how to do it while keeping it 10bit? As stacked or interleaved clip. Is there any ways? Anyone brave enough to compile fresh hacked FFMS2 to do it? Last edited by Keiyakusha; 17th June 2012 at 06:53. |
17th June 2012, 05:46 | #5 | Link |
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 712
|
SAPikachu built a few FFMS2 versions with stack16 output, although they are sporadically updated. Just add enable10bithack=true to the FFVideoSource parameters. It works wonders on AVC sources, but I don't know for other codecs.
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding |
17th June 2012, 08:10 | #6 | Link | |
契約者
Join Date: Jun 2008
Posts: 1,576
|
Quote:
I just tested FFMS2 r656 on v210 stream in .mov container (Because I have something to compare it to. DNxHD is not lossless so its hard to compare it to something, but it behaves similar.) So here is FFMS2 input, and here is readv210 of the same source. Result is similar, which indicates that it works, but as you can see there is some difference. This is because v210 (same as DNxHD) have 4:2:2 chroma subsampling, but FFMS2 opens clips only as YV12. On my screenshot ConvertToYV12() was used after readv210 input to make them even (maybe not the best idea). I tried to add "colorspace=yuy2" switch to FFVideosource, but then it opens video without 10bit hack. Should I configure something else or that's how it works right now? If latter, this is certainly step forward but unfortunately still not enough. And this is how opened as YV12 DNxHD looks (110 mbps). And 4:4:4 profile for some reason kills libswscale ^__^ Last edited by Keiyakusha; 17th June 2012 at 21:36. |
|
27th June 2012, 14:17 | #7 | Link |
Registered User
Join Date: Aug 2007
Posts: 218
|
Just built a new FFMS that supports 4:2:2 and 4:4:4 videos, you can download it at: http://nmm.me/kx
I tested this version using a DNxHD sample posted on this page. Seems it works correctly, the LSB part come out without problem. AvsP incorrectly reports the clip as YV12, subtitle("IsYV16: " + string(IsYV16)) shows the clip is actually YV16. Hope this helps.
__________________
f3kdb 1.5.1 / MP_Pipeline 0.18 ffms2 builds with 10bit output hack: libav-9a60b1f / ffmpeg-1e4d049 / FFmbc-0.7.1 Built from ffms2 6e0d654 (hack a9fe004) Mirrors: http://bit.ly/19TwDD3 Last edited by SAPikachu; 27th June 2012 at 14:18. Reason: fix download link |
27th June 2012, 14:24 | #8 | Link |
Registered User
Join Date: Nov 2004
Location: Poland
Posts: 2,843
|
Does it mean that we can import DNxHD at 10bit and dither to 8bit inside avisynth?
Please note: there is a bug in DNxHD 10bit decoder, which shows up on high contrast areas as a sort of halo/ringing. It has been reported long time ago to ffmbc developer and it's fixed there, but eg latest LAV filter still introduce this problem, so I'm not sure if it was ever fixed with ffmpeg. |
27th June 2012, 14:35 | #9 | Link |
Registered User
Join Date: Aug 2007
Posts: 218
|
Yes, that's possible, and we can keep full 4:2:2 colorspace now.
I'm not sure whether the bug has been fixed either, maybe you can check change log of libav to see it.
__________________
f3kdb 1.5.1 / MP_Pipeline 0.18 ffms2 builds with 10bit output hack: libav-9a60b1f / ffmpeg-1e4d049 / FFmbc-0.7.1 Built from ffms2 6e0d654 (hack a9fe004) Mirrors: http://bit.ly/19TwDD3 |
27th June 2012, 15:12 | #11 | Link | |
契約者
Join Date: Jun 2008
Posts: 1,576
|
Quote:
I try to use free alternative to professional software where possible. This is huge help, thanks! (^o^) Last edited by Keiyakusha; 27th June 2012 at 15:22. |
|
27th June 2012, 15:19 | #12 | Link |
Registered User
Join Date: Nov 2004
Location: Poland
Posts: 2,843
|
Can you post your import script please, so I can quickly check if decoding is fine.
Please include whole script with dithering. Just looked at some source, which clearly shows problem in LAV filter. Last edited by kolak; 27th June 2012 at 15:24. |
27th June 2012, 15:23 | #13 | Link |
契約者
Join Date: Jun 2008
Posts: 1,576
|
What do you mean by import script? You don't need anything except ffms2 call to open file...
Edit: Ffvideosource("Comp 1.mov",enable10bithack=true) f3kdb_dither() is this what you want? can it be that ffmbc developer fixed it but didn't sent fix upstream to ffmpeg? If so, he really should. Last edited by Keiyakusha; 27th June 2012 at 15:41. |
27th June 2012, 16:10 | #14 | Link |
Registered User
Join Date: Nov 2004
Location: Poland
Posts: 2,843
|
Yes- problem is there, so whoever is using it be careful!
Artefacts on high contrast areas, eg white text on black background. It creates sort of halo, contouring- something like mosquito noise on eg. mpeg2 encodes. It's definitely fixed in ffmbc. I resized and applied levels filter to make it more obvious. Last edited by kolak; 27th June 2012 at 17:12. |
28th June 2012, 00:58 | #16 | Link |
Registered User
Join Date: Aug 2007
Posts: 218
|
Yes, it should support most formats that libav supports, seems libav can decode ProRes but I haven't tested it.
By the way, is there any patch for the bug? I can check whether it can be applied to current version.
__________________
f3kdb 1.5.1 / MP_Pipeline 0.18 ffms2 builds with 10bit output hack: libav-9a60b1f / ffmpeg-1e4d049 / FFmbc-0.7.1 Built from ffms2 6e0d654 (hack a9fe004) Mirrors: http://bit.ly/19TwDD3 Last edited by SAPikachu; 28th June 2012 at 01:09. |
28th June 2012, 12:11 | #17 | Link |
Registered User
Join Date: Nov 2004
Location: Poland
Posts: 2,843
|
Tried 10bit ProRes and all seams to be fine Sometimes decoding is bit unstable during seeking, but during convert seams to be ok. Overall speed is also good- 2x faster than RT on my i7 990x on 24p HD source.
DNxHD 10bit decoding is fixed in ffmbc, so I assume it can be ported to ffmpeg. |
28th June 2012, 14:47 | #18 | Link |
Registered User
Join Date: Aug 2007
Posts: 218
|
Just downloaded source code of ffmbc to have a quick check, their DNxHD decoder diverged from the one of official libav/ffmpeg, and they didn't provide any code history. So it's very hard to extract a patch from it and I don't have time to do that. Maybe someone can ask them for the related patch?
__________________
f3kdb 1.5.1 / MP_Pipeline 0.18 ffms2 builds with 10bit output hack: libav-9a60b1f / ffmpeg-1e4d049 / FFmbc-0.7.1 Built from ffms2 6e0d654 (hack a9fe004) Mirrors: http://bit.ly/19TwDD3 |
Tags |
avisynth, black frames, detecting, dnxhd, mov |
Thread Tools | Search this Thread |
Display Modes | |
|
|