Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th July 2015, 22:00   #1  |  Link
the_tourist
Registered User
 
Join Date: Jul 2015
Location: Quebec (Canada)
Posts: 10
"YUV 4:2:0 Planar" or "Y'CbCr 8-bit 4:2:2 (yuv2)" in QTGMC ?

Hi,

I hope to post this request for help in the right place, but I'm not sure.

I am a very beginner in the use of Avisynth and I'm afraid that all this is beyond me at the moment ...

My goal is de-interlace QTGMC by the rendering of an edit I made from sequences in DV.

Following the indications of Rob Martens site http://www.gyroshot.com/upscale1.htm (SD to HD with Avisynth) I managed to install a functional QTGMC under WindowsXP.

I edit with cinelerra-cv 2.2 (linux), this software does not allow to realize rendered consistent with YV12 or YUY2 color space. His two formats that are closer to it, are "YUV 4: 2: 0 Planar" or "Y'CbCr 8-bit 4: 2: 2 (yuv2)" but the two did not open in VirtualDub.

The only solution I found is to do rendering in "YUV 4: 2: 0 Planar" And Then convert it by Avidemux in "YV12 (raw)" for VirtualDub to finally be willing to accept it. My problem, solved Would Be, If It Was That Avidemux only refuse to open the render too large file (38GB) from my 40-minute documentary in DV ...

For several days I have read a lot of text on Doom9, looking for a recipe That will permit to assurer que la render files of cinelerra-cv are accepted by Avisynth and VirtualDub. It Seems to be feasible with QTSource, and Perhaps with FFmpegSource. For the moment I do not know how to do it and I did not find instructions to do so.

I need help, I am very far from understanding the system of scripts and plugins, but I'm sure if I can use QTGMC to de-interlace my edit, the results will correspond to what I seeks.
the_tourist is offline   Reply With Quote
Old 27th July 2015, 22:43   #2  |  Link
ChiDragon
Registered User
 
ChiDragon's Avatar
 
Join Date: Sep 2005
Location: Vancouver
Posts: 610
If your source is NTSC DV (4:1:1) I think you would be better off working with 4:2:2 until the very end when you're at your final HD resolution; then drop to 4:2:0. You should be able to preserve more of your color information that way rather than going 4:1:1 -> 4:2:0 = "4:1:0" prior to upscaling, particularly given the limitations of interlaced 4:2:0.

Perhaps you can upload a small sample of a 4:2:2 file created by cinelerra-cv. 10 frames should be more than enough.
ChiDragon is offline   Reply With Quote
Old 28th July 2015, 03:29   #3  |  Link
the_tourist
Registered User
 
Join Date: Jul 2015
Location: Quebec (Canada)
Posts: 10
Hi ChiDragon,

Thank you to answer.

Yes my source sequences are NTSC DV 4:1:1 and I understand why you recommended me to favor the rendering mode of Cinelerra-CV in 4:2:2 ("Y'CbCr 8-bit 4:2:2 (yuv2)".

I had not mentioned but cinelerra-cv also offers another variant of a rendering in 4:2:2, it is the "Y'CbCr 8-bit 4:2:2 (2vuy)"

So I am sending you a compressed file containing two very short rendering of cinelerra-cv in 4:2:2, a first in Y'CbCr 8-bit 4:2:2 (yuv2) and the other in Y'CbCr 8- bit 4:2:2 (2vuy). They are available at the following link:

http://dl.free.fr/ta2wWbKkb

What interests me is how to do, to force QTGMC to accept and de-interlaces, at least one of these formats. I need detailed help to get there, because I am a very beginner, with Avisynth.

Thank you for your support.

Last edited by the_tourist; 28th July 2015 at 03:33.
the_tourist is offline   Reply With Quote
Old 28th July 2015, 17:12   #4  |  Link
ChiDragon
Registered User
 
ChiDragon's Avatar
 
Join Date: Sep 2005
Location: Vancouver
Posts: 610
What have you used that plays the 2vuy file correctly?

MPEG Streamclip on Windows opens the yuv2, but the 2vuy is displayed garbled (at least with my Streamclip & QuickTime version).

QTSource performs the same way. So you should be able to use that as your source filter in Avisynth to import the yuv2 file so that you can apply QTGMC and any other filters to it.

You don't need to specify any settings for it work with the yuv2, just QTInput("filename.mov"). Note that it will be losslessly converted to YUY2.

Last edited by ChiDragon; 28th July 2015 at 17:24.
ChiDragon is offline   Reply With Quote
Old 29th July 2015, 01:46   #5  |  Link
the_tourist
Registered User
 
Join Date: Jul 2015
Location: Quebec (Canada)
Posts: 10
I do not use anything to open 2vuy files, HandBrake does not decode them, so I do not use them. I have mentioned this second rendering option with cinelerra-cv, only in case you could find it useful.

The format that I normally use for rendering is "Y'CbCr 8-bit 4:2:2 (yuv2)" because HandBrake reads this file type, and then I can produce my compressed versions.

Handbrake also allows de-interlacing the video, but the quality that results is not very good; it produced too many artifacts. That is why I want to use de-interlacing with QTGMC of my render files from cinelerra-cv, and then produce the compressed versions.

I do not know MPEG Streamclip, but could he communicate with Avisynth to use QTGMC ?

So I followed your instructions... I intalled QTInput, I replaced the line AVISource("filename.mov") by QTInput("filename.mov") in the .avs file,
also ConvertToYV12 (interlace=true) by ConvertToYUV2 (interlace=true).

And it works!

The video was de-interlaced properly with QTGMC.

Fantastic, thank you very much for your help.

However...

The video is now silent... there is no sound...

What should I do to get the sound ?

If QTSource can not process the sound, would FFmpegSource be an alternative ?

Last edited by the_tourist; 29th July 2015 at 01:49.
the_tourist is offline   Reply With Quote
Old 29th July 2015, 15:33   #6  |  Link
creaothceann
Registered User
 
Join Date: Jul 2010
Location: Germany
Posts: 360
Try adding AudioDub(last, DirectShowSource("filename.mov", video=false))
creaothceann is offline   Reply With Quote
Old 29th July 2015, 21:54   #7  |  Link
ChiDragon
Registered User
 
ChiDragon's Avatar
 
Join Date: Sep 2005
Location: Vancouver
Posts: 610
Quote:
Originally Posted by the_tourist View Post
also ConvertToYV12 (interlace=true) by ConvertToYUV2 (interlace=true).
Adding ConvertToYUY2 isn't going to do anything when the source is already YUY2.

I don't believe you've said what you're targeting as your destination format. If your final output is going to be an interlaced resolution like 1080i, take care to use ConvertToYV12(interlaced=true) at the end of the script so that the proper conversion is done and you don't have to rely on the encoder.
ChiDragon is offline   Reply With Quote
Old 30th July 2015, 04:29   #8  |  Link
the_tourist
Registered User
 
Join Date: Jul 2015
Location: Quebec (Canada)
Posts: 10
@creaothceann


Thank you!

It worked and I found the sound of my sequence.

Questions:

1- Should I put the line AudioDub ... before or after that of QTInput? Is it important?

2- Is it possible to combine these two lines of instructions, so it is necessary to include the "filename.mov" (including its path) only once for the two types of instructions?

3- Do AudioDub transforms the sound or is it a simple copy without any degradation?


@ChiDragon

At this time, the output QTGCM (Avisynth VirtualDub) is Huffyuv and progressive (although still MediaInfo says Interlaced ...). With this "Master", I will initially manufacture (with HandBrake), the compressed version H264 which will go on Youtube or Vimeo.

Secondly, I will make a master DVD with various menus, which will be reproduced for distribution to a specialized network.

Even for the DVD, it was important that video, be de-interlaced (as well as possible) because the DV material was filmed 16/9 and when made to play on an old CRT TV 4/3 (which may yet happen in this network which is not fully modernized) These CRT very mismanage 480 lines of the image in 16/9 ... the result is a very big and painful comb effect.

My current need for QTGMC is solved and I Thank You.

The next editing DV footage, I would rather de-interlacing with QTGMC ... BEFORE editing ...

I would like to find out how to batch process automatically (QTGMC) a long list and DV sequences while maintaining the title files (except the extension) when converted.

I also want to find how to make DNxHD encoding rather than Huffyuv (cinelerra-cv does not accept Huffyuv files input).

Another challenge ... I would also like to learn how to use QTGMC directly and natively under Linux. I think I read that it was now possible with VapourSynth but I expect many difficulties before I get there ...

That's for another time ...

A brand new fan of Avisynth ...

Last edited by the_tourist; 30th July 2015 at 04:49.
the_tourist is offline   Reply With Quote
Old 30th July 2015, 18:38   #9  |  Link
creaothceann
Registered User
 
Join Date: Jul 2010
Location: Germany
Posts: 360
Quote:
Originally Posted by the_tourist View Post
Should I put the line AudioDub ... before or after that of QTInput? Is it important?
After QTInput.

Quote:
Originally Posted by the_tourist View Post
Is it possible to combine these two lines of instructions, so it is necessary to include the "filename.mov" (including its path) only once for the two types of instructions?
These are all equivalent:
Code:
f = "filename.mov"
v = QTInput(f)
a = DirectShowSource(f, video=false)
AudioDub(v, a)
Code:
f = "filename.mov"
AudioDub(QTInput(f), DirectShowSource(f, video=false))
Code:
f = "filename.mov"
QTInput(f).AudioDub(DirectShowSource(f, video=false))
Quote:
Originally Posted by the_tourist View Post
Do AudioDub transforms the sound or is it a simple copy without any degradation?
"AudioDub(clip1, clip2)" takes the video from clip1 and the audio from clip2, combines them and returns the result. It doesn't modify the data in any way.
creaothceann is offline   Reply With Quote
Old 31st July 2015, 05:34   #10  |  Link
the_tourist
Registered User
 
Join Date: Jul 2015
Location: Quebec (Canada)
Posts: 10
@creaothceann

Thank you for your support,

My test computer is inaccessible today, in a day or two I will try your various proposals. For the non-coder that I am, that language of scripts is very strange and surprising in its logic. But I will make the effort to understand it, because it seems to allow some very interesting things with video.
the_tourist is offline   Reply With Quote
Old 31st July 2015, 18:37   #11  |  Link
the_tourist
Registered User
 
Join Date: Jul 2015
Location: Quebec (Canada)
Posts: 10
@creaothceann

Well, I was finally able to test your code options, obviously everything worked.

I preferred the third option, which I find simpler and clearer.

With all this I consider the issue of use of sources in yuv2 format solved.

When I have some more questions (which will certainly happen) I will create new treads.

Thank you to all
the_tourist is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 18:27.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.