主题
最后登录1970-1-1
回帖0
精华
积分294
威望
RP
金钱 柯币
人气 ℃
注册时间2004-6-20
|
发表于 2006-5-25 21:13:19
|
显示全部楼层
回复: 怎样用在系统中用MPC播放REAL媒体?
以下全部是搜索来的,我稍微修改了点小区别(如将WINNT换为WINDOWS等),请向原作者致以诚挚的谢意!
自己提取real解码器,安装real官方播放器时,一般会在C:\Program Files\Common Files\real下留下Real解码器的内容。90%以上的rm播放是只用到了C:\Program Files\Common Files\real\Codecs\下的插件。提取这个目录下所有文件,再在操作系统目录下提取pncrt.dll文件,下载MPC作者那儿的RealMediaSplitter.ax,把这些全部放到自己随意建的一个目录下(注意,这个vbs脚本会把pncrt.dll和RealMediaSplitter.ax二个文件复制到"C:\WINDOWS\system32\",win98下自己改一下路径吧)
新建一记事本文件:
On Error Resume Next
Dim fso,key,InstallPath,value
Set fso = CreateObject("Scripting.FileSystemObject")
key = "HKEY_CLASSES_ROOT\SOFTWARE\RealNetworks\Preferences\DT_Codecs\"
InstallPath = "C:\WINDOWS\system32\"
Set WshShell = Wscript.CreateObject("Wscript.Shell")
value = WshShell.RegRead (key) <> vbNullString
If (value) Then
MsgBox("您的系统可能已安装Real解码器了")
Else
FullName = WScript.ScriptFullName
ScriptName = WScript.ScriptName
RealcodePath = Left(FullName,Len(FullName)-Len(ScriptName))
wshshell.RegWrite key ,RealcodePath
fso.CopyFile "pncrt.dll" ,InstallPath
If fso.FileExists(InstallPath & "RealMediaSplitter.ax")=false Then
fso.CopyFile "RealMediaSplitter.ax" ,InstallPath
End If
WshShell.run ("regsvr32.exe RealMediaSplitter.ax")
End If
保存为install.vbs
再建立一记事本文件,
On Error Resume Next
Dim fso,key,InstallPath
key = "HKEY_CLASSES_ROOT\SOFTWARE\RealNetworks\Preferences\DT_Codecs\"
InstallPath = "C:\WINDOWS\system32\"
Set fso = CreateObject("Scripting.FileSystemObject")
Set WshShell = Wscript.CreateObject("Wscript.Shell")
IF (WshShell.RegRead (key) <> vbNullString) Then
WshShell.RegDelete key
End If
WshShell.run("regsvr32.exe RealMediaSplitter.ax /u")
If fso.FileExists(InstallPath & "pncrt.dll") Then
fso.DeleteFile("C:\WINDOWS\system32\pncrt.dll")
End If
If fso.FileExists(InstallPath & "RealMediaSplitter.ax") Then
fso.DeleteFile("C:\WINDOWS\system32\RealMediaSplitter.ax")
End If
保存为unstall.vbs
把这二个vbs脚本放到你建立的提取文件的目录下,绿色版本就OK了~用Windows Media Player 6.4可以解码90%的rm,rmvb文件了,而且吃资源很小。不过,这种方式不能播放一些极少数的rm文件。原因在于Real 媒体的 DirectShow 模式不支持流媒体的回放~官方的播放器解码这类rm文件时,通过pnen3260.dll调用了一些相应的插件。不过也是可以做成绿色版的,这次要把C:\Program Files\Common Files\Real\下的三个目录:Codecs,Common,Plugins提取出来放到你随意新建的一目录,RealMediaSplitter.ax和pncrt.dll放到你新建目录下的根目录~
我(原作者)给出我写的脚本,
安装的脚本:
install.vbs
Dim fso,value
Set fso = CreateObject("Scripting.FileSystemObject")
Set WshShell = Wscript.CreateObject("Wscript.Shell")
key = "HKEY_CLASSES_ROOT\SOFTWARE\RealNetworks\Preferences\"
InstallPath = "C:\WINDOWS\system32\"
FullName = WScript.ScriptFullName
ScriptName = WScript.ScriptName
RealcodePath = Left(FullName,Len(FullName)-Len(ScriptName))
On Error Resume Next
value = WshShell.RegRead (key) <> vbNullString
If (value) Then
MsgBox("您的系统可能已安装Real解码器了")
Else
wshshell.RegWrite key & "DT_Codecs\",RealcodePath & "Codecs\"
wshshell.RegWrite key & "DT_Common\",RealcodePath & "Common\"
wshshell.RegWrite key & "DT_Plugins\",RealcodePath & "Plugins\"
If fso.FileExists(InstallPath & "pncrt.dll")=false Then
fso.CopyFile "pncrt.dll" ,InstallPath
End If
If fso.FileExists(InstallPath & "RealMediaSplitter.ax")=false Then
fso.CopyFile "RealMediaSplitter.ax" ,InstallPath
End If
WshShell.run ("regsvr32.exe RealMediaSplitter.ax")
End If
卸载的脚本:
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
Set WshShell = Wscript.CreateObject("Wscript.Shell")
key = "HKEY_CLASSES_ROOT\SOFTWARE\RealNetworks\Preferences\"
InstallPath = "C:\WINDOWS\system32\"
On Error Resume Next
IF (WshShell.RegRead (key & "DT_Codecs\") <> vbNullString) Then
WshShell.RegDelete key & "DT_Codecs\"
WshShell.RegDelete key & "DT_Common\"
WshShell.RegDelete key & "DT_Plugins\"
End If
WshShell.run("regsvr32.exe RealMediaSplitter.ax /u")
If fso.FileExists(InstallPath & "pncrt.dll") Then
fso.DeleteFile("C:\WINDOWS\system32\pncrt.dll")
End If
If fso.FileExists(InstallPath & "RealMediaSplitter.ax") Then
fso.DeleteFile("C:\WINDOWS\system32\RealMediaSplitter.ax")
End If
完美主义者可以用这种完整的Real解码包,不过那种rm格式还是无法用Windows Media Player播放的,Media Play Classic还行~什么?不支持网络播放~我宁可用nettransport拖下来看^
安装vsfilter,mkv,ac3filter,写几个bat文件就行了:
例如vsfilter:
先弄到一个unrar.dll^^(可以解rar压缩的字幕包)
建一记事本文件,
(2k/xp用,98不支持 %SystemRoot%,自己改路径吧)
copy VSFilter.dll %SystemRoot%\system32\
copy unrar.dll %SystemRoot%\system32\
regsvr32 %SystemRoot%\system32\VSFilter.dll
保存为register_NT.bat,安装用
再建一记事本文件:
regsvr32 %SystemRoot%\system32\VSFilter.dll /u
del %SystemRoot%\system32\VSFilter.dll
del %SystemRoot%\system32\unrar.dll
保存为unregister_NT.bat,卸载用
再建一快捷方式,指向
C:\WINDOWS\system32\rundll32.exe VSFilter.dll,DirectVobSub
把这些放到你随意建的一个目录,绿色版完成~
以上慢慢看啊,虽然是我搜的,我自己也觉得很麻烦…… |
|