arut / nginx-rtmp-module

NGINX-based Media Streaming Server
http://nginx-rtmp.blogspot.com
BSD 2-Clause "Simplified" License
13.23k stars 3.49k forks source link

StreamIsRecorded is sent after onStatus #422

Open amoskovsky opened 10 years ago

amoskovsky commented 10 years ago

According to the rtmp spec, the StreamIsRecorded message should be sent in response to the play command before the StreamBegin and onStatus messages. And this is how many streaming servers seen in the field work. However nginx-rtmp sends StreamIsRecorded after onStatus. So the client can't detect is it a live or recorded stream at the point it receives onStatus, which complicates things when you need different processing of those kinds of streams.

Is this behaviour intentional or it's just a bug?

caposguanatos commented 10 years ago

you can fix this editing ngx_rtmp_play_open function

amoskovsky commented 10 years ago

The real question is - is this behaviour intentional e.g. to workaround some known issues in popular players? If so then fixing it would break those players.

arut commented 10 years ago

@amoskovsky, it's not