I've read a lot of the postings here & so far everything regarding color adjustments seems to be done using AviSynth. I have a large mpg2 video on my hard drive & was wondering if there was a way to directly tweak its colors? Or do I have to convert to avi first?
+ Reply to Thread
Results 1 to 30 of 75
-
-
You create a d2v with dgindex and you should be good to go.Also a deblocking filter in the mix, shouldn't hurt but for color correction virtualdub is more handy or sony vegas filters if you have it.
No need for big avi
Script:
v=MPEG2Source("D:\MyVideo.d2v", info = 3)
a=WAVSource("D:\MyAudio.wav")
audiodub(v,a)
Deblock_QED(24,28,uv=3)
Converttorgb32(interlaced=true)
Then open in vdub tweak with colormill, hsi, gradation curves filters essentially and after you do that you can import vdub filters in your script directly for better results. Then you can get that kindof resultLast edited by themaster1; 5th Oct 2011 at 03:56.
*** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE -
Or use such native AviSynth filters as RGBAdjust, ChannelMixer or SmoothAdjust in the AviSynth script.
And no, you don't have to convert to AVI first. However, if your total filter chain is very slow, it can be very useful to create a lossless AVI (Lagarith or some such) before then using AviSource on that to feed into your MPEG-2 encoder. -
-
-
Also Premiere, Vegas, Final Cut, Video Studio, etc. (dozens of MPeg2 editors).
Recommends: Kiva.org - Loans that change lives.
http://www.kiva.org/about -
OK, maybe not everything, but pretty close to it. And I am referring to the postings that I have searched & read.
There is some great software developed by people on this forum and I was hoping to use such software in order to tweak a video. Therefore I did not consider a commercial product. -
Some people work with both AviSynth and VirtualDub, some use one or the other, and many don't use either. One reason you don't see a lot of VirtualDub or Adobe or Sony scripts is because those apps don't require scripts. What tools you use is up to you , but pros and amateurs alike use Premiere, Vegas, After Effects, and even VirtualDub and AviSynth. However, if you search the 'net for color correction tutorials, you won't see many posts about correcting color primarily with AviSynth. I'd add that some video color and levels problems are best done with AviSynth, and some are best handled in RGB apps. You'll likely see a lot of damage repair that must be done at the YUV level in AviSynth, and that can't be done in other than industrial-strength apps that few in this forum could afford.
Last edited by sanlyn; 21st Mar 2014 at 06:31.
-
I have 2 versions of the same movie on DVDs. One was made from a Laser Disc & the other from a PAL VHS tape. The Laser Disc version is sharper but the color looks faded in some scenes. The PAL sourced copy is softer but the colors look better. I can either tweak the Laser colors which may be difficult to do on a scene-by-scene basis, I don’t know. Or perhaps sharpen the PAL version. I don’t know which process would work out better.
While I have used scripts a few times over the last couple years I’m certainly no expert. And every time is sort of like a new learning experience for me. I have used AVStoDVD from this VideoHelp forum and noticed it can input & output MPEG2 files. It also uses AviSynth scripts in what I would call a user friendly manner. I can click on Sharpen or MSSharpen & the program will add the proper script with some default values. IOW it makes things easier and/or more fool proof for me. I presume a color correction script can be added into the mix if needed.
Do you think using AVStoDVD is a valid way to achieve what I want?
Or will I get better results using AviSynth and VirtualDub? -
If the idea is to make a DVD, you don't use VDub as it's not an MPEG-2 encoder. You prepare your AviSynth script and feed it directly to the encoder (maybe after testing it in VDub to make sure it's OK and doesn't throw any errors). If you're making something else, maybe you can use VDub. It's fairly easy to grab the colors from one video and superimpose them onto another, perhaps also sharpening them in the process. It requires that both videos have the exact same video - same framecount and same pixel-to-pixel mapping. Often some cropping and resizing is required for both so they match up. Then some variation of this works:
clip1=avisource("C:\clip_to _change _colors_of.avi")
clip2=avisource("C:\clip_to _match _colors_to.avi")
chroma=clip2
luma=clip1
MergeChroma(luma,chroma, 1.0) -
I'd really like to try that. However the biggest problem is when the PAL VHS was converted to NTSC DVD. It appears the 25fps was sped up to 24fps, which I read usually happens. And it does run about 3 minutes shorter for the approx 94 minute video.
I did try the Sharp & MSharp scripts within AVStoDVD and they do work. So I tried to adjust the saturation and am not having any success. It appears the "tweak" filter should do the job, but I've tried several syntax variations and they all give me a script error.
Any suggestions on the proper AviSynth script to adjust saturation would be greatly appreciated. -
There's no chance in hell a VHS cap and a LD cap are going to match for that MergeChroma() script. You'll get better results starting with the LD cap since it's better quality. I wouldn't use the VHS cap for anything other than color guidance.
-
WhateverSource("filename.ext")
Tweak(sat=2.0)
Mpeg2Source("filename.ext")
Tweak(sat=2.0)
Mpeg2Source("filename.ext") #add CPU=2 if you want some deblocking
TFM()
TDecimate()
Tweak(sat=2.0)
Mpeg2Source("filename.ext")
Tweak(sat=2.0)
Mpeg2Source("filename.ext") #add CPU=2 if you want some deblocking
TFM()
TDecimate()
ColorYUV(cont_u=256, cont_v=256)
Can you post short samples of the two caps?Last edited by jagabo; 10th Oct 2011 at 22:29.
-
Use colourlike filter in avisynth (link for download at http://avisynth.org/warpenterprises/)
Use the vhs cap to adjust color of the ld cap.
You need to crop black borders of both before applying the filter.
You can restore the border after colourlike has done its magic.
It was developed exactly for what you want to do. -
It appears scripts are handled slightly different within AVStoDVD. Here is what worked for saturation. I had to add the "Video" prefix to the tweak script.
Import("C:\Program Files (x86)\AVStoDVD\Lib\A2DSource.avsi")
LoadPlugin("C:\Program Files (x86)\AVStoDVD\DGIndex\DGDecode.dll")
LoadPlugin("C:\Program Files (x86)\AVStoDVD\Lib\LeakKernelDeint.dll")
LoadPlugin("C:\Program Files (x86)\AVStoDVD\Lib\MSharpen.dll")
Video = MPEG2Source("C:\Users\Mike\Videos\Test\short PAL.d2v")
# Audio is frameserved by AviSynth just for Preview and Edit purposes.
Audio = A2DAudioSource("C:\Users\Mike\Videos\Test\short PAL T80 2_0ch 256Kbps DELAY 0ms.ac3", CacheFolder="C:\Users\Mike\AppData\Local\Temp")
Video = Video.ConvertToYV12(interlaced=true)
Video = Video.AddBorders(8,0,8,0)
Video = Video.Lanczos4Resize(720,480)
Video = Video.MSharpen(8,70)
Video = Video.Tweak(sat=2.0)
AudioDub(Video, Audio)
It's late & I'll work with it some more later. But at least I can see what changing saturation looks like. -
I don't use AVS2DVD but you could probably have used:
Import("C:\Program Files (x86)\AVStoDVD\Lib\A2DSource.avsi")
LoadPlugin("C:\Program Files (x86)\AVStoDVD\DGIndex\DGDecode.dll")
LoadPlugin("C:\Program Files (x86)\AVStoDVD\Lib\LeakKernelDeint.dll")
LoadPlugin("C:\Program Files (x86)\AVStoDVD\Lib\MSharpen.dll")
Video = MPEG2Source("C:\Users\Mike\Videos\Test\short PAL.d2v")
# Audio is frameserved by AviSynth just for Preview and Edit purposes.
Audio = A2DAudioSource("C:\Users\Mike\Videos\Test\short PAL T80 2_0ch 256Kbps DELAY 0ms.ac3", CacheFolder="C:\Users\Mike\AppData\Local\Temp")
AudioDub(Video, Audio) # creates a stream called "last"
ConvertToYV12(interlaced=true) # last is assumed
AddBorders(8,0,8,0) # last assumed
Lanczos4Resize(720,480) # last assumed
MSharpen(8,70) # last assumed
Tweak(sat=2.0) # last assumed
# last is returned -
AVStoDVD was working OK with the mpeg2 from made from the PAL VHS-to-DVD copy. When I load the mpeg2 I get a message that
“MPEG2 Video stream found…”
“It is strongly recommended to index it”
I click on Yes & everything proceeds properly & my adjustments are made.
However when I load the mpeg2 from the LD source I do not get this message and the video is “processed” in seconds with nothing done to it.
I have tried this with a couple short clips & also the full videos. Same results - the PAL sourced versions always gets indexed but not the LD ones.
Any ideas why one mpeg2 would get indexed and not the other?
Both mpeg2 videos are 29.97fps. However the PAL sourced is 704x480 and LD sourced is 720x480.
I’m not locked into using AVStoDVD. I was using it because it was user friendly from my perspective. I might have to stop using it, but I’m still curious why one video gets indexed & not the other. -
DGIndex is included with AVStoDVD so I manually created the index file & used it and was then able to tweak saturation & hue within AVStoDVD. This let me see what some of the adjustments looked like.
I tried several different levels of saturation & hue but nothing really improved the video clip.
I compared frame captures of the PAL VHS sourced DVD to the LD sourced DVD and looked at histograms of each. The VHS version had a lot of peaks & valleys which looked like a normal histogram. The LD version was pretty flat from min to max, and I think this is the problem.
Does the colourlike filter only adjust/set the black & white points of the histogram? Or will it somehow also change the distribution in the vertical axis to simulate the reference video? -
-
-
One of the biggest problems you have is the laserdisc cap has blown out brights. You might be able to restore a little of those brights by adjusting the levels of the MPEG2 data before conversion to RGB.
I played around with just the chroma channels a bit and got the colors a little closer:
ColorYUV(off_u=8, off_v=-8)
ColorYUV(cont_u=100,cont_v=250)
Some fine tuning should get the colors a little closer. But I'd work at recovering some of the bright details first. -
jagabo -
Your adjustments certainly improve the colors.
I’m not sure what you mean by “before conversion to RGB”. I know just enough about video to get me in trouble and don’t intend to do any conversions, but is this happening automatically at some point during the color adjustment process?
I used a direct LaserDisc player to DVD recorder connection in order to get the video on DVD. I have a basic laser disc player with only a composite output. However most postings that I’ve read recommend using composite anyway instead of S-video because the comb filters on most laser disc players are not as good as those on newer equipment, such as DVD recorders. I’ve thought about having the LaserDisc transferred using a professional player & have called a couple local video facilities but so far none have laser disc players.
The PAL VHS to DVD transfer was supposedly done professionally & I’m currently trying to find out more about it. Do you think that using pro level equipment to do the laser disc transfer would significantly help in getter more accurate colors? -
Video is encoded in the YUV colorspace where intensities run from 16 (black) to 235 (white). Computer monitors run in RGB where black is at 0 and white at 255. So most programs stretch the contrast from YUV 16-235 to RGB 0-255 for display. But that means any parts of the YUV image that are darker than 16 or brighter than 235 get crushed -- ie, any details in those areas are lost. Since you posted a PNG image you have converted the video from YUV to RGB and hence may have lost details in the bright parts of the image. You might be able to restore those details by adjusting the brightness and contrast while the video is still in YUV (MPEG is YUV internally). If you can post a short unreencoded clip I'll tell you if anything can be done. A good way to get a clip is to use DgIndex. Use the mark-in and mark-out tools to mark a representative section then select File -> Save Project and Demux Video. Post the resulting M2V file.
Yes, that is correct. The video that's stored on the laserdisc is composite video. A decent capture device will have a better comb filter than what's in most LD players.
How does the image look if you watch it on TV? The same over bright, washed out colors? If so, there's probably not much that can be done. If the image looks better on TV, brightness and colors like the VHS rip, you can probably find a better capture method. -
jagabo -
Comparing the Laser/DVD to the VHS/DVD when viewed on the TV, the Laser/DVD's colors look faded. I'll have to get out the laser disc player & connect it to the TV and see what the direct laser-to-HDTV video looks like. It's been a while since I've done this.
In the meantime here is a M2V clip of the video from the DVD. -
I was able to recover some bright details. And I adjusted the colors a little different than last time:
Mpeg2Source("DGIndex Laser.demuxed.d2v", CPU=2)
TFM(d2v="DGIndex Laser.demuxed.d2v")
TDecimate()
ColorYUV(gain_y=-25, off_y=2) #adjust levels
ColorYUV(cont_u=175,cont_v=225) #increase saturation
ColorYUV(off_u=20, off_v=-20) #white balance, apron as reference
McTemporalDenoise(settings="high") #noise reduction
I think what this needs is to have the saturation adjusted according to the brightness. That will help add color to the washed out areas of the boys shirt. That's a fairly complicated process though. -
If the midrange is brought down into line, it won't be necessary to oversaturate or brighten. Looks to me like the LD has a midrange/levels problem and trouble with blue and green. IMHO the apron isn't pure white, the collar is. This is just another way of doing it (Levels set in YUV, the rest with VirtualDub's with grad curves and levels in RGB). You have to spend some time fiddling with the levels, color isn't so difficult once the midrange is set:
[Attachment 9132 - Click to enlarge]Last edited by sanlyn; 21st Mar 2014 at 06:32.
-
Yes, that looks a lot more like the VHS version. For levels I was shooting for the brights at IRE 100 and the darks at IRE 0. For the OP, a similar correction with AviSynth would roughly be:
ColorYUV(gain_y=-80, off_y=50, gamma_y=-100)Last edited by jagabo; 14th Oct 2011 at 10:15.
-
Nice, jagabo. One of those things you could fiddle with forever. That LD color and levels are pretty awful. 40's and 50's color was often overly warmish, and old film poorly stored would lose its brilliance. Many digital transfers were, uh, "digitally mastered" with no thought to good PQ. If the source was yellowed, grainy, or just godawful, that's the way it went to market. Pain in the neck to fix, and you never really know how the original looked.
Last edited by sanlyn; 21st Mar 2014 at 06:32.
Similar Threads
-
color correction in MeGUI
By codemaster in forum DVD RippingReplies: 1Last Post: 2nd Mar 2012, 20:56 -
General Color Correction
By elmuz in forum Newbie / General discussionsReplies: 1Last Post: 18th Jul 2011, 15:51 -
Increasing color depth and sampling for color correction
By poisondeathray in forum Newbie / General discussionsReplies: 17Last Post: 17th Oct 2009, 09:06 -
Color Correction for DV
By bsuska in forum Camcorders (DV/HDV/AVCHD/HD)Replies: 16Last Post: 23rd Oct 2008, 17:24 -
Color correction issues.
By ziggy1971 in forum Newbie / General discussionsReplies: 0Last Post: 17th Jan 2008, 22:17