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 9th September 2006, 07:44   #1  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
upscaling standard dvd movies to 1080p using ffdshow and your htpc

I Downloaded the sw kit.
I unzipped the sw kit.

I first installed Avisynth. With the Avisynth in the sw kit you don't need to replace the avisynth.dll as shown in the video.

Then I install ffdshow.

During the install of ffdshow there is a page that's called "Select Additional tasks", I check these boxes besides what's already checked:
mpeg2: libmpeg2
vc1: wmv9
raw video

Then after ffdshow is installed there is a final page that says "Run ffdshow video decoder configuration", so I check that box then press Finish.

Now ffdshow video decoder configuration pops up, here is how I set it up.

From the codecs tab I scroll down to mpeg2 and highlight it and check the "dvd decoding" box, then I click apply.

From the Decoder Options tab I uncheck the "Detect soft telecine and average frame durations" box, then I click apply.

Then I scroll down the check boxes until I see the Subtitles check box, and I click it with my mouse and hold down the mouse button and drag the subtitles check box to the top of the list, so it's right below Decoder Options.
Then I go through every list in subtitles and make sure every box is unchecked, so the subtitles checkbox has all the boxes unchecked, the titles sub list has all the boxes unchecked, then I press apply.

Then I drag the avisynth check box so it's right below the subtitles check box, and I check the avisynth checkbox and uncheck these boxes in the avisynth tab:
"add ffdshow video source"
"yuy2"
"rgb24"
"rgb32"
Still in the avisynth tab, I check the Buffers back/ahead box and leave the values at 10 10.

Then I check and drag the resize & aspect check box so it's below the avisynth check box, and this is how I setup the ffdshow resize & aspect check box:
I check the Multiply by circle and set it to the value of 1.000
I check the "No Aspect ratio correction" circle, then I click Apply.

Then I scroll down to the Output tab and uncheck these boxes:
"yuy2"
"yvyu"
"uyvy"
"rgb32"
"rgb24"
"rgb16"
"rgb15"
"High quality yv12 to rgb conversion"
"select closest matching colorspace"

I leave the YV12 check box checked, then I press Apply and OK to close the ffdshow video decoder configuration.

Third, I install Matroskasplitter.

Fourth I unzip mpc-hc and put it on my desktop.

Fifth, in Windows 7, I open windsfiltertweaker and go to the Preferred decoders tab and the 32 bit decoders to use ffdshow, specifically these decoders:
h.264
xvid
divx
mp4v
vc-1
mpeg-2
Then I click Apply and Close.
Then I check the tweaks tab and disable the "Microsoft dtv-dvd video decoder", then I click apply, close and then exit.

Sixth, I unzip the plugins folder and go to this folder C:\Windows\SysWOW64 to put the fftw3.dll.

Then I drag and drop the other dll’s into that folder and accept when it asks if I want to modify those dll's into the C:\Program Files (x86)\AviSynth 2.5\plugins folder.

You can tell it's the right folder because Directshowsource.dll is in that folder.

For non-64 bit windows you would put the fftw3.dll into the C:\WINDOWS\system32 folder, and the other plugins go into the C:\Program Files\AviSynth 2.5\plugins folder where directshowsource.dll is.

Seventh, I open media player classic home cinema player, and go to the "View, Options, Output" tab and check vmr9 windowed.
Then I go to the "view, Options, External filters tab" and check the Add filter box, and add "ffdshow video decoder", that set ffdshow video decoder to "Prefer", Click Apply and Ok to close the options box.
Then I go to "view, options, internal filter" and check every box.

Reboot and then put a movie in the computer and then open the movie with mpc-hc using the file tab and go to the dvd drive to open the movie.

___________________________________________


video guide at youtube link.
sw kit. Updated May 8, 2011.


overview
____________________________________________
Step 1.) install software: avisynth before ffdshow.
Step 2.) configure ffdshow digital audio
Step 2.) configure ffdshow analog audio
Step 3.) configure ffdshow video
Step 4.) configure media player classic
Step 5.) install avisynth plugins
Step 6.) Reboot, twice.

pictures
____________________________________________
________ FFDshow configuration options ________
- for vista, use aero. for quality.

FFDshow configuration options.


________ upscaling ffdshow configuration ________

Codecs tab
Set Mpeg2 to Libmpeg2, and check "DVD decoding".
Set Avisynth to Avisynth, Raw video to All supported

Decoder options tab
Uncheck "Detect soft telecine and average frame durations"

Subtitles tab, Unchecked
Uncheck "Decode closed captions"
Uncheck "Accept embedded subs"
Uncheck "Accept SSA, ASS, ASS2 Subtitle (experimental)
Vobsub subpage, uncheck Vobsub Enable.

Avisynth tab checked
YV12 checked,
Add FFdshow Video source Unchecked,
3:2 Pulldown box: Ignore Pulldown checked,
check Buffer back/Ahead: 10, 10

Code:
setmtmode(5,0)
SetMemoryMax(512)
video=ffdshow_source().changefps(ffdshow_source(), linear=true)
A=video
setmtmode(2)
SetMemoryMax(712)
B=a.Spresso_JD()
C=a.SeeSaw_JD(B).limitedsharpenfaster(strength = 11)
return C
GetMTMode(false) > 0 ? distributor() : last
Resize & aspect tab checked
Process whole image checked
Specify horizontal and vertical Resize: 1920, 1080 (or your monitors resolution)
Process Pixel aspect ratio internally checked
No aspect ratio correction checked
spline
Luma Sharpen: 0.00
Luma Guassian Blur 0.50 (On small monitors like laptops it's best not to use this. Set it to 0.00)
Accurate rounding checked

Output tab
yv12 checked


________ Media Player Classic ________

Click the View button. Check only the top three in the drop down list.
Click options.

Click the output tab, and set Directshow output to vrm9 windowed.
Directshow Audio: Select Reclock Audio Renderer

Click the External Filters Tab.
Click the Add Filter Button.
Double click the filters you want. You'll need;
FFdshow Audio decoder
FFdshow video decoder

________ Potplayer ________

Run the potplayer installer.
Open Potplayer and right click the screen,

Set the renderer to use madvr:
Video, Video Renderer, click "Madshi Video Renderer"

Set FFDshow to be the video decoder:
- Filters, Advanced Filter Settings, video decoder, filter management, press "scan", press "Ok".
Now in "Video decoder" press the drop down menu and set all the filters to use ffdshow video decoder, press "Ok".

To open a DVD, go to:
Right click screen, "Open", "Open Directory", "Computer", highlight the DVD drive, click Ok.

________ FFdshow Audio Decoder: Analog ________

Codecs tab

- Uncompressed Tab
Set it to "32 bit integer"

Mixer tab
- checked
I use 5.1 speakers so I set the number of speakers to 5, and check the Lfe box.

Output tab,
- Select 32 bit integer.

________ FFdshow Audio Decoder: Bitstream HD Audio in Windows 7 ________

Install Haali Media Splitter

Step 1

Codecs tab

- Uncompressed Tab
Set it to "All Supported"

Output tab,
- Passthrough boxes: ac3, dts, dolby digital plus, dts hd, dolby truehd are checked.
- Connect as PCM first is unchecked
- Supported output formats: check only 16bit, 24bit.
- Check direct to file

Step 2

Put the files from the bat folder into the system32 folder. To register the bat files you need to get permission to, here is how to do that.
- Using MPCVideoDec.ax as a example. Right click and select Properties.
Go to Security, Advanced, Owner tab, Edit, Hightlight Administerators, click Apply.
From the MPCVideoDec.ax properties, security tab, click Edit. From the Group or user names list, highlight each one and make sure it has Full Control checked.
Click ok and close the properties tab.
- Do this for these three files: MPCVideoDec.ax, MpegSplitter.ax, regsvr32.exe.
- Then right click the MPCVideoDec bat file and run as Administrator. It should successfully register the .ax file.

- For 64 bit windows. Put the MPCVideoDec.ax, MpegSplitter.ax into the system32 folder and the MPCVideoDec bat, MpegSplitter bat files into the syswow64 folder.
Change the permissions for the MPCVideoDec.ax, MpegSplitter.ax, regsvr32.exe as usual.

Step 3

- Run the reg file in the My Documents folder.

Step 4

- Run the Win7DSFilterTweaker.
Under the "Preferred Directshow decoding filters in Windows 7" tab, set H.264, and VC1 to MPCVideoDec.
The "Media Foundation" tab is left at default.
Under the "More Tweaks for Windows 7", check "Disable Microsoft DTV-DVD Audio Decoder", "Disable Media Foundation".



________ Software ________

Potplayer
Win7DSFilterTweaker
Haali
FFDshow. Updated May 8, 2011.
media player classic home cinema. updated March 13, 2011
Avisynth: custom build I made

________ Optional Software ________

J River
spdifer
Reclock

Test disks for comparison.

________ Plugins ________

plugins: link. Updated May 8, 2011.

\\\\\ List of the nessessary Avisynth plugins to go in the plugin folder. 9 in total.


\\\\\ fftw3.dll goes into the System32 folder.
If your using a 64 bit version of windows, put the fftw3.dll into the SysWOW64 folder, instead of the system32 folder.

C:\Windows\System32
C:\Windows\Syswow64

\\\\\ I use the ati 4670 and the 11.2 drivers.
I use hdmi to my 1080p tv.
The pixel format I use is full rgb: 4:4:4
I use a intel E6600 cpu, 2GB ram, Sata HDD, Sound card


Pictures
____________________________________________


Spdifer (For DTS and AC3)


profiles


ffdshow


media player classic


avisynth plugins folder



link to a different guide that shows you how to setup profiles

________________________

See this link for Frame Doubling, or Frame Interpolation.
Attached Files
File Type: zip LimitedSupport_09Jan06B.zip (37.8 KB, 366 views)
File Type: zip lsf_seesaw_spresso.zip (5.6 KB, 286 views)

Last edited by Jeremy Duncan; 13th May 2011 at 09:45.
Jeremy Duncan is offline   Reply With Quote
Old 9th September 2006, 22:51   #2  |  Link
midelic
Registered User
 
midelic's Avatar
 
Join Date: Jul 2003
Location: romania
Posts: 46
@Jeremy
Can you post the settings for "Levels" in FFdshow?I now that it depends on the source,but it's good for information.
I've seen them somewhere in your last thread.

Last edited by midelic; 9th September 2006 at 23:05.
midelic is offline   Reply With Quote
Old 13th September 2006, 09:47   #3  |  Link
toby77jo
Registered User
 
Join Date: Aug 2006
Posts: 8
Quote
Here's a speed tweak that might help.
It's meant for dual core cpu's when you use MT in FFdshow Avisynth..
Each time a movie is played you need to set it.
- CTRL-ALT-DEL to the Task Manager, Under the Processes tab, right click the .exe file for your video player (example: mplayerc.exe), and go to Set Affinity, Uncheck CPU 1.

Here's where I got the info. Thanks arfster.
Link
/Quote

For me it does not make sense, by removing the affinity of 1 core out of 2, you force the media player to only utilize 1 of the cores, MT is supposed to work on both cores? Please explain why this is a speed tweak for dual cores?
toby77jo is offline   Reply With Quote
Old 13th September 2006, 15:15   #4  |  Link
arfster
Registered User
 
Join Date: Jun 2006
Posts: 169
The reason it works is because ffdshow is biased towards one core. Even when you force affinity to core 0, it'll still end up with half on core 1. For example, I often end up with 20/90 core balance, but with the affinity tweak it's 60/50 or so.

It sometimes causes problems with large avisynth scripts though when you're near maxxed though, so it needs trial and error.
arfster is offline   Reply With Quote
Old 13th September 2006, 15:24   #5  |  Link
check
phjbdpcrjlj2sb3h
 
check's Avatar
 
Join Date: Sep 2005
Location: Western Australia
Posts: 1,691
why are you linking to a 2 year old ffdshow?
check is offline   Reply With Quote
Old 14th September 2006, 00:22   #6  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
How to encode blu ray to mpeg2.

First.) rip the blu ray to the pc. I use anydvd and in the anydvd settings I check get rid of trailers and only the main movie is ripped as a result.

Second.) open the tsmuxer program and add the m2ts file from the blu ray you ripped.
It's in the bdmv\stream folder where you ripped the blu ray too.
You only need the 00000.mt2s file in tsmuxer.

it will list different file types: 1 or more audio, 1 or more pgs (subtitle), and 1 video.
You only want one language because of how the file is read by powerdvd ultra.
If you choose more than one language you need to use media player classic to access the languages, powerdvd ultra will only have 1 language available.

Also subtitles are not available. They are in the pgs but there is no way I know of to get them to be a option in mpc or powerdvd ultra.

So you added the 00000.mt2s file and got a list of audio options. lets say you just want one language.

Third.) Check the ts option in the output tab.
Check where to save the ts. Some people say to change the profile but I don't and haven't.

Fourth.) Press the start muxing tab and it will make the movie into a ts file you can play with powerdvd or media player classic.
In media player classic you need to go to the options and make sure the internal filters include ac3. i just checked every internal filter option.

Fifth.) Steps 1-4 were for mpeg2. For vc1 the procedure is more tricky. I am working on a simple solution.

Notes.)
- There is no quality loss, no need to fiddle with cropping.

- The mpc says the dts is 1000 or so kb, but powerdvd says the audio is ac3 kb level. So mpc seems to have the hd audio whereas powerdvd doesn't

- To open the ts with mpc you need to select the ts file from the file tab.

Software used.)

tsmuxer
anydvd hd
mpc
________

Blu ray vc1 files.
Steps 1 and 2 are the same as before. This guide begins at step 3.

Step 3.) Demux the audio and video.

Step 4.) Install mkvtoolnix-unicode-2.6.0-setup.
Open the demuxed vc1 file that you made with tsmuxer, and add the audio you demuxed from tsmuxer.
Click start muxing, and it will make the mkv in the location you specified.

mkvtoolnix

Notes.)
A benefit in encoding the vc1 this way is it doesn't use pulldown even though you use a 60hz monitor.
I tested this with mpc and reclock.
________

Blu ray avc files

If you try to make a mkv like with vc1 the video is ugly if I use ffdshow or mpc hc video decoders, and the audio is out of sync if I skip forward.
So I choose the video I want from the ripped m2ts, and then use ts muxer to make it a "AVCHD disk".

If the video is on many m2ts files not just one, use bdinfo to get the files nessessay, then use tsmuxer to make the avshd disk.

Then to open the video you made, go to the bdmv/streams folder and it should be there.
You can open it with mpc or powerdvd. Your choice.

In some movies there is no 00000.m2ts file in the streams folder.
For these movies use bdinfo to see the files that make up your movie, as there may be not one main file but 3 or 4.
bdinfo

ffdshow works fine with the vc1 mkv. I could have used lsf if I wanted but my e6600 was taxed already using both cores.

Last edited by Jeremy Duncan; 23rd April 2009 at 22:40.
Jeremy Duncan is offline   Reply With Quote
Old 14th September 2006, 00:23   #7  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
That FFdshow links to afterdawn.com. They have a fairly new version of FFdshow. Maybe they display a different page for Australia ?
Jeremy Duncan is offline   Reply With Quote
Old 14th September 2006, 10:17   #8  |  Link
check
phjbdpcrjlj2sb3h
 
check's Avatar
 
Join Date: Sep 2005
Location: Western Australia
Posts: 1,691
sorry, i was referring to
"Here's Andy's FFDShow.
Link"
check is offline   Reply With Quote
Old 14th September 2006, 10:31   #9  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
People seem to like Andy's FFdshow and ask for it.
Jeremy Duncan is offline   Reply With Quote
Old 14th September 2006, 23:32   #10  |  Link
anton_foy
Registered User
 
Join Date: Dec 2005
Location: Sweden
Posts: 703
Having problems running FFDShow in avisynth 2.5, it says error: ffavisynth.dll is not an Avisynth 2.5 plugin.

This was after I had download the newest version of FFDShow.

Edit: sorry bout that I forgot the "C" in LoadCPlugin

Last edited by anton_foy; 14th September 2006 at 23:41.
anton_foy is offline   Reply With Quote
Old 14th September 2006, 23:43   #11  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
Does it work with LoadCPlugin? It has a bad habit of rarely working even then; it always does with my compiles, but not always for others. If not try this: ffavisynth.
foxyshadis is offline   Reply With Quote
Old 15th September 2006, 00:24   #12  |  Link
anton_foy
Registered User
 
Join Date: Dec 2005
Location: Sweden
Posts: 703
Thanks Foxyshadis it works great now using LoadCPlugin.
Would it be possible to use FFDShow when rendering in Adobe After Effects? I think I read that somewhere but I cant find the thread.
anton_foy is offline   Reply With Quote
Old 21st September 2006, 08:32   #13  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
No, sorry, the Devil lib is used in ImageSource only for decoding image formats. (Sort of like ImageMagick library.) Has absolutely nothing to do with avisynth internals or with video at all.
foxyshadis is offline   Reply With Quote
Old 25th September 2006, 18:39   #14  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
Okay, this is getting a little off the paranoid deep end. Why are you bringing all of this up? Of what interest is this to people using ffdshow & avisynth to play movies?
foxyshadis is offline   Reply With Quote
Old 25th September 2006, 18:53   #15  |  Link
Pookie
Registered User
 
Join Date: Apr 2005
Posts: 1,339
If only it was 777 , he could have won at the slots in Vegas

Nostradamus predicted the emergence of a Windows DLL that would be used in video playback.
He was only off by 5 letters.

Last edited by Pookie; 25th September 2006 at 18:59.
Pookie is offline   Reply With Quote
Old 26th September 2006, 08:08   #16  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,391
I'm going to reformat all my scripts, to make them appear in grouped paragraphs with the following linecounts:

4 8 15 16 23 42

__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 26th September 2006, 09:43   #17  |  Link
Pookie
Registered User
 
Join Date: Apr 2005
Posts: 1,339
Lol

http://www.moviesounds.com/easy/ufo.wav


Last edited by Pookie; 26th September 2006 at 10:05.
Pookie is offline   Reply With Quote
Old 30th October 2006, 04:44   #18  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
This is my HTPC setup and my favourite FFdshow Settings.

Display: 793df Samsung CRT Monitor
Size of image: 17" including case
Viewing distance: a foot and a half
Connection type: VGA
Video card: Rage 128 Ultra AGP 4x
CPU: 3.06 Northwood
Memory: 1 stick 512 DDR-SDRAM

OS: XP Pro
Driver version: ati2dvaa.dll, version 6.13.0010.5004 (English)
Output resolution: 1024x768
Add. enh: (ie. AA, AF) None
Video & Audio Codec: DScaler 5008
Video Renderer: VMR 7 Windowed
Ffdshow version: October 29, 2006 20:51:25 (msvc 2005, x86, ansi)

FFdshow (in order)
- Raw Video: All supported

- Avisynth:
Input colorspaces; YV12
LoadPlugin("G:\Program Files\AviSynth 2.5\plugins\colormatrix.dll")
setmtmode(2, 0)
colormatrix(mode="Rec.601->Rec.709")
SPresso(limit=2, limitC=13, bias=100, biasC=100, RGmode=17, RGmodeC=17)

- Resize and aspect:
Specify Size; 1280x720
No aspect ratio correction
Lanczos
Number of Taps; 2
Luma Sharpen; 0.50
Accurate rounding checked

- Queue & Misc: Check Queue output samples. Uncheck "Use Queue only in"

- Output: YV12
Allow output format hanges during playback, checked Green.

Here's a picture of my settings.
Link

Last edited by Jeremy Duncan; 30th October 2006 at 04:48.
Jeremy Duncan is offline   Reply With Quote
Old 7th November 2006, 00:49   #19  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
LSF with ss of 1.0 wil cause crazy aliasing, you really need at least 1.1 for watchability and 1.25-1.4 is better. You also might try using soft=-1 (or something like 10-15 to manually set it), which refrains from sharpening the smoother areas (like a rudimentary seesaw). I think, it's kind of hard to tell.

Still, seesaw is definitely designed to be better for denoising than LSF, and some videos don't need much sharpening, as it probably the case here.
foxyshadis is offline   Reply With Quote
Old 7th November 2006, 03:29   #20  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
Quote:
Originally Posted by Jeremy Duncan View Post
________LimitedSharpenFaster Configuration made by Me________

Codecs: All supported
Resize & aspect:
Multiply by 2.000
No aspect ratio correction
Lanczos
Taps: 2
Avisynth: YV12 checked

SPresso(limit=2, limitC=2, bias=76, biasC=76, RGmode=4, RGmodeC=4)
LimitedSharpenFaster(ss_x=1.0, ss_y=1.0, Smode=3, strength=80, overshoot=1)

Queue & Output: Queue output samples checked
Output: YV12 checked
Quote:
Originally Posted by foxyshadis View Post
LSF with ss of 1.0 wil cause crazy aliasing, you really need at least 1.1 for watchability and 1.25-1.4 is better.
That's why I resize before Avisynth. This gets rid of the Aliasing.
If I use ss of 1.1 or more it becomes unplayable in realtime.
Probably a nice idea to use the ss you recommend when you encode though.
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 21:29.


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