VideoHelp Forum
+ Reply to Thread
Page 1 of 7
1 2 3 ... LastLast
Results 1 to 30 of 187
Thread
  1. Member
    Join Date
    Sep 2021
    Location
    United Kingdom
    Search Comp PM
    I'm looking to put my DV AVI format videos onto a TV friendly format, at present without any edits. I have attempted virtualdub2 using 264x placing "bff" in the extra command line and saving as an mp4. I've read about MeGUI but I'm unsure if it's required? Any advice would be grateful. Thanks.
    Image Attached Thumbnails Click image for larger version

Name:	dv 264x bff.JPG
Views:	37
Size:	61.6 KB
ID:	71266  

    Image Attached Files
    Quote Quote  
  2. Your mp4 file is encoded progressive, not interlaced. You need to specify "--bff" in the extra commands, not "bff".
    Quote Quote  
  3. Member
    Join Date
    Sep 2021
    Location
    United Kingdom
    Search Comp PM
    Thanks jagabo. For the audio I used FFMPegAAC I've attached the new clip. I specified "--bff" in the extra commands I got this message after the encode which made me think should I have done --bff--weightp=0 as well? Thanks.
    Image Attached Thumbnails Click image for larger version

Name:	warning vd2.JPG
Views:	12
Size:	25.9 KB
ID:	71277  

    Image Attached Files
    Quote Quote  
  4. That looks good. Don't worry about the x264 warning. It's just telling you that it will not be using weightp with your interlaced video. And yes, if you want to get rid of that warning also add --weightp=0 to the list of options.

    Now you should verify that all your players play it properly.

    Oh, one thing I noticed with your DV file is that brights are clamped at 235. DV usually contains brights all the way up to 255. You can usually adjust that to get the levels into spec and recover some of the brightest brights. Maybe the problem is in the way you provided the clip. Is that straight from the camera? Or did you process it in an editor?
    Last edited by jagabo; 27th May 2023 at 18:31.
    Quote Quote  
  5. Member
    Join Date
    Sep 2021
    Location
    United Kingdom
    Search Comp PM
    Thanks jagabo. If it looks good I will ignore the warning messages. I will try the clip on a few players today. I used WinDV to transfer the Digital8 videos from the camera. I haven't used an editor. I've posted another clip that I have encoded.
    Image Attached Files
    Quote Quote  
  6. That clip has brights all the way up to 255. The black level could be brought down too. Compare original on left, adjusted on right (both deinterlaced with QTGMC):
    Image Attached Files
    Quote Quote  
  7. Member
    Join Date
    Sep 2021
    Location
    United Kingdom
    Search Comp PM
    Thank jagabo. I can see that the one you adjusted one on the right has more natural look. Is this a common problem with dv transfer or should I have done something differently when I transferred with WinDV?
    Quote Quote  
  8. The bad levels are not unusual with DV camcorders.
    Quote Quote  
  9. Member
    Join Date
    Sep 2021
    Location
    United Kingdom
    Search Comp PM
    Thanks jagabo. How did you achieve the correct levels? Is it better to deinterlace DV video or was this done only because you needed to use plugins in Avisynth to correct the illegal levels. Sorry for all the questions.
    Quote Quote  
  10. I used AviSynth to adjust the levels: ColorYUV(gain_y=-15, off_y=-10). But you can do something similar in most editors. In this case gain_y multiples all Y values by (256-15)/256, Y' = Y * 0.9414, then subtracts 10 from each Y value, Y' = Y - 10. Or Y' = Y * 0.9414 - 10. I also deinterlaced in AviSynth with a filter called QTGMC. The full script (minus the stacking of the original and processed videos and the waveform monitors) looked like:

    Code:
    LWLibavVideoSource("DV clip 2.mp4") 
    ColorYUV(gain_y=-15, off_y=-10)
    QTGMC()
    QTGMC is one of the best deinterlacers. If you can use AviSynth I'd recommend it for deinterlacing. It's better than most players or TVs can do. Compare your interlaced encoding to this one on your TV. Watch the text in the booklet.
    Image Attached Files
    Quote Quote  
  11. Member
    Join Date
    Sep 2021
    Location
    United Kingdom
    Search Comp PM
    Thanks jagabo. I will try that. Do I need to decompress the DV AVI video before I use Avisynth? Also apart from the bad levels on DV clip2 was the encode ok? Thank you for your help.
    Quote Quote  
  12. AviSynth can import the DV AVI directly with AviSource (requires a VFW DV decoder be installed, like Cedocida), LWlibavVideoSource (a third party source filter included with the LSMASH source package), or ffVideoSource (included with the ffMPEGSource package).

    The encoded video in post #5 otherwise looked ok. It was properly encoded and flagged as interlaced (MBAFF). It didn't suffer from chroma blending (a common problem with improper video handling).

    If you're not familiar with video waveform monitors (Histogram in AviSynth) this might help:
    https://forum.videohelp.com/threads/340804-colorspace-conversation-elaboration#post2121568
    Quote Quote  
  13. Member
    Join Date
    Sep 2021
    Location
    United Kingdom
    Search Comp PM
    Thanks jagabo. I will try that tomorrow and post. I've got cedocida already installed so would the code be:

    AviSource("DV clip 2.mp4")
    ColorYUV(gain_y=-15, off_y=-10)
    QTGMC()

    I wasn't sure if I needed to convert to a different colorspace? I think I read somewhere that I don't need to Assume BFF() as that is the default? Thank you for analyzing DV clip2 for me. You taught me last year how to use waveform monitors on my analogue captures, which made a massive difference in the quality of my videos which I'm so grateful for.
    Quote Quote  
  14. By the way, If you're just starting with AviSynth I recommend you install 64 bit AviSynth+. Then use all 64 bit AvISynth filters, and a 64 bit editor/encoder.

    Originally Posted by SkyBlues2021 View Post
    Thanks jagabo. I will try that tomorrow and post. I've got cedocida already installed so would the code be:

    AviSource("DV clip 2.mp4")
    ColorYUV(gain_y=-15, off_y=-10)
    QTGMC()
    Yes, that should work. Note that QTGMC is one of the hardest filters to get set up if you're a beginner with AviSynth. It requires a half dozen other third party filters.

    http://avisynth.nl/index.php/QTGMC#Core_Plugins_and_Scripts

    You might want to tone down the sharpening that QTGMC normally does -- your source is already a little over-sharpened (typical of camcorders). Try something like QTGMC(Sharpness=0.0). The default is 1.0. There are many other settings you can try fiddling with.

    Originally Posted by SkyBlues2021 View Post
    I wasn't sure if I needed to convert to a different colorspace?
    With DV AVI AviSource should give you YV12 (YUV 4:2:0). That is good for QTGMC. If you got some other format you might have to ConvertToYV12(interlaced=true).

    Originally Posted by SkyBlues2021 View Post
    I think I read somewhere that I don't need to Assume BFF() as that is the default?
    Yes. The default is BFF. Some source filters set the field order flag for you. AviSource does not.

    One other thing you might try is removing some of the oversharpening halos with dehalo_alpha(rx=2.0, ry=2.0). Note how there is a bright halo around all the sharp text in the booklet.

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

    Code:
    AviSource("DV clip 2.mp4")
    ColorYUV(gain_y=-15, off_y=-10)
    QTGMC(Sharpness=0.0)
    dehalo_alpha(rx=2.0, ry=2.0)
    Be careful with dehalo_alpha though. It can be very damaging. Long shots of people's face may end up looking very bad -- with all the facial features blurred away. There's a variation called FileDehalo which only removes the strongest halos.

    Originally Posted by SkyBlues2021 View Post
    Thank you for analyzing DV clip2 for me. You taught me last year how to use waveform monitors on my analogue captures, which made a massive difference in the quality of my videos which I'm so grateful for.
    You're welcome.
    Image Attached Files
    Quote Quote  
  15. Member
    Join Date
    Sep 2021
    Location
    United Kingdom
    Search Comp PM
    Thanks jagabo. I've attached the new video with your code, hopefully I've done it properly. I think it looks great.
    At present I have everything installed in 32 bit, I'm guessing the 64 bit is much faster? Should I run the script throughout the whole 1 hour video? It was my Son's ABA workshop and stay's within the living room setting. I removed --bff from the extra command line in virtualdub2 before encoding as it's been deinterlaced and it's now progressive? Hopefully that was the correct thing to do. Thanks
    Image Attached Thumbnails Click image for larger version

Name:	Dv clip Avisynth code.JPG
Views:	34
Size:	157.3 KB
ID:	71311  

    Click image for larger version

Name:	dv virtualdub2 settings deinterlaced.JPG
Views:	21
Size:	64.6 KB
ID:	71312  

    Image Attached Files
    Quote Quote  
  16. That clip looks good. The settings you've used are fine. It will probably be fine for the entire video. Sometimes I'll use a lower CRF for things that are really important to me.

    64 bit AviSynth+ will run a little faster than 32 bit. But the biggest issue is running out of memory with 32 bit programs because they can only use 2 to 3 GB, regardless of how much you have installed. That can be a problem when using multiple temporal filters. Also with high definition video. With only QTGMC you will be OK. But if you added another temporal filter or two, say SMDegrain and SRestore, you might have problems. Especially if you use a lot of threads.

    For faster processing enable multithreading. Add prefech(N) to the end of your script; where N is the number of cores you have (sometimes more, sometimes less).
    Quote Quote  
  17. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Originally Posted by jagabo View Post
    I used AviSynth to adjust the levels: ColorYUV(gain_y=-15, off_y=-10). But you can do something similar in most editors. In this case gain_y multiples all Y values by (256-15)/256, Y' = Y * 0.9414, then subtracts 10 from each Y value, Y' = Y - 10. Or Y' = Y * 0.9414 - 10. I also deinterlaced in AviSynth with a filter called QTGMC. The full script (minus the stacking of the original and processed videos and the waveform monitors) looked like:

    Code:
    LWLibavVideoSource("DV clip 2.mp4") 
    ColorYUV(gain_y=-15, off_y=-10)
    QTGMC()
    I'm using this filter in ffmpeg:

    Code:
    -vf "scale=in_range=full:out_range=full,curves=master='0.06/0 0.125/0.07 0.5/0.51 0.8/0.85 1/1'
    because the linear scaling makes the image too dark (for me).
    Quote Quote  
  18. Member
    Join Date
    Sep 2021
    Location
    United Kingdom
    Search Comp PM
    Thanks jagabo. Glad I didn't mess up! What CRF would you suggest? I think it probably best that I install 64 bit Avisynth and Virtualdub2 for when I start to encode. Can you use Prefech on all scripts DV and analogue captures? I think I have 2 cores, I've looked it up apparently you divide by two?

    Would my script then be:-

    AviSource("DV clip 2.mp4")
    ColorYUV(gain_y=-15, off_y=-10)
    QTGMC(Sharpness=0.0)
    dehalo_alpha(rx=2.0, ry=2.0)
    Prefech(2)
    Image Attached Images  
    Quote Quote  
  19. For general stuff I'm going to watch I'll use CRF 18. For really critical stuff I'll go as low as CRF 12. Of course, the lower the CRF the bigger the files will be. I find the Slow preset to be a good compromise of encoding speed, quality, and playback compatibility.

    Yes, that is where the prefetch should go, at the end of the script. Try up to 4 or so since you have a 2 core 4 thread CPU.
    Quote Quote  
  20. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Originally Posted by jagabo View Post
    For general stuff I'm going to watch I'll use CRF 18. For really critical stuff I'll go as low as CRF 12. Of course, the lower the CRF the bigger the files will be. I find the Slow preset to be a good compromise of encoding speed, quality, and playback compatibility.

    Yes, that is where the prefetch should go, at the end of the script. Try up to 4 or so since you have a 2 core 4 thread CPU.
    I tried using QTGMC multithreaded but the output file looks like the attached.

    SetFilterMTMode ("QTGMC",2)
    ffms2("V (JVC video).m2ts",atrack=-1)
    QTGMC(preset="slow",TR2=3)
    DeBlock()
    ASharp(D=2,B=1,hqbf=true)
    Prefetch(4)


    ffms2?
    Image Attached Files
    Quote Quote  
  21. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    I can confirm.
    Changing to MPEG2Source solves the problem.
    ffms2 works badly with multitheaded QTGMC, but without MT it's ok.
    Quote Quote  
  22. Member
    Join Date
    Sep 2021
    Location
    United Kingdom
    Search Comp PM
    Thanks jagabo & rgr. I've finally been able to get Prefetch to work I was using an earlier version of Avisynth but I thought I was using Avisynth+ hence why I couldn't get it to work! I set the CRF 12 and PreFetch(4) hopefully this still looks ok? Thanks.
    Image Attached Thumbnails Click image for larger version

Name:	DV Avisynth prefetch.JPG
Views:	16
Size:	159.8 KB
ID:	71331  

    Click image for larger version

Name:	DV prefetch VD settings.JPG
Views:	13
Size:	60.6 KB
ID:	71332  

    Image Attached Files
    Quote Quote  
  23. That looks fine. If you have some dark shots try comparing crf 12 to crf 18. You may see less posterization in the dark areas.

    Also try comparing different prefetch values to see which encodes fastest. That can be hard to predict as you have a mix of filtering and encoding and hyperthreading.
    Quote Quote  
  24. Member
    Join Date
    Sep 2021
    Location
    United Kingdom
    Search Comp PM
    Thanks jagabo. I do need to experiment more I'm a very regimented person in general and over frightened of making a mistake. Thank you for your help.
    Quote Quote  
  25. Member
    Join Date
    Sep 2021
    Location
    United Kingdom
    Search Comp PM
    I've just got 64 bit Avisynth+ and virtualdub2 up and running. I was hoping it was the same quality as my 32 bit version and I haven't messed anything up. Any advice would be appreciated. Thanks.
    Image Attached Files
    Quote Quote  
  26. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Works
    Image Attached Files
    Quote Quote  
  27. Originally Posted by SkyBlues2021 View Post
    I've just got 64 bit Avisynth+ and virtualdub2 up and running. I was hoping it was the same quality as my 32 bit version and I haven't messed anything up. Any advice would be appreciated. Thanks.
    Full range (top picture) is ok as long as you stay in YUV color space. I would however adjust the luma to be within the range 16 ....235 (bottom picture), or you may loose dark and bright details when the player (TV) converts YUY to RGB for the display.

    Try
    Code:
    colorYUV(levels="PC->TV")
    or
    Code:
    SmoothLevels(input_low=0,gamma=1.0,input_high=255,output_low=16,output_high=235)
    or adjust the proc-amp settings for capturing.

    Also, the brights are clipped. But this is probably due to an overexposure of the camera. One can't recover the details in the clipped brights.
    Image Attached Thumbnails Click image for larger version

Name:	Histograms000263.png
Views:	9
Size:	571.0 KB
ID:	71398  

    Click image for larger version

Name:	Histograms000277.png
Views:	8
Size:	595.3 KB
ID:	71399  

    Last edited by Sharc; 31st May 2023 at 17:27.
    Quote Quote  
  28. Originally Posted by SkyBlues2021 View Post
    I've just got 64 bit Avisynth+ and virtualdub2 up and running. I was hoping it was the same quality as my 32 bit version and I haven't messed anything up. Any advice would be appreciated. Thanks.
    Looks like everything is working fine.
    Quote Quote  
  29. Originally Posted by rgr View Post
    Works (full range encoding)
    I highly recommend staying away from full range YUV. All commercial consumer formats (DVD, BD), paid and free streaming services, etc. are limited range. Not all players respond to the range flags, especially outside of a computer. Using full range is just asking for playback problems.
    Quote Quote  
  30. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Originally Posted by jagabo View Post
    Originally Posted by rgr View Post
    Works (full range encoding)
    I highly recommend staying away from full range YUV. All commercial consumer formats (DVD, BD), paid and free streaming services, etc. are limited range. Not all players respond to the range flags, especially outside of a computer. Using full range is just asking for playback problems.
    I tested my TVs and players and none of them had any problems with full range video playback. The biggest problem I had with the PC
    Quote Quote  



Similar Threads

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