Does the latest JavaFx version support streaming webcam video? Is it possible to get it through JMF in fx?
It doesn't seem you can do it yet, see e.g. this recent post.
However, there seems to be several examples of using JMF to be able to at least capture an image. You might also try JNA.
Almost 7 years later from when the question was asked and there still isn't 'native' JavaFX support for displaying a stream from a webcam (as far as I am aware).
However I managed to achieve it using the OpenCV library and displaying into an ImageView. It's probably inefficient but OpenCV gives you the possibilities of processing the 'stream' too. Although all one might want to do is just display the stream, not modify it.
Related
I'm hunting for an openGL library that'll work on both Macs & IBMs. JOGL seems a good bet however, when I imported the JGears demo, I'm getting an odd result. All the swing related components in the program are displaying but the GLJPanel (being passed to an Animator) is not showing up. As far as I can tell, the display method isn't being called at all. I'm hoping someone can point me in the right direction.
I'm using JDK 1.7, and the latest jogl.jar and jogl-natives-macosx-universal.jar
You need to use NEWT for maximum compatibility as of today:
https://sites.google.com/site/justinscsstuff/jogl-tutorial-2
However there are other advantages and disadvantages of Newt over Canvas, see the aforementioned link for the full list.
Moreover, try this Gears demo instead:
http://jogamp.org/deployment/jogamp-current/jogl-demos/jogl-newt-applet-runner-gears.html
it should be what you were looking for from the beginning.
I'm a little confused on the terms. I understand that the spark framework has a video player and a video display. The difference being that video display doesn't have the video controls.
I know that stage video is new in AIR3 and uses hardware acceleration to play videos.
My question is, does videodisplay and videoplayer take advantage of stage video out of the box? Do I need to implement it another way?
After doing some research StageVideo for AIR desktop and extended desktop profiles is not available.
There seems to be an announcement about AIR in the coming days. Hopefully they put this on the road map. Some adobe guys hinted that this is coming.
I don't find any references to it within VideoDisplay and I don't see anything in VideoPlayer regarding StageVideo, plus from reading this article it sounds to me like they would keep them as two completely separate beasts, due to the possibility that the GPU is already in use and therefore can't be used at any given point in time (just what it sounds like to me). http://corlan.org/2010/12/01/working-with-stage-video/
Also when I Ctrl+Shift+T to get to VideoDisplay and VideoPlayer it specifically notes that they aren't optimized for mobile, which it seems is the main purpose for the new class (it's built in to the flash player it seems so I can't access the source).
If you're looking for something with pre-packaged controls and that can take advantage of the new StageVideo, check out the open source media framework (OSMF) says they support it in versions > 1.6. http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCUQFjAA&url=http%3A%2F%2Fblogs.adobe.com%2Fosmf%2F2011%2F02%2Fgetting-started-with-stage-video-support-in-osmf-and-strobe-media-playback.html&ei=gbo6T46qKIyXtwedwonzCg&usg=AFQjCNHpm7AV9MZHw79TZjAs_nIZc-qoow&sig2=45WDlwOlB60uMzivf1fZOw
Well i have a project in which gets pics and videos from folders and also i can view them it it and when i view them i want to also see those tags kinda like the camera which took it, dimensions , the ISO, the exposure time and others for pics and camera model framerate and dimensions...
Thanks in advance
I've never seen anything like this in Qt. Anyway, Qt is a C++ framework, you can use whatever library you want to use. QImageMetaData and QMeta are very near Qt style, but can only be used for images (never tried those).
Anyway, I would use the XMP toolkit. You also mentioned videos, so in that case XMP can handle both. It is very simple to use, well documented and fast (license is BSD). It is written in C++, so you can port it on whatever platform you want.
I think Qt itself does not provide a way to extract exif data (which is what I guess you're trying to extract). You could perhaps try QMeta. I have not used this myself, so no guarantees.
Is there any way where i can create a thumbnail image from a flash movie file(flv /swf) [NOT FROM A VIDEO File ] in ASP.NET ? Any samples of implementation ?
you can use ffmpeg to create thumbnails of the flash video
For .flv you can use ffmpeg to convert parts of the video (e.g. one frame) into an image (sequence)
I've used it as command-line application by calling Process.Start(), but there is at least one wrapper for .NET (I haven't tested it myself):
http://www.codeplex.com/ffmpegdotnet
For .swf I don't know any way to achieve this without some Adobe tool.
for flv it can be done easily, as others mentioned ...
for swf, it depends HIGHLY on the swf ... if the swfs visual appearence is determined by code, there is no other way than to embed a flash player in you app and either let the flash player make the snapshots, encode them as JPEG/PNG, and send them somewhere using TCP or LocalConnection (a flash<->flash communication connection, which can be used with C# as well) or try to somehow grab its output buffer yourself ... the first possibility should be no more than 10-20 lines of actionscript code ... don't know about the latter ...
other than that, you might use an external command line converter ... there are a few floating around the web ...
greetz
back2dos
Take a look at this article, it should point you in the right direction. It uses SharpFFmpeg to extract thumbnail images from movie clips from a variety of formats.
the only way to get an image, is to use a full flash client that starts playing and allows you to capture the first frame.
I would take a close look at flirt (they actually have an example that renders pngs)
Maybe some of the other flash libraries may be of help ( swfdec gnash swift tools gplflash)
Gnash is probably the best choice since its the most mature project out there, but i do not know how easy it is to integrate into command line tools or into your own projects.
We have been working on this in my company, and we got a proof of concept working pretty fast (but the project we made it for is on hold right now). I am not able to share the code, but I can give you some pointers.
It is not pure ASP.NET, but maybe you can still use it. We made a windows service that can be called from ASP.NET.
Basicly you install the flash plugin on the server, the windows services can then simply open the swf through the swf ActiveX component and then you can grap a picture of the whole thing. It works pretty well, notice that you do not have to actually render the ActiveX component on screen to capture the picture.
Check out this post. It does not tell you everything but I guess it provides the ground work required for it. You probably have to figure out how to get the object tag out of the flash-html you are trying to download from a web page. After that you'd have to figure out when to capture the frames. Its a long ride however. You don't need the asp.net part. Just concentrate on the windows project part. Hope this helps. :)
My Flex 3 app prints pages just fine from browsers on Windows using FlexPrintJob (not the browser print function). However, on OSX, the left and top margins show up larger and the page gets pushed off the right and bottom. Basically, the scaling is screwed up, and I can't see any way to adjust the margins in code.
Has anyone seen this discrepancy in Flex printing between Windows and OSX? Are there any known workarounds? I've searched all over and I can't find any good info on this (other than 12 unresolved printing bugs in the Adobe Jira DB).
And please don't say "don't print in Flex". I know Flex sucks at printing, but I have to use it. Thanks!
Edit:
PDF Generation is one route and while its a valid solution for some folks, I need to print directly. I'd like to see stuff like using regular Flash PrintJob, monkeypatches to FlexPrintJob, or just ways I can format my DisplayObjects before sending them to FlexPrintJob. None of the scaling options in FlexPrintJob work. My Flex Component is at 1.0 scale. I'm not sure what else I can do except for mess around with regular PrintJob. I'm putting a bounty on this for answers in this domain.
Switch to PDF generation. There are two ways to do this without having to purchase server-side licenses:
Use our library of Flex components - clear.swc, a part of open source Clear Toolkit available on Sourceforge. This process is described in Ch. 11 of the book Enterprise Development with Flex currently available as rough cuts on safaribooksonline.com
Use open-source library alivePDF.
Don't print by Flex PrintJob :)