VideoHelp Forum




+ Reply to Thread
Page 1 of 3
1 2 3 LastLast
Results 1 to 30 of 75
  1. Member
    Join Date
    Jan 2006
    Location
    United States
    Search Comp PM
    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?
    Quote Quote  
  2. 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 result
    Last edited by themaster1; 5th Oct 2011 at 03:56.
    *** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
    Quote Quote  
  3. 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.
    Quote Quote  
  4. Originally Posted by manono View Post
    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.
    Only if you're using multi-pass encoding, of course.
    Quote Quote  
  5. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by Mike99 View Post
    I've read a lot of the postings here & so far everything regarding color adjustments seems to be done using AviSynth.
    Everything?
    Last edited by sanlyn; 21st Mar 2014 at 06:31.
    Quote Quote  
  6. Member edDV's Avatar
    Join Date
    Mar 2004
    Location
    Northern California, USA
    Search Comp PM
    Originally Posted by sanlyn View Post
    Originally Posted by Mike99 View Post
    I've read a lot of the postings here & so far everything regarding color adjustments seems to be done using AviSynth.
    Everything?
    Also Premiere, Vegas, Final Cut, Video Studio, etc. (dozens of MPeg2 editors).
    Recommends: Kiva.org - Loans that change lives.
    http://www.kiva.org/about
    Quote Quote  
  7. Member
    Join Date
    Jan 2006
    Location
    United States
    Search Comp PM
    Originally Posted by sanlyn View Post
    Originally Posted by Mike99 View Post
    I've read a lot of the postings here & so far everything regarding color adjustments seems to be done using AviSynth.
    Everything?
    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.
    Quote Quote  
  8. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    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.
    Quote Quote  
  9. Member
    Join Date
    Jan 2006
    Location
    United States
    Search Comp PM
    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?
    Quote Quote  
  10. 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)
    Quote Quote  
  11. Member
    Join Date
    Jan 2006
    Location
    United States
    Search Comp PM
    Originally Posted by manono View Post
    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.
    Quote Quote  
  12. 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.
    Quote Quote  
  13. Member
    Join Date
    Jan 2006
    Location
    United States
    Search Comp PM
    Originally Posted by jagabo View Post
    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.
    I'd like to increase the LD saturation & have tried every variation of the AviSynth "tweak" syntax, but I keep getting a script error message. Any guidance would be appreciated.
    Quote Quote  
  14. WhateverSource("filename.ext")
    Tweak(sat=2.0)
    Obviously change the saturation value to suit your video. I would use DgIndex to build an index file and then:

    Mpeg2Source("filename.ext")
    Tweak(sat=2.0)
    If it's an NTSC laserdisc cap you can probably IVTC too:

    Mpeg2Source("filename.ext") #add CPU=2 if you want some deblocking
    TFM()
    TDecimate()
    Tweak(sat=2.0)
    Insteadof Tweak() you can also use ColorYUV():

    Mpeg2Source("filename.ext")
    Tweak(sat=2.0)
    If it's an NTSC laserdisc cap you can probably IVTC too:

    Mpeg2Source("filename.ext") #add CPU=2 if you want some deblocking
    TFM()
    TDecimate()
    ColorYUV(cont_u=256, cont_v=256)
    That's about the same as sat=2.0.

    Can you post short samples of the two caps?
    Last edited by jagabo; 10th Oct 2011 at 22:29.
    Quote Quote  
  15. Member
    Join Date
    Jan 2003
    Location
    India
    Search Comp PM
    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.
    Quote Quote  
  16. Member
    Join Date
    Jan 2006
    Location
    United States
    Search Comp PM
    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.
    Quote Quote  
  17. 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
    Quote Quote  
  18. Member
    Join Date
    Jan 2006
    Location
    United States
    Search Comp PM
    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.
    Quote Quote  
  19. Member
    Join Date
    Jan 2006
    Location
    United States
    Search Comp PM
    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?
    Quote Quote  
  20. Originally Posted by Mike99 View Post
    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.
    Are you looking at historgrams or waveforms? And are you looking at RGB or YUV? It would be much easier to help you if you posted some short video clips. Or at least some screen shots.
    Quote Quote  
  21. Member
    Join Date
    Jan 2006
    Location
    United States
    Search Comp PM
    Originally Posted by jagabo View Post
    Originally Posted by Mike99 View Post
    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.
    Are you looking at historgrams or waveforms? And are you looking at RGB or YUV? It would be much easier to help you if you posted some short video clips. Or at least some screen shots.
    I was looking at histograms of frame captures which are RGB.
    The first one is from the LD sourced DVD.
    The second one is from the VHS sourced DVD.
    I'll have to make some shorter video clips in order to post them.
    Image Attached Thumbnails Click image for larger version

Name:	vlcsnap-2011-10-06-Laser.png
Views:	478
Size:	884.4 KB
ID:	9112  

    Click image for larger version

Name:	vlcsnap-2011-10-06-PALVHS.png
Views:	451
Size:	729.8 KB
ID:	9113  

    Quote Quote  
  22. 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)
    Click image for larger version

Name:	adj2.jpg
Views:	1353
Size:	53.5 KB
ID:	9116

    Some fine tuning should get the colors a little closer. But I'd work at recovering some of the bright details first.
    Quote Quote  
  23. Member
    Join Date
    Jan 2006
    Location
    United States
    Search Comp PM
    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?
    Quote Quote  
  24. Originally Posted by Mike99 View Post
    I’m not sure what you mean by “before conversion to RGB”.
    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.

    Originally Posted by Mike99 View Post
    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
    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.

    Originally Posted by Mike99 View Post
    I used a direct LaserDisc player to DVD recorder connection in order to get the video on DVD.... Do you think that using pro level equipment to do the laser disc transfer would significantly help in getter more accurate colors?
    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.
    Quote Quote  
  25. Member
    Join Date
    Jan 2006
    Location
    United States
    Search Comp PM
    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.
    Image Attached Files
    Quote Quote  
  26. 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
    Click image for larger version

Name:	new.jpg
Views:	2421
Size:	45.6 KB
ID:	9130

    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.
    Quote Quote  
  27. Wow excellent work, jagabo!
    Quote Quote  
  28. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    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:

    Image
    [Attachment 9132 - Click to enlarge]
    Last edited by sanlyn; 21st Mar 2014 at 06:32.
    Quote Quote  
  29. 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)
    Click image for larger version

Name:	gamma.jpg
Views:	1364
Size:	36.4 KB
ID:	9137
    Last edited by jagabo; 14th Oct 2011 at 10:15.
    Quote Quote  
  30. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    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.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!