2023-06-03 7:52
(This post was last modified: 2023-06-03 7:58 by sjkjhasfkjhas.)
I saw some recent threads about people still using screen recorders, paid programs, and browser plugins to record shows so I figured I’d write up how I do it, which I think is much simpler and produces a better quality video.
(This probably works for Windows somehow, using WSL, but I don’t have Windows and haven’t tried it)
First, get yt-dlp. yt-dlp is universal downloader for dozens of streaming sites, including most of the popular webcam sites. It makes it dead simple to record public shows, and smooths out some quirks when recording private shows. It’s a more up-to-date fork of youtube-dl, if you’re familiar with that.
Download here, or use your favorite package manager like Homebrew: https://github.com/yt-dlp/yt-dlp/releases
Second, you’re going to need ffmpeg. You can download the binaries, but you should probably just use your OS’s package manager (or Homebrew on Mac). ffmpeg can be downloaded here: https://ffmpeg.org/download.html
As of right now, yt-dlp supports the following cam sites:
- Camsoda
- Stripchat
- Chaturbate
- BongaCams
- Cam4
If your webcam site of choice is supported, recording a public stream is as simple as specifying the URL as a parameter when running yt-dlp:
That’s literally it. It will automatically begin recording the show until the model stops her public show or you stop recording by typing CTRL+C. The resulting file will be a high-quality h.264-encoded video.
If your ffmpeg binary is in a non-standard location, you need to specify it as an option:
If your webcam of choice is not supported, or you want to record a private show that you’re currently in or spying on, it’s a little more complicated, but not by much.
First, you’ll need to make sure that you can watch the HLS version of the stream. That typically means turning off WebRTC or low-latency mode.
Second, you’ll need a way to find the HLS stream URL. I use a browser extension for this: https://chrome.google.com/webstore/detai...afofpnpjgn
(By default this extension will add an element to the page when it detects an HLS stream, but you can configure it so it only shows the stream URL when you click the extension button by turning off “URL injection”.)
Third, create a bash script:
Save the bash script somewhere (I’m going to call it record.sh) and make it executable:
You’ll also want to create a directory to save your recordings. You can change this default by editing DEFAULT_PATH in the script. If you’re using macOS, the home directory is /Users/username and not /home/username like it is in Linux.
Now, a caveat: you still need to be in the private show or spying on it to record it. You can’t bypass paying for the show in some way.
Once you have this script, start your private show or start spying (or go to public stream on an unsupported site, like MyFreeCams). Use the M3U8 sniffer Chrome plugin to get the HLS stream URL. When you click on the plugin, you’re almost always going to want to use “Copy Last”.
Now, run the script with the stream URL as a parameter:
This works exactly like yt-dlp does with public shows: it will record until the show is over, or until you press CTRL+C.
If you want to save the file somewhere else just this one time, add the path as a second parameter:
Hope this helps someone record better quality shows.
(This probably works for Windows somehow, using WSL, but I don’t have Windows and haven’t tried it)
First, get yt-dlp. yt-dlp is universal downloader for dozens of streaming sites, including most of the popular webcam sites. It makes it dead simple to record public shows, and smooths out some quirks when recording private shows. It’s a more up-to-date fork of youtube-dl, if you’re familiar with that.
Download here, or use your favorite package manager like Homebrew: https://github.com/yt-dlp/yt-dlp/releases
Second, you’re going to need ffmpeg. You can download the binaries, but you should probably just use your OS’s package manager (or Homebrew on Mac). ffmpeg can be downloaded here: https://ffmpeg.org/download.html
As of right now, yt-dlp supports the following cam sites:
- Camsoda
- Stripchat
- Chaturbate
- BongaCams
- Cam4
If your webcam site of choice is supported, recording a public stream is as simple as specifying the URL as a parameter when running yt-dlp:
Code:
yt-dlp 'https://chaturbate.com/jennycutey'
That’s literally it. It will automatically begin recording the show until the model stops her public show or you stop recording by typing CTRL+C. The resulting file will be a high-quality h.264-encoded video.
If your ffmpeg binary is in a non-standard location, you need to specify it as an option:
Code:
yt-dlp --ffmpeg-location=/opt/bin/ffmpeg 'https://chaturbate.com/jennycutey'
If your webcam of choice is not supported, or you want to record a private show that you’re currently in or spying on, it’s a little more complicated, but not by much.
First, you’ll need to make sure that you can watch the HLS version of the stream. That typically means turning off WebRTC or low-latency mode.
Second, you’ll need a way to find the HLS stream URL. I use a browser extension for this: https://chrome.google.com/webstore/detai...afofpnpjgn
(By default this extension will add an element to the page when it detects an HLS stream, but you can configure it so it only shows the stream URL when you click the extension button by turning off “URL injection”.)
Third, create a bash script:
Code:
#!/bin/bash
DATE=$(date +"%Y-%m-%dT%H_%M_%S")
M3U8="$1"
DEFAULT_PATH='/home/recordings'
RECORD_PATH="$2"
RECORD_PATH="${RECORD_PATH:=$DEFAULT_PATH}"
echo "Recording M3U8 stream..."
echo "URL: $M3U8"
echo "Location: $RECORD_PATH/$DATE.mp4"
yt-dlp --no-part --downloader ffmpeg --hls-use-mpegts --external-downloader-args 'ffmpeg:-f mp4 -analyzeduration 2147483647 -probesize 2147483647' -o "$RECORD_PATH/$DATE.%(ext)s" "$M3U8"
Save the bash script somewhere (I’m going to call it record.sh) and make it executable:
Code:
chmod +x record.sh
You’ll also want to create a directory to save your recordings. You can change this default by editing DEFAULT_PATH in the script. If you’re using macOS, the home directory is /Users/username and not /home/username like it is in Linux.
Code:
mkdir -p /home/bob/recordings
Now, a caveat: you still need to be in the private show or spying on it to record it. You can’t bypass paying for the show in some way.
Once you have this script, start your private show or start spying (or go to public stream on an unsupported site, like MyFreeCams). Use the M3U8 sniffer Chrome plugin to get the HLS stream URL. When you click on the plugin, you’re almost always going to want to use “Copy Last”.
Now, run the script with the stream URL as a parameter:
Code:
record.sh 'https://myfreecams.cdn.com/path/to/stream.m3u8'
This works exactly like yt-dlp does with public shows: it will record until the show is over, or until you press CTRL+C.
If you want to save the file somewhere else just this one time, add the path as a second parameter:
Code:
record.sh 'https://myfreecams.cdn.com/path/to/stream.m3u8' '/path/to/save/the/file'
Hope this helps someone record better quality shows.