[FFserver-user] Recipe to stream to Android

Joe Kreidler joek at optimaldesignco.com
Fri Jan 18 17:27:10 CET 2013


I found my problem and the solution was very easy. All I had to do was add the
following line to my ffserver configuration file.

AVOptionVideo flags +global_header

The “flags +global_header” info is used to force ffmpeg to spit out some
important specifications in the SDP it generates. ffmpeg places global
headers in extradata instead of every keyframe.


WITHOUT the global_header flag, the SDP returned to the Android tablet by
ffserver is:

v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Title
c=IN IP4 0.0.0.0
t=0 0
a=tool:libavformat 54.59.106
m=video 0 RTP/AVP 96
b=AS:128
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1
a=control:streamid=0

With the global header specification, the SDP returned to the Android
tablet by ffserver is:

v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Title
c=IN IP4 0.0.0.0
t=0 0
a=tool:libavformat 54.59.106
m=video 0 RTP/AVP 96
b=AS:128
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;
sprop-parameter-sets=Z2QAHqy0BQHtCAAAAwAQAAADA7B4sXU=,aM8yyLA=;
profile-level-id=64001E
a=control:streamid=0

Android will not accept the SDP without the sprop-parameter-sets and the
profile-level-id attributes being present.





On Wed, Jan 9, 2013 at 9:04 AM, Joe Kreidler <joek at optimaldesignco.com>wrote:

>
>
> I am trying to stream 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. I know my test client app is working properly
> because I can successfully stream the following H.264 content.
> rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov
>
> 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,
>
> Joe
>
>
> Note, 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 http://10.10.10.143:8090/feed1.ffm
>
>
> Port 8090
> BindAddress 0.0.0.0
> RTSPPort 7654
> RTSPBindAddress 0.0.0.0
> MaxClients 4
> MaxBandwidth 10000
> NoDaemon
>
> <Feed feed1.ffm>
> File /tmp/feed1.ffm
> FileMaxSize 20M
> ACL allow 10.10.10.0 10.10.10.255
> </Feed>
>
> <Stream 4Di.sdp>
> Feed feed1.ffm
> Format rtp
> VideoSize 640x480
> VideoQMin 1
> VideoQMax 2
> NoAudio
> </Stream>
>
> <Stream status.html>
> Format status
> ACL allow 10.10.10.0 10.10.10.255
> </Stream>
>
>


-- 

Joe Kreidler
Lead Software Engineer
Optimal Design

601 W. Campus Dr., Suite B3

Arlington Heights, IL  60004

Office: 847-818-1000 x 38

Fax: 847-483-1461
Mobile: 312-615-6431

 www.OptimalDesignCo.com <http://www.optimaldesignco.com/>


Follow Optimal Design on
Linkedin<http://www.linkedin.com/company/optimal-design>
, Twitter <https://twitter.com/#!/OptimalDesignCo> and
Facebook<http://www.facebook.com/pages/Optimal-Design/217642344936481>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/ffserver-user/attachments/20130118/b121608e/attachment.html>


More information about the ffserver-user mailing list