Create wmv-file from code? - vb.net

I have a project where the requirements is that a end user will select a template, enter some information and then my program should create a wmv movie file that has the information entered encoded in the movie.
So from my perspective I would like to have a framework that allows me to add graphics and text to a movie. Something like this:
movie.addframes(framecount, templateimage)
movie.frame(x).drawtext(x,y,text,font,size,color)
movie.frame(x).drawRectangle(rect,color,bordersize)
movie.frame(x).drawImage(rect,borderstyle,bordersize, image,sizemode)
movie.save(filename,filetype)
Does this exists?
I have searched and only found information about ffmpeg that doesn't seem to do what I want.
I don't need it to be real-time encoding.
I don't care if the framework/library is expensive.
If there are information of how to do this with for example DirectX or DirectShow and pointing to real working vb.net examples, then ill be happy too. ;) (Believe me, I have tried to search and haven't found anything.)
I have not found any good information about how to use Windows Media Encoder for this, but It seems like Windows Media Encoder is the way to go if doing it myself..

you can use DirectShow, check Samples\Capture\CapWMV here

Related

Developing a virtual drive for windows (.net C#)

My requirement.
Develop a ntfs/fat formatable raw virtual drive in windows - something like truecrypt. I want to know if there is C# implementation for this somewhere.
dokan, callbackfs etc dont exactly fit since the file system itself has to be implemented. filedisk, imdisk etc are in kernel space and the code appears to be complex.
Something like callbackdisk or the one provided by eterlogic is perfect, but unfortunately they are expensive, and I don't want to buy them just for a small project.
Is there any other freely available alternative like the above two. Preferably a simple C# wrapper that provide read()/write() callback functions in userland that I can code.
There is a solution, but you need a folder for that :/
Just look here and see if it fits your desires:
http://dotnet-snippets.de/snippet/erstellung-eines-virtuellen-laufwerks/712
It's in german, but you should see the div w/ the code.
The comments aren't that important.
Hope I helped you. :)

Google Wave extension for Programmers and their Code

Sorry if this is well known but Googling for my answer only came up with links about making Google Wave gadgets.
My question is, are there any Google Wave gadgets that allow for better collaborative code editing? I mean, I can set the font to fixed width etc., but are their any gadgets designed for it?
Responses shouldn't include anything about git or svn. I use those when I want to use those. This is about Google Wave!
Here is a huge list of robots available for Wave: http://www.chaaps.com/huge-list-of-125-google-wave-robots-add-bots-and-enjoy-wave.html
Maybe there is one in there?
Don't know how well it works but found an extension called CodeBot.
http://aaron.oirt.rutgers.edu/myapp/root/gadget/codeGadget
-- its a work in progress. Let me know if you want the source code.
I will package it and release it or something like it for the next WHIFF
release.

How to create a movie file (avi) using a set of jpeg files in VB?

As part of test automation framework building, I need to record the activities done by the user in a video.
Since i could not find a way to record a video directly in vb, i opted to capture a sequence of screen shots (print screens) and then convert it to a streaming video.
Please suggest a way to do the same.
thanks,
pkrg
maybe you can just run another program behind your application.
there are several programs like that.
it is not a professional way but easy way to do this... because probably these programs have already optimized their algorithms...
making avi with jpegs:
there are such a programs that do this too...
again you can search for it..
You can automate Windows Media Encoder there are some samples for C# and VB.NET in the SDK
I would recommend you to use CamStudio to record user activities of your program. It is also open-source.
if you want to roll your own, then
http://support.microsoft.com/?kbid=161299
Shows several ways to call windows api, to caputure the screen or parts of. Still I think you will have problems with the mouse cursor though. After capturing the screen you will have to draw the cursor in the correct position.

A technology for reading pdfs online with annotations?

is there an open source solution that displays PDFs for online reading? It has to be searchable much like google books and if possible has the ability to display annotations?
By "online reading" I'll assume you mean without a PDF reader plugin on the client. In that case you'll need to convert to HTML
http://pdftohtml.sourceforge.net/
If you don't mind losing the ability to copy text then converting to PNG may give you a more accurate rendering
http://www.imagemagick.org/
Regardless of the output format you can manage your searching using the original PDF data. One technology for this is mnogosearch
http://www.mnogosearch.org/
Monogosearch uses pdftotext internally, you may find this useful if you want to write your own search routines. pdftotext is part of the Xpdf suite of utilities
http://www.foolabs.com/xpdf/about.html
All of the tools listed above are available on Windows or Linux
You may also be interested in the Vuzit DocuPub Platform: http://vuzit.com/products/docupub_platform
The display technology itself is not open source, but they provide an API to access their service, so perhaps it is worth investigating.
Don't know if you are looking a software to install or some service to pay for...
I've read a lot about www.getbackboard.com (this is not advertising, only reporting something I've read about, that maybe fits your needs.. ;)
Not sure if they do annotations, but both of these will show PDFs quite well:
http://pdfmenot.com
http://docs.google.com
ICEPdf recently released their code as open source. It is Java based.
PyPdf is really nice. It supports reading the text as well as encryption which I know that itextsharp does not.
Of course you'd have to program in python as IronPython's class libraries aren't quite to the point where you can ref them from another language and use them. (But I imagine they will be someday soon)
PyPdf
This is not open source, but check it out anyways. You can download a free trial of their SDK to try it out. Reading PDF's and their annotations is not simple and I wouldn't trust a production app to open source decoders.
Here is an online demo.
http://www.atalasoft.com/ajaxannotations/default.aspx
Another good pdf reader is FoxitReader.

Accessing iSight programmatically?

Is it possible to access the iSight camera on a macbook programmatically? By this I mean I would like to be able to just grab still frames from the iSight camera on command and then do something with them. If so, is it only accessible using objective c, or could other languages be used as well?
You should check out the QTKit Capture documentation.
On Leopard, you can get at all of it over the RubyCocoa bridge:
require 'osx/cocoa'
OSX.require_framework("/System/Library/Frameworks/QTKit.framework")
OSX::QTCaptureDevice.inputDevices.each do |device|
puts device.localizedDisplayName
end
I don't have a Mac here, but there is some Documentation up here:
http://developer.apple.com/documentation/Hardware/Conceptual/iSightProgGuide/01introduction/chapter_1_section_1.html
It looks like you have to go through the QuickTime API. There is supposed to be a Sample Project called "MungGrab" which could be worth a look according to this thread.
If you poke around Apple's mailing lists you can find some code to do it in Java as well. Here's a simple example suitable for capturing individual frames, and here's a more complicated one that's fast enough to display live video.
There's a command line utility called isightcapture that does more or less what you want to do. You could probably get the code from the developer (his e-mail address is in the readme you get when you download the utility).
One thing that hasn't been mentioned so far is the IKPictureTaker, which is part of Image Kit. This will come up with the standard OS provided panel to take pictures though, with all the possible filter functionality etc. included. I'm not sure if that's what you want.
I suppose you can use it from other languages as well, considering there are things like cocoa bridges but I have no experience with them.
Googling also came up with another question on stackoverflow that seems to address this issue.
Aside from ObjC, you can use the PyObjC or RubyCocoa bindings to access it also. If you're not picky about which language, I'd say use Ruby, as PyObjC is horribly badly documented (even the official Apple page on it refers to the old version, not the one that came with OS X Leopard)
Quartz Composer is probably the easiest way to access it, and .quartz files can be embed in applications pretty easily (and the data piped out to ObjC or such)
Also, I suppose there should be an example or two of this in the /Developer/Examples/
From a related question which specifically asked the solution to be pythonic, you should give a try to motmot's camiface library from Andrew Straw. It also works with firewire cameras, but it works also with the isight, which is what you are looking for.
From the tutorial:
import motmot.cam_iface.cam_iface_ctypes as cam_iface
import numpy as np
mode_num = 0
device_num = 0
num_buffers = 32
cam = cam_iface.Camera(device_num,num_buffers,mode_num)
cam.start_camera()
frame = np.asarray(cam.grab_next_frame_blocking())
print 'grabbed frame with shape %s'%(frame.shape,)