|2005-03-17, 04:16 AM||#1|
把DVD節目複製出來是mpeg2文件檔, 用RealSystem Producer Plus進行壓縮,
audio=MPASource( "F:\dvdrip\vob\VOB\a\d AC3 T01 3_2ch 448Kbps 48KHz.mp3", normalize = false)
ac3source("F:\dvdrip\vob\VOB\1 AC3 T02 2_0ch 192Kbps DELAY 0ms.ac3")
By the way:有沒有這個軟體的RMVB/WMV插件？如果有的話，把流媒體轉換成VCD又多了一個選項！
用Helix Producer Plus 9.0.1
DVD2AVI & MPEG2DEC
A recently released MPEG-2 decoding plugin for Avisynth makes it possible to speed up DVD2AVI frameserving quite a bit by keeping the video data in the DVD-native YUV2 colorspace (VFAPI operates in RGB so everything has to be converted which of course takes time). Furthemore, combined with a MMX optimized Avisynth version, we can expect a considerable performance gain. On my machine I got 4 fps more using this combination to encode a DivX compared to the results using the traditional VFAPI way. But while it's faster it's also yet another level of complexity so unless you're familiar with the VFAPI way (explained in every guide that uses DVD2AVI) I suggest that you do not touch this method.
Since we're going to use avisynth in this tutorial, and not only as a simple frameserving mechanism but to crop and resize as well I strongly suggest that you visit the Avisynth homepage and check out the Avisynth tutorial and the Avisynth scripting reference. While you can get along without having read these it's as with any advanced program: You can only properly master it by having RTFM!
You need the following software in this guide:
DVD2AVI 1.76 or later
MPEG2DEC Avisynth plugin.
Now let's get started
Step 1: Create a DVD2AVI Project
At first you'll have to load your VOB files. If the files are consecutively named selecting the first VOB will load all the others.
The next step is finding out what kind of movie we're dealing with. Press F5 to start the preview. Let it run for a bit and watch the status window.
Here's two thing you may want to write down: The first is Aspect Ratio. Here you'll either get 16:9 or 4:3. The other is the frame type.
Frame Rate = 25.000 fps: your source is PAL and you can skip the following step.
Frame Rate = 29.970 fps: Let the preview run for a couple of minutes, then take a look at the Video Type: If it's FILM at a percentage higher or equal to 95% you can activate Forced FILM as shown below. Otherwise you will have to perform IVTC.
The next step is audio decoding. Depending on your favorite audio decoder you can let DVD2AVI decode your audio track.
As I prefer to let Graphedit do this task I always select None here. Just select the right track if you want DVD2AVI to decode the audio. If you need downsampling you can activate downsampling in the 48 -> 44.1KHz submenu. I suggest you use High quality when using that feature.
Finally in the Dolby Digital submenu activate decode.
Now we have to make sure that the video data stays in YUV format. Make sure that YUV is checked, otherwise we're going to lose our speed advantage.
The next step is finding out the parameters for the cropping operation which we're going to perform later on (not that VCD&SVCD creation don't need this). Move the slider of DVD2AVI to a position where you can see a picture, then activate the Clip & Resize window from the Video submenu and check the checkbox in the upper right of the window:
Note that certain options of this window don't work, but they eventually will in the next full release.
Move the Top and Bottom sliders until the black bars on top and bottom have disappeared. Unfortunately it's not possible at the moment to crop by 1 pixel, so if you thing that one value leaves a black line and a higher value crops into the picture just take the value in the middle.
The values shown in the screenshot are for a 1:2.35 16:9 movie, but not all movies are transferred in the same way so you better do this step instead of just using some values you found somewhere on the web.
Once you've found the right values uncheck the checkbox again.
Now you'll just have to create a DVD2AVI project file which can then be processed further.
Step 2: Avisynth setup & script creation
First of all comes the installation. After unpacking you have to copy AVISYNTH.dll to the following directory:
Windows 9x/ ME: c:\windows\system
Windows NT / 2000: c:\winnt\system
Windows XP: c:\windows\system32
Then double click on install.reg and just to make sure reboot your machine.
Now let's verify that Avisynth is properly installed by creating the following script:
Type this line in Notepad, then save it as c:\test.avs. Make sure that the filetype field in the save dialog box says All Files (*.*) and NOT Textfile (*.txt). Now right click on c:\test.avs in explorer, select open-with and select the Media Player from the list. If it plays, everything is good and we can proceed.
To load the MPEG2Dec plugin you have to use the LoadPlugin command and give it the full path and filename of the plugin to load as argument. The next step is loading your DVD2AVI project file using the mpeg2source command. Note that MPEG2Dec provides this function so if you forget LoadPlugin it won't work. The following is a sample scrip which simply opens the d2v file.
If you load this script into any encoding program that can read avs files you'll get the output of DVD2AVI, that is the decoded MPEG-2 data without any resizing applied (so the aspect ratio will be off).
The next step is cropping. You can skip it for SVCD creation. Now the values you wrote down when working in DVD2AVI become useful again. Cropping works by the use of the Crop function in Avisynth. It takes 4 arguments: Left, Top, Horizontal output size and vertical output size. Here's an example which crops a 16:9 1:2.35 NTSC stream:
This will crop the top 60 line of the video, plus the bottom 60 lines (remember that the video stream originally was 720x480, so if you crop the top 60 lines away and take the next 360 lines that cuts off the bottom 60 as well - 60 (black) + 360 (video) + 60 (black) = 480) If you add this line to the script above you'll now get a 720x360 video stream which has no black bars, just the video data.
Now we come to the last operation: resizing. Avisynth offers both Bilinear and Bicubic resize. Bicubic is more accurate and hence slower, and it should be used for higher quality output (2 CD DivX and SVCD). The arguments are the same for both resizing methods: You specify horizontal and vertical output size. For instance to resize your video stream to 640x272 using Bilinear resizing you'd add the following line to your script:
For Bicubic Resize the line would be: BicubicResize(640,272).
So a full script that would load the d2v project, crop and resize it to 640x272 would be:
Note: It's also possible to do resizing and cropping using the regular filters. In order to do this simply place all the crop parameters after the resize parameters. Example:
As mentioned before here no cropping is necessary. But once again we have to do the letterboxing on our own. As people who have used VirtualDub for SVCD frameserving already know what we have to do is to resize to 480x362, then add some black bars. To add black borders we use AddBorders which takes the following 4 arguments: left, top, right and bottom. In Avisynth language that would become the following:
So the script would become
Please note that for PAL the script would be
If you have done audio in DVD2AVI you might want to add this to your Aviynth script. In order to do this you make use of the WavFile function which takes the path and name of the WAV file as argument. And now we get a little more into programming. I don't know if this is completely accurate but it appears to me as if mpeg2source would return the mpeg2 stream and all the following operations would be applied to this returned stream. If you'd add wavsource("d:\matrix\audio.wav") after mpeg2source you'd end up with some errors, as now Avisynth would try to apply the cropping to you wave source, which of course won't work. What you have to do instead is to define temporary variables for both video and audio. Here's an example:
where the last line adds video and audio stream to one stream and returns it. Now you can place your crop & resize lines.
Is the final result for a DivX Avisynth script.
You can now load your avs file into the encoding program of your choice. Note that to prevent confusion I won't link to all the possible guides where you could continue now but if you've made it so far I'm sure you'll manage to find the right place to continue.
A last word for the DivX crowd: In VirtualDub you have to set video to Fast Recompress to profit from the speed increase. This means that you can't use additional filters :/
This document was last updated on March 13, 2003
沒那麼麻煩，我用helix producer 9.2+elecard codec直接就將vob轉成了rmvb。
在電腦沒裝mpeg2 code的情況下，RealSystem Producer Plus能直接對*.vod文件進行轉換。