Welcome to LEAD Support Forum Login | Register | Faq  

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

Re: Can you please provide some sample examples how to convert avi,WMV or mp4 to 3gp
Started by RaviKumarPinjala at 02-16-2008 0:16. Topic has 11 replies.

Print Search « Previous Thread Next Thread »
  02-16-2008, 0:16
RaviKumarPinjala is not online. Last active: 2/29/2008 7:48:27 AM RaviKumarPinjala

Top 100 Posts
Joined on 02-15-2008
Posts 22
Can you please provide some sample examples how to convert avi,WMV or mp4 to 3gp
Reply Quote
Hi,

We need to convert avi,wmv or mp4 files to 3gp.
IN the help i was unable to find the sample code.

Can you please provide us some samples??

Regards
Ravi Kumar P
   Report 
  02-17-2008, 11:34
Adam Boulad is not online. Last active: 10/9/2008 4:18:21 PM Adam Boulad



Top 10 Posts
Joined on 09-16-2007
Posts 425
Re: Can you please provide some sample examples how to convert avi,WMV or mp4 to 3gp
Reply Quote

Ravi,

Our help file contains this information:

==================================

It is possible to create a 3GPP H.263 stream that will play on mobile phones by using the LEAD H263 Encoder, the LEAD AMR Audio Encoder, and the LEAD ISO Multiplexer, along with the Resize Filter and Frame Rate Controller.

==================================

 

For more details and for a list of the setting needed, please check this help topic 'LEAD H263 Encoder User Interface (2.0)' in the 'LEADTOOLS Filter' help file.

You can check our sample convert project.


Adam Boulad
LEADTOOLS Technical Support

   Report 
  02-18-2008, 8:23
RaviKumarPinjala is not online. Last active: 2/29/2008 7:48:27 AM RaviKumarPinjala

Top 100 Posts
Joined on 02-15-2008
Posts 22
Re: Can you please provide some sample examples how to convert avi,WMV or mp4 to 3gp
Reply Quote
Hi,

Thanks for your reply.
We are planning to buy your product. before that we need to check this. i am unable to set proper settings in the demo convert project. if you provide us the sample project(c#) how to convert AVI,wmv and Mp4 files to mobile supported formats like 3gp, mp4
which required the resizing option also.

Thanks in advance
Regards
Ravi Kumar P

   Report 
  02-18-2008, 11:12
Adam Boulad is not online. Last active: 10/9/2008 4:18:21 PM Adam Boulad



Top 10 Posts
Joined on 09-16-2007
Posts 425
Re: Can you please provide some sample examples how to convert avi,WMV or mp4 to 3gp

Attachment: Demo_properties.zip
Reply Quote

Ravi,
I used the C# convert project which is located in this directory [LEADTOOLS 15 Multimedia]\Examples\ltmm\Dotnet\CS\Convert.

I used the settings in the attached images and I was able to create a 3GP that played successfully on a mobile phone.

Please try these settings.


Adam Boulad
LEADTOOLS Technical Support

   Report 
  02-19-2008, 6:44
RaviKumarPinjala is not online. Last active: 2/29/2008 7:48:27 AM RaviKumarPinjala

Top 100 Posts
Joined on 02-15-2008
Posts 22
Re: Can you please provide some sample examples how to convert avi,WMV or mp4 to 3gp
Reply Quote
Hi,

Thank you very much. i am able to convert the files to 3gp format with the help of the settings given by you.

But the problem is we need to convert the files online based on the target format(it is like transcoding the files in to different file formats using single source file).

for this we need to use a console application.
As in the example all the params are taken by the dialogboxes of the control.

is there any way to convert by setting the same settings by passing parameters.

Thanks & Regards
Ravi Kumar P
   Report 
  02-20-2008, 9:40
Adam Boulad is not online. Last active: 10/9/2008 4:18:21 PM Adam Boulad



Top 10 Posts
Joined on 09-16-2007
Posts 425
Re: Can you please provide some sample examples how to convert avi,WMV or mp4 to 3gp
Reply Quote

Ravi,

To do that you first insert the filter, and then access the interface of the filter, and set the properties of the filter.

For more information please read the following topics:

1) In the Multimedia API help file:

- Programmatically Inserting a Processor Filter.

- Access a Filter Interface.

 

2) In the Multimedia Filters help file:

- LEAD H263 Encoder User Interface (2.0).

 

You will need to change a couple of things since you will be setting encoder properties, in addition to the resize Transform Filter properties, but the concept is the same.


Adam Boulad
LEADTOOLS Technical Support

   Report 
  02-25-2008, 1:04
RaviKumarPinjala is not online. Last active: 2/29/2008 7:48:27 AM RaviKumarPinjala

Top 100 Posts
Joined on 02-15-2008
Posts 22
Re: Can you please provide some sample examples how to convert avi,WMV or mp4 to 3gp
Reply Quote
Hi,

I checked the help but that is in c and c++,
and that is using some applicationid based interface looping is there.

can you please share if you have any c# help.
i think it will help others also.

and also i observed once thing the Window based UI is taking the last saved values even i closed and opened the property windows and total program.

I think it is storing the values some where. is it in the registry or in any file. please help me to add a resize filter and assign the properties to generate the 3gp files with different dimensions

Regards
Ravi Kumar P
   Report 
  02-25-2008, 6:08
Adam Boulad is not online. Last active: 10/9/2008 4:18:21 PM Adam Boulad



Top 10 Posts
Joined on 09-16-2007
Posts 425
Re: Can you please provide some sample examples how to convert avi,WMV or mp4 to 3gp
Reply Quote

Ravi,
Do not look at the C/C++ help file (called the Multimedia API Help), but instead use the help file geared towards Visual Basic programmers (COM Objects Help), because the way C# uses ActiveX controls like our Multimedia controls is more similar to VB than to C/C++.
 
We currently don't have a dedicated .NET help file for the Multimedia SDK, but you should be able to use the COM help file for all your needs.

About storing the values, our DirectShow filters do that, but you can always override the stored values by changing them programmatically without displaying the property pages.

Please check the topics I mentioned earlier, but in the COM help file.


Adam Boulad
LEADTOOLS Technical Support

   Report 
  02-25-2008, 8:50
RaviKumarPinjala is not online. Last active: 2/29/2008 7:48:27 AM RaviKumarPinjala

Top 100 Posts
Joined on 02-15-2008
Posts 22
Re: Can you please provide some sample examples how to convert avi,WMV or mp4 to 3gp
Reply Quote
Hi Adam,

I am able to get the interfaces. but while setting the resize filter i am unable to set the object.

please find the code i am using.
please suggest me the correct way

LTMMLib.ltmmConvertCtrl ltmmConvert = new LTMMLib.ltmmConvertCtrl();
ltmmConvert.TargetFormat = 20;
ltmmConvert.VideoCompressors.Selection = 7;
LTMMLib.ltmmProcessor objPro = ltmmConvert.VideoProcessors.Item(27);
LMVResizeLib.ILMVResize objResize = (LMVResizeLib.ILMVResize)ltmmConvert.GetSubObject();
objResize.Enabled = true;
objResize.AspectRatio = true;
objResize.AutoSize = false;
objResize.Height = 96;
objResize.Width = 128;

Regards
Ravi Kumar P
   Report 
  02-25-2008, 8:53
RaviKumarPinjala is not online. Last active: 2/29/2008 7:48:27 AM RaviKumarPinjala

Top 100 Posts
Joined on 02-15-2008
Posts 22
Re: Can you please provide some sample examples how to convert avi,WMV or mp4 to 3gp
Reply Quote
Sorry the add videoprocessor part missed

LTMMLib.ltmmConvertCtrl ltmmConvert = new LTMMLib.ltmmConvertCtrl();
ltmmConvert.TargetFormat = 20;
ltmmConvert.VideoCompressors.Selection = 7;
LTMMLib.ltmmProcessor objPro = ltmmConvert.VideoProcessors.Item(27);
ltmmConvert.VideoProcessors.Add(objPro, 0);
LMVResizeLib.ILMVResize objResize = (LMVResizeLib.ILMVResize)ltmmConvert.GetSubObject(0);
objResize.Enabled = true;
objResize.AspectRatio = true;
objResize.AutoSize = false;
objResize.Height = 96;
objResize.Width = 128;
   Report 
  02-26-2008, 5:30
RaviKumarPinjala is not online. Last active: 2/29/2008 7:48:27 AM RaviKumarPinjala

Top 100 Posts
Joined on 02-15-2008
Posts 22
Re: Can you please provide some sample examples how to convert avi,WMV or mp4 to 3gp
Reply Quote
HI,

I got the solution.

please check my code below.

private static void Resizeto3gp()
{
ltmmConvert = new LTMMLib.ltmmConvertCtrl();
ltmmConvert.TargetFormat = 20;
ltmmConvert.AudioCompressors.Selection = 4;
ltmmConvert.VideoCompressors.Selection = 7;
ltmmConvert.SelectedVideoProcessors.Add(ltmmConvert.VideoProcessors.Item(ltmmConvert.VideoProcessors.Find("@device:sw:{E526D606-22E7-494C-B81E-AC0A94BFE603}\\{E2B7DCA5-38C5-11D5-91F6-00104BDB8FF9}")), 0);
LMVResizeLib.ILMVResize objResize = (LMVResizeLib.ILMVResize)ltmmConvert.GetSubObject(512);
objResize.Enabled = true;
objResize.AspectRatio = true;
objResize.AutoSize = false;
objResize.Height = 144;
objResize.Width = 176;
ltmmConvert.Complete += new LTMMLib._IltmmConvertCtrlEvents_CompleteEventHandler(ltmmConvert_Complete);
ltmmConvert.Preview = false;

ltmmConvert.sourcefile = @"C:\Documents and Settings\ravikumar.p\Desktop\for Testing\D_AaKhushi.MPG";
ltmmConvert.TargetFile = @"C:\Documents and Settings\ravikumar.p\Desktop\for Testing\D_AaKhushi_176x144.3gp";
Console.WriteLine("Started at " + DateTime.Now.ToString("HH:mm:ss ffff"));
ltmmConvert.StartConvert();
Console.ReadLine();
ltmmConvert = null;
}

public static void ltmmConvert_Complete()
{
ltmmConvert.VideoWindowFrame = 0;
ltmmConvert.StopConvert();
ltmmConvert.ResetSource();
ltmmConvert.ResetTarget();
Console.WriteLine("Completed :" + DateTime.Now.ToString("HH:mm:ss ffff"));

}


Regards
Ravi Kumar P
   Report 
  02-27-2008, 11:49
Adam Boulad is not online. Last active: 10/9/2008 4:18:21 PM Adam Boulad



Top 10 Posts
Joined on 09-16-2007
Posts 425
Re: Can you please provide some sample examples how to convert avi,WMV or mp4 to 3gp
Reply Quote

Ravi,
About the code that you sent me, I have two notes:
1- You did not set the Video and Audio compressor settings (the setting in the help file).

2- You should insert the video compressor dynamically (by searching for the DisplayName string rather than entering the value to the VideoCompressors and VideoCompressors hard coded, this will allow your application to run on different computers.


Adam Boulad
LEADTOOLS Technical Support

   Report 
Post
LEAD Support Fo... » Enduser » Multimedia Code... » Re: Can you please provide some sample examples how to convert avi,WMV or mp4 to 3gp

Powered by Community Server, by Telligent Systems