List Info

Thread: How To Play FLV (Flash Video) YouTube




How To Play FLV (Flash Video) YouTube
country flaguser name
United States
2007-07-28 04:27:52

Dear All
I want ask about Flash Video(FLV file). how can we play FLV file on Delphi
Application? it is possible use Flash ActiveX?
Shockwave Object?
if possible how can do that?

Thank You.

--
Regards

Kiyat Yuni Saptoko
http://kiyatyunisaptoko.com
http://starboard.web.id/
http://mobi.web.id

[Non-text portions of this message have been removed]

__._,_.___
.

__,_._,___
RE: How To Play FLV (Flash Video) YouTube
country flaguser name
United States
2007-07-29 13:47:34

I'd meant to look into this myself, so I took the opportunity to run some
quick tests. I did this with Delphi 7, though I could have tried BDS 2006.

It's possible, and the good news is that there are a number of ways.
Probably more than I know, in fact.

First, I'm assuming you know how to get the .FLV files. I snagged one from
YouTube with keepvid.com.

For playback, you could look at some commercial options. There are products
from www.f-in-box.com and www.delphiflash.com that claim FLV support. You
might look at those.

However, I took a different approach. There are a number of open source, or
at least freely available, tools that will play FLV files on a Windows box.
First, I tried using the Flash ActiveX control. Imported it, set the FLV to
it, and it didn't play. I wasn't surprised - I seem to recall having read
that doesn't work, and that you do need to assign a .SWF file for that to
work. Using a .SWF file has worked for me before.

If you download and install VLCPlayer, it can render FLV among a number of
other formats. Also, there's an ActiveX control that you can import in a
similar manner to the Flash.ocx control. There's a page at
http://wiki.videolan.org/index.php/ActiveX/Delphi that describes how to use
it. I tried this and got my FLV file to play.

If you find and download a DirectShow filter (codec) that can handle FLV
files, you could install that and then you can play FLV files in Windows
Media Player and other DirectShow-based applications. The ffdshow package
has some of these filters.

If you go this route, then you could get the DSPack components from
www.progdigy.com and use those to play back multimedia files. I did a quick
test of this, as well, specifying the FLV file, and it played back, too. I
use these components for a commercial project and they work well for the
WMV/AVI/MPEG files I play with them.

Hope that helps a bit.

I'll offer up my standard warning to all developers starting to use these
third-party packages: Be sure you're clear on the legal issues surrounding
your particular project. If it's experimentation and for yourself, there's
probably not a lot of worry in doing things. If you're doing work for sale
or even use within a company, then some of these tools are GPL, and that can
have consequences for your program. Similarly, most third-party tools like
the Flash.ocx control have a license agreement that spells out acceptable
uses, and that can be problematic. This is lawyer stuff, but may be
important if you're developing commercial software. Seek advice if you're
not sure.

From: delphi-en%40yahoogroups.com">delphi-enyahoogroups.com [mailto: delphi-en%40yahoogroups.com">delphi-enyahoogroups.com] On Behalf
Of Kiyat Yuni Saptoko
Sent: Saturday, July 28, 2007 2:28 AM
To: delphi-en%40yahoogroups.com">delphi-enyahoogroups.com
Subject: [delphi-en] [ASK] How To Play FLV (Flash Video) YouTube

Dear All
I want ask about Flash Video(FLV file). how can we play FLV file on Delphi
Application? it is possible use Flash ActiveX?
Shockwave Object?
if possible how can do that?

Thank You.

[Non-text portions of this message have been removed]

__._,_.___
SPONSORED LINKS
Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

Yahoo! Groups

Moderator Central

get help and provide

feedback on Groups.

Yoga Resources

on Yahoo! Groups

Take the stress

out of your life.

Dispose method !
country flaguser name
United States
2007-07-30 02:10:48



Type
PRec = ^Rec;
Rec = packed record
VarP : integer ;
End;

Type
RecArray = array of PRec ;

Assigninment :

function TCLassOne.FillArray ;
Var
VarOne :PRec ;
VarI : Integer l
Begin
SetLength(RecArray,500);
for VarI=0 to 500 do
Begin
New(VarOne );
VarOne^.VarP := VarI;
RecArray[VarI]:= VarOne ;
End;
End;

Releasing Mem :

function TCLassOne.ReleaseArray;
Var
VarI : Integer l
Begin
for VarI := 0 to Length(RecArray) - 1 do
begin
if (RecArray[VarI ] = NIL) then break;
Dispose(RecArray[VarI ]);
RecArray[VarI ] := NIL;
end;
End;

Hi seniours ,
im silent user of this group , really scared for asking my first question .but i want expert review ..
i ve mentioned two functions above first for assignment of array and second for reasing mem . but i ve some problem coz mem is not getting free untill appication is closed . means fucntion ReleaseArray isnt releasing mem of records held by array of pointers .
pls pls im stucked .
hope u understand my prob as i dun 've gud english .
thanks and regards .
Saurabh rai.

-------------------------------------------------------
Summit Information Technologies Limited, Gurgaon, India

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity
Visit Your Group
SPONSORED LINKS
Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

New web site?

Drive traffic now.

Get your business

on Yahoo! search.

Yahoo! Groups

Join a yoga group

and take the stress

out of your life.

RE: How To Play FLV (Flash Video) YouTube
country flaguser name
United States
2007-07-30 20:43:13

There's also a commercial package called SmartFlash at
http://www.almdev.com/

From: delphi-en%40yahoogroups.com">delphi-enyahoogroups.com [mailto: delphi-en%40yahoogroups.com">delphi-enyahoogroups.com] On Behalf
Of Warrick Wilson
Sent: Sunday, July 29, 2007 11:48 AM
To: delphi-en%40yahoogroups.com">delphi-enyahoogroups.com
Subject: RE: [delphi-en] [ASK] How To Play FLV (Flash Video) YouTube

For playback, you could look at some commercial options. There are products
from www.f-in-box.com and www.delphiflash.com that claim FLV support. You
might look at those.

[Non-text portions of this message have been removed]

__._,_.___
.

__,_._,___
Re: Dispose method !
country flaguser name
Greece
2007-08-01 06:06:21
O/H Saurabh Rai έγραψε:
> 
> Type 
> PRec = ^Rec;
> Rec = packed record 
> VarP : integer ;
> End;
> 
> Type 
>   RecArray = array of PRec ;
> 
> Assigninment :
> 
> function TCLassOne.FillArray ;
> Var 
>     VarOne :PRec ;
>     VarI : Integer l
> Begin
>         SetLength(RecArray,500);
>         for VarI=0 to 500 do 

i think you pass the end of array by one here
that is you read invalid memory.

I usually write

   for i := Low(RecArray) to High(RecArray) do

>         Begin
>                 New(VarOne );
>                 VarOne^.VarP := VarI; 
>                 RecArray[VarI]:=  VarOne ;
>         End;
> End;
> 
> Releasing Mem :
> 
> function TCLassOne.ReleaseArray;
> Var 
>     VarI : Integer l
> Begin
>     for VarI := 0 to Length(RecArray) - 1 do
>     begin
>         if (RecArray[VarI ] = NIL) then break;
>         Dispose(RecArray[VarI ]);
>         RecArray[VarI ] := NIL;
>     end;
> End;
> 
> 
>  Hi seniours , 
>       im silent user of this group , really scared for
asking my first question .but i want expert review ..

We are here to help eachother.
So don't be scared.
This world belongs to brave hearts.

> i ve mentioned two functions above first for assignment
of array and second for reasing mem . but i ve some problem
coz mem is not getting free untill appication is closed .
means fucntion ReleaseArray isnt releasing mem of records
held by array of pointers . 
>  pls pls im stucked .
> hope u understand my prob as i dun 've gud english .
> thanks and regards .
> Saurabh rai.

If your array is a global variable
or belongs to an object that is going to live
as long your application stays alive
then, yes, that memory remains occupied
untill the termination of your program.

But why this is a problem?
Unless the amount of memory your array needs is huge
I see no problem at all.

And what is huge nowadays? 1, 2, 10 MBytes? More?

BTW, the rules regarding memory and dynamic arrays
are the same as for strings.
That is both dynamic arrays and strings are
reference counted.
When the reference reaches zero the memory is deallocated.

Local variables goes out of scope when the function
terminates.
That means that

procedure F;
var
   S: string;
begin;
   S := 'a very long string here';
   blah
   blah
end; // << the memory the S points to is deallocated
here...

...unless, inside that routine, you assign S
to a variable with more broad scope.

The same stands true for dynamic arrays.
Also you may finalize (read dispose) a dynamic array
by assigning nil to it.

MyDynamicArrayVariable := nil;

Provided that the elements of your array do not need
explicit deallocation.
And that brings me to a question: Do you really need
an array of Pointers to a record?

Also, I avoid using New() and Dispose().
I prefer GetMem(), AllocMem() and FreeMem()
...although I don't remember why (lol)


Here is a variation of your code


type
   PRec = ^TRec;
   TRec = packed record
     Value : Integer;
   end;


type
   TRecArray = array of TRec;  // type for a dynamic array
of TRec
   PRecArray = array of PRec;  // type for a dynamic array
of PRec

   //both must be in global scope somewhere
var
   arRec  : TRecArray = nil;
   parRec : PRecArray = nil;

const
   ARRAY_LENGTH = 500;


procedure DisposeArrayPointer;
var
   i      : Integer;
begin
   if Assigned(parRec) then
   begin
     for i := Low(parRec) to High(parRec) do
       if Assigned(parRec[i]) then
         FreeMem(parRec[i], SizeOf(TRec));

     parRec := nil;  // dynamic array disposing
   end;
end;

procedure FillArrayPointer;
var
   i      : Integer;
begin
   DisposeArrayPointer();

   SetLength(parRec, ARRAY_LENGTH);
   for i := Low(parRec) to High(parRec) do
   begin
     parRec[i] := AllocMem(SizeOf(TRec));
     parRec[i].Value := i;
   end;
end;

procedure DisposeArray;
begin
   arRec := nil;   // dynamic array disposing
end;

procedure FillArray;
var
   i      : Integer;
begin
   DisposeArray();

   SetLength(arRec, ARRAY_LENGTH);
   for i := Low(arRec) to High(arRec) do
     arRec[i].Value := i;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
   FillArrayPointer;
   FillArray;
end;

procedure TForm1.FormDestroy(Sender: TObject);
begin
   DisposeArray;
   DisposeArrayPointer();
end;

procedure TForm1.Button1Click(Sender: TObject);
var
   i : Integer;
begin
   ListBox1.Clear;
   for i := Low(parRec) to High(parRec) do
     ListBox1.Items.Add(IntToStr(parRec[i].Value));

   ListBox1.Items.Add('----------');

   for i := Low(arRec) to High(arRec) do
     ListBox1.Items.Add(IntToStr(arRec[i].Value));
end;





-- 
Regards
Theo

------------------------
Theo Bebekis
Thessaloniki, Greece
------------------------
Greek_Delphi_Prog : a Delphi Programming mailing list in
Greek at
    http:
//groups.yahoo.com/group/Greek_Delphi_Prog

CSharpDotNetGreek : A C# and .Net mailing list in Greek
language at
    http:
//groups.yahoo.com/group/CSharpDotNetGreek

atla_custom : a Unisoft Atlantis Customization mailing list
at
    http://grou
ps.yahoo.com/group/atla_custom
------------------------


-----------------------------------------------------
Home page: http://group
s.yahoo.com/group/delphi-en/
To unsubscribe: delphi-en-unsubscribe@yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://group
s.yahoo.com/group/delphi-en/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://g
roups.yahoo.com/group/delphi-en/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:delphi-en-digest@yahoogroups.com 
    mailto:delphi-en-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    delphi-en-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.c
om/info/terms/
 

[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )