View Full Version : TMPGEnc vs. Mpgtx: mpeg demultiplex
WRFan
2nd October 2004, 02:02
TMPGEnc mpeg tools don't demultiplex mpeg files correctly, if they contain errors. It demultiplexes only part of the file, so let's say the input file is 800mb in size, after demultiplexing the video and audio stream files together are just 250-550mb in size, meaning part of the video is lost.
Mpgtx (http://mpgtx.sourceforge.net/) ALWAYS demultiplexes mpeg files correctly, even if they contain errors. But unfortunately this demultiplexer is command-line based, so not very comfortable to use.
Can somebody provide a vbs script for sending mpeg files to the demultiplexer through the "Send To" menu? Or maybe there is a gui for this programme available somewhere?
Or maybe somebody can tell me how to force TMPGEnc to demultiplex properly, cause it fails on every second file, a real pain in the ass
WRFan
2nd October 2004, 05:16
never mind, I got it:
path = "E:\Programme\Hauppauge\Mpgtx Demultiplexer\" '!!! must end with a backslash !!!
Mpgtx = "mpgtx.exe"
Dim wsh, args, infile, fs
' get input files
Set wsh = WScript.CreateObject("WScript.Shell")
Set args = WScript.Arguments
' check path
Set fso = CreateObject("Scripting.FileSystemObject")
If Not fso.FileExists(path & Mpgtx) Then
MsgBox "Could not find Mpgtx!" & vbCR & "(looked for '" & path & Mpgtx & "')", vbCritical, title
WScript.Quit
End If
'process files
infile = args(i)
' If(LCase(getExtension(infile))="mpg") Then 'decode
' wsh.Run(Chr(34) & path & Mpgtx & CHR(34) & " -d ")
wsh.Run(Chr(34) & path & Mpgtx & CHR(34) & CHR(32) & CHR(34) & infile & CHR(34) & " -b " & CHR(34) & getBasename(infile) & CHR(34) & " -d ")
' MsgBox getBasename(infile)
WScript.Quit
Function getBasename(filespec)
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFile(filespec)
getBasename = f.ParentFolder & "\" & fso.GetBaseName(filespec)
End Function
Function getExtension(filespec)
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFile(filespec)
getExtension = fso.GetExtensionName(filespec)
End Function
the first line has to be changed.
Still hope somebody can explain me why TMPGEnc doesn't demultiplex mpegs correctly
Krismen
2nd October 2004, 12:23
WRFan I've checked your vbs script and I've got the following error:
Script: D:\test.vbs
Line: 18
Sign: 1
Error: Index out of bounds
Code: 800A0009
Source: Microsoft VBScript - runtime error
WRFan
2nd October 2004, 20:14
Originally posted by Krismen
WRFan I've checked your vbs script and I've got the following error:
Script: D:\test.vbs
Line: 18
Sign: 1
Error: Index out of bounds
Code: 800A0009
Source: Microsoft VBScript - runtime error
I don't know what the problem might be, works for me. Have you tried it with different files? maybe a prob with a file name.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.