Jpeg capture with JMF

is there a way to capture a jpeg IMAGE from a webcam
with JMF? ( like webcam softwares do ...)

You have to write the application to process the image that is taken by snpshot. While manipulating the image byes, remember to bind to jpegencoder, there are free jpeg encoders avilable on the web, you may have to search! That will solve your problem!

Similar Messages

  • Video Capturing with JMF

    Dear friends
    I want to develop a program which can capture video from my web cam.
    (resolution 640x480 frame rate 20 frames/second) with JMF.
    If you have any suggestions and references please help me with this.
    Thank you in advance.

    ac09 wrote:
    ..If you have any suggestions..Read the posts to the [JMF forum|http://forums.sun.com/forum.jspa?forumID=28] where this topic has been discussed many (many) times. Make future posts re. JMF to the JMF forum.
    .. and references .. JMF [Code Samples and Apps|http://java.sun.com/javase/technologies/desktop/media/jmf/reference/codesamples/index.html] .
    Thank you in advance.No worries.

  • Transmiting live captured with JMF

    Hello I'm new here.I need some help how do i transmit live video from my webcam over a lan?
    I try this but it doesn't work can someone helpe me , i really need this to my project .
    Thank you.
    [email protected]
    mport java.io.*;
    import java.util.*;
    import javax.media.*;
    import javax.media.protocol.*;
    import javax.media.format.*;
    import javax.media.control.*;
    import javax.media.datasink.*;
    import jmapps.util.StateHelper;
    public class SendVideoCaptureV1 {
         private CaptureDeviceInfo di=null;
         private Processor p=null;
         private TrackControl track[]=null;
         private boolean encodingOk=false;
         private DataSource ds=null;
         private static final ContentDescriptor ct= new ContentDescriptor(ContentDescriptor.RAW_RTP);
         private static final Format[] fr=new Format []{
              new VideoFormat(VideoFormat.RGB)
         StateHelper sh=null;
         public SendVideoCaptureV1(){
              VideoFormat format = new VideoFormat(VideoFormat.RGB);
              //AudioFormat format = new AudioFormat(AudioFormat.LINEAR);
              //detecta todos os dispositvos de video q suportam RGB
              Vector devices=CaptureDeviceManager.getDeviceList(format);
              //System.out.println(devices.toString());
              if(devices.size()>0){
                   di=(CaptureDeviceInfo)devices.elementAt(0);
              else {
                   System.exit(-1);
              //criar o processor
              try{
                   p=Manager.createProcessor(di.getLocator());
                   sh=new StateHelper(p);
                   //p=Manager.createRealizedProcessor(new ProcessorModel(ds,fr,ct));
              catch(IOException io){
                   io.printStackTrace();
              catch(NoProcessorException pe){
                   pe.printStackTrace();
              //configurar o processor
              //p.configure();
              //bloquear ate estar configurado
              if(!sh.configure(10000))System.exit(-1);
              p.setContentDescriptor(new ContentDescriptor(ContentDescriptor.RAW));
              track=p.getTrackControls();
              for(int i=0;i<track.length;i++){
                   if(!encodingOk && track[i] instanceof FormatControl){
                        if(((FormatControl)track).setFormat(new VideoFormat(VideoFormat.JPEG_RTP))==null){
                        //if(((FormatControl)track[i]).setFormat(new AudioFormat(AudioFormat.GSM_RTP))==null){
                             track[i].setEnabled(false);
                        else {
                             encodingOk=true;
                   else {
                        track[i].setEnabled(false);
              //ds=p.getDataOutput();
              if(encodingOk){
                   if(!sh.realize(10000))System.exit(-1);
                   //p.realize();
                   try{
                        ds=p.getDataOutput();
                   catch(NotRealizedError ne){
                        ne.printStackTrace();
                        System.exit(-1);
                   try{
                        //String url="vfw://0 192.168.1.255:40000/video/1";
                        String url="rtp://192.168.1.255:40000/audio/1";
                        MediaLocator m=new MediaLocator(url);
                        DataSink d=Manager.createDataSink(ds, m);
                        d.open();
                        d.start();
                   catch(Exception ex){
                        ex.printStackTrace();
         public static void main(String []args){
              SendVideoCaptureV1 sv=new SendVideoCaptureV1();

    i dont understand.. you've just created a processor for motion jpeg over rtp, but your medialocator url is for audio (String url="rtp://192.168.1.255:40000/audio/1"; ) how come?

  • Capture cards to use with JMF....

    Hello, I need to buy a video capture card to use with JMF in order to get a video signal and send it using a stream channel.
    Somebody can help me and post a list of compatible capture cards with JMF?.
    I think on buy a PINNACLE 500 PCI but i have read that it is incompatible with JMF.
    Thanks.

    Creative webcam live should work, most webcams will work... at least under Windows. I've 2 older creative webcams that work under Windows.
    Not sure about Linux support though...
    Ps. there's a Java Media Framework section of this forum, where all the JMF related questions should be posted.
    regards,
    Owen

  • IT's possibile capture audio with JMF on Pocket Pc

    It's possibile capture audio with JMF cross-platform version on Pocket Pc?? Or how can it possibile on Pocket pc?????

    This article say about MMAPI and MIDP, I need a solution about JMF because, my application must capture audio on Pocket Pc with Jeode VM, and Jeode VM is compliant with JDK1.1.8(it's subset).

  • Filter with JMF before capture with third-party utility

    Hello,
    I'm just beginning to work with JMF - played a bit with it, especially with creating effect filters. Now I think need a nudge in the right direction, because it seems I'm stuck on something...
    Here is what I'm trying to do (I don't know if it's even possible): I have a simple video effect filter that works on realtime the data from a webcam. Is it possible to somehow register the output stream from this filter as another capture device (?) that can be used in turn by third-party software (movie capture, skype, etc.)? Say, if I have the following:
    [WEBCAM] -> [MY EFFECT FILTER] -> [SKYPE]
    Is this possible at all, or I'm looking in the docs for something that's just not there?
    Regards,
    - Alex
    P.S. Replies of the type "RTFM" are OK, especially if they contain info where to read, :-)
    Message was edited by:
    avtanski

    OK thanks.
    I've found a utility that modifes several of the date fields.
    Now, I just want to be sure that I don't screw this up...
    Which of the several date fields of a file holds the actual shot date?
    Which of the date fields is used by the organizer to "organize" the video files (avi and mov's) chronologically?
    Thanks for your help

  • Capture a several streams with jmf?

    i want to capture streams from 4 USB webcams in the same times.
    it's possible with JMF? and how?
    the JMStudio know just one capture device, if i link 2 webcams i capture just one stream?????
    please if you have solution send it to me,
    think you!!

    I think you don't have problems, because you should query the JMFRegistry, and you'll obtain the list of all multimedia devices installed in your system.
    Also, I suggest you a visit to Solutions section, look at "monitor.zip", there are some interesting files, regarding query of JMFRegistry. Good luck. :)

  • Premiere Pro CS5 not responding after 55 minutes of capture with intensity shuttle

    Hi and thank you for the valuable resources on this forum.
    I am capturing analogue video into Premiere Pro CS5 using he Blackmagic Intensity Shuttle (with Time Base Corrector in the video path).  My captures are stopping at 54 or 55 minutes when the computer becomes non responsive.  This has happened with the Blackmagic motion jpeg codec as well as the 10 bit YUV capture. Same thing happens if I capture with media express (the blackmagic capture software)
    I have tweaked my system as per many of the recommendations in the forum.
    Running CS5 5.03, autosave set to 10 minutes (same problem with no autosave or autosave at 20 minutes)
    Windows 7 64 bit fully updated
    i7 - 930 cpu
    Gigabyte x58A - UDP5 (Revision 1)
    24 Gb Ram
    Nvidia 470 - MSI with the twin Frozr cooling solution.
    Restore off, indexing off, windows search off,
    Followed tips from forum and Viper regarding optimizing system
    3 Hard drives
    System on standard Sata 2 drive
    Project capture to OCZ Vertex 3 120 g SSD drive (nice bit of gear) running on Sata 3 controller
    Page file on another hard drive
    Norton 360 unistalled
    Anything else I could find unistalled or turned off.
    Firmware and drivers for on board USB latest from Driver Station as per Blackmagic Recommendations.
    Very succesful capture of things shorter than 55 minutes but I have some longer things I would like to capture in one go.
    I have used process explorer to watch what happens.  Nothing special that I can identify in terms of processes but cpu seems to be going to 100%.
    With progessive tweaks the problems remains the same.
    I am not aware of any file size limits with Premire Pro or Blackmagic - are there some?
    Considering reinstall but would greatly appreciate any insights.  My first post so I hope I have provided the right info to help you help me.
    Thank you
    Andrew

    Good that you got it fixed... bridging device drivers have cause problems clear back to the computer version of the stone ages
    I still have a Pinnacle Dv500 card (used via dual-boot with WinXP and Premiere 6x) that went through several device driver versions to get everything working right
    While everything is working right... make a full "picture" of your hard drive to external USB drive to make recovering easy in case something goes wrong
    Hardware crashes or virus infections happen, so you should buy software to make a full
    backup of your hard drive to an external USB hard drive... plus, making step-by-step
    backups during a new install or major program addition makes it easy to go back a step
    if something doesn't work
    This backup and then restore is, of course, only to the same computer with a new drive
    (or the same drive as long as you don't mind writing over everything) since doing a
    restore to a new computer won't work due to Windows and many programs having activation
    information that is keyed to your hardware (which is why Windows will force you to RE-
    Activate if you change very much hardware)
    The product I use is at http://www.terabyteunlimited.com/image-for-linux.htm
    Image runs off of a bootable CD via Linux (the Zip you download includes a program to
    make the bootable CD) and it reads EVERYTHING on the drive, even the hidden
    registration information, so everything is restored when needed... and you may restore
    the image to a brand new drive in case of a crash, and not have to re-install anything
    Please note that I own no part of Image, and I don't get a referral fee (that is just a
    plain web link) but I use the program and it has saved me a LOT of trouble when I had a
    hard drive die... and I was able to restore everything and not have to re-install or
    re-activate a single program, from Windows on up

  • Converting an entire folder structure with images to jpeg, intact with folder structure.

    Hi!
    I have a rather large folder structure consisting of images dating all the way back to when I got my first digital camera in '98.
    The images are captured with a variety of cameras over the years and also includes image types processed with software. It's an almost 1,5 terabytes holy mixture of CR2, ARW, JPEG, PSD, PSB, TIFF, HDR and probably more that i forgot. However all of the formats can be read by photoshop/bridge. The file structure is /YYYYMMDD/file.ext. Converting the files folder by folder using the standard Image processor feature in bridge/photoshop is not really an option, considering the size of the structure.
    What I am trying to do is to convert the entire structure to .jpeg, both for backup purposes and also for being able to view all the images on devices other than my computer. It's important that the raw files are converted with their respecive .xmp adjustments applied.
    Is there any possible way to achieve this? I don't have lightroom, but if it can do this I will purchase it. Maybe some other image managment applications, like ACDSee, can do this?
    If someone know of any applications or (photoshop) scripts that can do this, or have any tips for me it is *HIGHLY* appreciated!

    Paul Riggott: T-H-A-N-K-S!
    The Russell Brown script is exactly what I needed, couldnt ask for anything better. I tried it out for a test run on a folder with 10 subfolders containing various file types and it recreated the folder structure complete with jpegs on another disk. The script have lots of useful options for converting, naming, color space conversion and much more.
    The one small thing to take note of, if others are reading this, is that you have to open the script in Photoshop in order to to process entire folder structures (including subfolders). If you launch the script from Bridge, it will only let you process single files and not folders.
    Again, you really made my day with this tip. Thanks

  • Lightroom changes colour in my RAW files captured with NIKON D300

    Dear All! Lightroom changes colour in my RAW files captured with NIKON D300. Some of the images are completely ruined. I am sure Adobe must be aware of this problem. What could be done? Is there a solution? Many thanks for your help. Regards, Stanislav

    You want "something different" but this "something different" is quite hard to define.
    I want a result which reflects the result on the camera. Have the feeling the display
    of the D800 is not the greatest, at least (not only the color issue which is often discussed)
    but also the exposure. Often I think I would need to compensate it, but then afterwards
    on the computer the non corrected version looks most of the time better.
    I think its interesting to see how allergic people react when the word jpeg comes up.
    This is also just a rendered result, just by the camera. There are many options in my cam.
    I like the vivid setting with some modifications. And that gives me a result I like.
    And if I like the result, why shall I spend way more time to replicate it?
    I do not talk about that I would want the jpeg, I only say that what I get color wise out of the
    box is how I would like to look at it. I still want the capability to fix for example exposure  in image,
    but I want the base the version I got from the jpeg view (or how the Nikon raw software could do).
    On Lightroom I did not manage to have a profile that looked as appealing to me.
    It also consumes way more time in my workflow to fix all pictures manually and results might differ.
    To work on an image you need a starting point, I do not say the jpeg look is always perfect and
    what I want all the time, but most of the time it is.
    You say yourself you use profiles. So why should there not be a profile which automatically adjusts to the camera settings.
    Its so frustrating to see a look which you like (the preview image when the pic is first accessed) and
    then Lightroom switches to its own rendering which is flat and which I do not like.
    For me its clearly something Adobe and/or Nikon should fix, like the mentioned "auto correct to preview look",
    Nikon profiles/settings/raw-details in Lightroom or for example a Nikon import module.

  • Image with jmf

    Hi,
    I am inexperienced in programming and i want some ideas...
    I want to process a picture with jmf (change format and dimensions) what i exactly need?I looked a few examples but iwas really confused!!!I cannot even load the image on a window(a player). Any advices....????
    Thanx

    Have you cleared this problem. I am having the same problem right now. Till now amn't able to clear it.
    One thing in my mind is that first of all I need to convert the JPeg images to a movie and after that transmit it...
    If you have cleared thsi problem, I'll be grateful if u can help me...
    Thanks
    Sco

  • Detection problem on HP webcam with JMF

    Hi,
    I'm trying NyARtoolkit and I need to use the video stream of my HP's webcam encrusted above the screen of my laptop (a HP Pavillon tx 2670ef)
    After the installation of JMF, I lunch JMStudio and I manage tu detect my webcam in : File->Preferences->Capture Devices->detect capture devices.
    Then i close the windows and i do File->Capture...->I enable "use video device" and unable "use audio device" then i click on "OK" but aftewards i have an error message saying that JMF couldn't initialize the capture device...
    2 students with me have the same pb...
    I made some researches about this issue and i found this post
    http://72.5.124.102/thread.jspa?messageID=10177842
    Afterwards I've installed ManyCam and i managed to get a video capture from the virtual webcam simulated with ManyCam.
    In fact, when i click on detect capture devices in JMStudio, a windows appears and i can choose "ManyCam Virtual Webcam" instead of "HP webcam".
    Moreover, in the options before capturing video, the encoding is in RVB instead of YUV before with the "HP webcam".
    But when i run my program i have this error :
    java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
         at java.util.Vector.elementAt(Unknown Source)
         at jp.nyatla.nyartoolkit.jmf.utils.JmfCaptureDeviceList.getDevice(JmfCaptureDeviceList.java:80)
         at jp.nyatla.nyartoolkit.java3d.utils.NyARSingleMarkerBehaviorHolder.<init>(NyARSingleMarkerBehaviorHolder.java:68)
         at J3DJME.NyARJava3D.<init>(NyARJava3D.java:174)
         at J3DJME.NyARJava3D.main(NyARJava3D.java:76)
    I tried many other things (Quicktime with QTcap... but i didn't managed to solve this pb yet)
    Coud you help to use my webcam with jmf ?
    josy

    You probably want to remove the crust from your web cam if you expect it to work. Most things that are encrusted aren't in the best of shape...
    JMF connects to web cameras by wrapping around native interfaces. If the JMStudio isn't able to use your web cam, it could mean a number of things...your web cam isn't compliant with the version of the interfaces (VFW and DirectShow, I believe) that JMF is wrapping around, the web cam doesn't output any formats JMF can use, etc.
    But if JMStudio can't use your web cam sucessfully, 99% of the time that means your web cam isn't going to work with JMF... unless you want to code support for it yourself.

  • VoIP with JMF

    hello,
    i'm trying to create a J2SE VoIP app with JMF. is it feasible?
    i've read that to overcome the NAT problem, we need to use Symmetry RTP. does it supported in JMF?
    i've done the SIP session managing with JSIP. now i need to send and receive RTP data.
    i've done this for the receiver
    url= "rtp://" + IP + ":" + port + "/audio/16";
    mrl= new MediaLocator(url);
    player = Manager.createPlayer(mrl);
    player.realize();
    // wait for realizing
    while (player.getState() != Player.Realized){
         try
    Thread.sleep(10);
    } catch (InterruptedException e)
    e.printStackTrace();
    player.start();
    with IP is the other party IP specified in the SDP, and the Port is the port specified in the SDP too.
    with wireshark, i've seen that RTCP is seen (Receiver Report, Source Description), and RTCP replies are received (Sender Report, Source Description), but RTP data is not received.
    i realize that JMF open the same local port as the port specified in the MediaLocator. while actually in my INVITE SDP, i tell the other party a different port. might this be the problem that i don't receive any RTP data?
    Thank you.

    Hey,
    No, the loss of packets isn't something you can control... you lose a packet, you lose a packet. The different encodings could have an affect on the impact of the packet loss, however, but the actual loss of the packet is out of everyone's hands. Even God loses packets as they travel on the wire...Well, I went again to Wiki to look for that page and you are right, I am wrong, it didn't say anything about packet loss, but it was referring to the call distortion and wrongly concluded something about the packets.
    Ummmm, maybe. The issue isn't as simple as knowing the public IP address of a client behind a NAT, it's also a matter of traversing the NAT itself. But if the SIP UAS handles all of that, then yes, you should be fine.after putting it to the test, I'm really confused...
    I'll try to lay it out so it would make sense and if that wont work I'll post my code here. there is just a lot of it in a few classes.
    This is tested with one way streaming!
    *1.* I've been trying to transmit audio and video within my home LAN, I've managed to send from one computer to the other, from beginning to end.
    This is what I receive on the callee computer in my home LAN:
    Participant added to list: ACER-LAPTOP/10.0.0.2
      - A new participant had just joined: TacB0sS@Acer-LapTop
    New Stream Event received: StreamMappedEvent
      Stream: com.sun.media.rtp.RecvSSRCInfo@13e6346
      Participant: com.sun.media.rtp.RTPRemoteSourceInfo@1cb374f
      Source: RTPManager
         SSRCCache  com.sun.media.rtp.SSRCCache@cc9d70
         Dataport  33444
         Controlport  33445
         Address  10.0.0.1
         RTPForwarder  com.sun.media.rtp.util.PacketForwarder@17456bc
         RTPDemux  com.sun.media.rtp.RTPDemultiplexer@ea85b4
    New Stream Event received: NewReceiveStreamEvent
      Stream: com.sun.media.rtp.RecvSSRCInfo@13e6346
      Participant: com.sun.media.rtp.RTPRemoteSourceInfo@1cb374f
      Source: RTPManager
         SSRCCache  com.sun.media.rtp.SSRCCache@cc9d70
         Dataport  33444
         Controlport  33445
         Address  10.0.0.1
         RTPForwarder  com.sun.media.rtp.util.PacketForwarder@17456bc
         RTPDemux  com.sun.media.rtp.RTPDemultiplexer@ea85b4
    new stream arrived fromcom.sun.media.rtp.RTPRemoteSourceInfo@1cb374f
      - Recevied new RTP stream: JPEG/RTP*2.* But when I try to transmit to my friends computer, which is far far away... I do receive NewParticipantEvent, and I do get StreamMappedEvent, but no NewReceivedStreamEvent. sometimes I received an InactiveReceivedStreamEvent but to the caller computer, not to the callee. I thought perhaps the log would help:
    This is what I get when I try to call my friends remote computer, on his computer:
    Participant added to list: xx.xx.xx.xx.bb.netvision.net.il/xx.xx.xx.xx
      - A new participant had just joined: TacB0sS@dell-laptop
    New Stream Event received: StreamMappedEvent
      Stream: com.sun.media.rtp.RecvSSRCInfo@198a455
      Participant: com.sun.media.rtp.RTPRemoteSourceInfo@aa37a6
      Source: RTPManager
    SSRCCache  com.sun.media.rtp.SSRCCache@12b7eea
    Dataport  33444
    Controlport  33445
    Address  192.168.2.101
    RTPForwarder  com.sun.media.rtp.util.PacketForwarder@99353f
    RTPDemux  com.sun.media.rtp.RTPDemultiplexer@76e369
    And this is what I get on my computer when I call my friends:
    New Stream Event received: InactiveReceiveStreamEvent
      Stream: null
      Participant: com.sun.media.rtp.RTPRemoteSourceInfo@7b7b11
      Source: RTPManager
         SSRCCache  com.sun.media.rtp.SSRCCache@cc9d70
         Dataport  33444
         Controlport  33445
         Address  10.0.0.1
         RTPForwarder  com.sun.media.rtp.util.PacketForwarder@17456bc
         RTPDemux  com.sun.media.rtp.RTPDemultiplexer@ea85b4This is really bigger then me, we've tried to play a bit with configuration, but I just don't see the point, some events are received some are not...
    What am I missing?
    Thanks,
    Adam.
    Edited by: Adam-Z. on Jun 14, 2010 7:34 PM

  • Rtp to wav(or au, etc) with JMF?

    these days i'm working on a program with JMF, it's sth like an ip phone sniffer, it sends arp spoof packets to ensure all the audio/video streams to pass through the sniffer in a switched lan, and the sniffer captures these streams and plays these streams, my question is:how can i save these rtp streams to a wav(or au, etc) file while playing them, or just save the rtp packets into a file like ethereal capture file, and use JMF API to play the captured file?
    sorry for my english, thanks a lot.

    Hi
    I also have project to convert the rtp packet captured by jpcap (payload: G.711 pcmu,from voip) in to wav file
    Did you find the solution? And if so , could you tell me how to do this or send me the source code please?
    My e-mail:[email protected]
    I really need it
    Thank you,
    Best regards

  • Problems initializing webcam device with JMF

    Hello,
    JMStudio works fine on first try. Webcam stream is captured and displayed.
    If I start JMStudio a second time, an error occurs "Couldn't initialize Webcam Device".
    After rebooting my laptop it works again once.
    Same errors occur with all example scripts using webcam device.
    I'm using Windows Vista Home Premium 32Bit and a Vega USB 2.0 Camera (integrated in my laptop)
    Thank you in advance.
    YoFrankie!

    YoFrankie wrote:
    It also wouldn't work the first time, would it?"Sounds like JMF isn't releasing your web cam correctly."
    Why wouldn't it work correctly the first time if JMF isn't releasing it correctly?
    It seems the webcam connection isn't executed correctly on exit, so it can't connect again the second time.Connection isn't executed correctly on exit? You mean JMF isn't releasing your web cam, correctly, when it's done with it... I feel like someone just said that...
    I just installed JMF today and JMRegistry recognizes my webcam and And the fact you only installed it today rules out the possibility than something went wrong during installation...why?
    unfortunately I couldn't find drivers for the webcamWhen I suggested that you make sure you're using the correct drivers for the web cam, just to be clear, I was referencing the drivers for your operating system, not anything to do with JMF.
    If you're using the incorrect drivers in the OS, whenever JMF sends out a "release the web cam" command, incorrect OS drivers may not be able to release it correctly.
    All sarcasm aside...you should try reinstalling JMF, to make sure nothing funky happened during the installation...and you should make sure that Windows is using the latest, best, most accurate drivers for your web cam, to make sure that you're not using a flat-head screwdriver to try to screw in a Phillips head screw...

Maybe you are looking for