[FFmpeg-user] ffmpeg/ffplay stream from TCP

Naraci, Paskualino pnaraci at students.uni-mainz.de
Fri Jan 18 15:35:46 CET 2013


Hello all together!

I m new to ffmpeg and facing a little problem:

I have a Parrot AR Drone 2.0 i want to stream the video from. Its a H264 encoded Stream.
When connected to the AR Drone 2.0 via WiFi, typing "ffplay http://192.168.1.1:5555" brings me the live video from the drone to the screen. Everythings fine!

But i want to be able to connect the drone to my Android device, and then stream the live video from the drone over Androids 3g connection, to my server. I use tethering to be able to have the Drone connected to Android and still have Internet access.


The final idea behind this, is to stream the drones video over an Android device to a media server (wowza or red5).

I tried on Android:

            Socket socketDrone = new Socket("192.168.1.1",5555);                                                   //connect to the Drones video
            Socket socketMyServer = new Socket("xxx.xxx.xx.xx",port1);                                         //connect to my Server
            IOUtils.copy(socketDrone.getInputStream(),socketMyServer.getOutputStream());    //redirecting the Drones Video Stream


on my Server:

          ServerSocket connFromAndroid = new ServerSocket(port1);
          Socket socketAndroid = connFromAndroid.acceppt();                                                        //waiting for connections from Android device

          ServerSocket connFromFFplay = new ServerSocket(port2);
          Socket socketFFplay = connFromFFplay.acceppt();                                                           //waiting for connections from FFplay/FFmpeg

          IOUtils.copy(socketAndroid.getInputStream(),socketFFplay.getOutputStream());        //redirecting the Video Stream again to FFplay



I thought this should work, but when executing "ffplay http://localhost:port2" i get only a corrupted, way to fast playing stream. And also ffplay doesnt start playing the video, it waits till the connection to the Android device or Drone is cut, then starts playing.

How can i get this to work as if i am directly connected to the drone via WiFi? What am i doing wrong, or missing out?
Any solutions are welcome, including third party apps... anything!!! just the get the idea behind this working!!

In the end i want to stream the video from the drone over android device to a media stream server (wowza or red5).

Thank you for reading!



More information about the ffmpeg-user mailing list