VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 34
Thread
  1. Member
    Join Date: May 2014
    Location: USA
    Search Comp PM
    Hello Folks!

    I am new to this forum, and I have been passionate about video and audio technology since I was a young kid.

    There is a huge collection of VHS and S-VHS family camera recordings in my archive shelves, dating as far back as 12 - 25 years. I have been converting these analog videos into the digital form (both DV-AVI and then DVD for convenient watching on TV) using some of the finest equipment: A professional video player JVC BR-S522E in combination with Canopus ADVC 100 for A/D conversion, using the Y/C output from the JVC deck. I use VirtualDub and "Neat Video" for video filtering and processing.

    Besides, I also have a consumer JVC recorder HR-S7960 (S-VHS). I can report from my experience that while the consumer deck performs very well in reducing video noise, it softens the image to a noticeable degree and takes away fine details. The professional JVC deck, on the other hand, has a higher noise level, but it delivers a very crisp and detailed picture. I prefer having a crisp image with more noise (which can be dealt with digitally post-capture in a much more effective manner) than the other way around, since lost details cannot be recovered at any consecutive stage. Since the sound is recorded on the mono track, it is important that the already limited heights are not clipped more than necessary. This is where the pro has an advantage, whereas the amateur VCR cuts treble and produces some sort of hiss from times to times that varies with picture brightness. One aspect where the professional player scores big is its very effective dropout compensator, which is superior to any consumer recorder I have ever used. Some tapes show a frequent amount of dropouts on the consumer JVC deck (that is ironically more visible with DNR/TBC enabled), while the BR-S suppresses them very effectively. It is really a great advantage to have dropouts reduced to the absolute minimum at the very beginning of the editing chain, since it can be very time consuming to get rid of them in the digital realm. The final advantage of the pro VCR is that it does not produce the distortion line at the bottom of the video that is outside the scanline area and therefore not visible on TVs, but definitely visible on a computer screen.

    So overall, I am happy with the sound and picture quality of the JVC professional player and the A/D conversion of the Canopus box. However, in some instances, when colors become very intense, there is a color flickering visible on the upper part of the screen. I have attached a sample file - it is a very short clip from one of my S-VHS recordings in the original DV-AVI (PAL) format (it has not been further compressed or filtered, so I have made the video very short and removed audio to save megabytes). As you can see, the flowers look nice, but their intense pink and green produces a flicker at the upper part (you could also call it "color pulsing"). Basically, it looks like the color intensity fluctuate from frame to frame. Let me tell you that the flicker does not persist throughout the whole video, maybe in just 10% of all scenes on the video tape. It has been a while since I captured that video, and I remember that when I connected the JVC deck to my CRT TV directly, the flickering wasn't nearly as intense. So I lay my blame partly on the Canopus box, since it has a tendency to amplify the color flicker when colors become very intense (and again, it is only the upper part that flickers - the lower part stays calm). I don't know if it is related to the DV format and its limited color sampling or to this specific converter, but the problem is there.

    I have tried to eliminate the flicker using some internal and external filters with mixed results. To eliminate the color flicker completely, I had to deploy the temporal smoother and move the slider far to the right, which produces some unlovely blurs and smears during scene pans. Reducing the strength of the temporal smoother soothes blurs, but keeps the colors flickering (not as badly, but still visible).

    So I wanted to ask you if anyone knows of some sort of a "smart" filter that reduces color noise only within a defined area that is dominated by a specific color (like pink and green in my sample video), or if there are other ways. Again, if I apply some "deflicker" filters or temporal smoothers, anytime the flickering is eliminated, the rest suffers from blurs or other artifacts. As I said, only a minority number of scenes are plagued with the flicker, but I would still like to get rid of it, even if it means to spend time editing and filtering. If that's not possible, maybe I need an analog video processor between the VCR and ADVC 100 to reduce the color intensity and/or reduce noise a little.

    Thanks for reading and sorry for my long post - I tried to be as informative as possible.
    I would appreciate any help! In exchange, I would be willing to give out my tips to other forum members.
    Attached Files
    Quote Quote  
  2. Member 2Bdecided's Avatar
    Join Date: Nov 2007
    Location: United Kingdom
    Search Comp PM
    You mean something like this...
    Code:
    avisource("Output.avi")
    bob()
    y=last
    v=vtoy()
    u=utoy()
    v=v.temporalsoften(4,255,255)
    u=u.temporalsoften(4,255,255)
    ytouv(u,v,y)
    but replacing temporalsoften with a slightly less stupid denoiser?

    You can always make sure the luma isn't changed, by using something like...
    Code:
    avisource
    original=last
    (filtering)
    processed=last
    original.mergechroma(processed)
    Sorry I've not actually answered your question!

    Cheers,
    David.
    Quote Quote  
  3. The even frames are more saturated than the odd frames. This is obvious when you view Y, U and V separately.

    Even:
    Click image for larger version

Name:	even.jpg
Views:	17
Size:	98.8 KB
ID:	25314

    Odd:
    Click image for larger version

Name:	odd.jpg
Views:	14
Size:	95.7 KB
ID:	25315

    Beyond that, the chroma at the top and bottom of the frames flickers more than in the middle of the frame.

    Try something like this:

    Code:
    AviSource("Output.avi")
    ConvertToYV12(interlaced=true) # MCTD requires YV12
    
    # chroma different on even/odd frames
    evn=SelectEven().ColorYUV(cont_u=-30, cont_v=-30)
    odd=SelectOdd()
    Interleave(evn,odd)
    
    luma=last # remember the luma here
    
    # still some chroma flicker at top and bottom so use a strong denoiser on the chroma
    Bob()
    McTemporalDenoise(settings="high") # or some other strong temporal filter
    SeparateFields()
    SelectEvery(4,0,3)
    Weave()
    
    # merge the original luma with the filtered chroma
    MergeChroma(luma, last)
    Deinterlaced (QTMGC) sample attached.
    Attached Files
    Last edited by jagabo; 22nd May 2014 at 10:13.
    Quote Quote  
  4. Member
    Join Date: May 2014
    Location: USA
    Search Comp PM
    Thank you for your replies!

    Since I don't have any experience with avisynth, I need to get my hands on it and learn how to use it.

    By the way, jagabo, the output file that you attached - is it only viewable using avisynth? If I open it with Windows Media Player, it shows a message that the file cannot be played.
    Quote Quote  
  5. You need an MKV reader/splitter to tell Windows that MKV files are video files -- try LAV Filters or Haali. You probably already have an h.264 decoder to decode the video.

    Or just use a player that knows how to play MKV files. MPCHC or VLC, for example.
    Quote Quote  
  6. Member
    Join Date: May 2014
    Location: USA
    Search Comp PM
    I was able to open the MKV file using VLC, and I must say that I am very impressed by the results!
    Wow, you did a great job. Thank you! Now if I was more knowledgeable with using avisynth... Well, I guess it's time to start learning something new.

    Then I will look out for scenes with intense flicker and filter them.

    Again, thank you very much for your help. You can keep the (now flicker free) flowers from the video
    Quote Quote  
  7. The basics of AviSynth aren't too difficult to learn. Basically, after installing it, you just use a text editor (like Notepad) to make a script, then open that script with an editor or player that supports them (VirtualDub,HcGUI, x264 cli, MPCHC, WMP).

    http://avisynth.nl/index.php/Main_Page#New_to_AviSynth_-_start_here

    Advanced filters are harder to use because they often have many variables to adjust. Getting McTemporalDenoise() set up is a pain because it requires several third party filters. Try the all-in-one installer here:

    http://avisynth.nl/index.php/MCTemporalDenoise

    MCTD is also very slow. You might consider some other temporal noise filter like TemporalSoften() -- like 2bdecided suggested. But I would still use the first part of my script (to get the chroma channels close to matching) before the TemporalSoften(). Otherwise you will need a huge TemporalSoften() to get rid of the flicker.

    You will have further difficulties because you are working with interlaced video. I just realized that MCTD has an interlaced mode so you could reduce my earlier script to:

    Code:
    AviSource("Output.avi")
    ConvertToYV12(interlaced=true) # MCTD requires YV12
    
    # chroma different on even/odd frames
    evn=SelectEven().ColorYUV(cont_u=-30, cont_v=-30)
    odd=SelectOdd()
    Interleave(evn,odd)
    
    luma=last # remember the luma here
    
    # still some chroma flicker at top and bottom so use a strong denoiser on the chroma
    McTemporalDenoise(settings="high", interlaced=true) # or some other strong temporal filter
    
    # merge the original luma with the filtered chroma
    MergeChroma(luma, last)
    If you are running 64 bit Windows be sure that you use all 32 bit components or all 64 bit components. You should probably stick with 32 bit because many filters aren't available in 64 bit versions. So use 32 bit AviSynth, 32 bit filters, and a 32 bit editor.
    Quote Quote  
  8. Member 2Bdecided's Avatar
    Join Date: Nov 2007
    Location: United Kingdom
    Search Comp PM
    Originally Posted by jagabo View Post
    You might consider some other temporal noise filter like TemporalSoften() -- like 2bdecided suggested.
    No, don't do that - I was just blurring four fields together without motion compensation to check that it got rid of the flicker. You shouldn't actually do that because you'll get horrible colour trails and outlines when anything moves.

    Apart from the chroma flicker, and the slight wobbling (is there a suitable TBC anywhere in this chain?), the quality of this capture is very impressive. Maybe it's because the original footage is decent and the levels are OK.

    btw, I think I'm seeing some kind of subtle horizontal bars (maybe 2 or 4 lines high) on parts of the footage. No idea what they are and it's too short a clip to really be sure.

    Cheers,
    David.
    Quote Quote  
  9. Originally Posted by 2Bdecided View Post
    Originally Posted by jagabo View Post
    You might consider some other temporal noise filter like TemporalSoften() -- like 2bdecided suggested.
    No, don't do that - I was just blurring four fields together without motion compensation to check that it got rid of the flicker. You shouldn't actually do that because you'll get horrible colour trails and outlines when anything moves.
    Yes, I forgot to mention that he would have to be less aggressive with a smaller radius and much lower thresholds. There are lots of other (faster than MCTD) temporal smoothers he could try.

    Originally Posted by 2Bdecided View Post
    btw, I think I'm seeing some kind of subtle horizontal bars (maybe 2 or 4 lines high) on parts of the footage. No idea what they are and it's too short a clip to really be sure.
    Yes, I see them too. It might be leftovers of hanover bars. Or maybe one or more heads on the SVHS deck are worn/dirty.
    Quote Quote  
  10. Member
    Join Date: May 2014
    Location: USA
    Search Comp PM
    So I have experimented around with avisynth yesterday and made some progress with understanding how it works and how each code line affects the image. Yes, it's indeed not hard to use, but the amount of different codes and options can be overwhelming. However, I have also realized that it can perform a lot of functions that VirtualDub and other video editing software suites can't, such as altering saturation and levels on even or odd frames only (which applied in my case).

    You both have mentioned different temporal filters that I could use. I think asking for the optimal one will probably yield the response that I should try out different ones and see for myself - so I am just going to ask you which one or two filters do you have good experience with aside from the McTF. As I mentioned, I am happy to learn that the flickering can be tackled.

    By the way, I have installed the all-in-one package of the McTemporal Filter, and when I open the script file with VirtualDub, it complains that some parts that come along with the temporal filter are formatted in UTF-8 instead of ANSI - did you also encounter this problem?

    As far as the subtle horizontal bars, I have watched the short clip and I am not quite seeing what you are talking about. There is one or two frames where you see a (compensated) drop-out. Are you talking about that? (I have attached the image)
    Attached Thumbnails Click image for larger version

Name:	Dropout.bmp
Views:	23
Size:	1.20 MB
ID:	25336  

    Quote Quote  
  11. There are alternating horizontal lines of the wrong color. They actually seem to be in the luma judging by jagabo's YUV images.

    Name:  palflower.png
Views: 200
Size:  800.2 KB

    Originally Posted by 2Bdecided View Post
    Apart from the chroma flicker, and the slight wobbling (is there a suitable TBC anywhere in this chain?), the quality of this capture is very impressive.
    He did say it was S-VHS. The deck should have a TBC but it was probably removed if purchased second-hand.
    Last edited by vaporeon800; 23rd May 2014 at 16:32.
    Quote Quote  
  12. Some of the other temporal smoother can be found here:
    http://avisynth.nl/index.php/External_filters#Temporal_Denoisers

    temporal/spacial filters:
    http://avisynth.nl/index.php/External_filters#Spatio-Temporal_Denoisers

    The benefit of McTemporalDenoise() is that it is motion compensated. If an object moves from one location to another in the frame then the smoothing uses those different locations. It doesn't just average pixels from the same location in each frame. But the motion analysis takes time.

    I haven't see the UTF-8/ANSI problem that you're having. Is that preventing the filter from working?

    The horizontal lines that were spoken of can be seen in the green parts of you sample image. A 4x enlargement from near the top left corner:

    Name:  stripes.jpg
Views: 195
Size:  9.3 KB
    Quote Quote  
  13. Member
    Join Date: May 2014
    Location: USA
    Search Comp PM
    I have never paid attention to the horizontal lines you pointed out, and to be honest and they don't bother me. They look like scanlines to me.

    My JVC BR-S deck does have a TBC unit. It came without it at the time of purchase six years ago (a used one), but I added the TBC cards later from buying a BR-S622E recorder that had a malfunctioning drive mechanism. So I removed the TBC cards from that recorder and plugged them into my player.

    I found that the TBC actually extended the color flicker to a slightly wider area, which is why I activated it only if vertical lines had visible wobbling and distortions. Cheap VHS tapes tend to show these distortions, while most of my S-VHS recordings have a stable image even without TBC. At the time when I couldn't get rid of the color flickering, I preferred less flickering over the final inch of stability, but now I will consider filtering the TBC'ed versions of the videos. By the way, I have both versions available for the footage that contains the sample video. The camcorder was a Panasonic MS1 which used full-format (S)VHS tapes.

    If the McTemporal filter is motion compensated, it sounds to me like it's one of the best out there. Its slow speed shouldn't be a big problem, since the scenes to filter are rather short. I will check the ANSI problem once more and report back.
    Quote Quote  
  14. Member
    Join Date: May 2014
    Location: USA
    Search Comp PM
    @vaporeon 800:

    Your avatar looks like the tracking knob of one of these JVC BR-S recorders...
    Quote Quote  
  15. Indeed, it's the BR-S525U.
    Quote Quote  
  16. Member
    Join Date: May 2014
    Location: USA
    Search Comp PM
    I had no idea what "Hanover bars" were until I checked this Wikipedia article - and yes, I can confirm that I see them on most other videos, too. Maybe they appear because the camcorder from 1988 did not apply the correction mentioned in the article? Anyway, Neat Video seems to soften them, since it interprets the Hanover bars as high-frequency noise.

    I have attached a picture showing the Hanover bars more visibly:
    Attached Thumbnails Click image for larger version

Name:	Hanover Lines.bmp
Views:	15
Size:	1.23 MB
ID:	25360  

    Quote Quote  
  17. Video Restorer lordsmurf's Avatar
    Join Date: Jun 2003
    Location: dFAQ.us/lordsmurf
    Search Comp PM
    The HR-S7960 is NOT a consumer deck. Normal VCS equipment is for consumers.

    The is a S-VHS deck, and is "prosumer". It's not "professional" simple because it has a tuner. But to most users, it is indeed a professional deck, both in abilities and in cost. (JVC has some stupid definitions.)
    Last edited by lordsmurf; 28th May 2014 at 10:15.
    Quote Quote  
  18. Originally Posted by XperienceD View Post
    I had no idea what "Hanover bars" were until I checked this Wikipedia article - and yes, I can confirm that I see them on most other videos, too. Maybe they appear because the camcorder from 1988 did not apply the correction mentioned in the article? Anyway, Neat Video seems to soften them, since it interprets the Hanover bars as high-frequency noise.
    You can get rid of hanover bars with a vertical blur:

    Code:
    luma=last # remember luma
    SeparateFields()
    Blur(0, 1.0) # blur pairs of scan lines together
    Sharpen(0, 0.7) # re-sharpen edges
    Weave()
    MergeChroma(luma,last) # merge new chroma with original luma
    But there may be something more going on here. Hanover bars only occur in colored areas. Grey areas will not have them. If you GreyScale() them they will go away. That dosn't work here.
    Last edited by jagabo; 26th May 2014 at 17:45.
    Quote Quote  
  19. Member 2Bdecided's Avatar
    Join Date: Nov 2007
    Location: United Kingdom
    Search Comp PM
    Yes, they're affecting luma - you'd need to mess something up badly to make Hanover bars affect luma, and your capture chain is extremely unlikely to do that. Probably something else, or it's baked into the source.

    I agree they're minor, and the chroma flicker is 1000x more annoying, but some modern displays exacerbate minor problems so it's worth fixing if it can be done easily and without making anything else worse.

    Cheers,
    David.
    Quote Quote  
  20. Member
    Join Date: May 2014
    Location: USA
    Search Comp PM
    Thanks for your suggestion! Yes, I see no reason now why the Hanover bars should be left untreated if they can be removed quite easily.

    I applied jagabo's code, but the reduction of Hanover bars was only very little to my eyes. I tried to apply VirtualDub's internal smoother filter, and I found that the combination of Neat Video and the VirtualDub smoother, set at the smallest radius, has actually eliminated the Hanover bars completely while it didn't affect the sharpness of the image at all. I will post a screenshot later.
    Quote Quote  
  21. Yes, you can eliminate it with a temporal smoother but that's not a good solution. Do you have any motionless sequences to use for testing?
    Quote Quote  
  22. Member
    Join Date: May 2014
    Location: USA
    Search Comp PM
    I was referring to VirtualDub's spatial smoother and not temporal. A temporal filter wouldn't help much here, since the Hanover lines are static. I also use the Virtual Dub temporal filter, but that's primarily to get rid of some low-intensity flicker (on both luma and chroma level).

    Here is a comparison between the untreated original image and the filtered one (I used Neat Video in the process):
    Attached Thumbnails Click image for larger version

Name:	Original.bmp
Views:	11
Size:	1.22 MB
ID:	25413  

    Click image for larger version

Name:	Filtered.bmp
Views:	7
Size:	1.22 MB
ID:	25414  

    Quote Quote  
  23. The spacial filter you're using is removing some of the smaller details too. I think the problem is related to your color flicker issue. One or two if the VCR heads are giving different brightness and color. It might be possible to alleviate the problem with some AviSynth filtering -- just by adjusting the brightness/contrast of the scan lines from the different heads. That would be preferable to using a spacial noise filter.
    Quote Quote  
  24. Member 2Bdecided's Avatar
    Join Date: Nov 2007
    Location: United Kingdom
    Search Comp PM
    Beware of making the video look like plastic. VHS needs a little noise to look acceptable IMO. S-VHS needs it almost as much.

    Cheers,
    David.
    Quote Quote  
  25. Video Restorer lordsmurf's Avatar
    Join Date: Jun 2003
    Location: dFAQ.us/lordsmurf
    Search Comp PM
    Originally Posted by 2Bdecided View Post
    Beware of making the video look like plastic. VHS needs a little noise to look acceptable IMO. S-VHS needs it almost as much.

    Cheers,
    David.
    Agreed.

    Too many amateurs/novices over-process videos.
    Quote Quote  
  26. Here's a sample script that reduced the horizontal lines in the "original.bmp" image in post 22.


    Code:
    ImageSource("original.bmp") 
    Crop(0,0,-0,-1) # odd frame size to even
    ConvertToYUY2()
    
    SeparateFields()
    AssumeFrameBased()
    SeparateFields()
    
    l0=SelectEvery(4,0).ColorYUV(gain_y=2)
    l1=SelectEvery(4,1).ColorYUV(gain_y=-1)
    l2=SelectEvery(4,2)
    l3=SelectEvery(4,3)
    Interleave(l0,l1,l2,l3)
    
    Weave()
    AssumeFieldBased()
    Weave()
    Name:  reduced.png
Views: 123
Size:  877.0 KB
    Quote Quote  
  27. Member
    Join Date: May 2014
    Location: USA
    Search Comp PM
    Yes, Neat Video has a tendency to take noise reduction too literally, which is why I set the slider for the luma noise reduction and the high-frequency noise suppression to no more than 45%, even for noisy videos. It is particularly the high-frequency noise that gives videos a more natural look, so I try to preserve it.

    Thanks jagabo for your efforts to get rid of Hanover lines using avisynth. Whenever I see a new code like yours, it makes me feel like an amateur who has so many more codes to learn about avisynth... I am actually quite happy with the spatial filter in VirtualDub. At the smallest settings, the softening is almost unnoticeable.
    Quote Quote  
  28. Member
    Join Date: May 2014
    Location: USA
    Search Comp PM
    Just to let you know that I have tried the motion compensated temporal filter, but it is extremely slow when set to at least "medium". By extremely slow I mean half the speed of Neat Video, which is already considered a resource hog. I get a frame rate of 2.73fps on my system at medium settings just from MCTF without any additional filters in chain. With all due respect for the quality of a motion-compensated temporal filter, it actually helps a great deal to get rid of the color flicker when chroma levels between odd and even frames are equalized using some of the code above, even when no MCTF is applied. An internal temporal smoother can do the rest. This works much faster.
    Quote Quote  
  29. Member PuzZLeR's Avatar
    Join Date: Oct 2006
    Location: Toronto Canada
    Search Comp PM
    Originally Posted by XperienceD View Post
    Just to let you know that I have tried the motion compensated temporal filter, but it is extremely slow when set to at least "medium". By extremely slow I mean half the speed of Neat Video, which is already considered a resource hog. I get a frame rate of 2.73fps on my system at medium settings just from MCTF without any additional filters in chain. With all due respect for the quality of a motion-compensated temporal filter, it actually helps a great deal to get rid of the color flicker when chroma levels between odd and even frames are equalized using some of the code above, even when no MCTF is applied. An internal temporal smoother can do the rest. This works much faster.
    Yes, Neat Video's temporal filter does wonders, and has done wonders for what I call "chroma dancing" in some of my other posts, a problem similar to yours.

    I wanted to attempt it on your clip, but there was no "flat" section big enough in your (first) clip, so couldn't work with it. As you know, Neat Video is quite useless without this profile that matches the video. This is especially more true when using the temporal filter. I was going to edit in my own, but the results were not going to be good unless I have a profile from your output that is more accurate.

    Yes, the temporal filter is slow, and you have to be careful with it, but it produces better results. And it produces better results at lower settings than stronger settings with it being disabled. (As for the slower speed, I batch them up on an i7 for an overnight - no big deal.)

    Do you have another clip, with the color flicker, and a scene that has a large enough flat background?
    I hate VHS. I always did.
    Quote Quote  
  30. Member
    Join Date: May 2014
    Location: USA
    Search Comp PM
    Try out the following clip. I hope that the sky represents a big enough flat section for the filter to create a noise profile.
    Attached Files
    Quote Quote