0

I'm working on a project that requires low latency desktop streaming from a mac to an iOS device over a local WiFi network. After trying unsuccessfully with sending images over network due to the extremely large bandwidth required, I asked a question here, and found that video streaming was much more suitable for my application.

I've read and found the RTSP protocol to be quite suitable for this, and have found a library on the mobile side that seems to receive and display RTSP streams quite well.

The thing is, I still have no idea how to generate a RTSP screen stream. The steps I can currently think of are

  1. Capture the Mac's desktop and encode it into an mpeg stream.
  2. Feed the stream into an RTSP server library of some sort.

Is my concept of this correct? Any pointers to where I might start?

FFMpeg is a name I find popping up quite often when dealing with encoding videos and such, but I currently have no idea how to piece all this together, since FFMpeg seems to deal with files, not streams.

switt
  • 331
  • 2
  • 8
  • ffmpeg can deal with everything! :-) files, streams, ... – Dmitri Sosnik Jan 22 '15 at 23:42
  • I'm currently looking at using AVFoundation's AVCaptureScreenInput, routed via an AVCaptureSession to an AVCaptureVideoDataOutput. This outputs "CMSampleBuffer"s which I think should work with FFMpeg . .? – switt Jan 23 '15 at 02:53
  • @DmitriSosnik Any ideas how I can include FFMpeg in Xcode? I get compiler warnings errors and stuff all the time lol. Dragging the FFMpeg source folder inside the project shows a "Create external build system project" window, which I uncheck, and choose to just copy files to the project. But then there are errors. And also, it seems as if FFMpeg code itself is intended to be a separate application. How do I add it, or even use it, as a library? I'm at a loss here. – switt Jan 23 '15 at 03:01
  • Take a look [here](http://stackoverflow.com/questions/19092796/build-ffmpeg-with-xcode-5) – Dmitri Sosnik Jan 23 '15 at 06:24
  • @DmitriSosnik Isn't that for iOS devices ? I'm adding this to the Mac OS side of the project. – switt Jan 23 '15 at 12:32
  • It's even easier, just [configure, make and make install](https://trac.ffmpeg.org/wiki/CompilationGuide/MacOSX). – Dmitri Sosnik Jan 24 '15 at 22:12
  • When you build ffmpeg it builds and installs header files, libraries and executable. Just link your project against those libraries (ibavcodec, libavutil, libavformat, libavfilter, libavdevice, libswscale and libswresample) – Dmitri Sosnik Jan 24 '15 at 22:15

0 Answers0