StreamDVR records your favorite live streamers while you are away. No need to miss a broadcast!
Time shifting is not a crime: https://en.wikipedia.org/wiki/Sony_Corp._of_America_v._Universal_City_Studios,_Inc.
-
Use either ffmpeg or streamlink to record to ts-containers
-
Automatically convert recordings to mp4 or mkv
-
Run custom post-process scripts after conversion to...
- upload to cloud storage
- generate thumbnail previews
- do anything you want
-
Supported sites out of the box: Twitch, Youtube, Pixiv, Picarto
-
See
Adding new pluginsto use StreamDVR with other sites that are supported by yt-dlp or streamlink. -
Docker available at https://ghcr.io/purrsevere/streamdvr
-
Dependencies:
bash,node.js >= 14.0.0,npm,git, andffmpeg- StreamDVR does not work in a windows command prompt. Use WSL to run StreamDVR in Windows.
-
Optional Dependencies:
streamlink,yt-dlpstreamlinkis used to fetch m3u8 URLs for Pixiv and Picarto by defaultyt-dlpis used to fetch m3u8 URLs for Twitch and Youtube by default
-
Install StreamDVR
On GitHub, click
Clone or download,Download ZIP. Or rungit clone https://github.com/jrudess/streamdvr.git -
Run
npm installto locally install all dependencies in package.json
-
config files are loaded from the following paths (listed in precedence order):
- $XDG_CONFIG_HOME/streamdvr/
- $HOME/.config/streamdvr/
- $cwd/config/
-
To run:
streamdvr -
Filename formatting:
%sSite Name%nStreamer Name%dDate and Time
-
TUI navigation:
1to focus the streamer list,Escto unfocus2to focus the site list,Escto unfocusenterto focus the input bar for CLIUp/Down/PgUp/PgDnto scroll the active focus
-
CLI:
add [site] [streamer] <alias>
addtemp [site] [streamer]
pause [site] <streamer> <time in seconds>
remove [site] [streamer]
reload
help
- Streamer aliases
Some websites, such as youtube, will have channel names that are random characters. For example, the URL to capture NBC News live streams is https://www.youtube.com/channel/UCeY0bbntWzzVIaj2z3QigXg. An alias can be specified when adding the channel to give it a better name.
add youtube UCeY0bbntWzzVIaj2z3QigXg nbc_news
- Custom Post Processing is enabled in
config.ymlwithpostprocess: /path/to/script
#!/bin/bash
#arg0 is path, arg1 is filename
args=("$@")
notify-send "streamdvr" "Done recording ${args[1]}"- Adding new plugins
Every site that is supported by either streamlink or yt-dlp will work with StreamDVR. All that is necessary is to create a new configuration file with the site's details. Refer to any existing yml file in the config directory for an example.
If you have created a .yml for StreamDVR and would like to share it, please submit a pull request to include the new yml files in the repo.
All support for streaming sites is handled by 3rd party programs. The site configuration yml files specify the m3u8 lookup and record scripts to use. Adding support for new programs requires adding new wrapper scripts and using those scripts in the yml configuration file.
If you would like StreamDVR to support a new program and have written your own wrapper scripts, pull requests are welcome. If you're just aware of other programs similar to yt-dlp or streamlink, please open an issue and provide the program's name/info. If the program looks promising (e.g. works for at least one of the existing sites), then I'll probably add support for it.
-
Configuration Options for
config.ymlenabledaemonSuppresses standard out messages
recordingautoConvertTypemp4, mkv, ts (no conversion)captureDirectoryTemporary storage area while recordingcompleteDirectoryFinal area to store recordingspostprocessScript to use to convert ts to mp4/mkvdateFormatUsed for log output and filenamesincludeSiteInDirThis option only applies ifstreamerSubdiris set. Recordings are placed incompleteDir/streamer_site. IfsiteSubdiris set thencompleteDir/site/streamer_site.streamerSubdirRecordings are placed incompleteDir/streamer/IfincludeSiteInDiris set thencompleteDir/streamer_site/. IfsiteSubdiris set thencompleteDir/site/{streamer, streamer_site}.siteSubdirRecordings are placed incompleteDir/site/. IfstreamerSubdiris set thencompleteDir/site/streamer/.keepTsFileThis option leaves the ts file in captureDir after an mp4/mkv is converted. This is mostly a 'debug' option.minSizeMinimum size in megabytes for a recording. Recordings smaller than this size are automatically deleted.maxSizeMaximum size in megabytes for a recording. Recordings that are larger than this size are halted and converted, then restarted.
postprocessPath to custom post-processing script that is run after a recording has been converted to its final file format. Arguments to script: arg0=path arg1=filenamelogenableStore log output to streamdvr.logappendAppend new output to the file when true. Overwrite new output to the file when false.
tuienableAllow interactive control of streamdvr with a text interfaceallowUnicodeDisable use of any fancy unicode characters in TUI output
colorsAllows customization of various colors used in logs or TUIproxyenableTurns on socks5 proxy forwarding for m3u8_streamlink.sh and record_streamlink.shserversocks5://127.0.0.1:9999
debuglogEnables debug messages to print in the normal logrecorderStore the ffmpeg/streamlink logs to a file when recordingerrortraceInclude a stack-trace for each error message
