Realtime 1394 firewire video in a WPF app via directx or other method - wpf

Are there any controls that anyone is aware of that I can use to stream firewire video into a WPF app. I do not need camera control or capture just the video. I need WPF hosting because I'll be adding WPF content on top.
I was hoping that with the addition of having direct X surfaces in WPF something like this might appear.
Ideally looking for something relatively high level (not a direct show guy at all).
Thanks,
Brian

There are a couple really good video rendering packages for WPF. This guy Jeremiah Morrill has a blog where he discusses his numerous render projects. There's the WPF Win32 render project, and a number of low-level techniques he documents for how to access accelerated playback, Media Foundation .NET, DVD controls, etc... I believe his blog is titled "Jer's One Stop Shop".
Reading over his blog in general is a good idea if you are in to video/WPF. Last I checked, "MediaKit", one of his more comprehensive projects, enables easy use of DirectShow (simple xaml and your off and running, so don't worry) and other well known native interfaces. It's very robust and actively maintained, if not that specific project, check into some of the recent API's he's contributing on, some various Win7 media support also.
The only reason I'd bring up this other project, Augmented Reality, is that you remarked about adding content "on top". You should definitely check out wpfAugRel if your doing a lot of video production. Where to get an add on for it eludes me, but I'm sure you can find it off that site, but it allows for you to script in python some fairly slick real-time video production.
-- edit --
Right, look at this google code page, it has some video's (picture's worth a thousand words right?), but regardless, it allow's you to mix in 3D content into live-action, through the use of "marker" prop's, essentially bit's of paper with some easily machine recognizable feature's, that facilitate their underlying engine to inject computer rendered output into a real world scene, highly dynamic, so you can toss these marker's around and the 3D content move's fluidly... anyhow good luck.

Check out this article by UberDemo. It captures video into a WMV file with Windows Media Encoder and WPF. There is a paragraph about how to do the preview in a WPF application.

Related

The correct choice of tools for a new Deep Zoom application

I want to create a new application. It will basically be a Deep Zoom application that users can draw annotations on (that will save to a DB so other users can see those annotations.) At first it will just simply run in a browser. However, the app would be useful if it could be used by enthusiasts in the field, so ability to run on smartphones or other handheld devices would be massively beneficial. 3G/4G signal is likely to be practically non existent in those places, so having the ability to download all the images and info for an "area" would be good.
I can't decide on which technology to use. Silverlight Deep Zoom apps look really nice in browsers, but I have heard that it is not a widely supported technology that MS might be ditching anyway and the only smartphones that would be capable of running Silverlight would be Windows phones = a very small share of the smartphone market. Flash will probably never run on iPhones/Apple products in general. So should I use HTML5? HTML5 all seems a little confusing to me at the moment, would it even be possible to make a HTML5 Deep Zoom application that users could annotate?
Any thoughts and advice would be really handy, thanks for reading.
I wrote a Deep Zoom app that supported annotation for a proof of concept a couple of years ago.
I used Django for this, however it is not approach I would recommend. If i was doing the same job again I would use CanvasZoom, which is based on HTML5. Canvas Zoom can be embedded into a webpage through javascript. There is a guide on how to do this here:
a link
Unfortunately you need to run Microsoft DeepZoom composer on the original image first in order too generate the deep zoom data that CanvasZoom will use. If you want your app to run in a browser it is likely that you will have to go for the following approach.
User selects image.
Image gets uploaded to server
Server creates deep zoom information
Use a PHP based approach so you have a canvaszoom page for the image.
The annotations will probably complicate matters, I did this with javascript when I attempted it. The trick is to work out when the image has been zoomed in (with canvas zoom there are preset zoom levels) and redraw the annotation regions. I found this approach non-trivial but not overly complicated.
Canvas Zoom is MIT licensed, so you can do what you like with it.
Good luck with your project.

which tools to use for designing cooliris type applications?

I want to utilise the 3dwall feature of cooliris, the physics effects of the icons in bumtop to design an application for making the image viewing more intuitive and interactive. I dont want to use flash as it would slow down the speed for interaction on desktop. PLease could someone tell me about
choice of
1.) physics engine - physx or ODE for the physics effects like bumtop
2.) opengl or direct 3d
3.) WPF(windows presentation Format) - what is its use
Flash with Actionscript 3 is the best for such things. Checkout http://www.flashloaded.com/flashcomponents/3dwall/ for an illustration of CoolIris type application in Flash.
WPF is great for building application like this. VS2008 doesn't provide solution for good visualization,
but you can always call for help Blend included in MS Expression. There you can select silverlight project for building fancy web applications (silverlight.net/showcase). At start, combining different controls and trigger events to start simulations is entirely included. Yes, inside Blend you can set frame keys like in flash.
It's certainly a lots of effort, but it don't need to be. Recently new set of WIN RadControls for WinForms and Silverlight are issued and they look, believe me, excellent. You can look for Run Demo program which shows example of using these controls. Under section Integration, Carousel and others you will see what you looking for and beyound.

How to perform video editing with Silverlight?

I would like to port an ActiveX of mine (to Silverlight) that have the following features:
Embedding a logo image in any video file.
Embedding subtitles in any video file.
Cropping any video file (for example: cropping 10 seconds of a 1 min. video).
Save the video file result (by the current encoders of the client).
The current ActiveX uses DirectShow - unfortunately, it can't be used in Silverlight. How I can abandon the old ActiveX technology for the new Silverlight technology?
The simple answer is: you can't.
Silverlight is targeted at two main types of apps:-
Content presentation, be that Video, Audio and Images, all with a view of creating interesting and engaging ways to interact with this sort of content.
More recently Line of Business apps, that is data entry and data presentation. Again with a view to making this at least a little bit more visually stimulating than prior technologies made these sorts of apps.
Video editing doesn't really fall into either of these camps and is not catered for.
I'm not sure its yet true to say the ActiveX is old, after all what technology is used to host the Silverlight Plugin in Internet Explorer? ActiveX.
I don't know if that's going to be easily doable. The various codecs natively available to Silverlight are all wrapped by the Silverlight MediaElement control, and so far as I can figure out, they're not directly exposed through an API, e.g., you can't get at the raw decoded RGBA bitstream. (If I'm wrong on this, I'd love to know, but I've poked around, and I can't figure out how to do it.) The Mono source tree has a decode-only implementation of the Dirac codec, but nothing that would easily let you decode, e.g., WMV or AVI files, so far as I'm aware.
And even if you could somehow grab the raw, decoded RGBA (or YCbCr) bitstream, so as to be able to insert whatever data you want into those frames, you'd still have to re-encode the video stream as well, and Silverlight doesn't provide any native support for that. You'd have to write your own encoders (not at all trivial), port them from the ffmpeg library (also not trivial), or wait for someone else to do it.
In short, my suspicion is that you're going to need to stick with your ActiveX solution for now -- though with some clever JavaScript coding, it might be possible to wrap that in a nice Silverlight UI.

Silverlight Webcam

Is it possible to access a webcam in Silverlight
From what I've read it's not possible in Silverlight 1.0 but what about 2.0... 3.0 ... 4.0?
It is now possible in Silverlight 4.0. Developer preview is available at http://silverlight.net/getstarted/silverlight-4-beta/
I'm afraid webcam support isn't available in Silverlight 2.0. You might hope for it to be added in a future version, but there's no easy way of doing it now... Saying this, some people have invented various hacks that use other technologies in combination with Silverlight to capture video from the webcam. They typically involve interfacing with Flash, which of course is perfectly capable of utilising webcams. See this article for an example (with source code included). It's not a pretty solution (at least in my opinion), and may not be 100% stable across browsers/platforms, but I think it's the best you're going to get for now. Perhaps you should submit feedback directly to Microsoft if you really want to see support in Silverlight 3.0 (though it's certainly been mentioned elsewhere, so it may already be on the to-do list).
Silverlight 4 supports web cams. To capture images you can use www.glo6.com/camera1.aspx
It saves encoded images to web server. If there is a need to motion tracking, save images regularly, and then compare them on your server with another application.
I asked a member of the Silverlight team when they would be coming out with webcam support, and he said, in effect, "Let's just say that it's a really high priority for Silverlight 4.0." That said, it hasn't been officially announced yet, so I wouldn't count on it until MS does make the announcement.
I've used the Silverlight -> JavaScript -> Flash hack in production code, and while it does work, it doesn't work very well. Among other things, it's a pain to keep the Flash camera synchronized with your Silverlight UI. The camera shows up on top of SL child window controls, for instance, and of course, doesn't obey the clipping rules for when, say, it should be scrolling out of sight in a list box. And animations are a PITA as well. It's all possible, just slow and unpleasant, and several orders of magnitude more work than it would be if MS just supported web cams in Silverlight.

Possibilities for full blown silverlight applications

Since the launch of Silverlight 2 I was expecting a lot of full blown Silverlight applications popping up but still there seem to be little evidence of this. Does anybody know of such applications out there in the wild. And also what would be the obvious applications you would develop in Silverlight. I would say mail clients are bad examples as they just as well could be written as a web/ajax app. As Silverlight is far more powerful than web+ajax possible candidates should be impossible/akward implementing as a web/ajax app.
The ones that comes to my mind is
Photo and imaging editing apps
Reporting applications
Office applications, Word/Excel...
Edit:
Added from posts
Games
The point isn't that the app need to fill the whole screen just that it isn't just a small part of a webpage, or you could call it a full blown application running inside the webbrowser, only using the webbrowser as a host.
I think the Medical app that Microsoft itself developed shows pretty well what could be achieved with silverlight http://www.mscui.net/PatientJourneyDemonstrator/
As for image editing then as I understand its a bit difficult as Silverlight lacks a Bitmap API to be able to do per pixel image editing...
Edit:
I noticed you added Word/Excel to your question and there comes the problem that Silverlight doesn't have a rich text editor built in and there hasn't been real good examples of custom implementations. There is one http://www.codeplex.com/richtextedit but I haven't seen any applications that actually use it.
I'm working on one in the medical domain.
This started as an update of a Mac classic application but due to the amount of work involved, broadened to considering other toolkits. I convinced them to go for an initial WPF desktop port to be followed by a Silverlight version.
I don't know one so far, but I could imagine that it could be used in a kind like the fullscreen video playback on youtube.
How many fullscreen desktop apps are there? Most application don't need the entire screen. If you don't want to be distracted by menus and taskbars and so you go fullscreen. Another type of applications that can use fullscreen are games.
You are limited in fullscreen to certain key presses such as arrow keys, tab, enter, and space so this rules out some of those types of apps. They have done this for security reasons so an app can't hijack the screen and record the keypresses, but I wish they could come up with a scheme to sufficiently warn the user then allow it if they consent.
An application Microsoft seem to like to show case is the AOL mail client written entirely in silverlight.
Personally I follow the rule is if you would not write it in flash you would not write it in silverlight preferring AJAX in most cases. In the past most large flash application have failed such as the flash word processor (cant remember the name) while AJAX enabled applications such as google documents have taken off.
Finally I believe until moonlight (linux and mac support) has been released and more general users have silverlight downloaded developers will be reluctant to use it widely even for smaller apps and gadgets.

Resources