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.
+ Reply to Thread
Results 1 to 30 of 187
-
-
Your mp4 file is encoded progressive, not interlaced. You need to specify "--bff" in the extra commands, not "bff".
-
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.
-
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.
-
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):
-
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()
-
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 -
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. -
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.
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.
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).
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)
You're welcome. -
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 -
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). -
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) -
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 can confirm.
Changing to MPEG2Source solves the problem.
ffms2 works badly with multitheaded QTGMC, but without MT it's ok. -
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. -
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.
-
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")
Code:SmoothLevels(input_low=0,gamma=1.0,input_high=255,output_low=16,output_high=235)
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.Last edited by Sharc; 31st May 2023 at 17:27.
-
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.
-
Similar Threads
-
Avi video conversion with format factory 3.5
By lestat870504 in forum Video ConversionReplies: 0Last Post: 2nd Feb 2023, 12:49 -
Which glasses for viewing SBS format 3D ?
By Seeker47 in forum VR Player and HardwareReplies: 7Last Post: 26th Jun 2022, 16:28 -
Convert .AVI Lagarith to friendly format
By Ferggue in forum MacReplies: 6Last Post: 10th Aug 2021, 17:00 -
convert a AVI (RFBW codec) to another format
By cpliu in forum Video ConversionReplies: 1Last Post: 12th Apr 2021, 14:50 -
any video format to AVi Container with DV Video format
By raadeon in forum Video ConversionReplies: 5Last Post: 29th Mar 2020, 08:23