How to synchronize audio and video rtp-streams

Hi everyone!
I've tried to make one of the processors, processor1, control the other processor, processor2, with processor1.addController(processor2) but I get a
javax.media.IncompatibleTimeBaseException. I need to synchronize audio and video rtp-streams because they are sometimes completely out of sync.
In JMF API Guide I've read:
"2. Determine which Player object's time base is going to be used to drive
the other Player objects and set the time base for the synchronized
Player objects. Not all Player objects can assume a new time base.
For example, if one of the Player objects you want to synchronize has
a *push-data-source*, that Player object's time base must be used to
drive the other Player objects."
I'm using a custom AVReceive3 to receive rtp-streams and then I create processors for the incoming stream's datasource's, and they are ALL PushBufferDataSource's.
Does this mean I can't synchronize these. If so is there any way I can change them into Pull...DataSources ?
How are you supposed to sync audio and video if not with as above ?

camelstrike wrote:
Hi everyone!
I've tried to make one of the processors, processor1, control the other processor, processor2, with processor1.addController(processor2) but I get a
javax.media.IncompatibleTimeBaseException. I need to synchronize audio and video rtp-streams because they are sometimes completely out of sync.
In JMF API Guide I've read:
"2. Determine which Player object's time base is going to be used to drive
the other Player objects and set the time base for the synchronized
Player objects. Not all Player objects can assume a new time base.
For example, if one of the Player objects you want to synchronize has
a *push-data-source*, that Player object's time base must be used to
drive the other Player objects."
I'm using a custom AVReceive3 to receive rtp-streams and then I create processors for the incoming stream's datasource's, and they are ALL PushBufferDataSource's.
Does this mean I can't synchronize these. If so is there any way I can change them into Pull...DataSources ?The RTP packets are timestamped when they leave, and they are played in order. You can't change the timebase on an RTP stream because, for all intensive purposes, it's "live" data. It plays at the speed the transmitting RTP server wants it to play, and it never gets behind because it drops out of order and old data packets.
If your RTP streams aren't synced correctly on the receiving end, it means they aren't being synced on the transmitting end...so you should look into the other side of the equation.

Similar Messages

  • How to synchronize audio and video

    Hello,
    I have an application that stream video images. Whats going on at the other end( the audio) I can also stream that.
    Now i want to synchronize both audio and video for effective synchronized output.
    Can i do that. I dont know the API that are available in Doja. Is Any timebase or timesynchronize APIs are available through which i can synchronize both.
    Any Suggestions and ideas can be implemented.
    Thanks

    I know that In Midlet development using MMAPI there are APIs available to synronize the players like
    p1.setTimaBase(p2.getTimeBase())
    But I am not using Players. Through http connection I m getting the raw image data and displaying it through ImageItem i.e no players required.
    Therefore If i stream the audio like this How to synchronize that.
    I relly need ur Help
    Thanks

  • Synchronize audio and video over RTP

    Hi all,
    I am new in jmf. Please any one tell me, how to synchronize audio and video streams, when we capture thru audio and video capture devices and send it over network thru rtp protocol and receive at client side. How to syncnronize at client side? Please send me reply if any one have solution in jmf.
    Thanks in advance.

    Does anyone know about how this is done? I'm doing a videoconference thing with jmf, QoS is a required componenet! So if anyone knows about how this is done, plz share with discussion! All I know so far is that I can buffer the incoming streams to some extend then call syncStart() to start the video with the starting time of the video!

  • How to transmit audio and video simultaneously?

    Hi,
    I am new at jmf.Now i have a problem that how to transmit audio and video at the same time.The AVTransmit can transmit only one media,audio or video.Anybody have experience with it?Please help me.Thanks a lot!

    Hi, audio and video data must be transmitted in 2 distinct RTP sessions, by using different ports at sender side.
    At receiver side, the port can be only 1.

  • Satellite A80: How to restore audio and video codecs?

    How can I restore the audio and video codecs which are installed by default on my Satellite A80 with XP Home edition?
    I removed them in safe mode because of a problem with the Pinnacle Codec installed by Pinnacle Studio 10.
    Now I need to set the standard audio en video codecs back.
    I already downloaded the codec package from Microsoft Mediaplayer and have sound en video again in Media Player.
    Unfortunately I still don't have sound in Toshiba Diagnose Program when testing Midi and Wave sound.
    System restore came up with the message that restore was not possible because no changes had been made.
    Message was edited by: roel

    Have investigated in the forum and found this different codecs:
    -Zsunami Filter Pack: (3.9.9)
    - Nimo Codec Pack: (5.0 Final)
    - ACE Mega CoDeC Pack: (5.93)
    - Codec Pack Elisoft: (13.505)
    - K-Lite Codec Pack: (2.2) Full
    - SLD Codec Pack: (1.5 Pro)
    - All in One: (5.0.6.1)
    - The Codecs: (1.1 full)
    Well, if the system restore does't work try to install one or several codecs from this list.
    Have found it in this posting:
    http://forums.computers.toshiba-europe.com/forums/thread.jspa?threadID=12068&messageID=44047
    good luck

  • 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 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.

  • How to apply audio and video transitions automatically when drop multiple clips to timeline?

    If I remember OK, in previos versions of Premiere it was possible to Drag multiple Clips from project area to timeline, and apply automatically audio/video transitions.
    It was possible to configure how many video frames will be overlapped to do a default transitions (and for audio, also).
    Is it possible in Premiere CS6 to do the same thing ?  Leave me a link to documentation, or a hint, how to get this thing done.
    I have searched over the documentation, but i have not found.
    Thanks for hints.

    I believe the feature you're referring to is Automate to Sequence. In CS6, it was in the Project Menu; for those using CC, it is in the Clip Menu.

  • How to synchronize audio and film

    I have digitized several analoge films without any problem in I movie. Sudenly my audio is not running at the smane speed as the film. Audio is running faster.
    How can i synchronize that??

    Hi
    Sudenly my audio is not running at the smane speed as the film.
    Can it be so that material used is in one frame rate (fps = frames per second) and Your movie project in another ?
    • NTSC = 29.97fps (standard in USA (and more) and on many Cameras)
    • PAL = 25fps (standard in EU (and more))
    Same goes for 50i and 50p and 60i and 60p.
    iMovie doesn't handle 50p or 60p as standard (as far as I know) but material need to be converted to 50i or 60i first.
    Then I use JES_Deinterlacer to convert from 25fps to 29.97fps - when I need to do a NTSC-project.
    fps in Your project You see here (in Project window)
    first ona at 24 bildrutor = 24fps (frames per second) (why it became this I wonder )
    next 30fps (NTSC)
    last 25fps (PAL)
    Mixing material with different fps - can in MY CASES result in Audio (out of sync./drift)
    Yours Bengt W

  • How to synchronize audio track and video when transmitting by RTP

    since the audio stream and video stream are transmitted separately on the network even if in a merged data, how to synchronize the audio stream and video stream at the receiving end ?

    camelstrike wrote:
    Hi everyone!
    I've tried to make one of the processors, processor1, control the other processor, processor2, with processor1.addController(processor2) but I get a
    javax.media.IncompatibleTimeBaseException. I need to synchronize audio and video rtp-streams because they are sometimes completely out of sync.
    In JMF API Guide I've read:
    "2. Determine which Player object's time base is going to be used to drive
    the other Player objects and set the time base for the synchronized
    Player objects. Not all Player objects can assume a new time base.
    For example, if one of the Player objects you want to synchronize has
    a *push-data-source*, that Player object's time base must be used to
    drive the other Player objects."
    I'm using a custom AVReceive3 to receive rtp-streams and then I create processors for the incoming stream's datasource's, and they are ALL PushBufferDataSource's.
    Does this mean I can't synchronize these. If so is there any way I can change them into Pull...DataSources ?The RTP packets are timestamped when they leave, and they are played in order. You can't change the timebase on an RTP stream because, for all intensive purposes, it's "live" data. It plays at the speed the transmitting RTP server wants it to play, and it never gets behind because it drops out of order and old data packets.
    If your RTP streams aren't synced correctly on the receiving end, it means they aren't being synced on the transmitting end...so you should look into the other side of the equation.

  • Syncing Audio and Video but wish for the Audio not to move on timeline?

    Has anyone worked out how to sync audio and video within Premiere Pro but have the Audio stay fixed on the timeline and the video move? Every way I try it Premiere Pro insists on moving the audio. Locking the track does not work as you cannot select the audio within it to Sync with.
    I have a music video shoot with 14 camera angles used on the lead singer (don't ask me why). Multi-camera editing is not an option as there are too many sources for my brand new MacbookPro to handle. I think I would need the computer from Superman II to edit that many clips together.
    What I am doing is syncing the first clip, the one Im going to use as the baseline fall back shot and then I need to sync other clips onto the timeline. However Premiere Pro insists on moving the audio to fit with the video not visa-versa.
    Any help would be appreciated.

    @slitchfield: on the mentioned page, it is stated that "Improvements in screen real estate, with slimmer top status bar and optional (in some apps) bottom toolbar, meaning that all phones will have a larger useful display area."
    But on the E6 the bottom toolbar decreases available screen size in most apps, most noticeable in Web browser where the full view has gone. The bottom toolbar is not optional, you can't configure it yourself.
    And: "Homescreen widgets will now come in up to five different sizes (1x1, 2x1, 4x1, 2x2, 4x4) and allow a greater degree of interactivity.", but on the E6 they are in only one size, always with large borders and other visual effects.
    So beware of differences between phones, perhaps some aspects of Belle work differently depending on the type of device.
    "Notes now brings up a white (and AMOLED-unfriendly...) editing screen.": that you can change by switching themes, "Dark Solid for Anna" does a good job. It is a shame that the lines of Notes have gone though.
    When switching themes, I found you have to restart the phone, otherwise the theme doesn't get properly loaded in all apps. Stopping/starting apps is not enough. So when experimenting and loading one theme after another, you may end up with disfunctional combinations of black-on-black and white-on-white, but it may not be due to the last theme. Also you may end up with a good combination that isn't around anymore the next time you restart your phone.
    Current N900 and former E6 user regretting Belle upgrade
    Devices owned: 2110, 2110i, Cellular Data Card, 8110, 7110, 6210, 6310i, 6100, 9500, 6233, 5140i, 3109c, N900, E6-00

  • 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.

  • TS1584 combined audio and video cd/dvd

    I have a music cd that has both audio and video transport streams. When I load the disc my pc opens it as a dvd  and doesnt allow me to rip the audio to itunes .. any ideas?

    I have a music cd that has both audio and video transport streams. When I load the disc my pc opens it as a dvd  and doesnt allow me to rip the audio to itunes .. any ideas?

  • How to demultiplex the merged audio and video streams

    Hi. I'm currently working on a video conferencing program. I successfully implemented the program using threads to run the audio and the video clients and servers. The problem with this is that the delay for the transmission of both media is a little too great. So now, I'm trying to merge both media into on DataSource, so then I don't have to worry about sending audio and video into 2 different ports and RTP sessions. I know how to merge the audio and video streams, but I was wondering how to extract each media back after receiving the merged audio and video streams. Any ideas? I used the createMergingDataSource(the_DataSource_array) method to merge both streams. Thanks.
    J.L.

    I am working on the same problem. Is there any solution yet?
    Regards
    C.Eckert

  • How to stream audio and video captured from mic and webcam in sync.

    I am working on a video chat project. I need to capture audio and video from mic and webcam and create rtp stream for them. How can I proceed for this. Any source code help will be highly appreciated. Otherwise just guide me how to do this and point to any good resource which is directly related to my need.
    Thanx.

    t.b.m
    As mentioned by you, i am doing exactly like that . I have coded transmitter class. But at the receiver side it is unable to play the stream. I am posting my code . Can you please help with me with any mistake i m making in my code ?? Or with way I should receive stream at receiver side. Plz see my code. I am streaming to ip address 172.31.80.67.
    package heyram;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.media.control.*;
    import javax.media.protocol.*;
    import javax.media.format.*;
    import java.io.IOException;
    import java.util.Vector;
    import java.net.InetAddress;
    import java.awt.*;
    import java.io.*;
    import java.net.InetAddress;
    import javax.media.*;
    import javax.media.protocol.*;
    import javax.media.protocol.DataSource;
    import javax.media.format.*;
    import javax.media.control.TrackControl;
    import javax.media.control.QualityControl;
    import javax.media.rtp.*;
    import javax.media.rtp.rtcp.*;
    import com.sun.media.rtp.*;
    import java.lang.Thread.*;
    public class HEYRAM{
    Format[] format=new Format[2];
    Vector[] devices=new Vector[2];
    CaptureDeviceInfo[] di=new CaptureDeviceInfo[2];
       SessionManager rtpsm = new com.sun.media.rtp.RTPSessionMgr();
    Processor p=null;
    Processor p1=null;
    boolean result;
    public HEYRAM(String address,int port,int ttl){
        try{
                InetAddress destaddr = InetAddress.getByName(address);
                SessionAddress sessaddr = new SessionAddress(destaddr,
                                                             port,
                                                             destaddr,
                                                             port + 1);
                String cname = rtpsm.generateCNAME();
                    String username = null;
                try {
                username = System.getProperty("user.name");
            } catch (SecurityException e){
                username = "jmf-user";
            // create our local Session Address
            SessionAddress localaddr = new SessionAddress();
                SourceDescription[] userdesclist= new SourceDescription[]
                    new SourceDescription(SourceDescription
                                          .SOURCE_DESC_EMAIL,
                                          "[email protected]",
                                                                     1,
                                          false),
                    new SourceDescription(SourceDescription
                                          .SOURCE_DESC_CNAME,
                                          cname,
                                          1,
                                          false),
                    new SourceDescription(SourceDescription
                                          .SOURCE_DESC_TOOL,
                                          "JMF RTP Player v2.0",
                                          1,
                                          false)
                rtpsm.initSession(localaddr,
                                userdesclist,
                                0.05,
                                0.25);
                rtpsm.startSession(sessaddr,ttl,null);
            } catch (Exception e) {
                System.err.println(e.getMessage());
                //return null;
        // rtpsm.initSession(localAddress, defaultUserDesc, rtcp_bw_fraction, rtcp_sender_bw_fraction);
            // rtpsm.startSession(...);
    public void createVideoSession()
        format[1] = new VideoFormat(VideoFormat.YUV);
        devices[1]= CaptureDeviceManager.getDeviceList( format[1]);
         di[1]= null;
            if (devices[1].size() > 0) {
                 di[1] = (CaptureDeviceInfo)devices[1].elementAt(0);
                  System.out.println(di[1].toString());
            else {
                // exit if we could not find the relevant capture device.
             System.out.println("1234jjfjsajfjasf1");
                System.exit(-1);
            // Create a processor for this capture device & exit if we
            // cannot create it
            try {
                p1 = Manager.createProcessor(di[1].getLocator());
            } catch (IOException e) {
                System.out.println("1234jjfjsajfjasf2");
                System.exit(-1);
            } catch (NoProcessorException e) {
                System.out.println("1234jjfjsajfjasf3");
                System.exit(-1);
            // at this point, we have succesfully created the processor.
            // Realize it and block until it is configured.
           // p1.configure();
         result = waitForState(p1, Processor.Configured);
         if (result == false)
         System.out.println("Couldn't realize processor");
            p1.setContentDescriptor(new ContentDescriptor( ContentDescriptor.RAW_RTP));
            // block until it has been configured
            TrackControl track[] = p1.getTrackControls();
            boolean encodingOk = false;
            // Go through the tracks and try to program one of them to
            // output ULAW_RTP data.
            for (int i = 0; i < track.length; i++) {
                if (!encodingOk && track[i] instanceof FormatControl) {
                    if (((FormatControl)track).
    setFormat( new VideoFormat(VideoFormat.YUV)) == null) {
    track[i].setEnabled(false);
    else {
    encodingOk = true;
    else {
    // we could not set this track to gsm, so disable it
    track[i].setEnabled(false);
    // Realize it and block until it is realized.
    p1.realize();
    result = waitForState(p1, Processor.Realized);
         if (result == false)
         System.out.println("Couldn't realize processor");
    // block until realized.
    // get the output datasource of the processor and exit
    // if we fail
    DataSource ds = null;
    try {
    ds = p1.getDataOutput();
    } catch (NotRealizedError e){
    //System.exit(-1);
    System.out.println("1234jjfjsajfjasf4");
    // Create a SessionManager and hand over the
    // datasource for SendStream creation.
    // The session manager then needs to be initialized and started:
    // rtpsm.initSession(...);
    // rtpsm.startSession(...);
    try {
    (rtpsm.createSendStream(ds, 0)).start();
    } catch (IOException e){
    System.out.println("1234jjfjsajfjasf6");
    e.printStackTrace();
    } catch( UnsupportedFormatException e) {
    System.out.println("1234jjfjsajfjasf7");
    e.printStackTrace();
    public void createAudioSession(){
    format[0] = new AudioFormat("linear",8000,8,1);
    devices[0]= CaptureDeviceManager.getDeviceList( format[0]);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for

  • Open orders at the end of the year

    Hi, I have not dealt with open orders at the end of the financial orders. Just would like to know how they will be dealt with in case they are open Best Regrds Surya

  • Setting up USB External Drive to Airport Extreme Base Station

    I've attached an External Hard Drive to my AEBS. My base computer is connected to the AEBS via Ethernet Cable and can see the external drive under Networked Drive however it shows up twice as Drive Y and Drive Z both showing the exact same capacity.

  • Canon camera no longer connects to Macbook Pro after 10.4.7 update

    Has anybody gotten word from Apple on this issue yet? My Rebel XT/350D stopped connecting to my MBP after the latest software update. It has stopped working with iPhoto, Image Capture and Capture ONE. If I put the CF card in a USB reader, it is recog

  • Height of menubar

    Is there any easy way to determine the exact height of the menubar that appears at the top of a projector when you use the InstallMenu command? It seems to be a setting in Windows, unrelated to Director. It seems to deafult to 20 pixels, but this isn

  • Adobe Acrobat DC erased my Adobe LiveCycles

    Hey All, I have a pretty in depth form that I have been updating in Adobe LiveCycle for several years now with populated large dropdown options and so on, but with the Cloud I have to also download the LiveCycle program separately. I have no issues w