Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Release - Delphi] My First Delphi Component.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Simsgy
Grandmaster Cheater
Reputation: 0

Joined: 07 May 2007
Posts: 581
Location: My new avatar <3

PostPosted: Sun Oct 07, 2007 2:10 pm    Post subject: [Release - Delphi] My First Delphi Component. Reply with quote

My first Delphi component (Source included).
A youtube downloader + converter checked in Delphi 7 and 2007, and it's working fine.

Examples for valid functions:
Code:

YoutubeDownload1.GetVideo('http://www.youtube.com/watch?v=Xps7AM8HbjE', 'C:\Video.flv');
//The GetVideo save path must be with .flv in the end.

YoutubeDownload1.GetImage('http://www.youtube.com/watch?v=Xps7AM8HbjE', 'C:\Temp\YoutubeImage.jpg');
//Useful if you want to show the default image of the video on your program.

YoutubeDownload1.ConvertFLV('C:\Video.flv', 'C:\Video.mpg');
{I'll fix that. meanwhile it's only converting to MPG (Im using ffmpeg, so make sure ffmpeg.exe is in the same directory as your application.}


Download:
http://www.mediafire.com/download.php?2zqmd24bgjy

Thank you Smile

_________________

Designer, WebMaster and a Delphi programmer.
TrPlayer, my biggest Delphi project hosted on SourceForge.net
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Sun Oct 07, 2007 2:15 pm    Post subject: Reply with quote

Code:

function TYoutubeDownload.ConvertFLV(SourceFile, DestFile: string): Boolean;
var
myFile : TextFile;
MyHWND: HWND;
begin
AssignFile(myFile, 'C:\convert.bat');
ReWrite(myFile);

WriteLn(myFile, '"' + ExtractFilePath(Paramstr(0)) + 'ffmpeg.exe" -i "' + SourceFile + '" -vcodec mpeg1video -acodec copy -b 600 "' + DestFile + '"');
Reset(myFile);
CloseFile(myFile);
ShellExecute(MyHWND, 'open', PChar('C:\convert.bat'), nil, nil, SW_SHOWNORMAL);
Result := True;
end;


what's wrong with this
Back to top
View user's profile Send private message
Simsgy
Grandmaster Cheater
Reputation: 0

Joined: 07 May 2007
Posts: 581
Location: My new avatar <3

PostPosted: Sun Oct 07, 2007 2:16 pm    Post subject: Reply with quote

By saying "I'll fix that" I meant adding conversion for other extensions.
_________________

Designer, WebMaster and a Delphi programmer.
TrPlayer, my biggest Delphi project hosted on SourceForge.net
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Sun Oct 07, 2007 2:17 pm    Post subject: Reply with quote

Guess again.
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Sun Oct 07, 2007 2:17 pm    Post subject: Reply with quote

Hmm...

Looks almost the same as SWF component.

just for YouTube Smile

Edit: you also leeched a source from Torry's Delphi Pages lol.

you didn't made it.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites