View Single Post
  #12  
Old 05-29-2011, 01:20 AM
KSV KSV is offline
Senior Member
 
Join Date: Apr 2011
Posts: 853
KSV is on a distinguished road
Cool

Re: change the code of of rtmpsrv, rtmpdump to run with the --live parameter by defau


Quote:
Originally Posted by chap View Post
here http://www.105.net/sezioni/inradio/r...o=105%20Latino not working correctly rtmpsrv (does not transmit a command --live)
Live switch can only be detected when it is sent by client. but in case of these two streams they are not sending any live flag.

so how does their streams play in flash client but not in rtmpdump?

because rtmpdump was always sending the optional start flag in play packet and their servers refuses to play when start flag is non negative. i have modified this behavior and now start and duration flags will only be sent when explicitly defined. this will let these types of streams play without specifying --live flag. however there is another problem due to a hack used by rtmpdump for faster downloading of recorded (nonlive) files. whenever it receives a BufferEmpty message it sends Pause Unpause packets to force sending next buffer. this may create some anomalies in recorded files when stream is live and --live switch is not specified because live stream can only be received in realtime. if we disable this hack, everything will be fine for live streams but download speed for nonlive streams may be slow so i haven't disabled it.

in short if you know that stream is live and rtmpsrv or rtmpsuck can't detect live flag, it would be better to specify --live flag though rtmpdump can download without it now.

Quote:
Originally Posted by chap View Post
I want to ask if you can somehow pass parameters from rtmpsuck to rtmpdump.
it took some time to figure out. i have added some code to rtmpsuck and copied one function from rtmpsrv. now it willl save the commands in Command.bat just like rtmpsrv.

but why didn't rtmpsrv works with ustream?

because their client sends a channel parameter in connect packet and server responds with original url to connect with. rtmpsrv is faking the connect response so client is not able to connect to stream.

i will post the updated package and diff file later.
Reply With Quote