471,570 Members | 1,562 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,570 software developers and data experts.

AVI RGB or BGR

How to know when the frames in AVI file is RGB or BGR because sometimes
Red appears first and sometimes Blue appears first in uncompressed
frames.

Does *anyone* know why?

Dec 23 '05 #1
3 3186
Nuno,

Unfortunately, AVI files are really containers for video and audio
streams. While there is a general specification for AVI files, the encoding
of the video and audio information is dependent on the encoding of the file
(which is what requires a specific codec).

You can get the encoding from the AVI file though, and then process
accordingly.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Nuno Magalhaes" <nu************@hotmail.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
How to know when the frames in AVI file is RGB or BGR because sometimes
Red appears first and sometimes Blue appears first in uncompressed
frames.

Does *anyone* know why?

Dec 23 '05 #2
I'm using avifil32.dll through p/invoke and the problem persists. How
do I know when blue or red comes first in umcompressed (_RGB) videos?
What header field should I search? Windows Media Player seems to know
that perfectly.
Nicholas Paldino [.NET/C# MVP] wrote:
Nuno,

Unfortunately, AVI files are really containers for video and audio
streams. While there is a general specification for AVI files, the encoding
of the video and audio information is dependent on the encoding of the file
(which is what requires a specific codec).

You can get the encoding from the AVI file though, and then process
accordingly.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Nuno Magalhaes" <nu************@hotmail.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
How to know when the frames in AVI file is RGB or BGR because sometimes
Red appears first and sometimes Blue appears first in uncompressed
frames.

Does *anyone* know why?


Dec 23 '05 #3
Nuno,

Windows Media Player actually doesn't know. Windows Media Player defers
to the DirectShow API, which reads the header, and then uses the appropriate
codecs to decode the file.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Nuno Magalhaes" <nu************@hotmail.com> wrote in message
news:11*********************@g49g2000cwa.googlegro ups.com...
I'm using avifil32.dll through p/invoke and the problem persists. How
do I know when blue or red comes first in umcompressed (_RGB) videos?
What header field should I search? Windows Media Player seems to know
that perfectly.
Nicholas Paldino [.NET/C# MVP] wrote:
Nuno,

Unfortunately, AVI files are really containers for video and audio
streams. While there is a general specification for AVI files, the
encoding
of the video and audio information is dependent on the encoding of the
file
(which is what requires a specific codec).

You can get the encoding from the AVI file though, and then process
accordingly.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Nuno Magalhaes" <nu************@hotmail.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
> How to know when the frames in AVI file is RGB or BGR because sometimes
> Red appears first and sometimes Blue appears first in uncompressed
> frames.
>
> Does *anyone* know why?
>

Dec 24 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by William C. White | last post: by
2 posts views Thread by Albert Ahtenberg | last post: by
3 posts views Thread by James | last post: by
reply views Thread by Ollivier Robert | last post: by
1 post views Thread by Richard Galli | last post: by
4 posts views Thread by Albert Ahtenberg | last post: by
1 post views Thread by inderjit S Gabrie | last post: by
2 posts views Thread by Jack | last post: by
3 posts views Thread by Sandwick | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by lumer26 | last post: by
reply views Thread by lumer26 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.