Two videos in the same MediaView

Hi,
ill try to explain my problem:
i have a code to make a player with 3 diferent videos. The problem is that i dont know how to change from one video to another. I have a "next" button, and in that button i do this:
            player.stop();
            objplaying++;
            central.getChildren().clear();
            player = new MediaPlayer(medias.get(objplaying));
            view = new MediaView(player);
            central.getChildren().add(view);
            System.out.println("Next: "+player.getStatus());
            player.play();What i do there is:
- Stop the player (which is a mediaplayer)
- erase all from the Pane central
- put in the player the new media with the new video
- Add the MediaView view to the pane and then play it.
It does works, but only sometimes, other times the video wont pass UKNOWN status. It does not happen in every video or always to the same video, happen sometimes.
I dont know if thats the way to change between videos, but i cant find an example how to do it

How do I choose the right sequence settings?
Picture-in-picture (PIP) and split screen
Multi-camera sequences are for real time switching between different sources.
Multi‑camera sequences

Similar Messages

  • How to play two videos at the same time

    Hi everyone!
    Ok, so what I'm trying to do is basically play two videos, which are already saved on the computer, at the same time. I can get one video to play, but when i try to start another it just displays a blank screen.
    import javax.swing.*;
    import javax.media.*;
    import java.awt.*;
    import javax.media.protocol.*;
    public class TwoVideoTest {
         public static void main(String[]args) {
         MediaLocator locator1 = null;
         MediaLocator locator2 = null;
         try {
         locator1 = new MediaLocator("file:/C:/truck1.mpg");
         locator2 = new MediaLocator("file:/C:/truck2.mpg");
         } catch(Exception e) {
         System.out.println("COULNDT CREATE LOCATORS IN MAIN TEST CLASS");
                          System.exit(-1);
         Player player1 = null;
         Player player2 = null;
                     try {
          player1 = Manager.createRealizedPlayer(locator1);
         player2 = Manager.createRealizedPlayer(locator2);
                      } catch(Exception e) {
              System.exit(0);
         JFrame frame = new JFrame();
         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        JPanel panel1 = new JPanel();
       JPanel panel2 = new JPanel();
        panel1.add(player1.getVisualComponent());
       frame.getContentPane().add(panel1);
       frame.setSize(new Dimension(500,500));     
       frame.setVisible(true);
       player1.start();
       player2.start();
    }

    HELLO AGAIN! I guess i post too soon....
    So i modified my code and now the videos play together. Threads, sigh.
    But the audio that comes with the video doesn't appear to be starting at the same time. And this problem I ASSURE you i have no clue how to handle. And yes i know, the two video audios will overlap, but this a test for heavens sake!
    Anyways, heres the modified code in case it will help anyone
    import javax.swing.*;
    import javax.media.*;
    import java.awt.*;
    import javax.media.protocol.*;
    public class Video implements Runnable{
         String url;
         MediaLocator locator;
         Player player;
         JPanel panel;
         public Video (String url,JPanel panel) {
              this.url = url;
              try {
                   locator = new MediaLocator(url);
                   player = Manager.createRealizedPlayer(locator);     
                   panel.add(player.getVisualComponent());
                   player.start();
              } catch (Exception e) {
                   System.out.println("ERROR CREATING MEDIALOCATOR");
                   System.exit(-1);
         public void run() {
              try {
              Thread.sleep(100);
              } catch(Exception e) {}
         public static void main(String[]args) {
            JFrame frame = new JFrame();
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              JPanel panel1 = new JPanel();
              JPanel panel2 = new JPanel();
              panel1.setPreferredSize(new Dimension(100,100));
              panel2.setPreferredSize(new Dimension(100,100));
              Thread thread1 = new Thread(new Video("file:/C:/truck1.mpg",panel1));
              Thread thread2 = new Thread(new Video("file:/C:/truck2.mpg",panel2));
              frame.getContentPane().add(panel1);
              frame.getContentPane().add(panel2);
              frame.setSize(new Dimension(500,500));     
              frame.setVisible(true);
              thread1.start();
              thread2.start();
         

  • Is it possible to play two videos at the same time in Captivate 4

    My idea is to create some e-learning material which shows a screencast of a powerpoint presentation and a video in the top left corner of the screen showing somebody presenting the slides.
    Does anybody know if it is possible to do this with Captivate 4?
    I know this functionality is provided in Adobe Director.
    Any help regarding this will be greatly appreciated
    Kind Regards
    Jay

    Hi Jay
    Do you have the eLearning Suite? If so, you have Adobe Presenter available to you. If you don't, you should be able to download the Presenter installation file and evaluate it.
    Presenter is an add in for PowerPoint. The neat thing about it is that it provides for a Table of Contents type of functionality as you see is configured in Captivate. But the twist with that is you are able to do something you cannot do in Captivate. You are able to insert videos inside the TOC area!
    Just musing out loud... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • I have two videos on the same sd card. One will sync, the other won't. What gives?

    Both are the same format, recorded within minutes of each other on the same type of camera.  This is driving me crazy.

    Did you give them different names?

  • Loading and Playing 2 videos at the same time

    Hello everyone
    I'm having a problem on loading and playing two videos at the same time on XletView.
    The background video, I'm loading by editing channels.xml that is located at config folder into xletview folder. I've just to add the file path and when i start the video it starts playing.
    But now, I have a problem. I have to load a file that is into my HD, and play it at the same time of the main(background) video.
    Do anyone know how to do this?

    anyone?
    PowerBook G4 1.67 GHz Mac OS X (10.4.7) 1.5 GB ram

  • Several videos on the same xhtml page in a epub

    hi, I tried to add two videos on the same xhtml page with the video tag in html5, when I open the ebook with iPad, I can see and watch the first video but not the following ones, there is just a space for the videos that is white like the background, no video player, nothing, is there a solution to fix that without creating a second xhtml page. thank you

    If you don't get an answer here, you might want to ask some of the folks discussing these issues at twitter. Just do a search for #ePrdctn and you'll soon see who might know.

  • Two flv videos at the same time

    Does anyone know how to keep flv files in sync? They play
    synced correctly, but once I stop one, I do not know how to make
    them sync again. I tried matching seek to playheadtime but it is
    always off but 1 - 5 seconds.

    Yes, it does not work even though it should. That is my
    problem. And now I have two videos that were encoded differently
    which I think gave me a clue to the problem.
    For the boards reference in case anyone else ever needs to do
    this...After doing more tests, I am starting to think that it has
    something to do with the video keyframes. The Flash livedocs
    mentions something about only jumping to specified points in the
    video where keyframes exists. I am thinking that my videos have
    different keyframes so sometimes it is off a little, and sometimes
    more. Please correct me if there is a simpler problem AND solution
    as this wont help me since I am not sure I can encode all my videos
    exactly the same right now.

  • How can I create multiple versions of a video within the same project?

    OK...this is a probably a very basic question but I'm not sure how to word it clearly.
    How can I create multiple versions of a video within the same project? What I mean is that I have a bout 50 minutes of video and I want to make two DVDs using different clips from this original 50 minutes of footage. It would be a real pain to have to re-import the video AGAIN for the second DVD. I suppose I could drop anything I don't want to burn to DVD back into the clips pane but that would wipe out all my transitions wouldn't it? I want to save each project in their “raw” form so I can burn additional DVDs later otherwise I would just do them one at a time and not care about one of them being destroyed.
    Wow...that was a mess. Does anyone understand what the heck I’m asking? I hope so.

    How can I create multiple versions of a video within the same project?
    You can't. You make separate projects using the same or different clips, segments, transitions, titles, etc. You can even duplicate the first project and then modify/make the desired changes in the duplicated project. Each project can then be burned as a different DVD or as different titles on the same DVD if there is enough room.

  • Two users opened the same file at the same time with file on Win2K Server

    I just had a problem with a file that could not be saved. After a little investigation I discovered that two users had the same file open at the same time. This is with both users using InDesign CS2 and saving to a Windows 2000 Server. Any ideas how this even happened? The only thing I can think of is if they both opened the file at the exact same time but even that I doubt. I guess the more likely possibility is that the user on 10.5 (which we have had a lot of problems with, it's hard to tell how many of them are CS3 problems (yes CS3) and how many are Windows 2003 Server problems) had InDesign CS2 flake out and not tell her the file was open. Has anybody else seen this? The other user was using 10.4. Both computers have the most recent updates for the OS and for their various adobe products.

    I have videos on mov file and my quick time player does not play them.
    The MOV file container is the generic QT file container. Any audio and video data compatible with the computer system used to create the file can be placed in the MOV file container. Unfortunate, other systems cannot play the file unless they too are configured with the same components as those used to create the file. The normal procedure here is to use the Finder "Info" or alternative media play "Inspector" window to determine what codecs were used to create the original file and, if they are available for your Mac, install them on your system for playback use. Also be advised that some "legacy" codecs may require playback in the QT 7 Player for proper QT support.
    I opened with other players, there is no sound. Then I opened the same file on my windows 7, it plays perfectly with the sound and everything? What is the problem?
    This would indicate these players either access your QT codec component configuration which does not include the required codec or the app has its own built-in codec support which does not include the required audio codec but you Windows 7 media player is configured with the required codec support. This may incidate the use of a really old codecs that may or may not be available/supported on a Mac any longer.

  • Can I have two LANs with the same IP route to each other

    Hi there,
    I have a customer who has a televantage voip network on a private 192.68.0.0/24 network but has two sites connected via a wireless tower that wants to enable QOS over between the two sites by using a 2621XM router at each end. I've enabled QOS on both routers for voice and video but haven't deployed this yet since I'm not sure if I need to change one of the sites networks to a different network number since I'll have the routes in place with a 192.168.1.0 on the WAN side. If both remote networks stay with the same number scheme of 192.168.0.0/24 will they be able to find each other when requesting where a remote 192.168.0.0 host is or do I need to change of the offices networks to a 192.168.2.0 network to make this work? Sounds kind of basic but before deploying I wanted to get some input...thanks.

    Routers cannot route unless the address blocks for each interface are different.
    If you have two sites connected by any kind of link, and you'll use one site as a gateay to the Internet, then you'll need at least four different addresses/ blocks:
    The 'b' site LAN, i.e., fa/0/0:192.168.0.0/24
    The 'b' site WAN (interconnecting link), i.e., fa0/1: 192.168.1.1/30
    The 'a' site WAN (interconnecting link), i.e., fa0/1:192.168.1.2/30
    The 'a' side LAN, i.e., fa0/0:192.168.2.0/24
    (assumes that your wireless link is acting as a bridge or non-routing link) - the fa0/1 device connects to the wireless devices).
    If you use the same router on the 'a' side for the interconnecting link for both the 'a' LAN and the Internet gateway, then the third interface would be your Internet WAN address.
    The 'b' side LAN interface is your 'b' side default gateway for you clients
    The 'a' side LAN interface is the 'a' side default gateway for your clients
    Set a default gateway on the 'a' router to the ISPs Default gateway / next hop address.
    If you're using a third router for an Internet gateway, then the LAN interface address becomes the default gateway for the clients on that LAN, and you'll need to set up a static route pointing to the other LAN in the routers that connect the two LANs..
    A routing protocol may be useful but, depending on your actual bandwidth available, it's probably better to just set up static routes (no routing protocol bandwidth utilization).
    The /30 for the WAN link gives some economy of address usage, but it may also secure the link better, since there are no additional addresses for the intruder to use; they'd have to spoof one of the two valid addresses (.1 & .2) as well as crack your encryption (and / or other security).
    There's an armload of other possible configurations / topologies / address schemes, I believe this one would be reasonably common.
    The bottom line is that a router can only route from one address block to another. In order to pass traffic between two segments with the same address block, you need a bridge / switch, or some other layer one/two device (like a wireless transceiver pair).
    Good Luck
    Scott

  • One again, "can I use CC on two computers at the same time?" - in practice.

    I know this has been asked before and all those threads are locked. Many asked the question, but I haven't found a satisfying answer yet.
    Can I multi task with CC?
    I want to have my laptop next to my desktop. And while I render, export or whatever my newly shot documentary on the laptop I want to work with a music video project on my desktop. Then when the render is finished I render the music video and go back to the laptop and continue on the documentary. Or maybe I just work 5 minutes on the desktop music video, then come up with something brilliant for the project on the laptop and switch. Back and forth. Will that kind of activity result in any kind of limitation, usage-wise?
    So, working on Premiere on my two computers at the same time.. is it possible? Technically? I know the EULA says "only one person". But will it let one person mutli task?
    I need to know this before I buy. sorry for asking this again, please bless me with a clear answer

    Hi Jimmy Crim,
    Yes in case of Creative cloud subscription you are allowed to install and use the cc apps in any two machines.
    Even if you want you care allowed to use these apps together in both the machines.
    Thanks
    Kapil

  • How do I separate two movies on the same timeline?

    I'm using Premiere Elements 11 but have not used it for a while so I've forgotten much of what I've learned. So here is my question: I have two movies on the same timeline. How do I separate them. In other words, how can I move one over on the timeline so it will not confuse my editing of the other one? But better yet - how can I just take one movie off the time line completely and edit it later as a separate movie. I really have four short movies - one minute long. I'd like to edit them separately, with a new file name. I don't know how to do this anymore.  

    Tommyvincent
    I have been doing some homework on the questions that you raised in this thread.
    Observations....
    1.
    After you  import a video into Project Assets, you can right click it, select Rename. That file when dragged to the Timeline will have the new name.
    But...
    If you import a video into Project Assets, drag it to the Timeline, right click the Timeline clip, select Rename from the pop up, then the Timeline file will be renamed but not its thumbnail in Project Assets. You would have rename that Project Asset thumbnail to match if you wanted to. But, these renamed files still trace back to the original with its original file name at its hard drive save location.
    2.
    About getting off your Timeline...one way would be to export the clip selectively if it were in group of clips on the Timeline. Two requirements for that
    a. In Edit area, set the gray tabs of the Work Area Bar to span just the segment to be exported
    and
    b. In the export area, have a check mark next to "Share Work Area Bar Only" option.
    3.
    If you brought a clip into Project Assets, double clicked it to open its Preview Window, you could trim the clip with the Set In and Set Out points and create "subclips" with new names in Project Assets. These "subclips" would be part of that project's media that could be dragged to the Timeline when needed.
    Please review and determine if any of the above is going in the right direction for what you want to do.
    Thank you.
    ATR

  • I AM TRYING TO HOOK UP TWO MONITORS AT THE SAME TIME

    I AM TRYING TO HOOK UP TWO MONITORS AT THE SAME TIME. I have had no success in figuring out why I can get an image on my TV and an image on my monitor (at the same time), but no icons, no start menu and no keyboard access. M y computer freezes as well when I try to do 2 monitors.

    Hi,
    Your machine has:
    *Integrated video is not available if a graphics card is installed.
    Radeon HD 6370D, 6410D, 6530D or 6550D Graphics (model dependent based on processor)
    Supports PCI Express x16 graphics cards
    Two DVI-D ports (Both ports can be used at the same time)
    You can use TWO monitors with the right connections for two ports #3 above. You can get more information from the following instructions:
       http://www.dummies.com/how-to/content/how-to-set-up-multiple-monitors-with-windows-7.html
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • Sync two audio clips from two angles of the same shoot?

    I don't know if this is possible, however I was wondering if it is possible to automatically sync two clips from the same shoot. I have footage from an event which has two angles being filmed at the same time, I am currently manually matching the audio and video to make sure it's in sync however I wondered if there was a way of FCP doing this for you? Doing it manually is fine, but it would be neat if there was a way to automatically do it.
    I think this may be a pipe dream, but I'm curious to know either way.

    If you don't have matching timecode and you don't wish to purchase Pluraleyes...
    then you can use FCP's multiclip editing process to sync in-points and out-points on video from the two cameras.
    Since it appears this would be your first time using this feature I'd recommend reading the following helpful tutorial:
    http://www.kenstone.net/fcphomepage/multicam_editingmartin.html

  • Flash causes pc to freeze when playing 2 youtube videos or flash videos at the same time

    I dont know what has caused this issue but since around january my pc has been freezing to the point where i have to hard reset if i play 2 youtube videos or any flash videos at the same time. the whole pc becomes unresponsive when this happens. all my drivers are up to date so i dont know where this issue is coming from.
    My specs:
    Browser- Firefox 28.0
    OS: Windows 7 home edition 64 bit
    Case: Raidmax Platinum
    Motherboard:ASUS M5A99X EVO AM3
    CPU: AMD fx 8350 (4.6ghz oc)
    Cpu Cooler: ZALMAN CNPS10X Performa 120mm
    GPU: msi GTX 670 power edition
    power Supply: Kingwin Kx 1000w
    RAM:2x4gb(8gb) CORSAIR Vengeance240-Pin DDR3 SDRAM
    HDD: Western Digital Caviar Blue 500gb and 640gb
    Bluray: LG Bluray Drive & Burner

    There's two ways you can go about this Amanda.
    1. Set the length of your images for example 8 seconds each. Offset the photo's like a ladder effect and add the animating keyframes. The red dots in the image below represent the start/finish points of the animation.
    2. The other option is to set the length of all the same, then use keyframes to set the start/ finish of the animation.
    I always use example 1, however example 2 would probably be easier to understand?
    Hope that helps
    Tony

Maybe you are looking for

  • Mail Issue for Macbook Air

    I updated my macbook air software and now mail wont open... need to reinstall mail..

  • I am trying to sync my contacts between my iphone and my Windows 8.1 computer.

    My iphone says that it is version 7.1.2 in the settings.  My computer is a Dell  with Windows 8.1.  I was able to get the devices to sync for music and pictures, but not the contacts.  Would the contacts be saved in Outlook on my computer? 

  • Drawing in the Swing

    Hi all ... really i am new to Swing and would like to know what is the best way to draw in a JFrame for example ? and is it like the awt or there are diffrences , thanks .

  • Graphical presentation

    Hi .. Need a help from some one . I have a situation wher I need to display lot of graphs in browser. We are using forms as the front end , Oracle 8i as the back end . Thanks ..

  • Difference in storage benchmark resuIts: iometer vs. SQLIO

    Hey guys, Just wondering if anyone could explain a difference in benchmark numbers between iometer and SQLIO. To set this question up:  I'm trying to get baseline performance for a new SAN installation, and have been testing with SQLIO for a particul