- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But what if the input is RGB32?
umc_video_enc_con assumes VideoData input object is initialized with some YUV color format. Later, for MPEG-2 stream type, GetNextYUVBuffer is called to setup the input buffer.
If I initialize instead with RGB32 color format, how are input buffers setup for MPEG-2? If I call GetNextYUVBuffer, I observe an exception, apparently because a color format other than YUV was selected.
Is there a way to encode MPEG-2 with RGB32 input? Thanks.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The umc_video_enc_con is a simple application to show how to use VideoEncoder class. If you are developing complicated media player or transcoder application then you have to care on RGB2YUVcolor conversion step.
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tovarich, Vladimir, I understand that umc_video_enc_con is a simple application. Question is: can MPEG-2 encoder accept RGB32 input? And if so, how to condition the input buffers?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tovarich FrankNatoli,
UMC VideoEncoder class do not support color conversion inside (but VideoDecoder does), so you have to do conversion outside.
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
TovarichVladimir: if VideoEncoder does not support color conversion inside, does that mean that all input to MPEG2 VideoEncoder must be YUV? My particular context is an OnPaint method that is passed an RGB32 bitmap. I want the OnPaint method to call video encoder to write an encoded output frame.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, that mean exactly this. You have to call color conversion routines to convert RGB to YUV before pass it to encoder.
Vladimir

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page