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 : Friday, February 15, 2008 7:11:34 PM(UTC)
RaviKumarPinjala

Groups: Registered
Posts: 14


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
 

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 : Sunday, February 17, 2008 6:29:26 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,034

Was thanked: 2 time(s) in 2 post(s)


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.

 
#3 Posted : Monday, February 18, 2008 3:18:29 AM(UTC)
RaviKumarPinjala

Groups: Registered
Posts: 14


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
 
#4 Posted : Monday, February 18, 2008 6:07:12 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,034

Was thanked: 2 time(s) in 2 post(s)




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.

File Attachment(s):
Demo_properties.zip (129kb) downloaded 36 time(s).
 
#5 Posted : Tuesday, February 19, 2008 1:39:07 AM(UTC)
RaviKumarPinjala

Groups: Registered
Posts: 14


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
 
#6 Posted : Wednesday, February 20, 2008 4:35:22 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,034

Was thanked: 2 time(s) in 2 post(s)


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.

 
#7 Posted : Sunday, February 24, 2008 7:59:45 PM(UTC)
RaviKumarPinjala

Groups: Registered
Posts: 14


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
 
#8 Posted : Monday, February 25, 2008 1:03:35 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,034

Was thanked: 2 time(s) in 2 post(s)










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.

 
#9 Posted : Monday, February 25, 2008 3:45:56 AM(UTC)
RaviKumarPinjala

Groups: Registered
Posts: 14


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
 
#10 Posted : Monday, February 25, 2008 3:48:42 AM(UTC)
RaviKumarPinjala

Groups: Registered
Posts: 14


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;
 
#11 Posted : Tuesday, February 26, 2008 12:25:13 AM(UTC)
RaviKumarPinjala

Groups: Registered
Posts: 14


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
 
#12 Posted : Wednesday, February 27, 2008 6:44:22 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,034

Was thanked: 2 time(s) in 2 post(s)






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.

 
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-2020, Yet Another Forum.NET
This page was generated in 0.116 seconds.