Hi,
You probably used the ffdshow luminance fix...
It's quite neat and the result is great (it automatically adjusts based on the video itself). The result looks like this:
FROM:
TO:
I tried using VirtualDub, but people around here say that I can't apply the Post-Processing filter (until now this seems to be true)
I also tried using MeGui and StaxRip, but reading documentation didn't helped me much...
How can I get this into my encoded video?
I would gladly consider any of your suggestions...
Best regards
+ Reply to Thread
Results 1 to 9 of 9
-
-
Try this: In VirtualDub add the Brightness/Contrast filter first. Bump up the Brightness by one notch (~7 percent). That filter works in YUV so you can bring up the brightness before it's lost in the YUV to RGB conversion. Then you can use any of the other filters. Use the Levels filter to adjust the levels.
-
My suggestion would be not to use it when encoding. If memory serves me correctly it works a little like volume normalising, except where volume normalising slowly increases the volume, then drops it again during loud parts, the postprocessing filter does the same thing with luminance.
I'm pretty sure the postprocessing filter doesn't work when ffdshow is decoding certain types of video (it may only work when decoding ASP) and I think it's part of the mplayer de-blocking filter which means you can't apply the luminance level fix without applying de-blocking.
Just some thoughts, anyway...... -
jagabo... you took the wrong image (the already processed one). If you try to apply the brightness/contrast filter over the original image, you will see that you can't really do what the post-processing rule does
hello_hello... you are right. that is the behaviour I'm looking forward to get: normalization
Thank you both for replies and... hopefully I will get a few more -
No you misinterpreted what I was showing. As you found, there's no way to restore the darks in your darker image because they have already been lost by your processing. Using VirtualDub's Brightness/Contrast filter first will give you something like your lighter image (ie, you can duplicate what ffdshow does). So I started with that image. Then you can use the Levels filter to further adjust it to get something like the output I showed.
-
It's the last thing I'd want to apply when encoding, but each to their own. Here's why.......
Try finding (or encoding) a video which contains a single static dark scene. If each frame is identical, then during playback the last frame should look exactly the same as the first frame. If you use ffdshow's luminance level fix though, it won't. The last frame will look noticeably brighter than the first frame. That's because the luminance change applied is gradual, it's the equivalent of slowly turning the volume up during the static scene, then resetting it when the scene changes. The luminance level change is applied in the same way.
In practice, the scenes in video will change often enough for you not to really notice the luminance level being adjusted as it's constantly "resetting" with scene changes. However there are times when there's a long enough duration between scene changes for it to be noticeable. It's not something I'd want to apply to my encodes.
If you really want to apply it though, then in MeGUI's case you'll need to open the video using DirectShow in order for ffdshow to decode the video. To do so, instead of using MeGUI's File/Open menu, open the AVS Script Creator, and use it to select the input video. MeGUI should then ask how you want to open the video, using the File Indexer or via DirectShow etc. Or......
Just create your own DirectShow script to open the video, then use the script as the source when selecting the source video in MeGUI's AVS Script Creator window. Something like this:
DirectShowSource("D:\video.mkv", audio=false)
As I said though, I think ffdshow's post processing filter only works when decoding certain types of video. If the source video is ASP (xvid etc) then it should work, but I'm not sure about mpeg2 or h264). I haven't played with it enough to remember exactly. -
Thank you very much
You've all been most helpful... but the last reply was the answer I was searching for.
Best Regards -
If you want to use ffdshow in VirtualDub just make sure that ffdshow (VFW) is used to decode the video. Uninstall or de-prioritize any other decoders for the source video and make sure the VFW decoder in ffdshow is enabled. Or use the DirectShow source filter in VirtualDub and the ffdshow's DirectShow decoder.
-
If you're an MeGUI user (or you could no doubt use another AVISynth based encoder GUI), you can get AviSynth to change the levels for you.
The AVISynth ColorYUV function will adjust them. I sometimes use it to brighten dark scenes a little. The offset function can be used to shift the luminance levels up or down a bit (I tend to try this method first as it's not like using brightness or contrast). So to make a video a little brighter you might add something like this to your script:
ColorYUV(off_y=8)
To make it darker you'd use a negative value:
ColorYUV(off_y=-12)
It also has an automatic luminance level adjustment, similar to ffdshow, which I'd personally never use, but:
ColorYUV(autogain=true)
The AVISynth Tweak function can do a few different things, but for simple brightness, contrast and saturation adjustments:
Tweak(cont=1.2, bright=-20, sat=0.85)
Any of the above are simple to add to an MeGUI script if you want to adjust the entire video, but what if you only want to adjust a scene or two? One solution is to use the trim function, which lets you select specific parts of the video to encode. Adding a lot a trims to a script can get a bit frustrating, but if you only need to add a few it's fairly easy. Using MeGUI's script creator and the preview while setting up an encode, you'd make note of the start and end frames for each section of the video you wish to adjust, then manually add your adjustments to the end of the script. Here's a basic example. Lets assume the video is 2000 frames long. For the first thousand frames you want to encode the video "as-is" while for frames 1001 to 1543 you want to raise the luminance level. Frames 1544 to 1860 need their luminance level lowered, but they also require a contrast boost. Frames 1861 to 2000 need to be encoded "as-is" again. To do all that, once MeGUI has created the script for encoding, you'd add something like this to the end of it:
Trim(0,1000)\
++ Trim(1001,1534).ColorYUV(off_y=16)\
++ Trim(1544,1860).ColorYUV(off_y=-10).Tweak(cont=1.2)\
++ Trim(1861,2000)
No need for ffdshow to be decoding and you have more precise control over the adjustments. Adding a lot of them can get somewhat messy, but for making simple adjustments to just a scene or two it can be very handy. And if you add the adjustments to the script using the AVS Script Creator, then the preview button lets you see the result. If you brighten a scene a little too much etc, just adjust the appropriate value in the script and hit the preview button again. When you're happy, save the script as you normally would and encode.Last edited by hello_hello; 26th Jan 2013 at 09:46.
Similar Threads
-
How to keep ffdshow post processing(deblocking filter) in finalized video
By Milardo in forum EditingReplies: 6Last Post: 5th Apr 2011, 05:09 -
ffvdub or ffdshow encoder image processing doesn't work with VirtualDub?
By Milardo in forum EditingReplies: 42Last Post: 21st Jan 2011, 18:09 -
ffdshow post-processing problem
By _migz_ in forum Newbie / General discussionsReplies: 16Last Post: 25th Apr 2009, 22:41 -
Post-conversion processing?
By ktwbc in forum ffmpegX general discussionReplies: 1Last Post: 8th Jan 2009, 13:16 -
Post-processing filters?
By pfxz in forum RestorationReplies: 3Last Post: 28th Jul 2008, 21:15