Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All,

I am trying to Compress Video using FFMPEG Library.
I am Having issue in putting watermark in Video.
I have boldmark command i tried for watermark. Kindly help me.


Code I used so far


C#
 string source = @"C:\Adstringo\AdstringoIn\source\Wildlife.mp4";
 string destination = @"C:\Adstringo\wildlife.mp4";
 string logo=@"D:\logo02.png";
 Process ffmpeg;

 ffmpeg = new Process();



 ffmpeg.StartInfo.Arguments = " -i \"" + source + "\"  -strict experimental -s " + "720:480" + "  -ac 2  -ar 44100  -b " + "256" + "k  \"" + destination + "\""; // arguments !
 //ffmpeg.StartInfo.Arguments = " -i \"" + source + "\" -i \"" + logo + "\" -filter_complex overlay=(main_w/2)-(overlay_w/2):(main_h/2)-(overlay_h)/2 \"" + destination + "\"";

string path = Path.Combine(Environment.CurrentDirectory, @"adstringo\adstringo.exe");



 ffmpeg.StartInfo.FileName = path;

 ffmpeg.StartInfo.CreateNoWindow = true;
 ffmpeg.StartInfo.UseShellExecute = false;
 ffmpeg.StartInfo.CreateNoWindow = true;
 ffmpeg.StartInfo.RedirectStandardOutput = false;


 ffmpeg.Start();
 Double a = Duration(textBox2.Text);
 int time = Convert.ToInt32(a * 500);
 //Thread.Sleep(time);
 lbl_error.Visible = true;


Thanks in Advance,
SUNIL MALI.
Posted

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