• Most new users don't bother reading our rules. Here's the one that is ignored almost immediately upon signup: DO NOT ASK FOR FANEDIT LINKS PUBLICLY. First, read the FAQ. Seriously. What you want is there. You can also send a message to the editor. If that doesn't work THEN post in the Trade & Request forum. Anywhere else and it will be deleted and an infraction will be issued.
  • If this is your first time here please read our FAQ and Rules pages. They have some useful information that will get us all off on the right foot. More details on our policies, especially our Own the Source rule are available here. If you do not understand any of these rules send a private message to one of our staff for further details.
  • Favorite Edit of the Year (FEOTY) Nominations for 2020 are now open! Submit your entries here.

VC-1 M2TS --> to Vegas compatible h264 losslessly?

TM2YC

Well-known member
Staff member
Donor
Faneditor
Messages
12,971
Reaction score
262
Trophy Points
198
Can a f**kin' irritating Microsoft VC-1 encoded Blu-Ray *.M2TS file be converted to the more common Sony Vegas compatible h264 *.M2TS format losslessly?
 

Captain Khajiit

Well-known member
Donor
Messages
2,684
Reaction score
5
Trophy Points
48
VC-1 and AVC are both lossy formats; going from one to the other is invariably lossy.

Anyway, for use in Vegas, why are you not converting to an intermediary codec (and converting to RGB in the process)? VC-1 is a pain, but my guide presents two decoding solutions, one of which is free.

EDIT: Well, technically, x264 has a lossless mode, but I would neither edit AVC nor feed Vegas YV12.
 

Aztek463

Well-known member
Faneditor
Cover Artist
Messages
1,627
Reaction score
0
Trophy Points
51
Captain Khajiit said:
Anyway, for use in Vegas, why are you not converting to an intermediary codec (and converting to RGB in the process)?

This. Seriously. Once I started using a Lagarith avi (even when I was still working with DVD sources) I never went back.

One you have the Lagarith codec installed, it's as simple as loading an *.avs script into VirtualDub:
Code:
DirectShowSource("C:\filepath\TM2YC_rulez.m2ts", fps=23.976)

and hitting go (make sure you have the right compression codec set) will give you an *.avi file that works with Vegas perfectly. You can then edit/export as normal.

Just a heads up, the *.avi will be big. Two tips:
  • Depending on how you rip, if you have the option of demuxing a *.ts as opposed to *.m2ts, the resulting *.avi will be smaller in size but equal in quality. Why this is I'm not sure. I discovered this by accident the first time I was working with HD and have been doing it since. The script I posted above still works, just change the extension on the filepath.
  • 1080p also produces a huge file. Rendering the video from VirtualDub in 720p also reduces the filesize, but if you're planning on doing a 1080p release anyways, just ignore this.
 

Captain Khajiit

Well-known member
Donor
Messages
2,684
Reaction score
5
Trophy Points
48
You shouldn't just use DirectShowSource(). Make sure you know which decoder is being used. My guide shows you how to do it. And you should control the conversion to RGB in AviSynth to ensure the correct coefficients are used. Don't trust VirtualDub to do it.
 

TM2YC

Well-known member
Staff member
Donor
Faneditor
Messages
12,971
Reaction score
262
Trophy Points
198
Captain Khajiit said:
VC-1 and AVC are both lossy formats; going from one to the other is invariably lossy.

Sorry I wasn't very clear, I just want a way to get a VC-1 file into Vegas without any kind of loss. If I had a "normal" AVC file it would work just fine with no loss because Vegas supports it no problem. I don't actually care if it's an *.M2TS file, or what format it is really, LagarithAvi would be just fine.

Aztek463 said:
Once I started using a Lagarith avi I never went back.

Yes I know I've been using LagarithAVI for a long time.... as I say, I didn't make that very clear. Sorry.

I can never figure out how to get any other format other than LagarithAVIs to open VirtualDub. It always comes up with an error. So if I can't get VDub to open the VC-1 file I can't go further than that. I'll look over the guides again and see if I can find where I'm always going wrong.
 

Captain Khajiit

Well-known member
Donor
Messages
2,684
Reaction score
5
Trophy Points
48
^ No worries! I did wonder...

TM2YC said:
I can never figure out how to get any other format other than LagarithAVIs to open VirtualDub. It always comes up with an error.

You write an AviSynth script that points the decoder to the file and open that in VirtualDub. Don't open the file itself. Surely you've done this when decoding AVC and MPEG-2.
 

TM2YC

Well-known member
Staff member
Donor
Faneditor
Messages
12,971
Reaction score
262
Trophy Points
198
Captain Khajiit said:
You write an AviSynth script that points the decoder to the file and open that in VirtualDub. Don't open the file itself. Surely you've done this when decoding AVC and MPEG-2.

Nope. Never been able to get any of this stuff to work. I'm probably missing some really simple thing.

Are you supposed to have AviSynth as a plugin for VirtualDub? If so how do you make that happen? Is there a guide somewhere already that explains how to simply make VirtualDub open files? That would be a good start :-D.
 

Captain Khajiit

Well-known member
Donor
Messages
2,684
Reaction score
5
Trophy Points
48
AviSynth's a frameserver, not a plug-in for VirtualDub. Download the latest 32-bit version here. Install it.

Follow my decoding guide, and write a script. Then open it in VirtualDub. File→Open video file... not Run script...

Let me know if you get stuck.
 

TM2YC

Well-known member
Staff member
Donor
Faneditor
Messages
12,971
Reaction score
262
Trophy Points
198
I've followed the decoding guide* up to the end of post9 and VDub gives me the following error when I try to open the script file...

AVI Import Filter error: (Unknown) (80040154)

This the same error I usually get. What am I missing?

(*Except I did not make/extract an mkv file using 'HdBrStreamExtractor' as I already had the VC-1 stream ready. So I opened that in graph/studio rather than the mkv container. So you are aware incase this is causing the problem but as I say above, it's the same error I've always got when trying to open anything)
 

Captain Khajiit

Well-known member
Donor
Messages
2,684
Reaction score
5
Trophy Points
48
I take it that you installed the latest version of AviSyth and are using the latest version of VirtualDub. Are you sure that you have the 32-bit versions of both?
 

TM2YC

Well-known member
Staff member
Donor
Faneditor
Messages
12,971
Reaction score
262
Trophy Points
198
Captain Khajiit said:
I take it that you installed the latest version of AviSyth and are using the latest version of VirtualDub. Are you sure that you have the 32-bit versions of both?

I've now installed the 32-bit VDub and I already had the latest version of AviSynth (Not sure how I tell if that's 32-bit though?). Now I get this error when I try to open the script in VDub:

Avisynth open failure:
DirectShowSource: unable to determine the duration of the video.
(F:\Ryan\Downloads\Blade Runner\Assets\BR Script 2.avs, line1)

By the way, my script is as follows...

DirectShowSource("F:\Ryan\Downloads\Blade Runner\Assets\BladeRunnerGraph.grf", fps=23.976, audio=false)
Assumefps(24000,1001)

Should I try again with an MKV, or does that not matter?
 

Captain Khajiit

Well-known member
Donor
Messages
2,684
Reaction score
5
Trophy Points
48
Demux the disc straight to MKV. (Don't just stick your VC-1 stream into one.) Then try again. I'm sure you have LAV filters installed. You will have to go through the process of making the graph again.
 

TM2YC

Well-known member
Staff member
Donor
Faneditor
Messages
12,971
Reaction score
262
Trophy Points
198
Captain Khajiit said:
Demux the disc straight to MKV. (Don't just stick your VC-1 stream into one.) Then try again. I'm sure you have LAV filters installed. You will have to go through the process of making the graph again.

Okay done this. I went to make an MKV with HdBrStreamExtractor, which I hadn't done before (I've only used it to rip the streams in their original forms) and it didn't work. After consulting the log file it turns out I needed 'HaaliMediaSplitter' (Which you mention in your software list). Installed that and followed the guide again and bingo! The MKV is now open in VDub on my desktop :).

Now what is the next step? (Sorry, I couldn't see where the VC-1 guide went after post#9).

Do I just save it as a lagAVI? I wanted to check the method and settings with you first, to make sure it all stays lossless.
 

Captain Khajiit

Well-known member
Donor
Messages
2,684
Reaction score
5
Trophy Points
48
TM2YC said:
After consulting the log file it turns out I needed 'HaaliMediaSplitter' (Which you mention in your software list).

Yes. It's mentioned in the list, and the guide explicitly tells you to install it in the demuxing section.

Now what is the next step? (Sorry, I couldn't see where the VC-1 guide went after post#9).

The guide goes nowhere because it's a guide to decoding. At some point, I might write a guide to processing that follows on from it.

Do I just save it as a lagAVI? I wanted to check the method and settings with you first, to make sure it all stays lossless.

Yes. Render a lossless AVI. First, make sure that your script looks like the following.

Code:
DirectShowSource("F:\Ryan\Downloads\Blade Runner\Assets\BladeRunnerGraph.grf", fps=23.976, audio=false)
Assumefps(24000,1001)
[B]ConverttoRGB(matrix="Rec709")[/B]#Your source is HD.

Next, open the script in VirtualDub.

File→Open video file...
Video→Compression→Lagarith (or whatever)
Video→Fast Recompress
File→Save as AVI

I'm glad you got it working! You'll find that adapting the workflow to deal with other codecs in future is easy.
 

TM2YC

Well-known member
Staff member
Donor
Faneditor
Messages
12,971
Reaction score
262
Trophy Points
198
What settings should be used in this menu...?

23388990145_f2b5c6fcd5_o.jpg


Also, why this...?

Captain Khajiit said:
Video→Fast Recompress

...and not "Full processing mode". What's the difference? I'm just curious.
 

Captain Khajiit

Well-known member
Donor
Messages
2,684
Reaction score
5
Trophy Points
48
TM2YC said:
What settings should be used in this menu...?

EDIT: I disable multithreading.

MODE: RGBA

Also, why this...?

...and not "Full processing mode". What's the difference? I'm just curious.

Full processing mode grants access to VirtualDub's filters, which you're not using. You're quickly rendering a lossless AVI and ensuring that there is no change in color-space.
 
Top Bottom