Adding Text Into a Video and Saving the Output
c#, vb.net, video
Solution
You can use an extremely powerful scripting language called avisynth
link: http://avisynth.org/
It works with ANY file you can play, it uses directshow.
Just install it, it's basically installing a VFW codec, but very easy. Open notepad and type
DirectShowSource("C:\dir\filename.extension")
Subtitle("Put Your text here")
Save it as "any name.avs"
And THAT'S IT. Now open it with any avi-capable application (you can even name it avi if you want!) and re-encode the video, or do processing. very easy and automatic. it works for pictures too.
For a full reference of the Subtitle() capabilities go here: http://avisynth.org/mediawiki/Subtitle
of course, avisynth can do wonders if you master it, like printing the system date on every frame of a recording (useful for security cams) or even complex processing like top-line noise reduction, sharpening and many, many other tasks, through external pugins.
External Pugin reference: http://avisynth.org/mediawiki/External_plugins
Easily downloadable plugins: http://avisynth.org/warpenterprises/
It's as simple as it gets. 2 lines of code and you have a openable, seekable, processable, convertable fully-compatible and less than 1 KB AVI (the subtitles are added on-the-fly when you open the AVS on your app)
Problem
What I'm trying to do is take a 'input' video file (I can make it whatever file type will make this the easiest) and then, through my code, add text to the video file. So, for example, it would take 'Sample1.mpg' and output 'Sample2.mpg'. It wouldn't show the video (I've found some tutorials that talk about overlaying text as the video plays; but not actually modifying the video file. Basically, I'd like to be able to say, 'From seconds 1 to 200, draw 'Hi Mom' at position 0,0 with this font' and have that saved in the outputed video. Whenever you run the outputted video, with any player, you'd end up seeing the text; because it'd be part of the video file. I've heard claims like, 'DirectShow!' but I'd really welcome anything slightly more specific.