BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Decoding video

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Multimedia
View previous topic :: View next topic  
Author Message
Jon Lennart Aasenden
Guest





PostPosted: Wed May 12, 2004 7:00 am    Post subject: Decoding video Reply with quote



Hi guys.

I realize that decoding video today, is a two step process:

1. reading the fileformat (and buffering data)
2. sending the data to a codec for decompression
3. displaying the data

But just out of curiosity, would it be possible to decode, and display, a
video under native pascal without calling DirectX or some external dll?

I have heard of native delphi mp3 decoders, that does all the work in pure
pascal (and that works), but in theory the same could be done for video
right?

Have there ever been a codec written in delphi?

Jon Lennart Aasenden,
Norway




Back to top
Avatar Zondertau
Guest





PostPosted: Wed May 12, 2004 7:17 am    Post subject: Re: Decoding video Reply with quote



Quote:
I realize that decoding video today, is a two step process:

1. reading the fileformat (and buffering data)
2. sending the data to a codec for decompression
3. displaying the data

Two steps?

Quote:
But just out of curiosity, would it be possible to decode, and
display, a video under native pascal without calling DirectX or some
external dll?

Yes, this would definately be possible, but it would have many
disadvantages. First the speed will be a problem if you're not using
DirectX or something similar. Second you would have to implement a
whole lot of codecs and add new ones each time another codec gains
popularity. Normally codecs are installed seperately and they can then
be used by any program that wants to play video. Many video file
formats (like avi) can handle any of these codecs, so to be able to
read all video files stored in that forma you'll have to implement all
codecs ever made.

Quote:
I have heard of native delphi mp3 decoders, that does all the work in
pure pascal (and that works), but in theory the same could be done
for video right?

If you would implement all codecs it would be possible, but this is
much more work than mp3, which only uses a single codec.

Back to top
Jon Lennart Aasenden
Guest





PostPosted: Wed May 12, 2004 1:43 pm    Post subject: Re: Decoding video Reply with quote



Well, i would not want to create all the codecs, but perhaps set a standard
to mpg file format, compressed with the xine codec or somthing.

Most video formats seem to use RLE compression?
Where only the difference from the last frame is stored as a new frame,
right?
This is probably why it takes a second when fast forwarding before the frame
is displayed, because mediaplayer has to backtrack to get the last keyframe
+ previous frames to build the correct "current" frame.

Any hints to where i can find the C++ source for the xine or divx codecs?
Is divX open (it was stolen from Microsoft was it not?) or is it a closed API?

Jon Lennart Aasenden


"Avatar Zondertau" <avatarzondertau (AT) hotmail (DOT) com> wrote

Quote:
I realize that decoding video today, is a two step process:

1. reading the fileformat (and buffering data)
2. sending the data to a codec for decompression
3. displaying the data

Two steps?

But just out of curiosity, would it be possible to decode, and
display, a video under native pascal without calling DirectX or some
external dll?

Yes, this would definately be possible, but it would have many
disadvantages. First the speed will be a problem if you're not using
DirectX or something similar. Second you would have to implement a
whole lot of codecs and add new ones each time another codec gains
popularity. Normally codecs are installed seperately and they can then
be used by any program that wants to play video. Many video file
formats (like avi) can handle any of these codecs, so to be able to
read all video files stored in that forma you'll have to implement all
codecs ever made.

I have heard of native delphi mp3 decoders, that does all the work in
pure pascal (and that works), but in theory the same could be done
for video right?

If you would implement all codecs it would be possible, but this is
much more work than mp3, which only uses a single codec.



Back to top
Avatar Zondertau
Guest





PostPosted: Wed May 12, 2004 2:59 pm    Post subject: Re: Decoding video Reply with quote

Quote:
Well, i would not want to create all the codecs, but perhaps set a
standard to mpg file format, compressed with the xine codec or
somthing.

You could do this, but of course this would mean you'll not be able to
play all videos.

Quote:
Most video formats seem to use RLE compression?
Where only the difference from the last frame is stored as a new
frame, right?

I don't think so. RLE is a lossless form of compression and therefore
results huge video files. I don't think it's useage is very common
except for, perhaps, small and very short movies.

Quote:
This is probably why it takes a second when fast forwarding before
the frame is displayed, because mediaplayer has to backtrack to get
the last keyframe + previous frames to build the correct "current"
frame.

About every video compression algorithm uses the concept of keyframes.
They store the keyframes entirely (probably in some JPEG-like format)
and store only some data for other frames to use for interpolation.

Quote:
Any hints to where i can find the C++ source for the xine or divx
codecs? Is divX open (it was stolen from Microsoft was it not?) or is it a
closed API?

DivX is not open source and AFAIK has nothing to do with Microsoft.

XviD (guess where the name came from ...) is a good opensource MPEG4
codec though, which, i think, also supports DivX. Information on the
project and sourcecode downloads can be found at:

http://www.xvid.org/

Back to top
Patrick
Guest





PostPosted: Wed May 12, 2004 11:20 pm    Post subject: Re: Decoding video Reply with quote

Quote:

DivX is not open source and AFAIK has nothing to do with Microsoft.

DivX and XVID, used to be the same thing (named DivX; open source). If I

understood it right, the DivX-licence has either been sold, or they changed
the source sufficient to let it be commercial.
After their separation, the original developpers of DivX continued their
work under the name XVID.

Quote:
XviD (guess where the name came from ...) is a good opensource MPEG4
codec though, which, i think, also supports DivX. Information on the
project and sourcecode downloads can be found at:

http://www.xvid.org/

Yes, it does support DivX.

So the best you can do, is use the XVID source to support videos, together
with some open-source MP3-decoder.

Regards,
Patrick



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Multimedia All times are GMT
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.