[MPlayer-users] Re: Reencoding/concatenating to minimize number of disks?
Tobias Diedrich
ranma at gmx.at
Fri Mar 14 19:29:09 CET 2003
Svante Signell wrote:
> An advice on how to re-encode two XVID/DIVX to SVCD's as efficiently as
> possible would be very much appreciated. Using the mencvcd script (in
Try using TMPGEnc (http://www.tmpgenc.net/) as it is much better than
mpeg2enc. It's a win32 app, but supposedly it runs under wine, although
I only got it to work right with crossover wine... :-/
I'm using a small wrapper program to make it scriptable:
#include <windows.h>
#include <stdio.h>
#include <process.h>
int main(int argc, char **argv)
{
HWND main;
HWND toppanel;
HWND bottompanel;
HWND audio;
HWND video;
HWND output;
HWND start;
int i;
if (argc != 4) {
printf("Usage: %s: <tpr> <source> <output>\n", argv[0]);
exit(1);
}
puts("Hello world!");
spawnl(_P_NOWAIT, "tmpgenc.exe", "tmpgenc.exe", argv[1], NULL);
for (i=0; i<100 && (main = FindWindow("TMainForm", "TMPGEnc")) == 0; i++) Sleep(100);
printf("main=%d\n", main);
if (main == 0) {
puts("Could not find main window!");
exit(1);
}
Sleep(2000);
bottompanel = FindWindowEx(main, NULL, "TPanel", NULL);
printf("bottompanel=%d\n", bottompanel);
toppanel = FindWindowEx(main, bottompanel, "TPanel", NULL);
toppanel = FindWindowEx(main, toppanel, "TPanel", NULL);
printf("toppanel=%d\n", toppanel);
audio = FindWindowEx(bottompanel, NULL, "TEdit", NULL);
audio = FindWindowEx(bottompanel, audio, "TEdit", NULL);
printf("audio=%d\n", audio);
video = FindWindowEx(bottompanel, audio, "TEdit", NULL);
printf("video=%d\n", video);
output = FindWindowEx(bottompanel, video, "TEdit", NULL);
printf("output=%d\n", output);
start = FindWindowEx(toppanel, NULL, "TButton", "Start");
printf("start=%d\n", start);
SendMessage(video, WM_SETTEXT, 0, (LPARAM) argv[2]);
SendMessage(output, WM_SETTEXT, 0, (LPARAM) argv[3]);
SendMessage(start, WM_LBUTTONDOWN, 0, 0);
printf("encoding start\n");
SendMessage(start, WM_LBUTTONUP, 0, 0);
printf("encoding done\n");
SendMessage(main, WM_CLOSE, 0, 0);
return 0;
}
--
Tobias PGP: 0x9AC7E0BC
This mail is made of 100% recycled bits
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-users/attachments/20030314/795c7c7f/attachment.pgp>
More information about the MPlayer-users
mailing list