Click here to Skip to main content
14,270,034 members
Rate this:
Please Sign up or sign in to vote.
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


 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, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100