| View previous topic :: View next topic |
| Author |
Message |
Simsgy Grandmaster Cheater
Reputation: 0
Joined: 07 May 2007 Posts: 581 Location: My new avatar <3
|
Posted: Sun Oct 07, 2007 2:10 pm Post subject: [Release - Delphi] My First Delphi Component. |
|
|
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  _________________
|
|
| Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Sun Oct 07, 2007 2:15 pm Post subject: |
|
|
| 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 |
|
 |
Simsgy Grandmaster Cheater
Reputation: 0
Joined: 07 May 2007 Posts: 581 Location: My new avatar <3
|
Posted: Sun Oct 07, 2007 2:16 pm Post subject: |
|
|
By saying "I'll fix that" I meant adding conversion for other extensions. _________________
|
|
| Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Sun Oct 07, 2007 2:17 pm Post subject: |
|
|
| Guess again. |
|
| Back to top |
|
 |
DeletedUser14087 I post too much
Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Sun Oct 07, 2007 2:17 pm Post subject: |
|
|
Hmm...
Looks almost the same as SWF component.
just for YouTube
Edit: you also leeched a source from Torry's Delphi Pages lol.
you didn't made it. |
|
| Back to top |
|
 |
|