Some ways to lip sink audio and video ?

Have shot a song of a music video ,audio is there during the shoot also....
now what can be a nice way to match the audio of the footage and the real WAV audio clip on the audio track in FCPx ?
I want to place the dance step clip in a close on the top of the....clip with same dance step in the long shot to see how it would look
if I could exactly place the two similar audios on each other I would almost match the lip sink....
but since waveforms are not distinctly visible I can't even take help of that...
Can you suggest some ways of placing shorter shots on long shots to see the result or will I have to sink them purely on my visual judgement ?

Select both clips, and go: File: New Mulitcam.. Bam!
Make sure to give the clips seperate Camera Name and/or Angel.
Make sure 'Use Audio' is selected.. but that is the default.

Similar Messages

  • PLEASE ADVISE BEST WAY TO HOOK UP AUDIO AND VIDEO TO OLDER TV WITH DVI INPUT

    GOT NEW APPLE TV NEED TO CONVERT HDMI OUTPUT TO HOOK UP TO MY HDTV READY PROJECTION TV WITH DVI INPUT CONNECTOR
    WOULD BE NICE IF YOU COULD JUST  EMAIL APPLE AND OTHER SIMILAR  COMPANIES LIKE MICROSOFT  ETC. SIMPLE QUESTIONS LIKE THIS WITH OUT FILLING OUT FORMS ETC

    Officially DVI is not supported, but may work provided connections are HDCP compliant.
    You will need an HDMI to DVI converter and as DVI does not support audio, a method of playing audio such as using AppleTV optical out instead to something capable of decoding the optical audio.
    This is a user to user forum not an Apple led official support forum by the way.
    AC

  • Audio and Video Performance Tweaking

    Hey guys I'm back with more questions.  I'm trying to improve the overall quality of my video conference experience.   My target market is the elderly and their families, so not necessarly people who are used to computers and tweaking things so we want to make it as good as we can right out of the box.
    Video
    1.)  All of my decoded video has clearly visible blocks.  I've attached a sample screen shot to show what I mean.  Is there a deblocking filter option I'm missing somewhere?
    2.)  The encoder in flash player 10.x is still H.263 based right?  I'm not missing a secret option to use the H.264 encoder am I?
    Audio
    1.)  I've set my audio codec to speex in my audio publisher, and it looks like it defaults to a quality setting of 10 (<rtc:AudioPublisher id="audioPub" codec="{SoundCodec.SPEEX}"/>).  Am I missing any tweaks to improve the audio quality?
    Audio questions where I assume the answer is no but I ask anyway
    2.)  Does the LCCS code or flash player prioritize audio packets over video packets or are they just sent when they're available.  I'd like to sacrafice video for audio if it's possible.
    3.)  Is there a way to better syncronize the video and audio streams.  Right now there's a lot of lag between what is said and how the lips move (this is even with peer to peer on the same private network).   I get the idea that there isn't but I thought I'd ask.
    4.)  Is there anything I can monitor to give me an idea of the current connection performance?   In otherwords can I monitor something and then make my own decicions to reduce the video quality or audio quality based on avaiable bandwidth between the two connected peers?
    5.)  You secretely have echo cancellation built in but were waiting till now to tell me right?  Just kidding.
    Thanks as usual
    -Eric

    Hironmay,
           Thank you for getting back to me, I know I asked a lot in one post there.   It would be nice to have a way for audio packets to be prioritized over video since they need to get there but  you can live with dropped video frames.   I'd love to see a way to sync the audio and video up as well.  I was just reading about some research where they showed if you can watch someones mouth move while you hear them talk it's equivelant to a 20dB volume increase (referrning to how well the person can understand you.)   I have elderly users so something like that is very important to me.
    I agree with you that when I changed the captureAndHeightFactor that the blocks got smaller, but did not go away.  I was hoping there was a way to smooth out the edges of the blocks so the boundries don't look so harsh.   I had been looking at flash.media.video in the flex 3.4 language reference and it talks about deblocking.  I copied the relevent text from the documentaiton at the end of this message.  I was wondering if there was something there I could use.   I'll play around with it some more.
    Believe me I've been very vocal about the need for echo cancellation on the Flash Forums
    Thanks for the help,
    Eric
    relevent text from flash.media.video
    deblocking
    property
    deblocking:intIndicates the type of filter applied to decoded video as part of post-processing.      The default value is 0, which lets the video compressor apply a deblocking filter as needed.
    Compression of video can result in undesired artifacts. You can use the       deblocking property to set filters that reduce blocking and,      for video compressed using the On2 codec, ringing.
    Blocking refers to visible imperfections between the boundaries      of the blocks that compose each video frame. Ringing refers to distorted      edges around elements within a video image.
    Two deblocking filters are available: one in the Sorenson codec and one in the On2 VP6 codec.      In addition, a deringing filter is available when you use the On2 VP6 codec.       To set a filter, use one of the following values:
    0—Lets the video compressor apply the deblocking filter as needed.
    1—Does not use a deblocking filter.
    2—Uses the Sorenson deblocking filter.
    3—For On2 video only, uses the On2 deblocking filter but no deringing filter.
    4—For On2 video only, uses the On2 deblocking and deringing filter.
    5—For On2 video only, uses the On2 deblocking and a higher-performance      On2 deringing filter.
    If a value greater than 2 is selected for video when you are using      the Sorenson codec, the Sorenson decoder defaults to 2.
    Using a deblocking filter has an effect on overall playback performance, and it is usually      not necessary for high-bandwidth video. If a user's system is not powerful enough,       the user may experience difficulties playing back video with a deblocking filter enabled.

  • MHP(XletView)  streaming audio and video sample

    I need some sample which uses streaming audio and video for Xletview, where can find it??

    Hi,
    If you want some examples check the pege:
    http://www.mhp-interactive.org/code/codesamples.shtml
    Have a nice playing
    Regards, Martinez

  • DO i need some extra hardware interface for receving both Audio and video

    hi i m doing e-learning project. i have to capture video from webcam and voice from headphone and send to client.
    but my code is working fine for either one at a time.
    DO i need some extra hardware interface for receving both Audio and video. im using code AVTransmit and AVReceive found from this site only
    After running TX
    i give Dsound:// & vfw://0 in Media Locater only sound is received and no vedio
    and when i give vfw://0 in Media Locater only live video is transmited.
    im using JMF1.1.2e.
    if any one know the method to run or cause of it plz reply me soon. i will be very thankfull
    transmiter/server side code .first run TX on server
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    import java.util.*;
    import javax.media.rtp.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.border.*;
    public class Tx extends JFrame implements ActionListener, KeyListener,
    MouseListener, WindowListener {
    Vector targets;
    JList list;
    JButton startXmit;
    JButton rtcp;
    JButton update;
    JButton expiration;
    JButton statistics;
    JButton addTarget;
    JButton removeTarget;
    JTextField tf_remote_address;
    JTextField tf_remote_data_port;
    JTextField tf_media_file;
    JTextField tf_data_port;
    TargetListModel listModel;
    AVTransmitter avTransmitter;
    RTCPViewer rtcpViewer;
    JCheckBox cb_loop;
    Config config;
    public Tx() {
    setTitle( "JMF/RTP Transmitter");
         config= new Config();
         GridBagLayout gridBagLayout= new GridBagLayout();
         GridBagConstraints gbc;
         JPanel p= new JPanel();
         p.setLayout( gridBagLayout);
         JPanel localPanel= createLocalPanel();
         gbc= new GridBagConstraints();
         gbc.gridx= 0;
         gbc.gridy= 0;
         gbc.gridwidth= 2;
         gbc.anchor= GridBagConstraints.CENTER;
         gbc.fill= GridBagConstraints.BOTH;
         gbc.insets= new Insets( 10, 5, 0, 0);
         ((GridBagLayout)p.getLayout()).setConstraints( localPanel, gbc);
         p.add( localPanel);
         JPanel targetPanel= createTargetPanel();
         gbc= new GridBagConstraints();
         gbc.gridx= 1;
         gbc.gridy= 1;
         gbc.weightx= 1.0;
         gbc.weighty= 1.0;
         gbc.anchor= GridBagConstraints.CENTER;
         gbc.fill= GridBagConstraints.BOTH;
         gbc.insets= new Insets( 10, 5, 0, 0);
         ((GridBagLayout)p.getLayout()).setConstraints( targetPanel, gbc);
    p.add( targetPanel);
         JPanel mediaPanel= createMediaPanel();
         gbc= new GridBagConstraints();
         gbc.gridx= 1;
         gbc.gridy= 2;
         gbc.weightx= 1.0;
         gbc.weighty= 1.0;
         gbc.anchor= GridBagConstraints.CENTER;
         gbc.fill= GridBagConstraints.BOTH;
         gbc.insets= new Insets( 10, 5, 0, 0);
         ((GridBagLayout)p.getLayout()).setConstraints( mediaPanel, gbc);
    p.add( mediaPanel);
    JPanel buttonPanel= new JPanel();
    rtcp= new JButton( "RTCP Monitor");
    update= new JButton( "Transmission Status");
         update.setEnabled( false);
         rtcp.addActionListener( this);
         update.addActionListener( this);
         buttonPanel.add( rtcp);
         buttonPanel.add( update);
         gbc= new GridBagConstraints();
         gbc.gridx = 0;
         gbc.gridy = 3;
    gbc.gridwidth= 2;
         gbc.weightx = 1.0;
         gbc.weighty = 0.0;
         gbc.anchor = GridBagConstraints.CENTER;
         gbc.fill = GridBagConstraints.HORIZONTAL;
         gbc.insets = new Insets( 5,5,10,5);
         ((GridBagLayout)p.getLayout()).setConstraints( buttonPanel, gbc);
         p.add( buttonPanel);
    getContentPane().add( p);
         list.addMouseListener( this);
         addWindowListener( this);
    pack();
    setVisible( true);
    private JPanel createMediaPanel() {
    JPanel p= new JPanel();
         GridBagLayout gridBagLayout= new GridBagLayout();
    GridBagConstraints gbc;
         p.setLayout( gridBagLayout);
         JLabel label= new JLabel( "Media Locator:");
         gbc= new GridBagConstraints();
         gbc.gridx = 0;
         gbc.gridy = 0;
         gbc.weightx = 0.0;
         gbc.weighty = 0.0;
         gbc.anchor = GridBagConstraints.EAST;
         gbc.fill = GridBagConstraints.NONE;
         gbc.insets = new Insets( 5,5,10,5);
         ((GridBagLayout)p.getLayout()).setConstraints( label, gbc);
         p.add( label);
         tf_media_file= new JTextField( 35);
         gbc= new GridBagConstraints();
         gbc.gridx = 1;
         gbc.gridy = 0;
         gbc.weightx = 1.0;
         gbc.weighty = 0.0;
         gbc.anchor = GridBagConstraints.WEST;
         gbc.fill = GridBagConstraints.HORIZONTAL;
         gbc.insets = new Insets( 5,5,10,5);
         ((GridBagLayout)p.getLayout()).setConstraints( tf_media_file, gbc);
         p.add( tf_media_file);
         tf_media_file.setText( config.media_locator);
         cb_loop= new JCheckBox( "loop");
         startXmit= new JButton( "Start Transmission");
         startXmit.setEnabled( true);
         startXmit.addActionListener( this);
         gbc= new GridBagConstraints();
         gbc.gridx = 2;
         gbc.gridy = 0;
         gbc.weightx = 0.0;
         gbc.weighty = 0.0;
         gbc.anchor = GridBagConstraints.WEST;
         gbc.fill = GridBagConstraints.NONE;
         gbc.insets = new Insets( 5,5,10,5);
         ((GridBagLayout)p.getLayout()).setConstraints( cb_loop, gbc);
         p.add( cb_loop);
         cb_loop.setSelected( true);
         cb_loop.addActionListener( this);
         gbc= new GridBagConstraints();
         gbc.gridx = 1;
         gbc.gridy = 1;
         gbc.weightx = 0.0;
         gbc.weighty = 0.0;
         gbc.anchor = GridBagConstraints.CENTER;
         gbc.fill = GridBagConstraints.NONE;
         gbc.insets = new Insets( 5,5,10,5);
         ((GridBagLayout)p.getLayout()).setConstraints( startXmit, gbc);
         p.add( startXmit);
         TitledBorder titledBorder= new TitledBorder( new EtchedBorder(), "Source");
         p.setBorder( titledBorder);
         return p;
    private JPanel createTargetPanel() {
    JPanel p= new JPanel();
         GridBagLayout gridBagLayout= new GridBagLayout();
    GridBagConstraints gbc;
         p.setLayout( gridBagLayout);
         targets= new Vector();
         for( int i= 0; i < config.targets.size(); i++) {
         targets.addElement( config.targets.elementAt( i));
    listModel= new TargetListModel( targets);
    list= new JList( listModel);
         list.addKeyListener( this);
         list.setPrototypeCellValue( "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
    JScrollPane scrollPane= new JScrollPane( list,
    ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
    ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
         gbc= new GridBagConstraints();
         gbc.gridx= 0;
         gbc.gridy= 0;
         gbc.weightx= 1.0;
         gbc.weighty= 1.0;
         gbc.anchor= GridBagConstraints.CENTER;
         gbc.fill= GridBagConstraints.BOTH;
         gbc.insets= new Insets( 10, 5, 0, 0);
         ((GridBagLayout)p.getLayout()).setConstraints( scrollPane, gbc);
         p.add( scrollPane);
    JPanel p1= new JPanel();
         p1.setLayout( gridBagLayout);
         JLabel label= new JLabel( "IP Address:");
         gbc= new GridBagConstraints();
         gbc.gridx = 0;
         gbc.gridy = 0;
         gbc.weightx = 0.0;
         gbc.weighty = 0.0;
         gbc.anchor = GridBagConstraints.EAST;
         gbc.fill = GridBagConstraints.NONE;
         gbc.insets = new Insets( 5,5,0,5);
         ((GridBagLayout)p1.getLayout()).setConstraints( label, gbc);
         p1.add( label);
         tf_remote_address= new JTextField( 15);
         gbc= new GridBagConstraints();
         gbc.gridx = 1;
         gbc.gridy = 0;
         gbc.weightx = 0.0;
         gbc.weighty = 0.0;
         gbc.anchor = GridBagConstraints.WEST;
         gbc.fill = GridBagConstraints.NONE;
         gbc.insets = new Insets( 5,5,0,5);
         ((GridBagLayout)p1.getLayout()).setConstraints( tf_remote_address, gbc);
         p1.add( tf_remote_address);
         label= new JLabel( "Data Port:");
         gbc= new GridBagConstraints();
         gbc.gridx = 0;
         gbc.gridy = 1;
         gbc.weightx = 0.0;
         gbc.weighty = 0.0;
         gbc.anchor = GridBagConstraints.EAST;
         gbc.fill = GridBagConstraints.NONE;
         gbc.insets = new Insets( 5,5,0,5);
         ((GridBagLayout)p1.getLayout()).setConstraints( label, gbc);
         p1.add( label);
         tf_remote_data_port= new JTextField( 15);
         gbc= new GridBagConstraints();
         gbc.gridx = 1;
         gbc.gridy = 1;
         gbc.weightx = 0.0;
         gbc.weighty = 0.0;
         gbc.anchor = GridBagConstraints.WEST;
         gbc.fill = GridBagConstraints.NONE;
         gbc.insets = new Insets( 5,5,0,5);
         ((GridBagLayout)p1.getLayout()).setConstraints( tf_remote_data_port, gbc);
         p1.add( tf_remote_data_port);     
    JPanel p2= new JPanel();
    addTarget= new JButton( "Add Target");     
    removeTarget= new JButton( "Remove Target");
         p2.add( addTarget);
         p2.add( removeTarget);
         addTarget.addActionListener( this);
         removeTarget.addActionListener( this);
         gbc= new GridBagConstraints();
         gbc.gridx = 0;
         gbc.gridy = 2;
         gbc.weightx = 1.0;
         gbc.weighty = 0.0;
         gbc.gridwidth= 2;
         gbc.anchor = GridBagConstraints.CENTER;
         gbc.fill = GridBagConstraints.HORIZONTAL;
         gbc.insets = new Insets( 20,5,0,5);
         ((GridBagLayout)p1.getLayout()).setConstraints( p2, gbc);
         p1.add( p2);
         gbc= new GridBagConstraints();
         gbc.gridx= 1;
         gbc.gridy= 0;
         gbc.weightx= 1.0;
         gbc.weighty= 1.0;
         gbc.anchor= GridBagConstraints.CENTER;
         gbc.fill= GridBagConstraints.BOTH;
         gbc.insets= new Insets( 10, 5, 0, 0);
         ((GridBagLayout)p.getLayout()).setConstraints( p1, gbc);
         p.add( p1);
         TitledBorder titledBorder= new TitledBorder( new EtchedBorder(), "Targets");
         p.setBorder( titledBorder);
         return p;
    private JPanel createLocalPanel() {
    JPanel p= new JPanel();
         GridBagLayout gridBagLayout= new GridBagLayout();
    GridBagConstraints gbc;
         p.setLayout( gridBagLayout);
         JLabel label= new JLabel( "IP Address:");
         gbc= new GridBagConstraints();
         gbc.gridx = 0;
         gbc.gridy = 0;
         gbc.weightx = 0.0;
         gbc.weighty = 0.0;
         gbc.anchor = GridBagConstraints.EAST;
         gbc.fill = GridBagConstraints.NONE;
         gbc.insets = new Insets( 5,5,0,5);
         ((GridBagLayout)p.getLayout()).setConstraints( label, gbc);
         p.add( label);
         JTextField tf_local_host= new JTextField( 15);
         gbc= new GridBagConstraints();
         gbc.gridx = 1;
         gbc.gridy = 0;
         gbc.weightx = 0.0;
         gbc.weighty = 0.0;
         gbc.anchor = GridBagConstraints.WEST;
         gbc.fill = GridBagConstraints.NONE;
         gbc.insets = new Insets( 5,5,0,5);
         ((GridBagLayout)p.getLayout()).setConstraints( tf_local_host, gbc);
         p.add( tf_local_host);
         try {
    String host= InetAddress.getLocalHost().getHostAddress();     
         tf_local_host.setText( host);
         } catch( UnknownHostException e) {
         label= new JLabel( "Data Port:");
         gbc= new GridBagConstraints();
         gbc.gridx = 0;
         gbc.gridy = 1;
         gbc.weightx = 0.0;
         gbc.weighty = 0.0;
         gbc.anchor = GridBagConstraints.EAST;
         gbc.fill = GridBagConstraints.NONE;
         gbc.insets = new Insets( 5,5,0,5);
         ((GridBagLayout)p.getLayout()).setConstraints( label, gbc);
         p.add( label);
         tf_data_port= new JTextField( 15);
         gbc= new GridBagConstraints();
         gbc.gridx = 1;
         gbc.gridy = 1;
         gbc.weightx = 0.0;
         gbc.weighty = 0.0;
         gbc.anchor = GridBagConstraints.WEST;
         gbc.fill = GridBagConstraints.NONE;
         gbc.insets = new Insets( 5,5,10,5);
         ((GridBagLayout)p.getLayout()).setConstraints( tf_data_port, gbc);
         p.add( tf_data_port);
         tf_data_port.setText( config.local_data_port);
         TitledBorder titledBorder= new TitledBorder( new EtchedBorder(), "Local Host");
         p.setBorder( titledBorder);
         return p;
    public void actionPerformed( ActionEvent event) {
    Object source= event.getSource();
         if( source == addTarget) {
         String ip= tf_remote_address.getText().trim();
         String port= tf_remote_data_port.getText().trim();
         String localPort= tf_data_port.getText().trim();
         addTargetToList( localPort, ip, port);
         if( avTransmitter != null) {
         avTransmitter.addTarget( ip, port);
         } else if( source == removeTarget) {
         int index= list.getSelectedIndex();
         if( index != -1) {
              Target target= (Target) targets.elementAt( index);
              if( avTransmitter != null) {
         avTransmitter.removeTarget( target.ip, target.port);
              targets.removeElement( target);
              listModel.setData( targets);          
         } else if( source == startXmit) {
         if( startXmit.getLabel().equals( "Start Transmission")) {          
         int data_port= new Integer( tf_data_port.getText()).intValue();
              avTransmitter= new AVTransmitter( this, data_port);
         avTransmitter.start( tf_media_file.getText().trim(), targets);          
              avTransmitter.setLooping( cb_loop.isSelected());
         startXmit.setLabel( "Stop Transmission");
         } else if( startXmit.getLabel().equals( "Stop Transmission")) {
              avTransmitter.stop();
              avTransmitter= null;
              removeNonBaseTargets();
              listModel.setData( targets);
         startXmit.setLabel( "Start Transmission");          
         } else if( source == rtcp) {
         if( rtcpViewer == null) {
         rtcpViewer= new RTCPViewer();
         } else {
              rtcpViewer.setVisible( true);
              rtcpViewer.toFront();
         } else if( source == cb_loop) {
         if( avTransmitter != null) {
              avTransmitter.setLooping( cb_loop.isSelected());
    private void removeNonBaseTargets() {
         String localPort= tf_data_port.getText().trim();
         for( int i= targets.size(); i > 0;) {
         Target target= (Target) targets.elementAt( i - 1);
         if( !target.localPort.equals( localPort)) {
    targets.removeElement( target);
         i--;
    public void addTargetToList( String localPort,
                             String ip, String port) {     
    ListUpdater listUpdater= new ListUpdater( localPort, ip,
                                  port, listModel, targets);
    SwingUtilities.invokeLater( listUpdater);           
    public void rtcpReport( String report) {
         if( rtcpViewer != null) {
         rtcpViewer.report( report);
    public void windowClosing( WindowEvent event) {
         config.local_data_port= tf_data_port.getText().trim();
         config.targets= new Vector();
         for( int i= 0; i < targets.size(); i++) {
         Target target= (Target) targets.elementAt( i);
         if( target.localPort.equals( config.local_data_port)) {
              config.addTarget( target.ip, target.port);
         config.media_locator= tf_media_file.getText().trim();
         config.write();
    System.exit( 0);
    public void windowClosed( WindowEvent event) {
    public void windowDeiconified( WindowEvent event) {
    public void windowIconified( WindowEvent event) {
    public void windowActivated( WindowEvent event) {
    public void windowDeactivated( WindowEvent event) {
    public void windowOpened( WindowEvent event) {
    public void keyPressed( KeyEvent event) {
    public void keyReleased( KeyEvent event) {
    Object source= event.getSource();
         if( source == list) {
         int index= list.getSelectedIndex();
    public void keyTyped( KeyEvent event) {
    public void mousePressed( MouseEvent e) {
    public void mouseReleased( MouseEvent e) {
    public void mouseEntered( MouseEvent e) {
    public void mouseExited( MouseEvent e) {
    public void mouseClicked( MouseEvent e) {
    Object source= e.getSource();
         if( source == list) {
         int index= list.getSelectedIndex();
         if( index != -1) {
              Target target= (Target) targets.elementAt( index);
              tf_remote_address.setText( target.ip);
              tf_remote_data_port.setText( target.port);
         int index= list.locationToIndex( e.getPoint());
    public static void main( String[] args) {
    new Tx();
    class TargetListModel extends AbstractListModel {
    private Vector options;
    public TargetListModel( Vector options) {
         this.options= options;
    public int getSize() {
         int size;
         if( options == null) {
         size= 0;
         } else {
         size= options.size();
         return size;
    public Object getElementAt( int index) {
    String name;
    if( index < getSize()) {
         Target o= (Target)options.elementAt( index);
    name= o.localPort + " ---> " + o.ip + ":" + o.port;
         } else {
         name= null;
         return name;
    public void setData( Vector data) {
         options= data;
         fireContentsChanged( this, 0, data.size());
    class ListUpdater implements Runnable {
    String localPort, ip, port;
    TargetListModel listModel;
    Vector targets;
    public ListUpdater( String localPort, String ip, String port,
                   TargetListModel listModel, Vector targets) {
         this.localPort= localPort;
         this.ip= ip;
         this.port= port;
         this.listModel= listModel;
         this.targets= targets;
    public void run() {
    Target target= new Target( localPort, ip, port);
         if( !targetExists( localPort, ip, port)) {
         targets.addElement( target);
    listModel.setData( targets);
    public boolean targetExists( String localPort, String ip, String port) {
         boolean exists= false;
         for( int i= 0; i < targets.size(); i++) {
         Target target= (Target) targets.elementAt( i);
         if( target.localPort.equals( localPort)
         && target.ip.equals( ip)
              && target.port.equals( port)) {          
              exists= true;
         break;
         return exists;
    >>>>>>>>>>>>>>>>>
    import java.awt.*;
    import java.io.*;
    import java.net.InetAddress;
    import java.util.*;
    import javax.media.*;
    import javax.media.protocol.*;
    import javax.media.format.*;
    import javax.media.control.TrackControl;
    import javax.media.control.QualityControl;
    import javax.media.rtp.*;
    import javax.media.rtp.event.*;
    import javax.media.rtp.rtcp.*;
    public class AVTransmitter implements ReceiveStreamListener, RemoteListener,
    ControllerListener {
    // Input MediaLocator
    // Can be a file or http or capture source
    private MediaLocator locator;
    private String ipAddress;
    private int portBase;
    private Processor processor = null;
    private RTPManager rtpMgrs[];
    private int localPorts[];
    private DataSource dataOutput = null;
    private int local_data_port;
    private Tx tx;
    public AVTransmitter( Tx tx, int data_port) {
         this.tx= tx;
         local_data_port= data_port;
    * Starts the transmission. Returns null if transmission started ok.
    * Otherwise it returns a string with the reason why the setup failed.
    public synchronized String start( String filename, Vector targets) {
         String result;
         locator= new MediaLocator( filename);
         // Create a processor for the specified media locator
         // and program it to output JPEG/RTP
         result = createProcessor();
         if (result != null) {
         return result;
         // Create an RTP session to transmit the output of the
         // processor to the specified IP address and port no.
         result = createTransmitter( targets);
         if (result != null) {
         processor.close();
         processor = null;
         return result;
         // Start the transmission
         processor.start();
         return null;
    * Use the RTPManager API to create sessions for each media
    * track of the processor.
    private String createTransmitter( Vector targets) {
         // Cheated. Should have checked the type.
         PushBufferDataSource pbds = (PushBufferDataSource)dataOutput;
         PushBufferStream pbss[] = pbds.getStreams();
         rtpMgrs = new RTPManager[pbss.length];
         localPorts = new int[ pbss.length];
         SessionAddress localAddr, destAddr;
         InetAddress ipAddr;
         SendStream sendStream;
         int port;
         SourceDescription srcDesList[];
         for (int i = 0; i < pbss.length; i++) {
         // for (int i = 0; i < 1; i++) {
         try {
              rtpMgrs[i] = RTPManager.newInstance();     
              port = local_data_port + 2*i;
              localPorts[ i]= port;
              localAddr = new SessionAddress( InetAddress.getLocalHost(),
                                  port);
              rtpMgrs.initialize( localAddr);          
              rtpMgrs[i].addReceiveStreamListener(this);
              rtpMgrs[i].addRemoteListener(this);
         for( int k= 0; k < targets.size(); k++) {
              Target target= (Target) targets.elementAt( k);
              int targetPort= new Integer( target.port).intValue();
              addTarget( localPorts[ i], rtpMgrs[ i], target.ip, targetPort + 2*i);
              sendStream = rtpMgrs[i].createSendStream(dataOutput, i);          
              sendStream.start();
         } catch (Exception e) {
              e.printStackTrace();
              return e.getMessage();
         return null;
    public void addTarget( String ip, String port) {
         for (int i= 0; i < rtpMgrs.length; i++) {
         int targetPort= new Integer( port).intValue();
         addTarget( localPorts[ i], rtpMgrs[ i], ip, targetPort + 2*i);
    public void addTarget( int localPort, RTPManager mgr, String ip, int port) {
         try {
         SessionAddress addr= new SessionAddress( InetAddress.getByName( ip),
                                  new Integer( port).intValue());
         mgr.addTarget( addr);
         tx.addTargetToList( localPort + "", ip, port + "");
         } catch( Exception e) {
         e.printStackTrace();
    public void removeTarget( String ip, String port) {
         try {     
         SessionAddress addr= new SessionAddress( InetAddress.getByName( ip),
                                  new Integer( port).intValue());
         for (int i= 0; i < rtpMgrs.length; i++) {
         rtpMgrs[ i].removeTarget( addr, "target removed from transmitter.");
         } catch( Exception e) {
         e.printStackTrace();
    boolean looping= true;
    public void controllerUpdate( ControllerEvent ce) {
         System.out.println( ce);
         if( ce instanceof DurationUpdateEvent) {
         Time duration= ((DurationUpdateEvent) ce).getDuration();
         System.out.println( "duration: " + duration.getSeconds());
         } else if( ce instanceof EndOfMediaEvent) {
         System.out.println( "END OF MEDIA - looping=" + looping);
         if( looping) {
         processor.setMediaTime( new Time( 0));
              processor.start();
    public void setLooping( boolean flag) {
         looping= flag;
    public void update( ReceiveStreamEvent event) {
         String timestamp= getTimestamp();
         StringBuffer sb= new StringBuffer();
         if( event instanceof InactiveReceiveStreamEvent) {
         sb.append( timestamp + " Inactive Receive Stream");
         } else if( event instanceof ByeEvent) {
         sb.append( timestamp + " Bye");
         } else {
         System.out.println( "ReceiveStreamEvent: "+ event);
         tx.rtcpReport( sb.toString());     
    public void update( RemoteEvent event) {     
         String timestamp= getTimestamp();
         if( event instanceof ReceiverReportEvent) {
         ReceiverReport rr= ((ReceiverReportEvent) event).getReport();
         StringBuffer sb= new StringBuffer();
         sb.append( timestamp + " RR");
         if( rr != null) {
              Participant participant= rr.getParticipant();
              if( participant != null) {
              sb.append( " from " + participant.getCNAME());
              sb.append( " ssrc=" + rr.getSSRC());
              } else {
              sb.append( " ssrc=" + rr.getSSRC());
              tx.rtcpReport( sb.toString());
         } else {
         System.out.println( "RemoteEvent: " + event);
    private String getTimestamp() {
         String timestamp;
         Calendar calendar= Calendar.getInstance();
         int hour= calendar.get( Calendar.HOUR_OF_DAY);
         String hourStr= formatTime( hour);
         int minute= calendar.get( Calendar.MINUTE);
         String minuteStr= formatTime( minute);
         int second= calendar.get( Calendar.SECOND);
         String secondStr= formatTime( second);
         timestamp= hourStr + ":" + minuteStr + ":" + secondStr;     
         return timestamp;
    private String formatTime( int time) {     
         String timeStr;
         if( time < 10) {
         timeStr= "0" + time;
         } else {
         timeStr= "" + time;
         return timeStr;
    * Stops the transmission if already started
    public void stop() {
         synchronized (this) {
         if (processor != null) {
              processor.stop();
              processor.close();
              processor = null;
         for (int i= 0; i < rtpMgrs.length; i++) {
         rtpMgrs[ i].removeTargets( "Session ended.");
              rtpMgrs[ i].dispose();
    public String createProcessor() {
         if (locator == null) {
         return "Locator is null";
         DataSource ds;
         DataSource clone;
         try {
         ds = javax.media.Manager.createDataSource(locator);
         } catch (Exception e) {
         return "Couldn't create DataSource";
         // Try to create a processor to handle the input media locator
         try {
         processor = javax.media.Manager.createProcessor(ds);
         processor.addControllerListener( this);     
         } catch (NoProcessorException npe) {
         return "Couldn't create processor";
         } catch (IOException ioe) {
         return "IOException creating processor";
         // Wait for it to configure
         boolean result = waitForState(processor, Processor.Configured);
         if (result == false)
         return "Couldn't configure processor";
         // Get the tracks from the processor
         TrackControl [] tracks = processor.getTrackControls();
         // Do we have atleast one track?
         if (tracks == null || tracks.length < 1)
         return "Couldn't find tracks in processor";
         // Set the output content descriptor to RAW_RTP
         // This will limit the supported formats reported from
         // Track.getSupportedFormats to only valid RTP formats.
         ContentDescriptor cd = new ContentDescriptor(ContentDescriptor.RAW_RTP);
         processor.setContentDescriptor(cd);
         Format supported[];
         Format chosen;
         boolean atLeastOneTrack = false;
         // Program the tracks.
         for (int i = 0; i < tracks.length; i++) {
         Format format = tracks[i].getFormat();
         if (tracks[i].isEnabled()) {
              supported = tracks[i].getSupportedFormats();
              // We've set the output content to the RAW_RTP.
              // So all the supported formats should work with RTP.
              // We'll just pick the first one.
              if (supported.length > 0) {
              if (supported[0] instanceof VideoFormat) {
                   // For video formats, we should double check the
                   // sizes since not all formats work in all sizes.
                   chosen = checkForVideoSizes(tracks[i].getFormat(),
                                       supported[0]);
              } else
                   chosen = supported[0];
              tracks[i].setFormat(chosen);
              System.err.println("Track " + i + " is set to transmit as:");
              System.err.println(" " + chosen);
              atLeastOneTrack = true;
              } else
              tracks[i].setEnabled(false);
         } else
              tracks[i].setEnabled(false);
         if (!atLeastOneTrack)
         return "Couldn't set any of the tracks to a valid RTP format";
         // Realize the processor. This will internally create a flow
         // graph and attempt to create an output datasource for JPEG/RTP
         // audio frames.
         result = waitForState(processor, Controller.Realized);
         if (result == false)
         return "Couldn't realize processor";
         // Set the JPEG quality to .5.
         setJPEGQuality(processor, 0.5f);
         // Get the output data source of the processor
         dataOutput = processor.getDataOutput();
         return null;
    static SessionAddress destAddr1, destAddr2;
    * For JPEG and H263, we know that they only work for particular
    * sizes. So we'll perform extra checking here to make sure they
    * are of the right sizes.
    Format checkForVideoSizes(Format original, Format supported) {
         int width, height;
         Dimension size = ((VideoFormat)original).getSize();
         Format jpegFmt = new Format(VideoFormat.JPEG_RTP);
         Format h263Fmt = new Format(VideoFormat.H263_RTP);
         if (supported.matches(jpegFmt)) {
         // For JPEG, make sure width and height are divisible by 8.
         width = (size.width % 8 == 0 ? size.width :
                        (int)(size.width / 8) * 8);
         height = (size.height % 8 == 0 ? size.height :
                        (int)(size.height / 8) * 8);
         } else if (supported.matches(h263Fmt)) {
         // For H.263, we only support some specific sizes.
         if (size.width < 128) {
              width = 128;
              height = 96;
         } else if (size.width < 176) {
              width = 176;
              height = 144;
         } else {
              width = 352;
              height = 288;
         } else {
         // We don't know this particular format. We'll just
         // leave it alone then.
         return supported;
         return (new VideoFormat(null,
                        new Dimension(width, height),
                        Format.NOT_SPECIFIED,
                        null,
                        Format.NOT_SPECIFIED)).intersects(supported);
    * Setting the encoding quality to the specified value on the JPEG encoder.
    * 0.5 is a good default.
    void setJPEGQuality(Player p, float val) {
         Control cs[] = p.getControls();
         QualityControl qc = null;
         VideoFormat jpegFmt = new VideoFormat(VideoFormat.JPEG);
         // Loop through the controls to find the Quality control for
         // the JPEG encoder.
         for (int i = 0; i < cs.length; i++) {
         if (cs[i] instanceof QualityControl &&
              cs[i] instanceof Owned) {
              Object owner = ((Owned)cs[i]).getOwner();
              // Check to see if the owner is a Codec.
              // Then check for the output format.
              if (owner instanceof Codec) {
              Format fmts[] = ((Codec)owner).getSupportedOutputFormats(null);
              for (int j = 0; j < fmts.length; j++) {
                   if (fmts[j].matches(jpegFmt)) {
                   qc = (QualityControl)cs[i];
                   qc.setQuality(val);
                   System.err.println("- Setting quality to " +
                             val + " on " + qc);
                   break;
              if (qc != null)
              break;
    * Convenience methods to handle processor's state changes.
    private Integer stateLock = new Integer(0);
    private boolean failed = false;
    Integer getStateLock() {
         return stateLock;
    void setFailed() {
         failed = true;
    private synchronized boolean waitForState(Processor p, int state) {
         p.addControllerListener(new StateListener());
         failed = false;
         // Call the required method on the processor
         if (state == Processor.Configured) {
         p.configure();
         } else if (state == Processor.Realized) {
         p.realize();
         // Wait until we get an event that confirms the
         // success of the method, or a failure event.
         // See StateListener inner class
         while (p.getState() < state && !failed) {
         synchronized (getStateLock()) {
              try {
              getStateLock().wait();
              } catch (InterruptedException ie) {
              return false;
         if (failed)
         return false;
         else
         return true;
    * Inner Classes
    class StateListener implements ControllerListener {
         public void controllerUpdate(ControllerEvent ce) {
         // If there was an error during configure or
         // realiz

    I do this all the time, I put my MBP to a 60 inch Sharp. If you have the video working do the simple thing first. Check to make sure your sound is on your TV and Mac. Then if that doesn't work go to System Prefrences and under sound go to a tab called Output and see if your TV is listed and if it is change it to that setting
    Hope It Works

  • Best way to handle audio and video?

    Can someone give me suggestions on best way to handle audio and video clips. 2 issues:
    Audio- I want to avoid problems for visitors who may need to install something to listen, and would like them to be able to remain viewing page while listening. I understand how to set up the Iweb player option, and I understand how to simply link to a mp3 file that relies on the visitors player. I'm thinking I need to "embed a player" (?) which is something I haven't dealt with yet.
    Video- I have a link to a .mov file. It plays it in either a real small box, or if you enlarge it , the image deteriorates. Is there a better way to handle this?
    http://www.imaginerecoveryonline.com/IMAGINERECOVERYONLINE.COM/THE_JOURNEY_1.htm l
    Thanks for any help

    Yes that should work for what you want.

  • How to get audio and video in one file

    hi...I am "premiere beginner user" and I have a simple question , I think..:)...Every time when I am trying to export media out from my premiere (using media encoder) I get video file and some audio files, but what I need is only ONE file, that contains both (audio and video)..for example , I have edited film in hd quality and I want it to export, I choose h.264 format(make some settings,pal,audio quality...) and when it´s "all done", only "result" I get is one video file and two audio files and they are not together :).....so please help mme anyone..ok and as you can see I am not from english speaking country, so sorry for my english...thanks for help....

    There is no indication that something is out-of-sync or the ability to move/slip into sync like in FCE/FCP.
    To the best of my knowledge, using match frame and overwriting the video with video+audio (or attaching it as a connected clip if you don't want to overwrite the video, which might have effects applied) is the best way to do this.
    You can use the blade tool first in the timeline to get just the section you want to get back into sync. Make cuts so that you have a single clip that needs the audio resynced, select it, and use shift-F to select the original synced clip in the Event Browser. Make sure your play head is at the beginning of this video clip in the timeline. Press option-2, then 'q', and now you have the audio back in your timeline, synced with the video.  Delete the old, no-longer-synced audio and you should be set.

  • OT: What viewers do you need to use ALL audio and video files?

    I had a lot of trouble with audio and video files on my PC. I
    now have a
    MacBook Pro, which is a big improvement. But I still
    frequently
    encounter files that I can't use. I try to open them, but
    Apple doesn't
    know what to do with them. For example, I often encounter
    unusable
    videos while perusing news websites. I also have some audio
    files with
    .mva or .mvw extensions that don't work.
    So what viwers/players do I need to download in order to be
    able to play
    every audio/video file that comes my way? iTunes handles .mp3
    files, and
    I also have QuickTime installed. I just viewed another video
    after I
    installed a Flash plugin. What else do I need to install?
    Thanks.
    www.geobop.org - Family Websites
    www.invisible-republic.org - Adult political websites (Mature
    adults only)

    VLC is a big favorite
    http://www.macupdate.com/app/mac/5758/vlc-media-player

  • Audio and video out uf sync

    I'm using Premier elements 12.  When I open a VOB file, the audio and video are not in sync.  I can open that same file with windows media player and all is well.  What do I need to do with respect to editing a file like this?
    The information about the display on my computer is:
    Name NVIDIA GeForce GT 220
    PNP Device ID PCI\VEN_10DE&DEV_0A20&SUBSYS_069A10DE&REV_A2\4&22063C0D&0&0018
    Adapter Type GeForce GT 220, NVIDIA compatible
    Adapter Description NVIDIA GeForce GT 220
    Adapter RAM 1.00 GB (1,073,741,824 bytes)
    Installed Drivers nvd3dumx.dll,nvwgf2umx.dll,nvwgf2umx.dll,nvd3dum,nvwgf2um,nvwgf2um
    Driver Version 9.18.13.3523
    INF File oem38.inf (Section002 section)
    Color Planes Not Available
    Color Table Entries 4294967296
    Resolution 1920 x 1080 x 60 hertz
    Bits/Pixel 32
    Memory Address 0xFA000000-0xFAFFFFFF
    Memory Address 0xD0000000-0xDFFFFFFF
    Memory Address 0xCE000000-0xCFFFFFFF
    I/O Port 0x0000EC00-0x0000EC7F
    IRQ Channel IRQ 16
    I/O Port 0x000003B0-0x000003BB
    I/O Port 0x000003C0-0x000003DF
    Memory Address 0xA0000-0xBFFFF
    Thanks,
    Pete Blair

    Pete Blair
    In all your information, I did not see what computer operating system your Premiere Elements 12 is running on? Have you updated 12 to the 12.1 Update, using an opened project's Help Menu/Update? If not, please do so.
    Your issue may relate to the details of your "VOB file" and how it was ripped/copied from the DVD-VIDEO and DVD disc to get it into a Premiere Elements project.
    a. project preset set for NTSC DV Standard or NTSC DV Widescreen (whichever corresponded to your recording details)...or PAL equivalent.
    b. DVD disc in burner tray
    c. Add Media/DVD camera or computer drive/Video Importer/.....
    It does not happened often, but if audio is out of sync and you are not using the above route, then consider the Command Prompt way described in the
    following
    ATR Premiere Elements Troubleshooting: PE: DVD-VIDEO/Seamless VOB Ripping
    A just in case note, contrary to some, it is not necessary to convert VOB (VTS_01_1.VOB video file and any files in that series) to any other format in Premiere Elements.
    Please review and consider and then we can decide what next.
    Thank you.
    ATR

  • Audio and Video Out of Sync  -AV sync problem

    Edited a bunch of clips together from Canon T1i 720p, iPhone 3GS, Canon SX110, and Sony DSC-W70. About an hour long. Everything looks great when played within iMovie '11, but when exported, the audio and video get out of sync. It gets progressively worse the farther along you are in the sequence. AV is as much as 6 seconds off by the end!! Audio is ahead of the video. I've tried exporting in several different ways including: Export to iDVD, Export to Media Browser 720p, with the same results.
    Anyone else having this problem? I know I've done this with success in the past with iMovie '09.

    Im having the same issue I have a project that is 9 minutes long tried all before even looking at the forum but It will not sync. Some one even told me to repair the permissions so nothing worked. I went to the Mac store no body knew what I was talking about so they asked me to call Apple so I did and was hung up on 3 times not only that but I was advised since I just bought the product I did have 3 months of tech support.
    I mean I'm having an issue and they tell me I have 90 days of free service? This has got to be a joke. I than asked well can I just take it back and instal my 09 back? I was advised nope you wont be able to do so and you cant get your money back.
    After this whole mishap I did learned that the less snips and clips and editing is on the project the sync and video will be ok but if you have lots clips such as most of us than we will continue on having this issue.
    We need a fix ASAP

  • Why do my audio and video start in sync, then quickly go out of sync?

    I've just installed Windows 8 and also purchased Premiere Elements 12.
    I've also got Windows movie maker.
    When I play my clips in Premiere Elements, they audio and video start of synced, but quickly go out. This doesn't happen with Windows Movie Maker and I had trialed some NCH video editing software also and didn't have that problem.
    can someone tell me what I need to do to get this working right?

    MASMAS
    The first thing that we need to know are the properties of what you are putting on the Timeline. What works in another software does not necessarily work in Premiere Elements. Each program has its own supported formats.
    a. What is the file extension for this file? .MOV or .MP4?
    b. Does the iPad describe it as 1080p or 720p?
    c. If you open Premiere Elements 12 and go to Edit Menu/Project Settings/General, what do you see for Editing Mode, Timebase, Frame Size, and Pixel Aspect Ratio, even if those field appear to be grayed out.
    Two immediate troubleshooting avenues are going to be in the direction of...
    a. Project settings not set up to match the properties of the source from the iPad. Then we would start a new project and set the project setting manually before importing your video. Details for manually setting the project preset are in the following.
    ATR Premiere Elements Troubleshooting: PE11: Accuracy of Automatic Project Preset (New Project Dialog) Setting
    b. The iPad video being recorded with a variable frame rate instead of a constant one...the remedy then would probably be to take your video in a program like HandBrake to change the variable to a constant frame rate. And after that, import the corrected video into the Premiere Elements project which has the correct project preset (preferably set manual to assure the correct result).
    Please see what you can put together in the way of video details, and we will sort this out.
    Thanks.
    ATR

  • 5G iPod Audio and Video not in Sync

    I bought an iPod 30 GB a couple of days before. I was trying to download a movie to it which is in MP4 format. The original movie was in AVI format and I used Videora iPod converter to convert AVI -> MP4, but when I try to view the movie in my iPod the Audio and Video are not in Sync at al. The audio is way ahead of the video. Please someone let me know how to fix this problem. I turned off Equalizer and all other fancy settings in the iPod but it still didn't help.

    some encoders have this problem occasionally. I've seen it very frequently in ffmpex when the source is avi. not sure what you're using, but so I'd suggest you try a different software. I'm getting very good results out of handbrake or 42.

  • Photo Booth - audio and video not syncing

    I was making some videos on Photo Booth and the audio doesn't start playing until 5 seconds after the video starts! Do you know if there is any way to fix this or is it a software issue? I have tried resetting the computer but it didn't help.
    Thanks for your help!

    In Photo Booth, right-click on the video and either Export or Reveal in Finder. Either way, then open and play it with QuickTime. Is audio and video still out of sync?

  • Is it possible to play audio and video files(urls) directly in webView ?

    Hello Everybody,
    I have implemented one article page in webView. The content of the that page is html file. There are some links for audio and video files. Is it possible to play that links directly in that webView by clicking them?
    Or is there any other way to play this files?
    Any kind of information on this topic is highly appreciated.
    Thanks,
    Pandit Pakhurde

    Is it important that the music come from a video, or are you just looking to listen to music in the background, while doing something else.  If the later, you can certainly play music from the Music App, Pandora, or iHeart Radio, etc., and with the music playing, tap your home button to go to your home page and open anything else you want and the music will continue.
    I don't have any videos to try out right now, but you try the same thing out and if the music continues, it works.  If it doesn't, it doesn't.

  • Capturing Audio and Video of DVD

    I need to convert sections of a DVD (audio and video) that I narrated on to mp3/mp4 so I can put it up on my website.
    Is there a way to do that with Quicktime? Some plugin?
    Thanks
    G4 Powerbook   Mac OS X (10.4.8)  

    Is there a way to do that with Quicktime? Some plugin?Not normally. While there is an MPEG-2 QT component for the video data, it ignores the audio. I would normally use MPEG Streamclip (free) to demux the audio data to AIFF. This is a very quick operation. Since the AIFF file is fully compatible, it can then be converted to other audio formats by QT Pro and/or iTunes.

Maybe you are looking for

  • ICal 10.6 client no longer syncing with 10.5 iCal server

    Searched the forums and haven't found anyone with an answer yet. We upgraded all our laptops to 10.6. The server is still at 10.5, running CalDAV server. Since the upgrade of the iCal clients, they are no longer accessing the iCal server. Any ideas w

  • Running out of disk space in c drive

    Hi, i'm new to OBIEE, i installed obiee 10.1.3.4 on my computer , i'm doing practice on sample sales. every day i could see message running out of disk space, daily i'm purging cache entries and deleting sessions in UI, and also deleting temp files i

  • Can't open PSD files using "Open With..." feature in 3rd party programs.

    I use MediaPro to manage my media assets and it allows me to pass files to PE10 with an "Open With..." feature.  So I can have a file selected in MediaPro, and then open that file with PE by using this feature.  It worked great with PE8, but for some

  • Is there a way to leave Video messages?

    I am using iChat, I understand you can leave video messages to your buddies, provided they are not Off Line but is there any kind of software that would allow me to record and send a video message to someone? Thanks Frederic

  • How to stream live media in Lion server

    Even though Apple's website recommends QuickTime Broadcaster and Darwin server see http://www.apple.com/quicktime/extending/resources.html QuickTime Broadcaster  is not compatible with Lion server and Darwin server webpage appears fixed to 2008...4 y