Quote:
Originally Posted by mohqwt
how can i make this file dont close his self when the model make refresh and waiting the model to be online , or Continue , sorry for my bad english
|
Here you go. Probably better than any script on this forum. If the model is offline or private, it will retry after 15 seconds infinitely.
Code:
@echo off
setlocal enableDelayedExpansion
set USERNAME=AnonymousUser
set PASSWORD=anonymous
set CB_VERSION=9
set OUT_DIR=captures
set SECONDS=15
set /p model=Enter username:
set model=%model:https://chaturbate.com/=%
set model=%model:/=%
if not exist %OUT_DIR% (mkdir %OUT_DIR%)
for /L %%i in (1,1,99) do (
set N=!time:~9,12!
set /a N=10000!N! %% 10000
set rand=!random!
set /a rand=!rand!* 31/32768+1
set /a rand=!N!+!rand!
set /a rand=!rand!*31/131+1
)
set server=edge%rand%
:doCapture
set ts=%date:/=-%_%time::=-%
set ts=%ts: =%
set output=%OUT_DIR%\%model%_%ts%.flv
set PASSWORD=%PASSWORD:\u003D==%
color 2F && title %model% @ %time% - %server%
cls && echo Capturing: %model% @ %time% - %server% && echo.
rtmpdump --live --timeout 20 ^
-r "rtmp://%server%.stream.highwebmedia.com/live-edge" ^
-p "http://chaturbate.com/%model%" ^
-C S:%USERNAME% ^
-C S:%model% ^
-C S:%CB_VERSION% ^
-C S:%PASSWORD% ^
-y "playpath" -o %output%
for %%r in (%output%) do (
if %%~zr lss 1 del %output%
color 4F && title %model% - OFFLINE
)
set /a rand=%random%*31/32768+1
set server=edge%rand%
timeout %SECONDS%
goto doCapture
A real account isn't
required, because it randomly picks from 1 of 31 stream servers. However, only one connection per server is allowed for anonymous users. But after 15 seconds it will try another random server.
If you need more instances, it's better to replace the USERNAME and PASSWORD fields with a real account. The password hash is easily obtained by searching for "pbkdf2_sha256" in the source of any stream page when logged in.