手动和自动录像模块:
recorder rec1 { record all manual; record_unique on; record_notify on; record_max_size 512M; #record_interval 30s; record_path /data/recorded_flvs; record_suffix all.flv; #录像停止后,先判断是否能上传,允许后则将录像上传到OSS/ exec_record_done /home/www/bin/rtmpRecorded.sh $name $path $filename $basename $dirname; }
exec_record_done 参数:
-
recorder
- recorder name -
path
- recorded file path (/tmp/rec/mystream-1389499351.flv
) //记录文件路径 -
filename
- path with directory omitted (mystream-1389499351.flv
) -
basename
- file name with extension omitted (mystream-1389499351
) -
dirname
- directory path (/tmp/rec
)
{ "channel_id": "2121_15919131751", "end_time": 1473125627, "event_type": 100, "file_format": "flv", "file_id": "9192487266581821586", "file_size": 9749353, "sign": "fef79a097458ed80b5f5574cbc13e1fd", "start_time": 1473135647, "stream_id": "2121_15919131751", "t": 1473126233, "video_id": "200025724_ac92b781a22c4a3e937c9e61c2624af7", "video_url": "http://200025724.vod.myqcloud.com/200025724_ac92b781a22c4a3e937c9e61c2624af7.f0.flv" }