I am trying to figure out how to get as close to real time streaming as possible from Raspberry Pi to an iPhone (more particularly just an HTTP stream so iPhone or Android could use it). The Raspberry will have a Behringer UCA202 connected to it.

I have looked all over the web at different options (ffmpeg and VLC seem to be what it comes down to). I cannot seem to find ffmpeg options for just an HTTP stream like VLC has.

I am looking for some direction and maybe some quick examples to get me on the right track.


I have Squeezeplug installed on my pi and running Logitech Media Server. On my iPhone I downloaded an app called iPeng (10eur) and it allows me to stream music on my network, indexed by Logitech Media Server through my iPhone.


First of all; HTTP Streaming on iOS and Android devices are different. Apple uses HLS (HTTP Live Streaming) while Android uses HDS (HTTP Dynamic Streaming).

from Apple's official documentation : (http://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/StreamingMediaGuide/HTTPStreamingArchitecture/HTTPStreamingArchitecture.html)

In a typical configuration, a hardware encoder takes audio-video input, encodes it as H.264 video and AAC audio, and outputs it in an MPEG-2 Transport Stream, which is then broken into a series of short media files by a software stream segmenter. These files are placed on a web server. The segmenter also creates and maintains an index file containing a list of the media files. The URL of the index file is published on the web server. Client software reads the index, then requests the listed media files in order and displays them without any pauses or gaps between segments.

Segmenters : https://github.com/carsonmcdonald/HTTP-Live-Video-Stream-Segmenter-and-Distributor https://github.com/johnf/m3u8-segmenter

Also there are some ffmpeg forks such as ffmpeg-hls (https://github.com/yfli/ffmpeg-hls)

I recommend you follow this document.(http://www.netmaster.dk/LiveStreaming) It uses first segmenter that i mentioned above. Just strip AWS ec2 things.

I'm using ffmpeg/RTP to stream audio from Raspberry to my iOS devices. To stream a local file to iOS device (which has IP address in this example) :

ffmpeg -i "Pink Martini_Sympathique/CDImage.flac" -strict experimental -acodec libmp3lame -ab 32k -ac 1 -re -f rtp  rtp://

To listen stream from iOS device i use OPlayer (great player to watch movies/series also) and just call the stream URL : rtp:// After a bit caching/buffering it play smoothly.

To stream your mic/line-in sound change the ffmpeg commmand :

arecord -f cd -D plughw:0,0 | ffmpeg -i - -strict experimental -acodec libmp3lame -ab 32k -ac 1 -re -f rtp  rtp://
  • I've been able to get everything into ffmpeg's own segmenter and have the files output to a webserver folder. But, when I go to the location on my iPhone, I get an unsupported URL message. I am still trying your options, etc. Thanks for the help. I'll come back after I try more things.
    – tluck234
    May 23 '13 at 0:54
  • I'm also not getting a bitrate when using segmenter in Fffmpeg... It does work if I save to an MP3 from the input, but not if I try and segment it up..
    – tluck234
    May 23 '13 at 14:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.