How to capture screen activity? (screen&audio to video file)

Hello,
I have to capture video desktop activity (including audio) to a file using JMF. I spent hours and hours searching this... a have studied a lot of classes, examples BUT I don't know how to bind them... how to record the actvity. My project is to record screen activity, upload on a server and finally control my computer remotely from an applet (or from another java desktop application). I will use HTTP streaming (what I record I upload on a server, then stream it to the client)
Can someone show me some hints or code for modifying JVidCap example from Sun? Someone else on Sun forum said he could do it but did not say how...
I just want to modify the video capturing so that I get the screen actifity recorded. I read nearly all examples possible including Screen Grabber...
Please help me!
I also have those two classes to get the screen activity as datasource... from [Screen Grabber|http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/ScreenGrabber.html] example but I really don't understand how to implement them in my application because there is no method returning a datasource object... (or probably I don't know how to use them):
(DataSource and LiveStream class)
I hope someone can bind them or help me to go on on this project.... it is so important to me ...

Thanks A LOT for info. I really apprectiate it. This is my code... many mistakes I think... I have a NullPointerException. I renamed DataSource class to CDataSource and instead of line: "stream = streams[0] = new LiveStream(getLocator());" I passed the media locator:"stream = streams[0] = new LiveStream(ml);"
public class capture extends javax.swing.JFrame implements DataSinkListener{
    private DataSink dataSink;
    private Processor outputProcessor;
    CaptureDeviceInfo cdi;
    public capture() throws IOException, NoDataSourceException, NoPlayerException, CannotRealizeException, IncompatibleSourceException {
                initComponents();
// video DataSource
        MediaLocator sourceLocator = new MediaLocator("screen://352,264,320,240/5");
         * javax.media.NoDataSourceException: Cannot find a DataSource for: screen://352,264,320,240/5
        at javax.media.Manager.createDataSource(Manager.java:1037)
at commented line bellow*/
       // CDataSource videoDS = (CDataSource) Manager.createDataSource(sourceLocator);
        CDataSource videoDS = new CDataSource(sourceLocator);
// sound DataSource
         cdi = CaptureDeviceManager.getDevice("DirectSoundCapture");         
         MediaLocator soundMediaLocator = cdi.getLocator();
         DataSource soundDS = Manager.createDataSource(soundMediaLocator);
         //merge Data Sources - is it correct?
         DataSource ds = Manager.createMergingDataSource(new DataSource[]{videoDS, soundDS});
//check them - NullPointerException here, so I think the video DataSource is not correct? or merging is not correct?
          * Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at com.ibm.media.protocol.MergingDataSource.getContentType(MergingDataSource.java:53)
        at com.ibm.media.protocol.MergingPushBufferDataSource.getContentType(MergingPushBufferDataSource.java:63)
          System.out.println("ds: \n" + ds.getContentType() + ":" +
                                ((PushBufferDataSource) ds).getStreams()[0].getFormat() + "\n" +
                                ((PushBufferDataSource) ds).getStreams()[1].getFormat());
//save to video file
         saveFile(ds);
         //handler
                addWindowListener(new WindowAdapter() {
                        @Override
                        public void windowClosed(WindowEvent e) {
                                try {
                                        if(outputProcessor != null) {
                                                outputProcessor.close();
                                        if(dataSink != null) {
                                                dataSink.close();
                                                dataSink.stop();
                                } catch(IOException ex) {
                                        ex.printStackTrace();
            private void saveFile(DataSource ds) throws NotRealizedError {
                  ProcessorModel outputPM = new ProcessorModel(ds,
                        new Format[]{new VideoFormat(VideoFormat.JPEG),new AudioFormat(AudioFormat.LINEAR)},
                        new FileTypeDescriptor(FileTypeDescriptor.QUICKTIME)
                  //save file here
                MediaLocator dest = new MediaLocator("file://C:/rec.mov");
                try {
                        outputProcessor = Manager.createRealizedProcessor(outputPM);
                        DataSource newDS = outputProcessor.getDataOutput();
                        newDS.connect();
                        newDS.start();
                        dataSink = Manager.createDataSink(newDS, dest);
                        dataSink.open();
                        dataSink.start();
                        dataSink.addDataSinkListener(this);
                        //record to that file
                        outputProcessor.start();
                } catch(Exception e) {
                        e.printStackTrace();
}I a starter in JMF (but not in java)... However I read so much JMF these days... I hope I will be a pro one day... :)
Can you tell me my mistakes please? Should I use Merge class? (from example). Is video datasource correct?

Similar Messages

  • How to capture photo of screen while in skype

    how to capture photo of screen while in skype on Ipad2

    press the home button and the top power button at the same time. your screen will flash white and the image will be in your camera roll.

  • Why does say"To play the selected item, you must install a later version of the Adobe Flash Player. To download the Adobe Flash Player, go to the Adobe website." when I have the latest Version of it and it's just Black screen with no audio and Video?

    Why does say"To play the selected item, you must install a later version of the Adobe Flash Player. To download the Adobe Flash Player, go to the Adobe website." when I have the latest Version of it and it's just Black screen with no audio and Video? (Powerpoint Presentation 2013)

    You asked your question on the wrong forum. Try one for the Flash Player

  • How can I get netflix streaming audio, the video is fine but the audio coming through is from the TV(dish)

    how can I get netflix streaming audio, the video is fine but the audio coming through is from the TV(dish)

    It's exactly as I stated. Whenever I try to drag these kinds of loops (ESX24 / software instrument loops? the ones marked in green with the white music note next to them) from the loop browser into the timeline a message comes up saying Audio Not Found for that loop.  And a new track is created automatically when loops are dragged into the timeline, so I'm not creating some other random / synth instrument track so I'm not sure  what the deal is... But perhaps I'll try creating a software instrument track first and then drag the loop into that track and see what happens - maybe there's something with the default settings that automatically creates audio tracks whenever loops are imported?

  • I have an error message, decompressing audio or video file, how do I fix it?

    I have an error message, decompressing audio or video file, how do I fix it?

    Hi carjam222,
    Please mention some more details regarding your issue. Check the link below.
    http://forums.adobe.com/thread/961741
    Regards,
    Vinay

  • How do I combine separate audio and video files into one Quicktime movie?

    I have DVDs that contain separate audio and video files in folders marked Audio_TS and Video_TS. I would like to know how to combine these files into a single Quicktime movie. Is there inexpensive or shareware software that imports and unites these files reliably? A simple solution is preferred, rather than getting into complex media editing applications.
    G4 eMac   Mac OS X (10.4.9)  

    Doug - the VOB files (in the VIDEO_TS folder) are MPEG-2 files. MPEG-2 have the video and audio mixed into the one file - there are no audio files to combine.
    The rest are directions to a DVD player (e.g. the BUP and IFO's) . The AUDIO_TS folder is used for DVD Audio discs and on video DVDs is always empty.
    Many people use Handbrake or iSquint to convert VOB to iPod video though MPEG Streamclip is the best - open the first numbered VOB and it will prompt you to open all of them. ALWAYS fix timecodes when it asks. You can then edit/trim and export to MPEG-4.

  • How streaming an audio or video files from google drive using google api objective-c client?

       I have implemented streaming an audio or video files by mpmovieplayer from Dropbox. For this purpose I am using Dropbox sdk. Audio or video files are playing with no problem from dropbox in my app.
    But, I can not implement the same functionality from Google drive. I am using alternateLink,webcontentLink,EmbedLink,Exportlink that we get from google drive. But mpmovieplayer does not play audio or video. So how can get any link from google drive,by which i can streaming an audio or video file from google drive. I have listed all google drive files in a table view. I am using google api objective-c client. So please help me. Thanks in advance.

    Hello,
    I'm giving a try at your application and so far, it is great!
    I understand that you're working on a way to help moving back files to google drive. Actually, I can copy / paste, but it always renames the files, so I end up with both a "copy of" and my original file.
    could you save and overwite the original file when it already exists ? (perhaps an option in the settings) ?
    Thanks!

  • How to delelte audio and video files on C7 and int...

    hey everybody,
    i have bought a new C7 yesterday and i am facing two problems:
    1. I am unable to delete audio and video files from my mobile. how to do it?
    2. while my wlan connection works perfectly i am unable to connect to net thru 3g and GPRS ( i am a bsnl user and have save all the settigns).
    any help will be greatly appriciated

    hey everybody,
    i have bought a new C7 yesterday and i am facing two problems:
    1. I am unable to delete audio and video files from my mobile. how to do it?
    2. while my wlan connection works perfectly i am unable to connect to net thru 3g and GPRS ( i am a bsnl user and have save all the settigns).
    any help will be greatly appriciated

  • How to combine discrete audio and video files?

    I am working on a project which requires me to merge a video file with a PCM audio file from another source.
    I just bought Compressor 4.1.1, expecting to be able to do exactly this.
    The only "multiple input - single output" option I can see is creating a surround sound group, adding my audio as left and right channels, and then attaching the video.
    This does not work. Pressing "add" at the end of the process does not result in a new job.
    Help please!
    G.

    QT7 Pro is able to do this. Cost is $30.
    In QT7 Pro, open up the audio and video files to be matched.
    Select all the audio and then select copy
    In the video window, put the playback head where you want the audio to start then select add to movie.
    Verify the playback is as desired, then save the movie. Done.
    Takes longer to describe the process than to do it.
    x
    Of course, life is good when the in point is exactly the same for both audio and video ...

  • How can I combine the audio and video files from youtube downloads when they don't automatically combine?

    I'm using YouTube Video and Audio Downloader. Sometimes the audio and video files combine automatically, sometimes they don't - remaining as separate " DASH - .m4a and DASH - .mp4 ". It used to be that when this would happen I could open up a "ffmpeg" window which would allow me to "manually" convert them to a combined .mp4 file. It was a "drag and drop" type of interface. For some reason I can no longer access that ffmpeg combining function. I tried clicking on ffmpeg.exe. I tried re-downloading ffmpeg several times, both from the Downloader options tab and from the ffmpeg website.
    Thanks for your help.

    Sounds like a question for the developer of the video download add-ons that you have installed.

  • How should i convert any image, audio and video into binary?

    I am going to prepare a Steganographer Software Using java.
    I want a code to convert any Image , audio and video files into binary structure.
    I am having very short time to accomlish my project, so please reply as early as possible.

    It's already binary.

  • How to load and display the external flv video files in dynamicly and the how to control the flv fil

    How to load and display the external flv video files in dynamicly using AS 3.0
    and  How to control the flv file  add the play paus button and add seekbar.
    I have using to load the flv file following code
    var flvPlaceHolder1:MovieClip = new MovieClip();
    var vid1:Video = new Video(734, 408);
    flvPlaceHolder1.addChild(vid1);
    addChild(flvPlaceHolder1);
    flvPlaceHolder1.x = 1059;
    flvPlaceHolder1.y = 152;
    var nc1:NetConnection = new NetConnection();
    nc1.connect(null);
    var ns1:NetStream = new NetStream(nc1);
    vid1.attachNetStream(ns1);
    var listener1:Object = new Object();
    listener1.onMetaData = function(evt:Object):void {};
    ns1.client = listener1;
    ns1.play("GV-1600 TURNING.flv");
    ns1.addEventListener(NetStatusEvent.NET_STATUS, statusChanged1);
    function statusChanged1(ns1:NetStatusEvent):void
             trace(ns1.info.code);
            if (ns1.info.code == 'NetStream.Buffer.Empty')
                 trace('the video has ended');
                 removeChild(flvPlaceHolder1);
                 //trace('removeChild');
                gotoAndPlay(1786);
    then how to add the play,paus ,full screen button    and   seekbar,volumebar.

    I have to Create the flash presentation for our company product
    In this presentation the left  side the text animation are displayed then right side the our product video is displayed.
    In this presentation i need the following option :
    1, The first product video and animation is finished then the next product is played
    2, then the video displayed  (size width and height 400x300) , I click this video to increase the size(ex:1000x700)
    3, then the playing video i control  it play, stop, paus button and volume bar, seek bar.
    4, then this presentation is displayed on 42 inches LCD TV so this full presentation is run full screen.
    I have finished first two steps 1 and 2
    the following are the screen short and code:-
    code :-
    var count=0;
    var flvPlaceHolder2:MovieClip = new MovieClip();   
    var vid2:Video = new Video(734, 408);
    flvPlaceHolder2.addChild(vid2);
    addChild(flvPlaceHolder2);
    flvPlaceHolder2.x = 1059;
    flvPlaceHolder2.y = 152;
    var nc2:NetConnection = new NetConnection();
    nc2.connect(null);
    var ns2:NetStream = new NetStream(nc2);
    vid2.attachNetStream(ns2);
    var listener2:Object = new Object();
    listener2.onMetaData = function(evt:Object):void {};
    ns2.client = listener2;
    ns2.play("GS-4000.flv");
    this.addEventListener(Event.ENTER_FRAME, BtnFadeIn2);
    function BtnFadeIn2(event:Event):void
        if (this.currentFrame == 387)
            /*flvPlaceHolder2.x = 30;
            flvPlaceHolder2.y = 140;
            vid2.width=1800;
            vid2.height=800;
            trace('Screen size is changed');*/
            if(count==0)
            flvPlaceHolder2.x = 30;
            flvPlaceHolder2.y = 140;
            vid2.width=1800;
            vid2.height=800;
            count++;
    ns2.addEventListener(NetStatusEvent.NET_STATUS, statusChanged2);
    function statusChanged2(ns2:NetStatusEvent):void
        trace(ns2.info.code);
        if (ns2.info.code == 'NetStream.Buffer.Empty')
                trace('the video has ended');
                 removeChild(flvPlaceHolder2);
                 //trace('removeChild');
                gotoAndPlay(433);
    flvPlaceHolder2.buttonMode=true;
    flvPlaceHolder2.addEventListener(MouseEvent.CLICK,home2);
    function home2(e:MouseEvent):void
        if(vid2.width==734 && vid2.height==408)
            flvPlaceHolder2.x = 30;
            flvPlaceHolder2.y = 140;
            vid2.width=1800;
            vid2.height=800;
        else
            flvPlaceHolder2.x = 1059;
            flvPlaceHolder2.y = 152;
            vid2.width=734;
            vid2.height=408;

  • HT4168 audio or video files in ePub document?

    I'd like to know if we can insert audio or video files to Pages that will export to ePub format?
    Thanks!

    Here is me Googling for you:
    http://support.apple.com/kb/ht4168
    http://epubweekly.wordpress.com/2013/01/24/epub-using-apples-pages/
    http://www.youtube.com/watch?v=XkcL9oq2IO4
    http://www.macsage.com/how-to-produce-an-ebook-with-apples-pages-part-1/
    http://www.macsage.com/how-to-produce-an-ebook-with-pages-%E2%80%93-part-2/
    The last link is most pertinent.
    Peter

  • Extracting audio from video file to edit...

    i know in imovie it's easy you just select the video then go up top and select the extract audio tab...
    but how can you extract the audio from a video file in final cut so are able to edit the audio and video files separately from one another WITHIN final cut??

    no output volume? ... you need to check your setting under the View menu > Audio Playback ... where are you sending the audio? maybe you're routing it to follow the video out through firewire to your DV device, in which case you need to turn up the speakers on your DV monitoring equipment
    ...or is this a muxed MPEG file? if so you need to demux it before bringing it into FCP, or better still, convert it to a more appropriate edit codec (you can use the excellent and free MPEG Streamclip application to do this)

  • Playing audio and video files in JSF (.wav,.mp3)

    Hi,
    I would like to know how to play audio and video files such as .wav,.mp3 in jsf .
    could any one please post the code for playing the wav files.
    Thanks,
    Ram

    There is no JSF component to do this, so you would have to write your own custom component to render an <object ...> element.
    Or, you can use <f:verbatim> wrapped around an html <object ...> element.

Maybe you are looking for

  • Getting oracle.xml.parser.v2.XMLParseException: Start Of root Element

    Hi All, I am getting below error while creating STUB/Skeleton in Jdeveloper to call a web service from OAF Page But getting below error while trying to creating Stub/Skeleton to call weservice ERROR: oracle.xml.parser.v2.XMLParseException: Start Of r

  • PAYMENT MENTHOD FOR LOCKBOX

    Hi, I am setting up the lock box for my comp code. 1. Payment method I have to define payment method for incoming check . But .. When i am click on incoming payment. system display this options. 1. debit memo 2. bill/ex 3. bill/ ex pmt .req 4. paymen

  • How do i get rid of the ugly Table?

    Wheni check out my site i see the table. liek i have all my images and then they are all seperated by the table how can i get rid of those lines? THANKS -Bryan

  • Is it possible to burn a data disc in premiere elements 10?

    Hi, I would like to know if it is possible to burn a data disc in premiere elements 10 rather than copy a whole project. I understand that I would be able to make further copies from this disc. Is it possible and is this information correct? Dave

  • Need to set parallel in database

    Hi All this is on 11.2.0.3.0 We need to configure database to set transactions to parallel Server is 64GB,, Oracle db is 40GB Cpu_count =40 parallel_degree_policy=MANUAL parallel_degree_policy=AUTO Any more settings needed Current settings parallel_a