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 23rd June 2009, 21:20   #1  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
How I got directshowsource to use VC1 from Blu Ray

VC1 encoding guide

__________________

haali media splitter: install
http://www.videohelp.com/tools/Haali_Media_Splitter

anydvd: Rip
http://www.slysoft.com/en/anydvd.html

tsmuxer: Demux
http://www.videohelp.com/tools/tsMuxeR

mkvtoolnix: mux vc1 to mkv with timecode
http://www.videohelp.com/tools/MKVtoolnix

graphedit: make grf file from the mkv file mvktoolnix made
http://www.videohelp.com/tools/GraphEdit

______________________________________________

Step 1.) rip the vc1 blu ray using anydvd.

Step 2.) demux the audio and video using tsmuxer.
you may downconvert the audio to dts.

Step 3.) mux the vc1 to mkv using mkvtoolnix.

Create a text file with this code and call the file Timecode.:
# timecode format v1
assume 23.976

- Open mkvtoolnix and add the file.
Click the video to highlight it then from the timecodes button add the timecodes file you made.
Click start muxing.

Step 4.) use graphedit to build a grf file
Build grf : Haalimediasplitter-WMVideodecoderDMO

- Open Graphedit.

- Click the Graph button and the Insert filters button.

- From the list choose Directshow Filters and click "Haali Media Splitter", then click insert filter.
There will be a pop up asking you for a input file. Change "All Media Files" to "All Files (*.*)".
Then go to where you saved the file you made with mkvtoolnix and click that then click open and in graphedit you will see the mkv file.

- Now from the Same directshow filters list you chose Haali media splitter from, scroll to the bottom of that list and click "WMVideo Decoder DMO" and then "Insert Filter".
It will be the color Green.
Now Close the Insert filters list by pressing the red "x".

- In the graphedit you will see two boxes: ____.mkv, wmvideo decoder dmo.
These boxes have tiny squares on them. Join the boxes using the same method as drag and drop.

Click the tiny box in the mkv file and drap it to the wmvideo decoder where it says in0.
Once you join them the boxes will have color.

- Now save this work from the file tab.

Step 5.) In the code below it shows the file extension GRF. This is the location you saved the file you made in graphedit.
Run the avs script through megui.
DirectShowSource("G:\Matrix1\Matrix1.grf",audio=false,fps=23.976)

How to split a vc1 section from a movie

__________________

- You first demuxed the vc1 using tsmuxer.
- Split only 1 chunk from the vc1. If you split more than one chunk the second and consecutive chunks don't work properly.
Only the first chunk works properly, so make it a large enough size: 500MB or 1GB.
- Use the program mkvtoolnix and the Timecode and mux the vc1 to mkv.
- Make the graph in graphedit and directshowsource uses the grf as a video vile.

- if you make the whole movie a mkv then use dgsplit and take a chunk of the mkv.
Then run the chunk you split through mkvtoolnix again with the timecode file,
the video will be all jerky for some reason.
So doing this isn't as good as taking the chunk from the source vc1.

- Taking a chunk is good for encoding tests as it's faster than encoding the whole movie which can take a day or more.
__________________
When I get tired during work with dvd stuff i think of River Tamm (Summer Glau's character). And the beauty that is Serenity.

Last edited by Jeremy Duncan; 26th June 2009 at 00:41.
Jeremy Duncan is offline   Reply With Quote
Old 23rd June 2009, 22:10   #2  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
One way if you have a supported Nvidia graphics adapter: DGVC1DecNV.
Guest is offline   Reply With Quote
Old 23rd June 2009, 22:14   #3  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,340
Do you have a haali media splitter and a directshow vc-1 decoder installed?
poisondeathray is offline   Reply With Quote
Old 23rd June 2009, 22:36   #4  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
Quote:
Originally Posted by poisondeathray View Post
Do you have a haali media splitter and a directshow vc-1 decoder installed?
Yes, Haali media splitter and ffdshow.
__________________
When I get tired during work with dvd stuff i think of River Tamm (Summer Glau's character). And the beauty that is Serenity.
Jeremy Duncan is offline   Reply With Quote
Old 24th June 2009, 05:41   #5  |  Link
Midzuki
Unavailable
 
Midzuki's Avatar
 
Join Date: Mar 2009
Location: offline
Posts: 1,480
VC1ESParser.dll allows you to open "raw" VC-1 streams directly.

Code:
# The video source does have constant frame rate
DirectShowSource("example.vc1", fps=29.97, framecount=120000)
# It works!

Last edited by Guest; 24th June 2009 at 13:38. Reason: deleted URL as it is a license violation
Midzuki is offline   Reply With Quote
Old 24th June 2009, 13:32   #6  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Where is the documentation for VC1ESParser.dll?

What does it do and how does one use it?
Guest is offline   Reply With Quote
Old 24th June 2009, 13:36   #7  |  Link
Kurtnoise
Swallowed in the Sea
 
Kurtnoise's Avatar
 
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
Part of the VC1 SDK...and it's clearly mentioned that we cannot distribute it.
Kurtnoise is offline   Reply With Quote
Old 24th June 2009, 13:54   #8  |  Link
Midzuki
Unavailable
 
Midzuki's Avatar
 
Join Date: Mar 2009
Location: offline
Posts: 1,480
@ neuron2 & Kurtnoise: thanks for the warning.

I will remove the binary from my wannabe website right away.

13:00 GMT --- binary successfully deleted.

Last edited by Guest; 24th June 2009 at 14:03. Reason: overdue update
Midzuki is offline   Reply With Quote
Old 24th June 2009, 13:54   #9  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
link

I read in the link that to get directshowsource to run vc1 video I do the steps below:
1.) 1.gdsmux/ HaaliMatroskamuxer ( VC1 to mkv)
2.) 2. Make a Timecode text file with these llines:
# timecode format v1
assume 23.976
3.) Remux the first mkv file with mkvmerge and insert the above Timecode File.
"You will see some warnings but it's ok.
Now you have a mkv file with correct time, full seek and you
don't need framecount value, you need only fps=23.976 in avisynth."
4.) Build grf with Graphedit :
Haalimediasplitter-WMVideodecoderDMO
5.) example avs script:
DirectShowSource("G:\Matrix1\Matrix1.grf",audio=false,fps=23.976)

______________


I wonder what any of you think about this procedure?
Question.) Is it up to date and correct?

Question.) Do I demux the audio and video from the vc1 using tsmuxer before doing the above 5 steps using only the video?
Then mux the audio in using megui into the final encoded video?
__________________
When I get tired during work with dvd stuff i think of River Tamm (Summer Glau's character). And the beauty that is Serenity.

Last edited by Jeremy Duncan; 24th June 2009 at 13:57.
Jeremy Duncan is offline   Reply With Quote
Old 24th June 2009, 14:01   #10  |  Link
rack04
Registered User
 
Join Date: Mar 2006
Posts: 1,538
Before I purchased DGVC1DecNV I would mux the raw VC1 stream into MKV using eac3to and then create a avisynth script using DirectShowSource.

Code:
:vc1
Echo.
Echo.
Echo.[ %TIME% ] Creating AviSynth Script ...
Echo.

@Echo on
"%eac3to_PATH%" "%INPUT_VIDEO%" "%WORKING_DIRECTORY%\%SOURCE_FILENAME%-output.mkv"
@Echo off

if "%SOURCE_VIDFRAMERATE%" EQU "23.976" goto 23
if "%SOURCE_VIDFRAMERATE%" EQU "24.000" goto 24
if "%SOURCE_VIDFRAMERATE%" EQU "25.000" goto 25
if "%SOURCE_VIDFRAMERATE%" EQU "29.970" goto 29

:23
Echo DirectShowSource("%WORKING_DIRECTORY%\%SOURCE_FILENAME%-output.mkv", audio=false)>"%WORKING_DIRECTORY%\%SOURCE_FILENAME%-output.avs"
Echo AssumeFPS(24000,1001)>>"%WORKING_DIRECTORY%\%SOURCE_FILENAME%-output.avs"
goto encode

:24
Echo DirectShowSource("%WORKING_DIRECTORY%\%SOURCE_FILENAME%-output.mkv", audio=false)>"%WORKING_DIRECTORY%\%SOURCE_FILENAME%-output.avs"
Echo AssumeFPS(48000,2000)>>"%WORKING_DIRECTORY%\%SOURCE_FILENAME%-output.avs"
goto encode

:25
Echo DirectShowSource("%WORKING_DIRECTORY%\%SOURCE_FILENAME%-output.mkv", audio=false)>"%WORKING_DIRECTORY%\%SOURCE_FILENAME%-output.avs"
Echo AssumeFPS(50000,2000)>>"%WORKING_DIRECTORY%\%SOURCE_FILENAME%-output.avs"
goto encode

:29
Echo DirectShowSource("%WORKING_DIRECTORY%\%SOURCE_FILENAME%-output.mkv", audio=false)>"%WORKING_DIRECTORY%\%SOURCE_FILENAME%-output.avs"
Echo AssumeFPS(30000,1001)>>"%WORKING_DIRECTORY%\%SOURCE_FILENAME%-output.avs"
goto encode

Last edited by rack04; 24th June 2009 at 14:06.
rack04 is offline   Reply With Quote
Old 25th June 2009, 00:34   #11  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
That looks like a batch file.
I updated the first post with how I got vc1 running with directshowsource.
__________________
When I get tired during work with dvd stuff i think of River Tamm (Summer Glau's character). And the beauty that is Serenity.
Jeremy Duncan is offline   Reply With Quote
Old 25th June 2009, 11:31   #12  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
fyi I encoded a vc1 movie in hc enc. Then muxed the audio with tsmuxer.
The file size was about 10GB less than the vc1 version and no quality was lost.

here was my hc enc settings:

Open hc enc
Input: Open the avs
Output: where you will save the file
Log: where you will save the log
Average bitrate: Average 25000, Maximum 25000
Profile: best
Aspect ratio: 16:9
smp checked
scene change checked
autogop not checked: set to 12
dc prec 10

settings 1 tab
Progressive
gop length, b frame: 12, 2

settings 2 tab
vbr bias 100
vbv checked
write seq endcode checked

HC encode took about 6 hours on my E6600 cpu.
Around 16GB final file size.
__________________
When I get tired during work with dvd stuff i think of River Tamm (Summer Glau's character). And the beauty that is Serenity.

Last edited by Jeremy Duncan; 26th June 2009 at 00:40.
Jeremy Duncan is offline   Reply With Quote
Old 25th June 2009, 14:33   #13  |  Link
rack04
Registered User
 
Join Date: Mar 2006
Posts: 1,538
Quote:
Originally Posted by Jeremy Duncan View Post
That looks like a batch file.
I updated the first post with how I got vc1 running with directshowsource.
You are correct.
rack04 is offline   Reply With Quote
Old 25th June 2009, 21:27   #14  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,986
Just out of curiosity - why 25mbps CBR MPEG-2? I'm guessing hardware requirements?

Also, how could the VC1 stream be bigger, given that at most BluRay discs have a 25mbps video stream?!

~MiSfit
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 26th June 2009, 00:49   #15  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
Why 25mbps? I did some test runs and settled on that number.
Why cbr? I looked at the hc enc readme and decided to use it.
Why mpeg2 for this vc1? I decided to try to see if I could then to see if the encode would be successful and the audio worked fine after the encode.
Also the file size was of interest to me, I wanted to see how big the file would be in mpeg2.
How could the vc1 be bigger? I don't know. The mpeg2 video looked indistinguishable from the disk version to my eye. I didn't do picture comparison though between the disk and encode mpeg2 version, but the mpeg2 version had detail in the spots you would look for it and didn't appear blurred at all.

The script I used was:
directshowsource(code stuff here)
# vc-1 blu ray: Baraka. This line wasn't in the avs though.
Crop(0,102,-0,-102)
Spline36Resize(1920,816).AddBorders(0,132,0,132)
__________________
When I get tired during work with dvd stuff i think of River Tamm (Summer Glau's character). And the beauty that is Serenity.
Jeremy Duncan is offline   Reply With Quote
Old 26th June 2009, 01:02   #16  |  Link
setarip_old
Registered User
 
setarip_old's Avatar
 
Join Date: Aug 2005
Posts: 16,267
@Jeremy Duncan

Please clarify - Was your desire to find a way to incorporate a BluRay's VC-1 videostream in an MKV wrapper?

If so, it's as simple as using (presently freeware) one-click "MakeMKV".

If I've misinterpreted your purpose, I apologize...
setarip_old is offline   Reply With Quote
Old 26th June 2009, 01:08   #17  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
I can use mkvtoolnix to make the vc1 mkv and play this with mpc hc.
I wanted to be able to use directshowsource with the vc1 though.

I read a thread on avsforum.com in the home theater forum about people wanting to encode blu ray to frame interpolation, so I have been working out how to do that ever since.
This was about a week now.
Just about done my work I set out to do now though, a few more tests.
__________________
When I get tired during work with dvd stuff i think of River Tamm (Summer Glau's character). And the beauty that is Serenity.
Jeremy Duncan is offline   Reply With Quote
Old 26th June 2009, 04:30   #18  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,986
Quote:
people wanting to encode blu ray to frame interpolation
??

You mean interpolated to 60p?!

Also, what was the file size / duration (bitrate) of your VC1 source?

~MiSfit
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 26th June 2009, 05:17   #19  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
Quote:
Originally Posted by Blue_MiSfit View Post
??

You mean interpolated to 60p?!

Also, what was the file size / duration (bitrate) of your VC1 source?

~MiSfit
Yes, 60 fps.

The vc1 filesize?
How do I get the bitrate value?
By duration, you mean how long the film was?
__________________
When I get tired during work with dvd stuff i think of River Tamm (Summer Glau's character). And the beauty that is Serenity.
Jeremy Duncan 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 09:31.


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