1:/Created multimedia/rtmp in the /usr/local/nginx/html/ directory
2: Copy file 1.flv to the directory
3: Open usr/local/nginx/ conf/nginx.conf, modified as follows
rtmp {
#rtmp on-demand configuration
server {
listen 1935;
chunk_size 4000;
application vod {
play /usr/local/nginx/ html/multimedia/rtmp; #On-demand media file storage directory
} }
}
}
4: Restart nginx. nginx -s reload
5: Play link: rtmp://yourserverIP:1935/vod/1.flv
Note: The vod here corresponds to application The name, not the file path.
6: Complete
The above introduces nginx development (3) building rtmp on-demand system, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.