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. |
|
|
Thread Tools | Search this Thread | Display Modes |
24th October 2010, 04:07 | #1 | Link |
Registered User
Join Date: May 2010
Posts: 18
|
AVIDemux is blurring the video, can't be turned off :(
Hi.
I've noticed a strange behaviour of AVIDemux during testing. I have an interlaced video, and i was trying to deinterlace it. No matter what deinterlace filter i choose, the results are the same! Some "ghost image" appears on the picture where fast motion occurs. To help you understand the problem, i show you some pictures. This is the original interlaced frame: And this is the yadif-deinterlaced in AVIDemux: Do you see the pink "ghost" on the white wall? But in Virtualdub: no problem, it seems as it has to be: (yadif-deinterlace) This symptom can have only one explanation: AVIDemux is blurring/smoothing every frame once it decodes, before any further processing. And i think this can be noticeable on this image, its AVIDemux natural, no filters selected at all: If you zoom in (with paint forexample) you can see the white lines between the red, they're actually pink already. I've searched the application for this option to turn it off, but i've did not find it. Is it just me who didn't find this switch in AVIDemux, or is this software a real useless crap? I was about to change VirtualDub-x264vfw to AVIDemux-x264, but now i think i'll stay with VirtualDub. So you guys, what do you know about this blurring thing? Is it intentional or not? (i used huffyuv for the examples because its lossless) Fenyo PS: Ouh, and i used Avidemux 2.5.3 Last edited by Fenyő; 24th October 2010 at 04:15. |
24th October 2010, 13:03 | #2 | Link |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
(1) Make you that you have disabled all post-processing (deblocking, deringing, etc) in Avidemux under "Video" -> "Postprocessing". Uncheck all filters and set "Filter strength" to 0.
(2) I suggest inspecting the original interlaced video using the "Stack Fields" filter. If there is "ghosting" (blending) already present in the individual fields, the deinterlacer can't magically fix it. (3) When you converted the original interlaced video to HuffYUV, I hope you used the YUY2 colorspace and not YV12, as the chroma sub-sampling would have destroyed the interlace...
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 24th October 2010 at 14:16. |
24th October 2010, 20:06 | #3 | Link | |||
Registered User
Join Date: May 2010
Posts: 18
|
Quote:
Quote:
And yes, "ghosting" is already present in the individual fields, and of course the deinterlacer can't fix it. But this "ghosting" is not encoded in the source video! That's the thing i'm talking about. Quote:
You know what? Check it yourself! I've just created a 16 MByte sample, i've copied around 2 seconds from this recorded video (covering this picture above) with VirtualDub direct stream copy. You can download it here: Sample HuffYUV Video Open it with AVIDemux, use Stack Fields, and you can see the ghosting. Then open it with VirtualDub, use deinterlace filter in "Unfold fields side-by-side" mode, and you can see there's no ghosting!! |
|||
24th October 2010, 20:27 | #4 | Link |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
I checked your sample file, but I fail to see any obvious artifacts in Avidemux.
Also I can't see any obvious difference between Avidemux and VirtualDub when inspecting the individual fields:
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 24th October 2010 at 20:40. |
24th October 2010, 21:39 | #6 | Link |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Your example clip only has 14 frames
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ |
24th October 2010, 21:46 | #7 | Link |
Registered User
Join Date: May 2010
Posts: 18
|
No, you're wrong! Its exactly 47 frames long!
And its obvious from your pictures, that you've opened some test1-FIXED file. Check your file, here is its MD5: d6d4d260bf4e7db2e4a70e660bcb23dd Exact file size is: 16 647 132 Bytes. Maybe your download is corrupted. |
24th October 2010, 22:03 | #8 | Link | |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
VirtualDub showed a bunch of warnings but managed to re-construct the index. It got exactly 14 frames, the last (15th) frame in VirtualDub always is empty. I had to "repair" your sample file with AVI Mux-GUI in order to open it in Avidemux for the comparison. Again only 14 frames
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 24th October 2010 at 22:05. |
|
24th October 2010, 22:05 | #9 | Link | |
Registered User
Join Date: May 2010
Posts: 18
|
Quote:
Now i'm completely sure about this. Check file size!! |
|
24th October 2010, 22:15 | #10 | Link | |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
I indeed can see the issue on frame #18 and my assumption is that Avidemux, which uses YV12 as "internal" processing format, screwed up the YUY2 to YV12 conversion! Avidemux probably assumed that the input is progressive, which of course is fatal when converting interlaced YUY2 to YV12 Workaround: Feed the input into Avidemux using the AVS Proxy with a simple script like this: Code:
FFVideoSource("test1.2nd.avi") ConvertToYV12(interlaced=true)
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 24th October 2010 at 22:18. |
|
24th October 2010, 23:14 | #11 | Link |
Registered User
Join Date: May 2010
Posts: 18
|
Yes! Indeed, your theory is right!
With that script the ghosting is eliminated. (BTW, its a shame for AVIDemux that it needs extra software to handle AviSynth AVS files, complicating the already not simple video editings with AviSynth. -VirtualDub handles AVS naturally, so one more good-point to good old VirtualDub) So this is not a normal function after all. ...as i thought. You know, if i haven't tested this video with AVIDemux, probably i would use AVIDemux now, including these glitches to my videos, and who knows when would i realize that why all my videos becoming ghosted... And probably most of the users do not even realize this problem, and they're producing videos with this ghosting to the general public. I think this problem is essential, and i think converting video to an internal format (especially if it is 4:2:0) is quite a bad idea! (not efficient, unnecessary conversions, and making the overall video quality worse) It should have process the video in its original format, and by this it would avoided this problem. As you can see, VirtualDub don't has this problem at all. Why? (another good point to VirtualDub) I don't know if the creators of AVIDemux reading this forum and this thread, but i think it's time to rewrite some code in AVIDemux... So till its been fixed, i won't use AVIDemux, and i'll stay with VirtualDub. |
24th October 2010, 23:27 | #12 | Link | ||
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
Avisynth 2.x and VirtualDub are Windows-only software and the development of Avisynth 3.x is dead. At the same time Avidemux is Cross-Platform (Windows, Linux, Mac OS X). Thanks to the AVS Proxy, we can run Avidemux as a native Linux process, while AVS Proxy + Avisynth can run inside Wine. This allows AVS input on Windows and Linux Moreover swapping out Avisynth into its ownprocess also has the advantage that both, Avidemux and Avisynth, can allocate up to 2 GB of memory each. (If both would run inside the same process, they would have to share the 2 GB of memory that each 32-Bit process can allocate at maximum, which indeed can be problem!) Quote:
VirtuaDub, for example, converts everything to RGB32 for internal processing! However using YV12 as the "internal" format, as Avidemux does, makes a lot of sense, because the great majority of all sources are YV12 (4:2:0) and basically any video encoder takes YV12 as input. Just a few examples: MPEG-2 video from Video-DVD or DVB-T/S/C uses YV12, interlaced or not! H.264/AVC from BluRay or DVB-S2 uses YV12. Both, x264 and Xvid, exclusively take YV12 input. Consequently using YV12 as the "internal" format will avoid unnecessary color-space conversions in 99% of all cases, while RGB32 would enforce two conversions in 99% of all cases. So I would suggest you stop grumbling, until you know all the facts that have lead to certain implementation decisions
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 24th October 2010 at 23:58. |
||
25th October 2010, 00:00 | #13 | Link | ||||
Registered User
Join Date: May 2010
Posts: 18
|
Quote:
Quote:
Quote:
Quote:
I'm using HuffYUV which handles only YUY2 and RGB so YUY2 is mostly used at least here. (i think Divx accepts RGB too) Anyway, i think a fix is still necessary for this problem. At least a dialog box when AVIDemux sees that a color conversion is required for the input file, it could ask the user whether the input file is interlaced or not, and using the correct conversion depending the user answer instead of assuming it progressive. |
||||
25th October 2010, 00:34 | #14 | Link | |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
Quote:
As far as I know, it does not correctly process interlaced YV12 when doing this conversion to RGB. |
|
25th October 2010, 00:42 | #15 | Link | |
Registered User
Join Date: May 2010
Posts: 18
|
Quote:
So. Is it possible that this dialog box feature will appear in the next version of AVIDemux? |
|
25th October 2010, 07:50 | #16 | Link | |
Registered User
Join Date: Feb 2006
Posts: 823
|
Quote:
And now you know why VirtualDub doesn't support the interlaced YV12 hack from e.g. Avisynth. Last edited by GodofaGap; 25th October 2010 at 07:54. |
|
25th October 2010, 08:45 | #17 | Link | ||||||
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
Nonetheless, if VirtualDub now uses YV12 or even YUY2 for processing, then it's only the logical step into the right direction, as it will avoid unnecessary conversions. And it also means that now VirtualDub and Avidemux actually do the same in 99% of all cases, as 99% of all sources available to customers are YV12 and all relevant encoder use YV12 input as well. Moreover I wouldn't call "interlaced YV12" a hack, because that's what is used almost everywhere, including all the commercial broadcast (DVB-S/T/C) and discs (Video-DVD/BlueRay). Remember: Both, H.264 and MPEG-2, don't even support 4:2:2 or 4:4:4, except for special profiles - and those profiles generally aren't support in consumer hardware Quote:
...which only means it works more like Avisynth and Avidemux now Quote:
Yes, we could run Avidemux under Wine, which is running under a Linux, which is running inside a VM, which is running on a Windows host, which is running inside yet another VM, which is... Or we can run Avidemux as a native application, which still is the fastest and most robust and most simple way to run an application Quote:
We are waiting for your patch... Quote:
(2) DivX is an MPEG-4 ASP encoder. And as any modern video compression format, MPEG-4 ASP works in the YUV color space. If the DivX encoder software takes RGB data as input, then this only means that it will convert your input RGB data to YV12 internally. Nothing more, nothing less... Quote:
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 25th October 2010 at 19:49. |
||||||
25th October 2010, 20:34 | #18 | Link | ||
Registered User
Join Date: May 2010
Posts: 18
|
Quote:
Quote:
If i use AVIDemux, the video will be converted to YV12 in the first step EVERY TIME! So AVIDemux has to know if it is interlaced or progressive to the correct conversion. And as you well know, most of the encoders have a switch, so the user can tell the encoder that the source is interlaced or not. (but it does not solve this AVIDemux-problem) |
||
25th October 2010, 20:52 | #19 | Link |
Registered User
Join Date: May 2010
Posts: 18
|
I'm telling you some interesting:
The Cable network here is UPC, (of course they are providing digital tv along with the analog) and their DVB-C system uses Nagravision-3 which pairs their mediabox with their card, so i can't use dreambox or other cool things. And of course i can not retrieve my recorded content in its original MPEG stream format from the mediabox. The only way to get the content is the HDMI output of the box. So i have an Avermedia AverTV CaptureHD card, which has an HDMI input, and i can capture the uncompressed video signal. And it's native color output: YUY2 ...Surprise-surprise i can only select YUY2, YVYU, UYVY in the driver's properties. So all i capture from UPC's DVB-C system is coming in YUY2 format. (i don't know if the UPC-box is the one which converts the originaly YV12 to YUY2, or the Avermedia card, but i can not change the fact that i get it in YUY2) |
25th October 2010, 21:25 | #20 | Link | ||
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
Consequently you don't have "true" YUY2 (4:2:2), you only have an upconverted YUY2, which was upconverted from 4:2:0 somewhere along the way - either by the capture card or by the "mediabox" itself. This means that going form the upconverted YUY2 back to YV12 causes absolutely no loss, because you can't loose any information that never was there... Quote:
Converting from YV12 to YV12 is a NOP Moreover if you feed Avidemux with YUY2 data that was upconverted from an original YV12 source, then a conversion does happen, but NO information/detail is lost in that case (see above). Last but not least, even if you had a "true" YUY2 source that actually uses the full 4:2:2 chroma resolution (NOT upconverted), you would still have to downconvert to YV12 at some point in the processing chain! That's because, as mentioned several times before, all the relevant video encoders (x264, Xvid, etc.) exclusively support YV12 input. YUY2 is either reject by the encoder or downconverted "internally". Conclusion: Using YV12 as "internal" processing format does NOT cause a conversion in the great majority of all cases. And in the rare cases where it does, the conversion would have been unavoidably anyway
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 25th October 2010 at 21:50. |
||
|
|