Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, May 5, 2008 6:37:45 AM(UTC)
zorik_novadaq

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.
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, May 6, 2008 6:18:51 AM(UTC)

Adnan Ismail  
Guest

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)
zorik_novadaq

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)

Adnan Ismail  
Guest

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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.089 seconds.