Closed warlock135 closed 6 years ago
it's a bug, hostname can not be the same one.you can config like this:
hostname pub rtmp localhost;
hostname sub rtmp 127.0.0.1;
and ./ffplay rtmp://127.0.0.1/live/test
Thank for your reply. I already tried to use another server rather than localhost, somethings like this:
hostname pub rtmp 10.x.x.x;
hostname sub rtmp localhost;
but still got the same error. Aw, I will try your suggestion and give you further details when I'm back to my office on Monday.
Hi,
With a fresh nginx + your module, it works now with localhost. Maybe there are some conflicts between the modules and some arut-rtmp patches which i applied before.
But when I try with another server on the network, I still cant play the stream. ffplay just hangs and timeout after a few second. ffplay command:
./ffplay rtmp://localhost/live/test
And the error:
RTMP_ReadPacket, failed to read RTMP packet headersq= 0B f=0/0
Here is the host config:
hostname pub rtmp 10.58.201.130; # match rtmp push domain
hostname sub rtmp localhost; # match rtmp pull domain
I also can play the stream directly from the outside server with ffplay:
./ffplay rtmp://10.58.201.130/live/test
Another thing, wireshark shows no packet to the server (10.58.201.130) when I try to play with the "localhost" command above. So I think there is some problem in pulling the stream from the origin server.
Nevermind, I had some misunderstandings about the hostname config. Thank for your help!
Hi, Im trying to use your module to implement a streaming server. Here is my config (basically the same as in your readme)
Streaming into the server with ffmpeg works fine. Here is my command:
./ffmpeg -f pulse -ac 2 -i default -f x11grab -framerate 25 -video_size 1440x1080 -i :0.0+0,0 -async 1 -vsync 1 -c:v libx264 -crf 23 -preset superfast -vf "format=yuv420p" -g 60 -tune zerolatency -movflags +faststart -fflags +genpts -avoid_negative_ts make_zero -c:a aac -b:a 128k -ar 44100 -f flv rtmp://localhost/live/test
But when i try to play the stream with ffplay:
./ffplay rtmp://localhost/live/test
Here is the log:
Is that the correct url to play the stream if I use that config? I also try with another server but the result is the same.
Thank in advance!