Click here to Skip to main content
15,884,472 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i Want to add a watermark in uploaded video file or in already exists video file ,i have tried the FFMEPEG.exe file for this but it didnt work for my and i dont want to use third party tool.
Posted

1 solution

you have to take a frame out of your uploaded video!
C#
Process p;
ProcessStartInfo info = new ProcessStartInfo();
info.FileName = "ffmpeg.exe";
info.WindowStyle = ProcessWindowStyle.Hidden;
info.Arguments = " -i " + your_video_name + " -vframes 1 " + your_extracted_image_name + "%d.jpg";


p = Process.Start(info);


while (!p.HasExited) { Thread.Sleep(10); }


the address of the video should be some thing like this: "c:\inetpub\wwwroot\mysite\videos\video_to_convert.3gp"
"-vframes 1 " take the first frame of your video file!
"%d.jpg": %d is a parameter for ffmpeg.exe that make an auto numbering for new image ,
then it save your image, and then use this article to make a watermark image!
check this out!
Build a Simple Watermarking Utility in C#[^]
I hope this could be helpful!:)
 
Share this answer
 
Comments
taha bahraminezhad Jooneghani 26-May-12 7:44am    
http://www.c-sharpcorner.com/uploadfile/krishnasarala/get-framesimages-from-video-in-asp-net/
you can use this either to get image from your video!
Sandeep Mewara 26-May-12 13:23pm    
5!
taha bahraminezhad Jooneghani 26-May-12 15:22pm    
thank you!:)
Nelek 26-May-12 18:17pm    
+5
taha bahraminezhad Jooneghani 26-May-12 22:08pm    
thank for your vote!

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