PDA

View Full Version : [rtmpgw] - video starts to play only when I stop rtmpgw


yegorov-p
01-18-2012, 03:50 AM
Hi everyone.

I'd like to receive video stream from that camera:
http://www.centrettc.ru/cam3-stream-jw/ or direct link
http://www.centrettc.ru/pub/jwp/player.swf?file=cam3-pf1.stream&streamer=rtmp://62.33.94.30/rtplive

So, I start rtmpgw:
rtmpgw -r "rtmp://62.33.94.30/rtplive/cam3-pf1.stream" -t "rtmp://62.33.94.30/rtplive/cam3-pf1.stream" -s "http://www.centrettc.ru/pub/jwp/player.swf" -p "http://www.centrettc.ru/cam3-stream-jw/" -g 81

In several seconds rtmpgw connects and it shows something like
260.394 KB / 10.22 sec
But VLC, connected to http://127.0.0.1:81 shows nothing! Then, in 3-4 minutes, rtmpgw stops and vlc starts to show video from the camera =)
Then, after 3-4 minutes, vlc stops and rtmp writes something like that:
D:\[DROPBOX]\My Dropbox\rtmp>rtmpgw -r "rtmp://62.33.94.30/rtplive/cam3-pf1.stre
am" -t "rtmp://62.33.94.30/rtplive/cam3-pf1.stream" -s "http://www.centrettc.ru/
pub/jwp/player.swf" -p "http://www.centrettc.ru/cam3-stream-jw/" -g 81
HTTP-RTMP Stream Gateway 2.4 git-6230845 2011-9-25
(c) 2010 Andrej Stepanchuk, Howard Chu; license: GPL

Streaming on http://0.0.0.0:81
processTCPrequest, Range request not supported
Connecting ... port: 1935, app: rtplive/cam3-pf1.stream
5238.459 KB / 215.39 sec
ERROR: RTMP_ReadPacket, failed to read RTMP packet body. len: 18634
Closing connection... done!

Can somebody help me with that?

chap
01-18-2012, 10:44 AM
use Mplayer;)
rtmpdump -r "rtmp://62.33.94.30/rtplive" -a "rtplive" -f "WIN 10,3,183,10" -W "http://www.centrettc.ru/pub/jwp/player.swf" -p "http://www.centrettc.ru/cam3-stream-jw/" --live -y "cam3-pf2.stream" | "C:\PROGRA~1\MPlayer\mplayer.exe" - -cache 8192 -framedrop

yegorov-p
01-18-2012, 11:19 AM
I know how to dump it and how to play it with mplayer ;-)
I don't understand, why rtmpgw doesn't work.

KSV
01-18-2012, 11:33 AM
it's not rtmpgw's fault. open the url 127.0.0.1:81 in your browser and it will start saving data normally. it means rtmpgw is sending back data as intended but player is choking on that particular stream. even when you try to pipe through rtmpdump player shows exactly same behavior.

yegorov-p
01-18-2012, 11:53 AM
Ok. Here's another example

Source: http://inter.ua/images/player.swf?file=inter&streamer=rtmp://62.149.26.240/tv

Run rtmpgw as
rtmpgw -r "rtmp://62.149.26.240/tv/inter" -t "rtmp://62.149.26.240/tv/inter" -s "http://inter.ua/images/player.swf" -g 81

VLC plays it perfectly. Why? =)

KSV
01-18-2012, 12:05 PM
Ok. Here's another example

Source:

Run rtmpgw as


VLC plays it perfectly. Why? =)

read the bold part again. it may be due to improper stream format.

it's not rtmpgw's fault. open the url 127.0.0.1:81 in your browser and it will start saving data normally. it means rtmpgw is sending back data as intended but player is choking on that particular stream. even when you try to pipe through rtmpdump player shows exactly same behavior.

chap
01-18-2012, 03:48 PM
do not know, maybe I was wrong code - but it works
use mplayer(try cache8192,framedrop)
rtmpgw -r "rtmp://62.33.94.30/rtplive" -a "rtplive" -W "http://www.centrettc.ru/pub/jwp/player.swf" -p "http://www.centrettc.ru/cam3-stream-jw/" --live -y "cam3-pf2.stream" -g 81 | ping -n 1 -w 100 192.168.254.254 >nul | "C:\PROGRA~1\MPlayer\mplayer.exe" - http://127.0.0.1:81

http://img515.imageshack.us/img515/566/20120119015028.th.png (http://imageshack.us/photo/my-images/515/20120119015028.png/)

use vlc(try cache 30000ms - 50000ms)
rtmpgw -r "rtmp://62.33.94.30/rtplive" -a "rtplive" -W "http://www.centrettc.ru/pub/jwp/player.swf" -p "http://www.centrettc.ru/cam3-stream-jw/" -v -y "cam3-pf2.stream" -g 81 | ping -n 1 -w 100 192.168.254.254 >nul | "C:\PROGRA~1\VideoLAN\VLC\vlc.exe" - http://127.0.0.1:81
http://img267.imageshack.us/img267/7843/20120119032132.th.png (http://imageshack.us/photo/my-images/267/20120119032132.png/)