Skip to content

greg-dev/smo3-bcast-recorder

Repository files navigation

smo3-broadcast-recorder

Smоtri.cоm is one of the most popular russian video hosting sites with a big community and live broadcasts.
This tool lets you automatically record your favorite shows right from the terminal.

Requirements

Node.js used to retrieve broadcasts stream data.
rtmpdump used to connect to RTMP server and capture the live video stream and save it to a file.

Setup

  1. Install Node.js (tested on 6.9.x and v8.6.x).
  2. Download and unpack the code.
  3. Open console and go into the directory where you unpacked the files.
  4. Install all dependencies by running npm install in the same directory as index.js is.
  5. Install rtmpdump.
  6. Copy the favorites.example.js file, rename it to favorites.js and fill it with logins of the broadcasters you want have automatically recorded in the watch mode.
  7. Copy the excluded.example.js file, rename it to excluded.js and fill it with logins of the broadcasters you don't want have automatically recorded in the watch mode.

Running

  1. Open console and go into the directory where you unpacked the files.
  2. To create new recording process and lock it on a broadcast use the record command and broadcaster login or broadcast identifier as in the examples below:
  • run npm run record mashka4189
  • run npm run record 10438720

    you can add .json suffix to broadcast id to start recording using its data stored previously in a file:
  • run npm run record 10438720.json
  1. To store broadcast data without recording any video stream use the store command as below:
  • run npm run store mashka4189
  • run npm run store 10438720
  1. To access protected broadcasts in all above cases use the password as an optional parameter, for example:
  • run npm run record mashka4189 1234
  1. To keep tracking newest broadcasts and automatically capture your favs use the watch mode, and pass the latest broadcast id and set time interval (the reasonable value is from 10 to 60 seconds).
  • run npm run watch 10438720 30
  1. To get the list of currently running capture processes use the kill command as below:
  • run npm run kill list

    you can also stop recording broadcast by passing its id as an optional parameter:
  • run npm run kill 10438720

Note: Avoid running more than 75 capture processes at the same time or you will get your IP banned.

Note: The command below might be useful for finding and killing unwanted capture processes:
ps xo ppid,pid,command | grep 'rtmpdump' | sed 's/^ *//;s/ *$//' | tr -s " " | cut -d " " -f 1,2,21
It will list all your capture processes with their PID, PPID and output file name, the first two ids are needed to kill the process with kill -9 PPID PID and the third one will help you localize it.

About

📹 Node.js script that lets you automatically record your favorite live shows right from the terminal

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published