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]);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • During sync all my purchased music and videos disappeared from computer and iPhone as well can you advice me what to do ?

    I made a recovery in my computer and i downloaded the latest iTunes software but during sync all my purchased music and videos disappeared from iPhone and never get to iTunes and there is no back up for music.Can somebody Advice me what to do ?

    Emma Norton wrote:
    I've tried looking for the devise in My computer but all it says is iCloud.
    You should not see anything labeled iCloud in Windows Explorer.

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

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

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

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

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

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

  • How do you record video with usb mic and have the audio from garageband be the sound when recording and not just your normal voice but garage band effects for youtube?

    How do you record video with usb mic and have the audio form garageband be apart of the video when recording, meaning the audio from garageband and echo  and not just your normal voice for youtube post?its not add the garageband audio its just normal voice from mic no  effects is going thru?

    Hi Life93,
    What you describe would be possible by recording your video, then removing the audio from it and adding audio from GarageBand once the video is in iMovie (I presume here that you are using iMovie for your video production. Other applications may need different methods.)
    See this thread on how to remove the audio from a clip in iMovie -
    Is there a way to separate audio from a video c...
    https://discussions.apple.com/thread/1779767
    To add audio from GarageBand use this article -
    iMovie '11: Add a sound clip to your project
    http://support.apple.com/kb/PH2255
    Thanks for using Apple Support Communities.
    Best,
    Brett L

  • How to stream the same VIDEO from iTunes to multiple Apple TVs simultaneously?

    I'm trying to stream the same video/movie from iTunes 10.5.2 under Mac OS X 10.7.2 to 2 Apple TVs simultaneously so that they are in sync. We have 2 TVs in our cafe and are trying to send the pre-service video announcements to both screen wirelessly.
    Audio is no problem as I just choose the Multiple Speakers option on the AirPlay icon at the bottom right of iTunes. However, when I choose a video, the Multiple option is not available. I know I can go into the Apple TV menu and choose the video from my Mac that has Home Sharing activated but it is virtually impossible to get the videos synced on both screens.
    Is there something I'm missing or is a 3rd party application available that will do this?
    Please read what I'm trying to do carefully before responding.
    Thanks in advance for your help.
    Derek

    I'm also struggling with this.  I have a Mac Mini and 5 ATV2's that I want to stream video content to simultaneously.

  • I Want To Transmit Audio from Mic and Video from WebCam.....???????????????

    I Want To Transmit Audio from Mic and Video from WebCam on Another Computer. I have used AVTransmit2.java file and AVReceive2.java file for Transmission and Receiving but They Transmit Only Video On Another Computer on a network without any error. Any One Help me How Can i Transmit both Audio & Video at the Same time ????????
    i m using This Command for Transmittion
    java AVTransmit2 vfw://0 192.168.0.1 192.168.0.2 10000
    and this Command For Receiving
    java AVReceive2 192.168.0.1/10000 192.168.0.2/ 10002

    Excuse me foro my bad English but I speak English like Tarzan.
    To trasmit both video and audio I created a MergingDataSource wich incorporates video and audio data sources. Then I created a Processor with this DataSource and a RTPManager for each track of the processor. It works.
    Stupendoman

  • 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

  • I am new to iMovies.  When I make a video using the mic and camera in my Macbook Pro, the audio and video are not in synch.  Very annoying.  How can I fix this?

    I am new to iMovies.  When I make a video using the mic and camera in my Macbook Pro, the audio and video are not in synch.  Very annoying.  How can I fix this?

    DVD drives read the bottom of the disk, not the top. Smooth out the paper & try again.

  • How do I uninstall debut video capture software from my macbook pro?

    How do I uninstall Debut video capture software from my macbook pro?

    Thanks Sig - not sure that the program came with an uninstall feature (seemed to just go straight into the apps folder but I'll give it a try.

  • How to import missing content for my music and video files from Itune online

    how to import missing content for my music and video files from I tune online.

    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • How can you download photo's and video's from an iPad to external hard drive

    How can you download photo's and video's from an iPad to external hard drive for storage.

    Here's the link that explains ...
    http://www.idownloadblog.com/2014/06/02/apple-updates-the-photos-app-in-ios-8-to -work-with-icloud-photo-library/

  • Afteburner has no audio in video capture?

    I'm not really sure if this is the right section for this topic but i'd just like to know if there's any way to have audio when video capture is used. Thank you.

    Quote from: Henry on 20-September-11, 13:08:57
    AB only takes a single frame screenshot DUDE, so what gives you the idea that it would record audio for that? It does not capture live video from games or anything else.
    Why do you assume that i know that AB is not capable of audio recording since its a single capture device? I'm not as computer savvy as you. I'll teach you how to moderate dude: When a question is asked you reply this way: "AB only takes a single frame rate screenshot and is not capable of recording audio at the same time." Never assume that the person asking knows about technical stuff like you, that's why i'm asking DUDE. I wouldn't ask if knew the answer, duh! Lol.

  • Transmiting video captured from a webcam to another system through internet

    Hi there, I developed an application catch video stream from the webcam and transmit it another system within LAN network , I would like know possibility to senting it over internet to another system?? is it possible sent this streams to more than one location simultaneously. Any idea?
    Best regards
    anoop

    hi tony
    Thank you very much for reply, I very appreciate this.for tansnsmitting video using rtp protocol we need to specify the network output for media transmission(ie Medialocator).what i mean is we need to create a medialocator specifing the destination of our broadcast. which look like a typical url rtp://address:port/content-type ,here the address is the address to which video must be tansmitted.to transmit in unicast mode this address should be the address of the intended machine.its working fine.to transmit in mulitcast mode with a subnet we can do this by replacing 255 with last field of the address part.it also working fine within subnet so that we can display video captured from one cam to multiple destination
    ** this is the real problem whcih i m facing now is how to make it to work in internet? to mutliple destination? whether i need to create multiple medialocator url??? anybody have any idea? plz help thanking u in advance?
    anoop

  • HT1473 How to transfer audio or vedio file from my computer to  iphone 5S

    I have an iphone 5S. I tried to transfer Audio and video file from my Pc to my iphone using itunes, but it is nor added to ituned or in my pc. I saw some video  in youtube regarding the use of itune for file transfering .But it is totally confusing me.
    Please help me

    Read the User's Guide as it clearly states how to add content to an iDevice.

Maybe you are looking for

  • Windows 8.1 : Windows explorer show DVD drive as local disk

    I have windows 8.1. On windows explorer , the DVD-ROM Drive icon is displayed as a Local disk. When I double click on that icon I get a strange error message : An error occurred while ejecting "*," On Device manager , on disk management , everything

  • Tables work in IE but not FF

    This looks fine in IE but runs off the right side in FF. What gives? Thanks. Diana Hunter http://www.indianaeagleforum.org/contact_join.html

  • Goods receipts MM-SUS.

    Hi Masters of SRM.  I am working in MM-SUS scenary. actually in Good Receipts the we02 is settup the message stppod. I have some questions about settup in MM. in my guide talk about implements a user exit MM06E001 Note : 888725  1.- which transaction

  • Dump while creating Planning Version

    Hi, While I am Creating Panning Version Through /SAPAPO/MVM its giving Dump What happened? Error "-4016" occurred in the current database connection "LCA". Exception Exception Class                  CX_SY_NATIVE_SQL_ERROR Error analysis An exception

  • What is wrong with wifi after iOS 6 update on the new iPad ?

    Since I upgraded to iOS 6 my iPad ***** at connecting to Wi- Fi.  I have been using iPads since the original launch and I currently own the 3rd gen iPad. Since the upgrade to iOS 6.0 the performance of Wi-Fi is terrible. My iPad often cannot find net