[FFmpeg-user] Recipe to stream to Android

Joe Kreidler joek at optimaldesignco.com
Thu Jan 10 17:14:21 CET 2013

I asked this question on the ffserver mail list, but there has not been
any responses. I'm trying the ffmpeg list since this list is more active
and I am not sure if my problem is in ffserver or ffmpeg.

I am trying to stream H264 video using ffmpeg and ffserver on a Ubuntu
12.04LTS desktop to an Android tablet running a small test client app
on Ice Cream Sandwich v 4.0.4. Note, I am not using ffmpeg or ffserver
on Android. I know my test client app is working properly because I can
successfully stream the following H.264 content.

I know that the problem is that ffserver is generating the SDP for the
video media like this:

m=video 0 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1

The format parameter line (a=fmtp) is missing the "sprop-parameter-sets"
and "profile-level-id" parameters and without these parameters, Android
does not accept the RTP data.  A valid line looks like this:

a=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z0LAHukBQHsg,aM4G4g==;

My ffmpeg and ffserver configuration files are included below. If
someone has successfully streamed H.264 content to an Android tablet,
can you share you configuration me with?

Thank you in advance,


I captured a video on the Android device and played it back just
to verify that I had a good video file. I then transferred the file to
my Ubuntu desktop. I send the video content to ffserver using the "copy"
codec, in other words, no transcoding of the content at all.

ffmpeg -i test.mp4 -c copy

Port 8090
RTSPPort 7654
MaxClients 4
MaxBandwidth 10000

<Feed feed1.ffm>
File /tmp/feed1.ffm
FileMaxSize 20M
ACL allow

<Stream 4Di.sdp>
Feed feed1.ffm
Format rtp
VideoSize 640x480
VideoQMin 1
VideoQMax 2

<Stream status.html>
Format status
ACL allow

More information about the ffmpeg-user mailing list