Can you please tell me what will be me stream URL if I am using following code in nginx.conf
rtmp {
server {
listen 1935; # Listen on standard RTMP port
chunk_size 4000;
application show {
live on;
pull rtmp://THIS_IS_SOME_STREAM live=1;
hls on;
hls_path /mnt/hls/;
hls_fragment 3;
hls_playlist_length 60;
}
}
}
I tried this but it didn't work: rtmp://My_Server_Ip/show
EDIT
rtmp {
server {
listen 1935;
chunk_size 4000;
application live2 {
live on;
pull rtmp://Stream_IP app=vod/demo.mp4 name=okstr live=1;
}
}
}
AND
rtmp {
server {
listen 1935;
chunk_size 4000;
application live2 {
live on;
pull rtmp://Stream_IP/vod/demo.mp4 name=okstr live=1;
}
}
}
Then I tried following URL in VLC but it didn't any show video nor any error.
http://My_IP/live2/okstr
The general format is: [rtmp://]host[:port][/app[/playpath]]
In the case of pull
if the playpath is empty it uses the current stream name.
You either didn't set the play path, the pull doesn't work or the firewall blocks RTMP. Check the logs.
The second config with
pull rtmp://Stream_IP/vod/demo.mp4 name=okstr live=1;
is correct one. Or you can edit this way:
pull rtmp://Stream_IP app=vod playPath=demo.mp4 name=okstr live=1;
Play url for it would be rtmp://yourserverip/live2/okstr. But I have similar issue with pull setup not working in weird way. It does serve first 4 connects but does not all following them. Just disconnects right after play stream rtmp command. ffplay does say "invalid data found while processing input". I had to use additional ffmpeg instance for relay, running in separate or in exec_static. This push scheme is ok. Also make sure that worker_processes is 1; and rtmp_auto_push is off or commented; as multiworker config has an issues.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.