Streaming problems from PC to ATV1stGen

Hi all,
I have had my 1st Gen AppleTV for a number of years now (synced to my MBP) and been very happy with it. Recently I finally converted my partner to the world of Apple and iTunes. We would therefore like to continue using as before (i.e. photos, shows and music synced to my MPB iTunes) but also now playing his music shared on his PC's iTunes.
This all seems possible, and indeed we get the system to connect via the Shared Music section on AppleTV, however after it had been playing for a while (over an hour or so) the music stops and we find AppleTV is frozen. We therefore have to leave it for 10/15 mins until it reboots itself, or we have to unplug and start over.
Any ideas where to look to resolve this? We have set the PC to never go to sleep mode for the hard drive. Is this just a Windows/Apple thing? Would it be resolved if we moved to the 2nd Gen AppleTV?

milnuts wrote:
Ok, I reconfigured my system.  Current setup is now
Cable Modem -> Time Capsule -> Switch (connected to both the blu ray, Xbox 360, and PC).
I just tried to connect with both the Xbox and the blu ray player, no luck.  
Yes, that is disappointing.. can you briefly borrow the router from your neighbour and test it again.. I would really like to see what happens when you put the netgear back and pull full ipconfig /all from the computer. Or another router of any kind.. if your modem is also a router completely remove the TC and see what happens.
The Xbox360 won't even recognize the PC at all.  I thought for sure this would work as the Time Capsule is completely out of the picture, or so I would have thought.
What can change when you swap router??
Windows can change.. here is one I missed in the previous suggestions.. windows can jump from home location to work or public without telling you, simply because you changed router. Jump into windows PC and make sure the location is set to home.. turn off the firewall even. Turn off ipv6 as the TC is ipv6 capable and that could mess things up.
Even turn on the guest account with full permissions.. and see if any of those things helps.
How do I set the IP for the blu-ray and PC to something other than the default?  I tried to do that through the AirPort Utility in the Time Capsule.  Network->DHCP Reservations->+  That lets me put in the MAC address for the device I want to reserve, but it only allows me to change the last bit of the address.  So it grays out the 10.0.1 and only allows me to change the last number.
No, you cannot do it via dhcp.. you set manual IP address.. in other words, open the PC networking.. go to TCP/IP properties and change from auto to manual and set IP as I indicated. You do it directly on the PC and directly on the bluray and xbox.. not via dhcp.

Similar Messages

  • Bluetooth streaming problems from iPhone5 to Subaru Outback stereo...

    Why is my car's (2014 Subarbu Outback) Bluetooth streaming only one artist, not purchased but transferred from my iTunes on MacBook Pro, from my iPhone5 to my car's stereo system and only control I have is to go to 'next' song?  Any help greatly appreciated...

    Where are you looking at controls at, the phone or the vehicle? What troubleshooting have you tried? I have read other threads regarding problems with late model Subaru vehicles, so you might want to do a search of that.
    Otherwise, I would recommend removing the car from the list of devices on the phone, turn Bluetooth off. Then do a reset on the phone, holding the sleep/wake and home buttons together until you see the Apple logo and then release. After that, remove the phone from the listing on the car, turn the car off. Then turn the car on and put it into discovery/pairing mode. Turn Bluetooth on for the iPhone and see if they connect. If then do, see what connection you have then.

  • Problem Streaming Only from my Mac

    Ok... I have an Apple TV3 latest software, a macbook black 1188 with OSX 10.7.4.... I have an iPhone 4S w 5.1.1...
    Here's my problem... I can stream audio from my phone... NP
    I can use my apple TV to listen to whats on my computer, and stream movies... I can leave my laptop in my bedroom and listen to music in my living room...
    Now... If i use iTunes from my laptop and switch from computer to Apple TV... movies work fine... but music only comes through in small blips adout two seconds apart...
    I have updated everything, reset my router, reset Apple tv, I have 30mbps speed and a bad a$$ new cisco router... can someone please help!!!???

    Thank you for your help, I will try that but, I am not using wep, I usually add the mac address of any computer I want in the network.
    you mentionned that you read that this is happening with some users, can you give me the link for me to see if there is other solutions I can try?
    Thx a lot

  • TS2972 I am having problems streaming content from iTunes on my computer to the Apple TV.

    I cannot stream content from iTunes on my computer to my Apple TV (latest model).
    I have checked the following -
    iTunes Version 11.1.5.5
    No Windows updates outstanding for the computer
    Home Sharing is turned on in both iTunes and the Apple TV
    The wireless network appears to be OK
    iTunes connects to the Store so the computer is OK
    the Apple TV connects to external content - You Tube etc
    I have opened up TCP/IP port 3689 and UDP port 5353 in the McAfee Firewall
    When I turn on the Apple TV and check the Computer Icon, I get the following message -
    "To access your iTunes library on Apple TV, turn on Home Sharing in iTunes on your computer using "..the Apple ID...".
    Where to next?
    Voyager999

    Well, after 1 hour of phone support and 90 minutes of on-line support, McAfee finally resolved the problem.
    If anyone else has a similar problem, tell McAfee to look at Service Request 1443603280.

  • Problem streaming music from iPhone to airport express

    Hi
    I use a Airport express connected to my stereo to stream music from my iMac and iPhone. It works brilliantly and seamisily from my iMac but when i try to listen to music from my iPhone it connects up but then plays the music but it keeps dropping out and you hear the music but it seams to keep loosing the connection.
    the imac and iPhone are connected to the same wifi network as the airport express. If i lay the iphone near the wifi router it still drops the signal and drops the connection to the airport express
    ive got an iPhone 4s running Iso 5  and lion on my Mac
    just a note ive had this problem with my previous iPhone 3gs running the old iso and the new iso 5 when i updated it the other month
    I have also updated the Firmware on the airport express
    any suggestions or solutions would be greatuly recieved.
    Thanks in advance

    thanks for your replies.
    It's because I have one router for internet (that I share with my neighbors) and another with my Airport Express hooked to it.
    But I would like to stream my music when I go to my friends.
    I'll write to Apple

  • While streaming music from i-phone 4s to apple tv, it stoppes working after 2 minutes. Its worked fine for a year or so, no problem, never moved it or touched it! Can anyone help please?

    While streaming music from my i-phone 4s, it stops working after 2 miutes and so does music from my i-tunes after about two songs, very frustrating! Have tried allsorts!!!

    That indicates a network issue, what exactly have you tried?

  • How do I stream music from non-iTunes apps to Airport (mac air core-i7 OS 10.7.5 airport firmware 7.6.1 --- option-clicking speaker icon only shows internal speakers - audio streaming works from iTunes just fine.

    How do I stream music from non-iTunes apps to Airport (mac air core-i7 OS 10.7.5 airport firmware 7.6.1 --- option-clicking speaker icon only shows internal speakers - audio streaming works from iTunes just fine.

    Hello Achates:
    I did not read the rather long post. If you wish to reinstall OS X 10.4, use your software install DVD. Backup is essential. To minimize your risk, I would use an archive and install:
    http://docs.info.apple.com/article.html?artnum=107120
    In that way, you will have a fresh copy of OS X and your current settings will be preserved.
    Incidentally, I do not agree that the printer problem is best solved by reinstalling OS X. I have had HP printers for sometime and, on one occasion, had difficulty after an upgrade. HP technical support walked me through uninstalling all traces of the HP driver and then reinstalling.
    Barry

  • Cannot stream RENTALS from Mac to apple TV via Homesharing

    Hi,
    very odd problem here since a couple of weeks. I have a Apple TV 3rd Gen. which I use to stream content from my Mac via Homesharing. Everything works well (I can stream music, images, movie-long HD podcasts) besides I want to stream a rental video. I can browse through the library, select a movie as normal but when I fire it off to play it takes forever to start playing. I was waiting for minutes but the movie does not start. On the other hand I can stream the rental flawlessly the other way round, from my Mac to my Apple TV. It takes just seconds to start.
    I cannot really work out when the issue appeared but it surfaced a few weeks ago.
    Any idea how to solve this?
    Thanks,
    Tom

    You can do this either from the music app on the iPad or from the remote app, it's quite simple and intuitive. Once you get the iPad it should be quite apparent how it works. If you aren't sure at that time post back.

  • K430 Bad streaming problem - help needed

    Hello everyone,
    I wonder if any of you can help me or have had a similar problem.
    I bought a Lenovo Ideacentre K430 Desktop PC (Intel Core i7 3770 3.4GHz Processor, 16GB RAM, 2TB HDD, DVD, LAN, WLAN, Nvidia Graphics, Windows 8)  two months ago via Amazon and on the whole have been very pleased with it.
    However I have had a major problem when it comes to streaming video. For example, when watching TV programmes via BBC iPlayer it will stop after about 45 secs and say that there is insufficient bandwith.  Yet, when I run the BBC diagnostic it says the streaming speed is 3621 kbps and is sufficient.  (I have two laptops in the house and both of these stream video without any problems).  I also have the same problem when streaming video from other websites.  When using websites generally they seem to load quickly and also when downloading items it seems to do these jobs at a good speed: it is just when streaming it seems to have a problem and stops.
    I have even switched the K430 desktop to an ethernet cable to see if that helps - but the problem still persists. All the other devices in the house, i.e. iPhone, Wii, laptop all stream via the wi-fi without any problems.
    I'm not that technical , so any advice and suggestions would be greatly appreciated.
    many thanks,
    Matt

    hi Pikemonster,
    Welcome to the Forums.
    Just to verify, do you get the same issue if you stream via flash player using i.E., Chrome, or Firefox?
    http://www.bbc.co.uk/iplayer/tv
    Also, have you tried to adjust the video quality (i.e. medium, low, etcl)
    Regards
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • Streaming media from wireless external hard drive and MBP to TV?

    Hi everyone. I have a retina MBP and have recently bought a Sony Bravia smart tv with wireless. I have a time machine (the new one) with an external hard drive connected to it with all my media, photo, movies etc. My tv is connected to my wireless from the time machine and I'm wondering how do I stream media from my external hard drive to my tv? And how do I stream media from my MBP to my tv wirelessly? I can't seem to figure it out. Also mirroring my MBP desktop to my tv wirelessly, can it be done without an apple tv? Thanks in advance.

    I had the same issue. It was due to the appalling performance of the USB connection to the disk, not any issue with the wireless connection itself. My iMac was within 7m of the router, on the same floor, with a clear line of sight and good reported connection speed. I have the latest late-2009 version of the AEBS running the 7.5 firmware. This has loads of performance problems (read these forums). I'm hoping that Apple will release the new firmware (7.51) for download soon and then the issue may be resolved.

  • Can't view photos or stream videos from websites on iPad 3

    When I go to a website with safari, I can't stream video or view photo galleries.  It tells me that I need adobo flash player.  That is not supported for this device.  How do I see photoographs or stream video from websites??

    Jenpre.... keep your head down in that hurricane, and good luck. I hope it moves away soon for you all.
    When I say "more modern", from what I've read many sites recognise that Flash can be a problem on mobile devices (phones and tablets) because it's very power hungry. So, if I understand things correctly, many sites are putting up html5 versions, which is supposed to be much easier on computers / devices. Quite oftne when I go to a site on my iPad it auto-diverts to the "mobile" version of the site, and I haven't found a single case where I can't see a video. To be truthful, even if not directed to a mobile version, I don't have much trouble with any of the sites I visit..... I can see most videos and pretty much all graphics, the same as I can on my Mac, which does run Flash.
    Still, I'm sure a computing expert will know much more.
    Good luck in that hurricane....
    PS... there are quite a few good hurricane tracking Apps you know....

  • Streaming audio from my IPAD to my Apple TV from Rhapsody application.  when Apple TV go into Screen Saver mode, about 5 minutes after that it stops playing the Audio Stream and goes into Sleep mode.

    I am Streaming audio from my IPAD to my Apple TV from Rhapsody application.  when Apple TV go into Screen Saver mode, about 5 minutes after that it stops playing the Audio Stream and goes into Sleep mode.  I am using the Optical Out from the Apple TV to my receiver, the Apple TV is hard Wired to the Network, the IPAD is Wirelessly attached to the network (it continues to play the Audio Stream).  When the Apple TV is turned back on it resumes playing once I manual select it for output from the IPAD.  All device are on current releases of software.  I have no Video hooked up to the Apple TV.  How do I correct this?

    Intermittent problems are often a result of interference. Interference can be caused by other networks in the neighbourhood or from household electrical items.
    You can download and install iStumbler (NetStumbler for windows users) to help you see which channels are used by neighbouring networks so that you can avoid them, but iStumbler will not see household items.
    Refer to your router manual for instructions on changing your wifi channel or adjusting your multicast rate.
    There are other types of problems that can affect networks, but this is by far the most common, hence worth mentioning first. Networks that have inherent issues can be seen to work differently with different versions of the same software. You might also try moving the Apple TV away from other electrical equipment.

  • HT1551 Streaming music from iPhone 4 to apple tv

    I can stream videos and photos no problem from my iPhone but can't seem to play music. I can select the button which gives you a choice of iPhone or apple tv but just seems to play silently on my phone and not through the tv. The button seems to turn blue for some reason(not sure if relevant). I've done the usual reboots, software updates etc but doesn't work. Any ideas ?

    Welcome to the Apple Community.
    Did you restart your Apple TV, iPhone and the router. What format is the music in.

  • I am having issues with streaming music from iTunes on my MacBook Pro to my audio system through AirPlay.  Works perfectly with my iPod Touch.  The AirPlay icon appears irregularly in iTunes and when selected doesn't connect.  Running latest IOS software.

    I am having issues with streaming music from iTunes on my MacBook Pro to my audio system through AirPlay.  Works perfectly with my iPod Touch.  The AirPlay icon appears irregularly in iTunes and when selected doesn't connect.  Running latest IOS software.

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Unsync all music and resync
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up           
    - Restore to factory settings/new iOS device.
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar          
    You said:
    No, I do not want to "factory reset" my iPod. No I do not wish to do anything crazy long or hard to fix this. 
    That may be necessary, It is not what you want to do/not do but what is required to resolve your problem.

  • JMF How to stream rtp from udp packet

    I implemented an rtsp client and use the client to setup two rtp session(audio, vedio). But when I use the example pramgram "AVReceive3" to stream the udp packet, it doesn't work.
    When the AVReceive3 receive the udp packet from the rtp port, it will call the update(ReceiveStreamEvent evt) function, and the event type is StreamMappedEvent, and the call to evt.getReceiveStream().getDataSource() return null.
    I thought the first event should be NewReceiveStreamEvent. Please help to solve the problem.
    What's rtp packet will cause the event StreamMappedEvent.
    Following is the code of AVReceive3.java:
    * AVReceive3.java
    * Created on 2007年10月30日, 下午4:11
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package PlayerTest;
    import java.io.*;
    import java.awt.*;
    import java.net.*;
    import java.awt.event.*;
    import java.util.Vector;
    import javax.media.*;
    import javax.media.rtp.*;
    import javax.media.rtp.event.*;
    import javax.media.rtp.rtcp.*;
    import javax.media.protocol.*;
    import javax.media.protocol.DataSource;
    import javax.media.format.AudioFormat;
    import javax.media.format.VideoFormat;
    import javax.media.Format;
    import javax.media.format.FormatChangeEvent;
    import javax.media.control.BufferControl;
    * AVReceive3 to receive RTP transmission using the RTPConnector.
    public class AVReceive3 extends Thread implements ReceiveStreamListener, SessionListener,
    ControllerListener
    String sessions[] = null;
    RTPManager mgrs[] = null;
    Vector playerWindows = null;
    boolean dataReceived = false;
    Object dataSync = new Object();
    public AVReceive3(String sessions[])
    this.sessions = sessions;
    public void run()
    initialize();
    public boolean initialize() {
    try {
    mgrs = new RTPManager[sessions.length];
    playerWindows = new Vector();
    SessionLabel session;
    // Open the RTP sessions.
    for (int i = 0; i < sessions.length; i++) {
    // Parse the session addresses.
    try {
    session = new SessionLabel(sessions);
    } catch (IllegalArgumentException e) {
    System.err.println("Failed to parse the session address given: " + sessions[i]);
    return false;
    System.err.println(" - Open RTP session for: addr: " + session.addr + " port: " + session.port + " ttl: " + session.ttl);
    mgrs[i] = (RTPManager) RTPManager.newInstance();
    mgrs[i].addSessionListener(this);
    mgrs[i].addReceiveStreamListener(this);
    // Initialize the RTPManager with the RTPSocketAdapter
    mgrs[i].initialize(new RTPSocketAdapter(
    InetAddress.getByName(session.addr),
    session.port, session.ttl));
    // You can try out some other buffer size to see
    // if you can get better smoothness.
    BufferControl bc = (BufferControl)mgrs[i].getControl("javax.media.control.BufferControl");
    if (bc != null)
    bc.setBufferLength(350);
    } catch (Exception e){
    System.err.println("Cannot create the RTP Session: " + e.getMessage());
    return false;
    // Wait for data to arrive before moving on.
    long then = System.currentTimeMillis();
    long waitingPeriod = 30000; // wait for a maximum of 30 secs.
    try{
    synchronized (dataSync) {
    while (!dataReceived &&
    System.currentTimeMillis() - then < waitingPeriod) {
    if (!dataReceived)
    System.err.println(" - Waiting for RTP data to arrive");
    dataSync.wait(1000);
    } catch (Exception e) {}
    if (!dataReceived) {
    System.err.println("No RTP data was received.");
    close();
    return false;
    return true;
    public boolean isDone() {
    return playerWindows.size() == 0;
    * Close the players and the session managers.
    protected void close() {
    for (int i = 0; i < playerWindows.size(); i++) {
    try {
    ((PlayerWindow)playerWindows.elementAt(i)).close();
    } catch (Exception e) {}
    playerWindows.removeAllElements();
    // close the RTP session.
    for (int i = 0; i < mgrs.length; i++) {
    if (mgrs[i] != null) {
    mgrs[i].removeTargets( "Closing session from AVReceive3");
    mgrs[i].dispose();
    mgrs[i] = null;
    PlayerWindow find(Player p) {
    for (int i = 0; i < playerWindows.size(); i++) {
    PlayerWindow pw = (PlayerWindow)playerWindows.elementAt(i);
    if (pw.player == p)
    return pw;
    return null;
    PlayerWindow find(ReceiveStream strm) {
    for (int i = 0; i < playerWindows.size(); i++) {
    PlayerWindow pw = (PlayerWindow)playerWindows.elementAt(i);
    if (pw.stream == strm)
    return pw;
    return null;
    * SessionListener.
    public synchronized void update(SessionEvent evt) {
    if (evt instanceof NewParticipantEvent) {
    Participant p = ((NewParticipantEvent)evt).getParticipant();
    System.err.println(" - A new participant had just joined: " + p.getCNAME());
    * ReceiveStreamListener
    public synchronized void update( ReceiveStreamEvent evt) {
    System.out.println("\nReceive an receiveStreamEvent:"+evt.toString());
    RTPManager mgr = (RTPManager)evt.getSource();
    Participant participant = evt.getParticipant(); // could be null.
    ReceiveStream stream = evt.getReceiveStream(); // could be null.
    System.out.println("The RTPManager is:");
    if (evt instanceof RemotePayloadChangeEvent) {
    System.err.println(" - Received an RTP PayloadChangeEvent.");
    System.err.println("Sorry, cannot handle payload change.");
    System.exit(0);
    else if (evt instanceof NewReceiveStreamEvent) {
    try {
    stream = ((NewReceiveStreamEvent)evt).getReceiveStream();
    DataSource ds = stream.getDataSource();
    // Find out the formats.
    RTPControl ctl = (RTPControl)ds.getControl("javax.media.rtp.RTPControl");
    if (ctl != null){
    System.err.println(" - Recevied new RTP stream: " + ctl.getFormat());
    } else
    System.err.println(" - Recevied new RTP stream");
    if (participant == null)
    System.err.println(" The sender of this stream had yet to be identified.");
    else {
    System.err.println(" The stream comes from: " + participant.getCNAME());
    // create a player by passing datasource to the Media Manager
    Player p = javax.media.Manager.createPlayer(ds);
    if (p == null)
    return;
    p.addControllerListener(this);
    p.realize();
    PlayerWindow pw = new PlayerWindow(p, stream);
    playerWindows.addElement(pw);
    pw.setVisible(true);
    // Notify intialize() that a new stream had arrived.
    synchronized (dataSync) {
    dataReceived = true;
    dataSync.notifyAll();
    } catch (Exception e) {
    System.err.println("NewReceiveStreamEvent exception " + e.getMessage());
    return;
    else if (evt instanceof StreamMappedEvent) {
    if (stream != null)
    if(stream.getDataSource()!=null)
    DataSource ds = stream.getDataSource();
    // Find out the formats.
    RTPControl ctl = (RTPControl)ds.getControl("javax.media.rtp.RTPControl");
    System.err.println(" - The previously unidentified stream ");
    if (ctl != null)
    System.err.println(" " + ctl.getFormat());
    System.err.println(" had now been identified as sent by: " + participant.getCNAME());
    else if (evt instanceof ByeEvent) {
    System.err.println(" - Got \"bye\" from: " + participant.getCNAME());
    PlayerWindow pw = find(stream);
    if (pw != null) {
    pw.close();
    playerWindows.removeElement(pw);
    * ControllerListener for the Players.
    public synchronized void controllerUpdate(ControllerEvent ce) {
    Player p = (Player)ce.getSourceController();
    if (p == null)
    return;
    // Get this when the internal players are realized.
    if (ce instanceof RealizeCompleteEvent) {
    PlayerWindow pw = find(p);
    if (pw == null) {
    // Some strange happened.
    System.err.println("Internal error!");
    System.exit(-1);
    pw.initialize();
    pw.setVisible(true);
    p.start();
    if (ce instanceof ControllerErrorEvent) {
    p.removeControllerListener(this);
    PlayerWindow pw = find(p);
    if (pw != null) {
    pw.close();
    playerWindows.removeElement(pw);
    System.err.println("AVReceive3 internal error: " + ce);
    * A utility class to parse the session addresses.
    class SessionLabel {
    public String addr = null;
    public int port;
    public int ttl = 1;
    SessionLabel(String session) throws IllegalArgumentException {
    int off;
    String portStr = null, ttlStr = null;
    if (session != null && session.length() > 0) {
    while (session.length() > 1 && session.charAt(0) == '/')
    session = session.substring(1);
    // Now see if there's a addr specified.
    off = session.indexOf('/');
    if (off == -1) {
    if (!session.equals(""))
    addr = session;
    } else {
    addr = session.substring(0, off);
    session = session.substring(off + 1);
    // Now see if there's a port specified
    off = session.indexOf('/');
    if (off == -1) {
    if (!session.equals(""))
    portStr = session;
    } else {
    portStr = session.substring(0, off);
    session = session.substring(off + 1);
    // Now see if there's a ttl specified
    off = session.indexOf('/');
    if (off == -1) {
    if (!session.equals(""))
    ttlStr = session;
    } else {
    ttlStr = session.substring(0, off);
    if (addr == null)
    throw new IllegalArgumentException();
    if (portStr != null) {
    try {
    Integer integer = Integer.valueOf(portStr);
    if (integer != null)
    port = integer.intValue();
    } catch (Throwable t) {
    throw new IllegalArgumentException();
    } else
    throw new IllegalArgumentException();
    if (ttlStr != null) {
    try {
    Integer integer = Integer.valueOf(ttlStr);
    if (integer != null)
    ttl = integer.intValue();
    } catch (Throwable t) {
    throw new IllegalArgumentException();
    * GUI classes for the Player.
    class PlayerWindow extends Frame {
    Player player;
    ReceiveStream stream;
    PlayerWindow(Player p, ReceiveStream strm) {
    player = p;
    stream = strm;
    public void initialize() {
    add(new PlayerPanel(player));
    public void close() {
    player.close();
    setVisible(false);
    dispose();
    public void addNotify() {
    super.addNotify();
    pack();
    * GUI classes for the Player.
    class PlayerPanel extends Panel {
    Component vc, cc;
    PlayerPanel(Player p) {
    setLayout(new BorderLayout());
    if ((vc = p.getVisualComponent()) != null)
    add("Center", vc);
    if ((cc = p.getControlPanelComponent()) != null)
    add("South", cc);
    public Dimension getPreferredSize() {
    int w = 0, h = 0;
    if (vc != null) {
    Dimension size = vc.getPreferredSize();
    w = size.width;
    h = size.height;
    if (cc != null) {
    Dimension size = cc.getPreferredSize();
    if (w == 0)
    w = size.width;
    h += size.height;
    if (w < 160)
    w = 160;
    return new Dimension(w, h);
    public static void main(String argv[]) {
    //if (argv.length == 0)
    // prUsage();
    String sessions[]= new String[] {"127.0.0.1/6670","127.0.0.1/6672"};
    AVReceive3 avReceive = new AVReceive3(sessions);
    if (!avReceive.initialize()) {
    System.err.println("Failed to initialize the sessions.");
    System.exit(-1);
    // Check to see if AVReceive3 is done.
    try {
    while (!avReceive.isDone())
    Thread.sleep(1000);
    } catch (Exception e) {}
    System.err.println("Exiting AVReceive3");
    static void prUsage() {
    System.err.println("Usage: AVReceive3 <session> <session> ");
    System.err.println(" <session>: <address>/<port>/<ttl>");
    System.exit(0);
    }// end of AVReceive3
    Following is the code of RTPSocketAdapter.java:
    * RTPSocketAdapter.java
    * Created on 2007&#24180;10&#26376;30&#26085;, &#19979;&#21320;4:13
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package PlayerTest;
    import java.io.IOException;
    import java.net.InetAddress;
    import java.net.DatagramSocket;
    import java.net.MulticastSocket;
    import java.net.DatagramPacket;
    import java.net.SocketException;
    import javax.media.protocol.DataSource;
    import javax.media.protocol.PushSourceStream;
    import javax.media.protocol.ContentDescriptor;
    import javax.media.protocol.SourceTransferHandler;
    import javax.media.rtp.RTPConnector;
    import javax.media.rtp.OutputDataStream;
    * An implementation of RTPConnector based on UDP sockets.
    public class RTPSocketAdapter implements RTPConnector {
    DatagramSocket dataSock;
    DatagramSocket ctrlSock;
    InetAddress addr;
    int port;
    SockInputStream dataInStrm = null;
    SockInputStream ctrlInStrm = null;
    SockOutputStream dataOutStrm = null;
    SockOutputStream ctrlOutStrm = null;
    public RTPSocketAdapter(InetAddress addr, int port) throws IOException {
    this(addr, port, 1);
    public RTPSocketAdapter(InetAddress addr, int port, int ttl) throws IOException {
    try {
    if (addr.isMulticastAddress()) {
    dataSock = new MulticastSocket(port);
    ctrlSock = new MulticastSocket(port+1);
    ((MulticastSocket)dataSock).joinGroup(addr);
    ((MulticastSocket)dataSock).setTimeToLive(ttl);
    ((MulticastSocket)ctrlSock).joinGroup(addr);
    ((MulticastSocket)ctrlSock).setTimeToLive(ttl);
    } else {
    dataSock = new DatagramSocket(port, InetAddress.getLocalHost());
    ctrlSock = new DatagramSocket(port+1, InetAddress.getLocalHost());
    } catch (SocketException e) {
    throw new IOException(e.getMessage());
    this.addr = addr;
    this.port = port;
    * Returns an input stream to receive the RTP data.
    public PushSourceStream getDataInputStream() throws IOException {
    if (dataInStrm == null) {
    dataInStrm = new SockInputStream(dataSock, addr, port);
    dataInStrm.start();
    return dataInStrm;
    * Returns an output stream to send the RTP data.
    public OutputDataStream getDataOutputStream() throws IOException {
    if (dataOutStrm == null)
    dataOutStrm = new SockOutputStream(dataSock, addr, port);
    return dataOutStrm;
    * Returns an input stream to receive the RTCP data.
    public PushSourceStream getControlInputStream() throws IOException {
    if (ctrlInStrm == null) {
    ctrlInStrm = new SockInputStream(ctrlSock, addr, port+1);
    ctrlInStrm.start();
    return ctrlInStrm;
    * Returns an output stream to send the RTCP data.
    public OutputDataStream getControlOutputStream() throws IOException {
    if (ctrlOutStrm == null)
    ctrlOutStrm = new SockOutputStream(ctrlSock, addr, port+1);
    return ctrlOutStrm;
    * Close all the RTP, RTCP streams.
    public void close() {
    if (dataInStrm != null)
    dataInStrm.kill();
    if (ctrlInStrm != null)
    ctrlInStrm.kill();
    dataSock.close();
    ctrlSock.close();
    * Set the receive buffer size of the RTP data channel.
    * This is only a hint to the implementation. The actual implementation
    * may not be able to do anything to this.
    public void setReceiveBufferSize( int size) throws IOException {
    dataSock.setReceiveBufferSize(size);
    * Get the receive buffer size set on the RTP data channel.
    * Return -1 if the receive buffer size is not applicable for
    * the implementation.
    public int getReceiveBufferSize() {
    try {
    return dataSock.getReceiveBufferSize();
    } catch (Exception e) {
    return -1;
    * Set the send buffer size of the RTP data channel.
    * This is only a hint to the implementation. The actual implementation
    * may not be able to do anything to this.
    public void setSendBufferSize( int size) throws IOException {
    dataSock.setSendBufferSize(size);
    * Get the send buffer size set on the RTP data channel.
    * Return -1 if the send buffer size is not applicable for
    * the implementation.
    public int getSendBufferSize() {
    try {
    return dataSock.getSendBufferSize();
    } catch (Exception e) {
    return -1;
    * Return the RTCP bandwidth fraction. This value is used to
    * initialize the RTPManager. Check RTPManager for more detauls.
    * Return -1 to use the default values.
    public double getRTCPBandwidthFraction() {
    return -1;
    * Return the RTCP sender bandwidth fraction. This value is used to
    * initialize the RTPManager. Check RTPManager for more detauls.
    * Return -1 to use the default values.
    public double getRTCPSenderBandwidthFraction() {
    return -1;
    * An inner class to implement an OutputDataStream based on UDP sockets.
    class SockOutputStream implements OutputDataStream {
    DatagramSocket sock;
    InetAddress addr;
    int port;
    public SockOutputStream(DatagramSocket sock, InetAddress addr, int port) {
    this.sock = sock;
    this.addr = addr;
    this.port = port;
    public int write(byte data[], int offset, int len) {
    try {
    sock.send(new DatagramPacket(data, offset, len, addr, port));
    } catch (Exception e) {
    return -1;
    return len;
    * An inner class to implement an PushSourceStream based on UDP sockets.
    class SockInputStream extends Thread implements PushSourceStream {
    DatagramSocket sock;
    InetAddress addr;
    int port;
    boolean done = false;
    boolean dataRead = false;
    SourceTransferHandler sth = null;
    public SockInputStream(DatagramSocket sock, InetAddress addr, int port) {
    this.sock = sock;
    this.addr = addr;
    this.port = port;
    public int read(byte buffer[], int offset, int length) {
    DatagramPacket p = new DatagramPacket(buffer, offset, length, addr, port);
    try {
    sock.receive(p);
    } catch (IOException e) {
    return -1;
    synchronized (this) {
    dataRead = true;
    notify();
    System.out.println("RTPSocketAdapter receive RTP packet from port:"+port);
    System.out.println("The received RTP packet:"+new String(buffer));
    return p.getLength();
    public synchronized void start() {
    super.start();
    if (sth != null) {
    dataRead = true;
    notify();
    public synchronized void kill() {
    done = true;
    notify();
    public int getMinimumTransferSize() {
    return 2 * 1024; // twice the MTU size, just to be safe.
    public synchronized void setTransferHandler(SourceTransferHandler sth) {
    this.sth = sth;
    dataRead = true;
    notify();
    // Not applicable.
    public ContentDescriptor getContentDescriptor() {
    return null;
    // Not applicable.
    public long getContentLength() {
    return LENGTH_UNKNOWN;
    // Not applicable.
    public boolean endOfStream() {
    return false;
    // Not applicable.
    public Object[] getControls() {
    return new Object[0];
    // Not applicable.
    public Object getControl(String type) {
    return null;
    * Loop and notify the transfer handler of new data.
    public void run() {
    while (!done) {
    synchronized (this) {
    while (!dataRead && !done) {
    try {
    wait();
    } catch (InterruptedException e) { }
    dataRead = false;
    if (sth != null && !done) {
    sth.transferData(this);
    Thanks.

    The error of No format has been registered for RTP Payload type 96
    is caused by the dynamic payload mapping, when I add the dynamic mapping between dynamic payload and format. The Player cann't work yet. I think it because JMF doesn't support the format of my clips. For example:
    video: a=rtpmap:96 H263-2000/90000
    audio:a=rtpmap:97 MP4A-LATM/12000/1
    Is there some available plugin to support these format?
    Thanks

Maybe you are looking for