This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Monday, May 5, 2008 6:37:45 AM(UTC)
Groups: Registered
Posts: 9
Is there a way to create the MPEG2 directly from bitmaps (png files) instead of creating an AVI file first and then converting it into the MPEG2.
THANKS.
#2
Posted
:
Tuesday, May 6, 2008 6:18:51 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
You can check the Creating an AVI File From Bitmaps Using ltmmSampleSource example inside our Multimedia help files. However, in the sample, you will need to change 2 things:
1. Use a video compressor that produces MPEG2 data.
2. Use an output format of ltmmConvert_TargetFormat_MPEG2_PROGRAM or any relevant format you want. You can check these format in the ltmmConvert_TargetFormat Constants help topic
#3
Posted
:
Monday, May 12, 2008 11:48:15 AM(UTC)
Groups: Registered
Posts: 9
Thanks.
You example helps me alot.
BUT in my case I'm working with a mono-chrome bitmaps with 8 bpp.
I tried to change your code to work with 8 bpp to generate the AVI file (Format8bppIndexed instead of Format24bppRgb, removing all * 3) but I always get the time-out error on the second call to GetSampleBuffer in the loop.
What I'm doing wrong ?
#4
Posted
:
Tuesday, May 13, 2008 6:26:22 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
Input
media sub-types for our MPEG2 encoder are:
MEDIASUBTYPE_YV12
MEDIASUBTYPE_YUY2
MEDIASUBTYPE_UYVY
MEDIASUBTYPE_RGB32
MEDIASUBTYPE_RGB24
It does
not accept 8-bit palettized (indexed) images.
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.