Log in

View Full Version : Converting to YV12


Hobojobo
4th September 2013, 10:36
I am capturing VHS videos with VirtualDub using the capture mode.
As compression I use the Lagarith Lossless codec.
I want to transcode the videos with quenc to mpg2 (DVD).

As I understand, the video has to have the YV12 colourspace to be fed into quenc as avs.
Lagarith has the option to capture directly to YV12.
(Compression - Lagarith - Configure)
Quenc keeps telling me the input formt is not YV12.
Is this a bug?

I have to add
ConvertToYV12(interlaced=true)
to the avs-script.

Then it works.
I would like to YV12-convertion during the capturing to safe time.

raffriff42
4th September 2013, 14:25
The Lagarith data may be in YV12, but what is the codec spitting out? VirtualDub's default Lagarith decoder yields RGB; using the DirectShow plugin, I get YUV444; and using the FFmpeg Input Driver (http://forums.virtualdub.org/index.php?act=ST&f=7&t=20025&st=90) plugin, I get YUV420.

Testing method:
- VirtualDub 1.10.x;
- Color depth on decompression=auto;
- Filters dialog: check Show image formats;
- Add Null Transform filter;
- Observe image format readout on Input column.

EDIT Oh, you're opening the video in Avisynth? For decoding as YV12 in Avisynth, try the FFmpegSource (FFMS2) (http://code.google.com/p/ffmpegsource/) plugin.

TheSkiller
4th September 2013, 18:01
Lagarith has the option to capture directly to YV12.
Better don't do that – it's ought to cause trouble (like interlaced vs progressive chroma downsampling, chroma aliasing).

In VirtualDub you should select YUY2 color space (4:2:2 interleaved) for capturing and Lagarith settings: YUY2 mode, "Always Suggest RGB for Output" unchecked.

Then you use AviSource() and ConvertToYV12(interlaced=true).
Better yet, use Gavinos replacement routines (http://forum.doom9.org/showthread.php?p=1471623#post1471623) for the conversion for slightly better quality.


I would like to YV12-convertion during the capturing to safe time.
Unless you're on a Pentium II 450 MHz the conversion from YUY2 to YV12 interlaced is very fast, you will hardly notice it. ;)

Hobojobo
4th September 2013, 22:37
:thanks: