horacio9a / myfreecams-anonymous

myfreecams-anonymous lets you follow and archive your selected models' shows on myfreecams.com.
18 stars 6 forks source link

rtmp:// support #2

Open brachna opened 6 years ago

brachna commented 6 years ago

I know that you tried to get rtmp:// support (not for this script) months ago when I was researching the question.

I was trying to get it to work using python-librtmp, but had no success.

url = "rtmp://video" + str( self.m_server ) + ".myfreecams.com:1935/NxServer"
path = "mp4:mfc_" + str( self.m_cid ) + ".f4v"
pageUrlArg = "https://www.myfreecams.com/_html/player.html?broadcaster_id=0&cache_id=1507078249&target=main"
connectData = [ self.m_id, "", str( self.m_cid ), "DOWNLOAD", self.m_uid, 0, "" ]

conn = librtmp.RTMP( url,
    app="NxServer",
    flashver=self.m_version,
    swfurl="https://www.myfreecams.com/flash/Video170823.swf",
    swfvfy=True,
    pageurl=pageUrlArg,
    connect_data=connectData,
    playpath=path,
    timeout=rtmpTimeout,
    live=True )

connect() works of course, however create_stream() fails.

RTMPDumpHelper does find all data and launches rtmpdump which downloads the stream just fine until browser page with stream is closed. On its own rtmpdump can't download anything using generated command. So I assume it has to do with websocket connection. For example, live.fc2 requires one to hold websocket connection and send 'heartbeat' every 30 seconds or so, otherwise connection will drop. I was surprised that one can just drop websocket connection and continue downloading HLS stream like you do in your script.

Have you tried to get rtmp:// stream in recent days?

horacio9a commented 6 years ago

It is true that I also tried to record mfc rtmp stream using python-librtmp but with no success. I recently tried same using livestream & streamlink but also without results. I think some people fix this with patch for rtmpdump.exe, but that version is not public.

RuzzyRullezz commented 6 years ago

Actual problem? I have a solution

horacio9a commented 6 years ago

In the meantime problems with streamlink and livestreamer has been solved.

Asynchr0nous commented 6 years ago

I see you have added support for rtmp for this scripts so thank you. would it possible be able to add this same support for https://github.com/horacio9a/mfc-node/tree/master without need for the MFCD.exe file?