Playing Video from a SocketConnection
Please I need assistance on how to play an mpg video over a SocketConnection. I have ServerSocket that send a video file through the InputStream,I want to play the video file over this Stream in a MIDlet.
Plz any help or reference will be highly appreciated.
Thanks
Actualy I am not really interested in live streaming,what I want is to be able to play a video file residing on a machine.
I have created a ServerSocket that will send the file through an OutputStream, but I want to get the file and play it on the device after recieving it through an InputStream.
Plz help me if you have a clue on to achieve this.
Similar Messages
-
How do I play video from my macbook pro to my tv?
How do I play video from my macbook pro to my tv?
What model MacBook Pro do you have? On my late 2011, I used to use a Mini DisplayPort/Thunderbolt to HDMI adapter to get video and audio from my Mac to my television. I used this adapter from Monoprice. Worked great - I just no longer use it because I bought a 27" monitor.
You can also use AirPlay mirroring if you've the right MBP and an Apple TV - but the wired method works, too.
Clinton -
Play video from external HD to Apple TV
I would like to play videos from an external drive to the Apple TV.
The workarounds I've seen all involve moving the entire iTunes library to the external drive. I want to keep all my music on the internal HD but the videos on the external HD.
Suggestions?Launch iTunes on your computer
Mac - iTunes > Preferences > Advanced
PC - Edit > Preferences > Advanced
Uncheck 'Copy files to iTunes media folder when adding to library'
This will allow you to drag and drop videos from the external drive to iTunes without copying to the internal drive. Once in iTunes you should be able to watch them on your Apple TV
Hope that helps -
Playing videos from iTunes onto a TV from my iPad
Can I play videos from iTunes onto a TV from my iPad. All I seem to be able to get is the music when I connect via an HDMI cable or wirelessly to apple TV.
Thanks
TerryI have sorted now. Play through video app not music. Easy when you know how!!!
-
I have just bought a MacBook Air and i cannot play videos from the internet as it asks for a flash player to be installed i try to download Adobe flash player and it will not allow me to do so?
Ziatron is correct that Flash does not work on an iPad, but it does work on a Mac. See Adobe Flash Player 11.2.202.160.
-
I bought the AV cable at the Apple store yesterday and tried it out. I can play
video from the Video app, the Netflix app, and the YouTube app without a
problem. But I can't play anything from the ABC app or the Hulu Plus app (the
free stuff - I'm not subscribed yet) or the HGTV app. I get sound, but no
picture. Anyone know why? Am I doing something wrong?I just tried to watch from the ABC Player on the TV, doesn't work. The app description in the app store doesn't indecate you can watch it on a TV. And there nowhere on the app to switch viewing from the iPad to the TV. So, I would say you can't view this on a TV.
-
WHy can't I play videos from you tube or watch Hulu on the ipad.......they play fine on the iPhone, how can I fix this ?
Start by providing some relevant information if you need troubleshooting help. We have no idea how or what you are doing whatever it is that you are doing.
-
Firefox only can't play videos from Hamster web site
Firefox plays videos from every other site but Hamster. IE and Chrome have no problems playing videos from this site
Hi .
Make sure your OS X software is up to date.
Click the Apple top left in your screen. From the drop down menu click Software Update.
Or, open System Preferences > App Store > Check Now
If your Mac is up to date, most news websites require Flash.
Back to System Preferences > Flash Player then select the Advanced tab.
Click: Check Now -
IPad stop playing videos from sites
Today my iPad stopped playing videos from site. IT WORKED YESTERDAY so iPad CAN play it. When Im trying to play video there is a crossed triangle so I can't press it. Please help!
Its not theirs (player) they posts videos from vk.com . On this site it's ok to run video but on all of the others which have videos from vk it's not working.
-
How to play videos from cnn?
how to play videos from cnn?
cnn.com listenlive.eu sites for news and music but its saves on phone and can't open it. I think they are in wmp. is there a player that play and open different formats?
-
Is there a software like flash player for ipad.what software do I exactly need in order to play videos from websites?
NKafafi88-
There may be a couple Apps that may help, but I understand they don't work very well. The best solution would be to contact the owners of the websites and let them know they need to update their site.
The alternative I use, is to download the problem video onto my computer, and convert it to M4V or MP4 format using a program like HandBrake <HandBrake>. Then it can be added to iTunes and synced with the iPad.
Fred -
I am not able to play videos from YouTube, or videow posted on my blog, when I use Fire Fox. That did not happened before the 3.6.14 and allthouhg you informed us that with the 3.6.15 the problem will dissapear, it does not happen. Take into consideration that, with explorer, everything is running fine. I am a long time user o firefox and I donnot want to change. Please give me advise how to solve thiw problem. Tanhks in advance
Hi, My computer shuts down when I try to do any thing with graphics, ie, watching streamed video or looking at my photo's. this is a recent problem, anyone got any idea's
-
Hi, I installed Flash Player 11.6.602.180 installed on Win 7 with IE and can never play videos from this site http://w3.newsmax.com/newsletters/uwr/video_hyman.cfm?s=al&promo_code=12CF6-1
any idea what this site is looking for ? thanks bill mWhat do you see instead of the expected Flash content?
-
Question about Playing Videos from Digital Camera on iPod
I just got an iPod video and it won't let me put my video recordings from my digital camera on it. I got this camera about six months ago and it will play through Windows Media Player but will not on iTunes. What's weird is that my iTunes plays videos from my really old digital camera.
Does anyone know how I can play my videos?I don't create videos myself but this might help you.
-
Playing video from a capture device - Out of memory for video buffers?
Hello guys, I'm having problems playing video from a video capture device when not using JMStudio. When I use JMStudio, the video plays real time with no problems, but when I use code taken from a java book which is a simple Media Player, I get the following error:
"Error is Error: Out of memory for video buffers."
My capture device is working and I don't know why i get this error when trying to watch the video feed from a program other than JMStudio. I also tried different code that has worked in the past with the same exact capture device and I still get the same error. Please help, I have no clue at this point. The code for the simple media player is below, it's taken out of the book "Java: How to Program (4th edition)":
Thanks in advance, I am very greatful
Miguel
device info: vfw:Microsoft WDM Image Capture (Win32):0
When I type the locator, I am typing vfw://0, I also tried just vfw://
and I get the same error.
// Fig. 22.1: SimplePlayer.java
// Opens and plays a media file from
// local computer, public URL, or an RTP session
// Java core packages
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;
// Java extension packages
import javax.swing.*;
import javax.media.*;
public class SimplePlayer extends JFrame {
// Java media player
private Player player;
// visual content component
private Component visualMedia;
// controls component for media
private Component mediaControl;
// main container
private Container container;
// media file and media locations
private File mediaFile;
private URL fileURL;
// constructor for SimplePlayer
public SimplePlayer()
super( "Simple Java Media Player" );
container = getContentPane();
// panel containing buttons
JPanel buttonPanel = new JPanel();
container.add( buttonPanel, BorderLayout.NORTH );
// opening file from directory button
JButton openFile = new JButton( "Open File" );
buttonPanel.add( openFile );
// register an ActionListener for openFile events
openFile.addActionListener(
// anonymous inner class to handle openFile events
new ActionListener() {
// open and create player for file
public void actionPerformed( ActionEvent event )
mediaFile = getFile();
if ( mediaFile != null ) {
// obtain URL from file
try {
fileURL = mediaFile.toURL();
// file path unresolvable
catch ( MalformedURLException badURL ) {
badURL.printStackTrace();
showErrorMessage( "Bad URL" );
makePlayer( fileURL.toString() );
} // end actionPerformed
} // end ActionListener
); // end call to method addActionListener
// URL opening button
JButton openURL = new JButton( "Open Locator" );
buttonPanel.add( openURL );
// register an ActionListener for openURL events
openURL.addActionListener(
// anonymous inner class to handle openURL events
new ActionListener() {
// open and create player for media locator
public void actionPerformed( ActionEvent event )
String addressName = getMediaLocation();
if ( addressName != null )
makePlayer( addressName );
} // end ActionListener
); // end call to method addActionListener
// turn on lightweight rendering on players to enable
// better compatibility with lightweight GUI components
Manager.setHint( Manager.LIGHTWEIGHT_RENDERER,
Boolean.TRUE );
} // end SimplePlayer constructor
// utility method for pop-up error messages
public void showErrorMessage( String error )
JOptionPane.showMessageDialog( this, error, "Error",
JOptionPane.ERROR_MESSAGE );
// get file from computer
public File getFile()
JFileChooser fileChooser = new JFileChooser();
fileChooser.setFileSelectionMode(
JFileChooser.FILES_ONLY );
int result = fileChooser.showOpenDialog( this );
if ( result == JFileChooser.CANCEL_OPTION )
return null;
else
return fileChooser.getSelectedFile();
// get media location from user input
public String getMediaLocation()
String input = JOptionPane.showInputDialog(
this, "Enter URL" );
// if user presses OK with no input
if ( input != null && input.length() == 0 )
return null;
return input;
// create player using media's location
public void makePlayer( String mediaLocation )
// reset player and window if previous player exists
if ( player != null )
removePlayerComponents();
// location of media source
MediaLocator mediaLocator =
new MediaLocator( mediaLocation );
if ( mediaLocator == null ) {
showErrorMessage( "Error opening file" );
return;
// create a player from MediaLocator
try {
player = Manager.createPlayer( mediaLocator );
// register ControllerListener to handle Player events
player.addControllerListener(
new PlayerEventHandler() );
// call realize to enable rendering of player's media
player.realize();
// no player exists or format is unsupported
catch ( NoPlayerException noPlayerException ) {
noPlayerException.printStackTrace();
// file input error
catch ( IOException ioException ) {
ioException.printStackTrace();
} // end makePlayer method
// return player to system resources and
// reset media and controls
public void removePlayerComponents()
// remove previous video component if there is one
if ( visualMedia != null )
container.remove( visualMedia );
// remove previous media control if there is one
if ( mediaControl != null )
container.remove( mediaControl );
// stop player and return allocated resources
player.close();
// obtain visual media and player controls
public void getMediaComponents()
// get visual component from player
visualMedia = player.getVisualComponent();
// add visual component if present
if ( visualMedia != null )
container.add( visualMedia, BorderLayout.CENTER );
// get player control GUI
mediaControl = player.getControlPanelComponent();
// add controls component if present
if ( mediaControl != null )
container.add( mediaControl, BorderLayout.SOUTH );
} // end method getMediaComponents
// handler for player's ControllerEvents
private class PlayerEventHandler extends ControllerAdapter {
// prefetch media feed once player is realized
public void realizeComplete(
RealizeCompleteEvent realizeDoneEvent )
player.prefetch();
// player can start showing media after prefetching
public void prefetchComplete(
PrefetchCompleteEvent prefetchDoneEvent )
getMediaComponents();
// ensure valid layout of frame
validate();
// start playing media
player.start();
} // end prefetchComplete method
// if end of media, reset to beginning, stop play
public void endOfMedia( EndOfMediaEvent mediaEndEvent )
player.setMediaTime( new Time( 0 ) );
player.stop();
} // end PlayerEventHandler inner class
// execute application
public static void main( String args[] )
SimplePlayer testPlayer = new SimplePlayer();
testPlayer.setSize( 300, 300 );
testPlayer.setLocation( 300, 300 );
testPlayer.setDefaultCloseOperation( EXIT_ON_CLOSE );
testPlayer.setVisible( true );
} // end class SimplePlayersomebody? anybody? I know there are some JMF professionals in here, any ideas?
I was reading the Sun documentation and it said something about increasing the JVM memory buffer or something? Well, i'm just clueless at this point.
Help a brotha out!
Maybe you are looking for
-
I know Quicken makes a program for Mac and I've checked a couple of free ones, which don't seem to be what I'm looking for. Is there any other program that I can use? I hope this is the right area to post this question. I searched for this topic but
-
Power Shell script to send a email with event details when an specified event occur
I want a power shell scrip to send a email to a specific email id with the event details when an specified event triggered. The default option to trigger the email on event occur is failed.
-
Hi all We have a server client setup where teh client reads from an xml feed and then passes objects representing the xml along to the server, which processes them. So two JVMs running (each with 2 threads). We are using the standard socket/ObjectInp
-
Mail Not Sorting new Folders Added Alphbetically
Hello! I have tons of sub folders in my inbox, and I would like it to sort them all alphabetically. This was all fine, but recently the last 6 folders I added to the list were appended to the bottom of the list, and not sorted alphabetically with the
-
I'm getting the following errors while trying to provision a PS 2010 PWA on our SharePoint 2010 farm. Our PS instance has been working for a while now, and houses two other PWAs. But today, when trying to create this one, I get "Failed - see the Appl