• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 553
  • Last Modified:

Convert Video to wmv

Hello,

How to convert video to wmv, there is free component? especially from avi to wmv
There are other free components or free source to convert video to other types
I'm using Delphi 2009, if not i want other delphi version

Thanks
0
Mahdi78
Asked:
Mahdi78
  • 3
  • 2
  • 2
1 Solution
 
ofirproCommented:
how about windows media encoder, i believe the older version is still free, or if you would like, Windows Movie Maker will do it too

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=03D169B3-A410-4451-82AF-18F23FB63ACB

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=000a16f5-d62b-4303-bb22-f0c0861be25b
0
 
Mahdi78Author Commented:
The SDK came with C# and vb, and i don't practice these programming languages
0
 
ofirproCommented:
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Ephraim WangoyaCommented:

Try ViedoLab

http://www.mitov.com/html/download_videolab.html

Use
 TVLDSVideoPlayer;
 TVLASFLogger;
0
 
Mahdi78Author Commented:
I need free component VideoLab is commercial
@ofirpro gave me WM 8 Encoding Utility, it is a command line tool, i can convert avi to wmv by using MS-Dos prompt

example : wm8eutil -input clip.avi -output clip.wmv

but i didn't get how execute this command line from delphi, tried ShellExecute and WinExec
I don' know i use them to execute command line
0
 
Ephraim WangoyaCommented:

I see you got a way to do it. Here is another method without ShellExecute
uses
  ShellAPI;


function ExecAndWait(Path: PChar; Timeout: DWORD): integer;
var
  WaitResult : integer;
  StartupInfo: TStartupInfo;
  ProcessInfo: TProcessInformation;
  iResult : integer;
begin
  FillChar(StartupInfo, SizeOf(TStartupInfo), 0);
  with StartupInfo do
  begin
    cb := SizeOf(TStartupInfo);
    dwFlags := STARTF_USESHOWWINDOW or STARTF_FORCEONFEEDBACK;
    wShowWindow := sw_hide;
  end;
  if CreateProcess(nil,path,nil, nil, False,
		NORMAL_PRIORITY_CLASS, nil, nil,
		StartupInfo, ProcessInfo) then
  begin
    WaitResult := WaitForSingleObject(ProcessInfo.hProcess, timeout);
    Result := WaitResult;
  end
  else
    Result := GetLastError;
end;

procedure TForm3.Button1Click(Sender: TObject);
var
  CommandLine: PChar;
  S: string;
begin
  S := '"C:\Program Files (x86)\Windows Media Components\Tools\wm8eutil" -input search_1.avi -output search_1.wmv';
  StrPCopy(CommandLine, S);
  ExecAndWait(CommandLine, INFINITE);
end;

Open in new window

0
 
Mahdi78Author Commented:

Thank you @ewangoya, i found the how i use Shellexecute like this

procedure TForm1.Button1Click(Sender: TObject);
begin
ShellExecute(Handle, 'open', PChar('cmd.exe'),
Pchar('/c wm8eutil -input clip.avi -output clip.wmv'),
Pchar('C:\Program Files\Windows Media Components\Tools\'), SW_Hide);  // directory where the executable wm8eutil.exe is available
end;

Your method freezing the application. and raise access violation error when finish the converting

If you know how to read progress shown in cmd screen on memo and how to cancel the converting operation with my method, then i will create a new question with 500 points for that.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now