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
LVL 9
Mahdi78Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mahdi78Author Commented:
The SDK came with C# and vb, and i don't practice these programming languages
0
ofirproCommented:
0
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.