Exporting video file while applying gamma correction

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
nawak
New Cone
New Cone
Posts: 2
Joined: 08 Apr 2010 21:29

Exporting video file while applying gamma correction

Postby nawak » 08 Apr 2010 21:40

Hi,

I have a dark video that needs to be brightened. For playback I use the gamma correction in the extended video settings. But I would like to correct the original file.
VirtualDub's gamma correction is way worse than VLC's, because it saturates the colors. All the tools I have tried have this flaw except VLC.
So I tried to use the export/convert feature of VLC but I can't find the extended settings like in the playback mode.

My question is, how do I enable the gamma correction when I export/convert a video file?

Thanks!

nawak
New Cone
New Cone
Posts: 2
Joined: 08 Apr 2010 21:29

Re: Exporting video file while applying gamma correction

Postby nawak » 08 Apr 2010 23:13

I have found how to do what I want (brighten the video file), but not using VLC.
I still don't know if it's possible to convert a video file with VLC while applying video "effects".

I am posting this hoping it will help others. It is a bit off-topic for the forum, but it is short and I'm sure I am not the only one wanting to brighten a video and beliveing that using VLC is the only hope, seeing how bad the others tools are.

First, the reason why VirtualDub's gamma filters don't work: they apply the gamma on the RGB components. I am guessing that VLC applies gamma on the Y channel of YUV components only, which is what you want when you need to brighten a video.

Now, to brighten a video (apply gamma on the Y channel) you need to use an aviSynth script. Install aviSynth if you don't have it.
The avs script will look like that:

Code: Select all

DirectShowSource("C:\temp\video.mp4", pixel_type="YUV") ColorYUV(gamma_y=256)
(gamma_y=256 makes a Y channel gamma of 2.0, which is what my video needed))

Then, open the avs script in virtualDub as if it was an avi file.
Finally, convert the video using virtualDub as usual.

Voilà!

ssmubita
New Cone
New Cone
Posts: 1
Joined: 06 Apr 2011 07:16

Re: Exporting video file while applying gamma correction

Postby ssmubita » 06 Apr 2011 07:21

Just wanted to say thank-you so much for this info.

I have been having a heck of a time trying to correct my captured digital footage.

I've tried all sort of configuration but this one is the best so far for brightening up footage without fading colors or saturating them.

apauza
New Cone
New Cone
Posts: 3
Joined: 19 Oct 2011 21:07

Re: Exporting video file while applying gamma correction

Postby apauza » 19 Oct 2011 21:12

Was just wondering if anyone had a solution to nawaks question?
I would like to do exactly the same - I can watch, but can not see how to export mp4 with a change in gamma (would like to put the mp4 back onto my Galaxy Ace which takes very dark videos indoors)
Ta


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 124 guests