Click here to Skip to main content
15,887,350 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi,
I want to make an add-in for outlook to covert a video file to gif which has two functionality to save the video file as gif image and attach the the gif in the mail body as attachment and thumbnail.

Please give me idea to do this and what component I need to use and architecture.

Thanks in advance...I am sure you I can have a great ideas here.
Posted
Comments
RedDk 30-Nov-15 15:25pm    
I'd start by going here:
https://code.msdn.microsoft.com/
Punch in the language you're going to use. Filter the results by your version knowledge. Perhaps add some more filtration if you're familiar with process.

If nothing comes back, you might have to adjust your approach. There is so much sample here however that SOMETHING will doubtlessly catch your interest so abandoning your original idea doesn't seem so heinous in the end.
Member 10189208 30-Nov-15 17:10pm    
Thanks RedDK,

I have proceeded little bit. But stuck here..can you help here plz. I am stuck in ConvertMedia method ..it is throwing Unknown input format: '.mp4' (exit code: 1).


private void buttonOne_Click(Office.CommandBarButton ctrl,
ref bool cancel)
{

int size = -1;
using (OpenFileDialog dlg = new OpenFileDialog())
{
try
{
dlg.Multiselect = false;
dlg.CheckFileExists = true;
string formats = "All Videos Files |*.dat; *.wmv; *.3g2; *.3gp; *.3gp2; *.3gpp; *.amv; *.asf; *.avi; *.bin; *.cue; *.divx; *.dv; *.flv; *.gxf; *.iso; *.m1v; *.m2v; *.m2t; *.m2ts; *.m4v; " +
" *.mkv; *.mov; *.mp2; *.mp2v; *.mp4; *.mp4v; *.mpa; *.mpe; *.mpeg; *.mpeg1; *.mpeg2; *.mpeg4; *.mpg; *.mpv2; *.mts; *.nsv; *.nuv; *.ogg; *.ogm; *.ogv; *.ogx; *.ps; *.rec; *.rm; *.rmvb; *.tod; *.ts; *.tts; *.vob; *.vro; *.webm";

dlg.Filter = formats;
dlg.ShowDialog();
if (dlg.ShowDialog() == DialogResult.OK) //<--- Fails here
{
var ffmpeg = new FFMpegConverter();
ffmpeg.ConvertMedia(File.ReadAllText(dlg.SafeFileName), Path.GetExtension(dlg.FileName), GenerateStreamFromString("asd.gif"), ".gif", new ConvertSettings());

string text = File.ReadAllText(dlg.FileName);
size = text.Length;
}
}
catch (IOException)
{

throw;
}

}


}
RedDk 1-Dec-15 14:10pm    
Well, I don't know anything about ffmpeg development other than to say I've heard of it, but ... can't you write to "console.log" somewhere?

I won't get any reply to this comment unless some finds it's way into the textbox that pops up with a hit on the "reply" button.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900