史萊姆論壇

史萊姆論壇 (http://forum.slime.com.tw/)
-   多媒體影音轉檔燒錄技術文件 (http://forum.slime.com.tw/f129.html)
-   -   Mpeg2轉RMVB, 有沒有一次直接的辦法? (http://forum.slime.com.tw/thread144842.html)

psac 2005-03-17 04:16 AM

Mpeg2轉RMVB, 有沒有一次直接的辦法?
 
Q:
Mpeg2轉RMVB, 有沒有一次直接的辦法?
我通過DVD複製軟體,
把DVD節目複製出來是mpeg2文件檔, 用RealSystem Producer Plus進行壓縮,
總是提示不支持.
(系統已經安裝了mpeg2解碼器.MPC等都能正常播放)
而且WMP編碼器都可以正常編碼, 可惜大家好像都不喜歡WMV格式電影.

各位可有辦法解決??


A:
換別的mpg2解碼器...用Avisynth載入視瀕和音瀕,載入字幕,並去拉絲,用helix開啟就可以了。

論壇裡有很多關於這方面的內容,你搜找找看。

Q:我喜歡WMV格式的!我壓片子都是壓成WMV,文件檔不會很大又清晰!
有沒有關於這個軟體的使用說明啊?

我安裝了一下,用不來,用Google也沒搜到教學,已經幾次聽人說到這個軟體了,
相信肯定是個很好的東西。


A:只要會編輯AviSynth的AVS文件就行了,用GK、autorv9xp等軟體,根本不用那麼費事。
一直以來,DVD轉RMVB都是先將DVD轉為AVI 後,在再RMVB,這樣一來不僅在速度上和品質上都會有影響。
我發現helix可以開啟.avs文件,這個發現使dvd直轉RMVB成為了可能,而且變得十分容易。
首先找到AviSynth 2.5(這個支持YV12,為做DVDRIP提供更好的環境,所以作為首選)
MPEG2Dec3.dll(這個是載入d2v工程文件)、
decomb.dll(這個是用來做去絲的)、
ac3source.dll(這是載入AC3文件,當然是好是2聲道的,如果5.1聲道可能會有問題,如果只有5.1的AC3,最好轉MP3,然後用下面的插件載入)、
mpasource.dll(載入mp3文件)、
VSFilter.dll(載入字幕插件)
下面是我做的一個.avs文件,大家可以參考,加#號是不作處理部分。
MP3語法:
# PLUGINS
LoadPlugin("D:\PROGRA~1\GORDIA~1\MPEG2Dec3.dll")
LoadPlugin("D:\PROGRA~1\GORDIA~1\decomb.dll")
LoadPlugin("D:\PROGRA~1\GORDIA~1\mpasource.dll")
LoadPlugin("D:\PROGRA~1\GORDIA~1\VSFilter.dll")
# SOURCE
video=mpeg2source("F:\dvdrip\vob\VOB\a\1.d2v")
video=ConvertToYUY2(video)
video=Telecide(video).Decimate(5)
video=crop(video,6,10,-6,-10)
video=LanczosResize(video,640,336)
audio=MPASource( "F:\dvdrip\vob\VOB\a\d AC3 T01 3_2ch 448Kbps 48KHz.mp3", normalize = false)
DelayAudio(audio,-0.128)
audioDub(video, audio)
# SUBTITLES
VobSub("F:\dvdrip\vob\VOB\1")

AC3語法:
# PLUGINS
LoadPlugin("D:\PROGRA~1\GORDIA~1\MPEG2Dec3.dll")
LoadPlugin("D:\PROGRA~1\GORDIA~1\decomb.dll")
LoadPlugin("D:\PROGRA~1\GORDIA~1\VSFilter.dll")
LoadPlugin("D:\PROGRA~1\GORDIA~1\ac3source.dll")
# SOURCE
mpeg2source("F:\dvdrip\vob\VOB\a\1.d2v")
ConvertToYUY2()
Telecide().Decimate(5)
crop(6,10,-6,-10)
LanczosResize(640,336)
ac3source("F:\dvdrip\vob\VOB\1 AC3 T02 2_0ch 192Kbps DELAY 0ms.ac3")
# SUBTITLES
VobSub("F:\dvdrip\vob\VOB\1")


Q:
果然是好辦法。


By the way:有沒有這個軟體的RMVB/WMV插件?如果有的話,把流媒體轉換成VCD又多了一個選項!


A:
http://www.souxin.com/stream-software-play.htm

Q:

那個。。。。

如果是avi格式的話有沒有軟體可以轉成rmvb?

rmvb是不是高品質的rm????

A:
用Helix Producer Plus 9.0.1
這裡有篇來自doom9的文章,只要改把最後一部份換成用Real編碼器就可以了!!


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:

Avisynth
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:

AviSource("c:\temp\test.avi")

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.

LoadPlugin("c:\temp\MPEG2DEC.DLL")
mpeg2source("D:\matrix\matrix.d2v")

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:

Crop(0,60,720,360)

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.

DivX resizing

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:

BilinearResize(640,272)

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:

LoadPlugin("C:\temp\MPEG2DEC\MPEG2DEC.DLL")
mpeg2source("d:\matrix\matrix-unresized.d2v")
Crop(0,60,720,360)
BilinearResize(640,272)

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:

BilinearResize(640,272,0,60,720,360)

SVCD resizing

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:

BicubicResize(480,360)
AddBorders(0,60,0,60)

So the script would become

LoadPlugin("C:\temp\MPEG2DEC\MPEG2DEC.DLL")
mpeg2source("d:\matrix\matrix-unresized.d2v")
BicubicResize(480,360)
AddBorders(0,60,0,60)

Please note that for PAL the script would be

LoadPlugin("C:\temp\MPEG2DEC\MPEG2DEC.DLL")
mpeg2source("d:\matrix\matrix-unresized.d2v")
BicubicResize(480,432)
AddBorders(0,72,0,72)

Audio:

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:

video=mpeg2source("d:\matrix\matrix-unresized.d2v")
audio=wavsource("d:\matrix\audio.wav")
audiodub(video,audio)

where the last line adds video and audio stream to one stream and returns it. Now you can place your crop & resize lines.

LoadPlugin("C:\temp\MPEG2DEC\MPEG2DEC.DLL")
video=mpeg2source("d:\matrix\matrix-unresized.d2v")
audio=wavsource("d:\matrix\audio.wav")
audiodub(video,audio)
Crop(0,60,720,360)
BilinearResize(640,272)

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

Q:
沒那麼麻煩,我用helix producer 9.2+elecard codec直接就將vob轉成了rmvb。

A:
那效果只能用「慘」來形容了
Elegant只做deinterlace,不作IVTC,效果可想而知 !
在電腦沒裝mpeg2 code的情況下,RealSystem Producer Plus能直接對*.vod文件進行轉換。
vob說也是mpeg2編碼.沒有mpeg2 code是不能對它解碼的
覺得很奇怪啊。。不信你試試。。
在windowsXP+sp1下試過,就是這樣啦


所有時間均為台北時間。現在的時間是 03:19 AM

Powered by vBulletin® 版本 3.6.8
版權所有 ©2000 - 2024, Jelsoft Enterprises Ltd.

『服務條款』

* 有問題不知道該怎麼解決嗎?請聯絡本站的系統管理員 *


SEO by vBSEO 3.6.1