[FFmpeg-devel] [PATCH] ffserver rtsp bug fixes

Howard Chu hyc
Mon May 17 13:23:14 CEST 2010


Howard Chu wrote:
> Howard Chu wrote:
>> Howard Chu wrote:
>>
>>> Unfortunately I still haven't had any success actually playing the stream. It
>>> seems that ffserver isn't sending any RTP packets at all.
>>
>> The cur_pts in the stream starts out with an absolute timestamp, while for all
>> subsequent packets it only carries a relative timestamp. The check for whether
>> it's time to transmit or not thus compares the huge cur_pts against the
>> current server time (which is also relative) and decides it's not time to send
>> anything yet.
>>
>> This patch gets things working for a single stream (audio only or video only).
>> Still not working for both audio and video; in that case I only receive the audio.
>
> Finally found that problem too, it was a simple error in looking up the stream
> index. The attached patch includes the two previous ones. I can now
> successfully play ffserver's rtsp streams using both ffplayer and mplayer.
> Unfortunately my G1 phone refuses to play the stream, so I still need to find
> out what's wrong there.

Again, it turned out to be something really simple - the sdp response was 
missing a required c= (connection) record. I've fixed this by using "0.0.0.0" 
when no IP address was provided by the calling app.

Also re-sending the ffserver patch, slightly simplified. (When comparing the 
feed file to the current config, we only need to check that the codec_id 
matches, don't need to actually open the codec on each check.)

So after spending a day and a half poking at this, I now have ffserver 
streaming live H264/AAC videos to my G1 phone via RTSP/RTP. I've also attached 
the ffserver.conf file I'm using. I invoke ffmpeg as

ffmpeg -i <input> -threads 0 http://localhost:8090/feed1.ffm

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sdpfix.txt
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100517/990e2542/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ffserverfix.txt
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100517/990e2542/attachment-0001.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ffserver.conf
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100517/990e2542/attachment.asc>



More information about the ffmpeg-devel mailing list