Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

ltmmConvert: ltmmConvert_TargetFormat_ISO and error 0x80040227
Started by wresele@netway.at at 03-19-2008 13:44. Topic has 1 replies.

Print Search « Previous Thread Next Thread »
  03-19-2008, 13:44
wresele@netway.at is not online. Last active: 3/11/2008 3:37:48 PM wresele@netway.at

Not Ranked
Joined on 09-28-2004
Posts 2
ltmmConvert: ltmmConvert_TargetFormat_ISO and error 0x80040227
Reply Quote

Hi,

I struggled with a specific problem/bug(?) of the ISO target format: I tried to do a simple video conversion to H264 in approx. these steps:

  1. CoCreateInstance of the ltmmConvert object
  2. use put_SourceFile() and put_TargetFile() to set source and destination
  3. use put_TargetFormat( ltmmConvert_TargetFormat_ISO ) and put_AllowedStream() to set ISO format
  4. use get_AudioCompressors() & Find() & put_Selection() to select the correct audio compressor (AAC)
  5. use get_VideoCompressors() & Find() & put_Selection() to select the correct video compressor (H264)
  6. use StartConvert() to start the conversion

At step 6 I was always getting an error 0x80040227 (VFW_E_WRONG_STATE, "The operation could not be performed because the filter is in the wrong state")

I encountered this problem only when using the ISO container format - OGG for example was working fine.

After closely following the convert.exe example, and after trying out some different combinations, I finally succeeded by changing the sequence as follows:

  1. CoCreateInstance of the ltmmConvert object
  2. use put_SourceFile() and put_TargetFile() to set source and destination
  3. use put_TargetFormat( ltmmConvert_TargetFormat_Avi ) and put_AllowedStream() to set AVI format
  4. use get_AudioCompressors() & Find() & put_Selection() to select the correct audio compressor (AAC)
  5. use get_VideoCompressors() & Find() & put_Selection() to select the correct video compressor (H264)
  6. use put_TargetFormat( ltmmConvert_TargetFormat_ISO ) and put_AllowedStream() to set ISO format
  7. use StartConvert() to start the conversion

So it is absolutely necessary to set AVI as dummy-target format BEFORE selection of the compressors, and to select ISO in a last step? Even if I set the ISO format twice in both steps 3 & 6, it did not work - it needs to be AVI at the first step.

Is there any reasonable explanation for this behaviour? Or is it a machine specific behaviour (e.g. depending on the codecs I have installed?).

thanks

Wolfgang

 

 


 


   Report 
  03-20-2008, 15:40
GregR is not online. Last active: 11/26/2008 3:40:25 PM GregR



Top 10 Posts
Joined on 05-31-2006
In House
Posts 1,717
Re: ltmmConvert: ltmmConvert_TargetFormat_ISO and error 0x80040227
Reply Quote
What are the file versions of ltmm15.dll and DSKernel2.dll?

Try this order:

source file
compressors
target format
target file

As far as I know, this kind of problem shouldn't exist.  If the order I mentioned above doesn't solve the problem, please send a small sample project (NOT your entire application) that isolates this problem so I can try to reproduce it here.

Greg Ross
LEADTOOLS Technical Support
   Report 
Post
LEAD Support Fo... » Enduser » Capture & Conve... » ltmmConvert: ltmmConvert_TargetFormat_ISO and error 0x80040227

Powered by Community Server, by Telligent Systems