watermark video mp4/mov/avi

Topics: Developer Forum, Project Management Forum, User Forum
Nov 17, 2015 at 1:24 PM

i use your code example, for watermark a video,
as in this link ,that you published: code_sample2.html

but it works only for .wmv videos.
(for other types of videos i get an exception or it run without ending)

how can i make it work for mp4 or mov or avi videos, also?
what i need to change in the code?

thanks :)
Jun 10, 2016 at 8:38 PM

(If you still have his question after 7+ months),

I have an essentially identical project. I also had an identical issue. As far as I know, there is no way to import any types of videos to Splicer besides .Avi and .wmv.

In my case, I want to overlay a clock on a video. I haven't quite gotten the whole clock-not-blocking-video part down, but I have imported the .MP4's I wanted to overlay, but only by converting it first with ffmpeg.

That link sends you to a page with a crap ton of different star-trek style formats. I spent a good hour downloading different formats to see if my Windows 10 could actually open one before finally downloading 7Zip and unzipping this format.

I converted the video using:
using System.Diagnostics;

Process pProcess = new Process();

pProcess.StartInfo.FileName = "ffmpeg" //This has to be a path with the executable extension (C:\\Users\\BillyBob\\Downloads\\ffmpeg-crazy-folder-name\\ffmpeg.exe)

 // The escaped double quotes must be there, or paths with spaces will be treated as different arguments and throw errors.
// eg. "C:\\Users\\BillyFredAndFrank\\Documents\\holy cow.avi" would give "C:\\...\\holy" and "cow.avi"
string inPath = "\"C:\\awesomeMP4.mp4\""; 
string outPath = "\"C:\\WHAAAATTTT??  ITS AN AVI!!.avi\""; 

string args = "-i "+ inPath+" "+outPath;  //don't ask what the -i does.  I just that without it stuff doesn't work.

pProcess.StartInfo.Arguments = args;


 //Get program output
string strOutput = pProcess.StandardOutput.ReadToEnd();

 //Wait for process to finish

After the videos were converted, I passed the converted paths to my overlaying function in place of the original path and everything worked (relatively) well.

Hope this all helps!
The Hermanoid