Editing
Recording Twitch Live Stream
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Streamlink == Source: [https://streamlink.github.io/ Streamlink on GitHub] Can be installed with homebrew or pip. Usage: <ref>[https://streamlink.github.io/cli.html Streamlink CLI] - GitHub</ref> <syntaxhighlight lang="bash"> $ streamlink --twitch-disable-ads -o path/to/output.ts https://twitch.tv/[twitchUser] best </syntaxhighlight> The `--twitch-disable-ads` pauses recording during preroll and ad breaks in order to avoid discontinuity in the saved stream which interferes with playback in players such as VLC. <ref>[https://github.com/streamlink/streamlink/issues/3210#issue-710685043 Twitch.tv embedded ads] - GitHub</ref> Streamlink output format is MPEG transport stream (MPEG-TS). The output stream will need to be converted into a more usable format with a separate utility, e.g.: <syntaxhighlight lang="bash"> $ ffmpeg -i yourvideoname.ts -c:v libx264 outputfilename.mp4 </syntaxhighlight> See also [https://dev.twitch.tv/docs/api/ Twitch API] and [https://pytwitchapi.readthedocs.io/en/stable/ Python Twitch API]. === Kick === Streamlink can also be used for kick.com streams. The latest version of the program (5.5.1) currently does not support Kick streams natively. Kick streams require a [https://github.com/nonvegan/streamlink-plugin-kick 3rd-party plugin] to be installed. This plugin is installed by copying a python script to the Streamlink plugins directory (`~/Library/Application Support/streamlink/plugins/`). The plugin depends on the `cloudscraper` Python package, which can be installed with `pip`: <syntaxhighlight lang="bash"> $ pip install cloudscraper </syntaxhighlight> However, `streamlink` is installed with `brew`. Brew in turn relies on its own python installation, which is different from the system installation. (`/usr/local/Cellar/python@3.x/3.x.x/Frameworks/Python.framework/Versions/3.x/lib/python3.x/`) When streamlink is run using brew's python install, `cloudscraper` isn't accessible. It's necessary to create a link to the cloudscraper packs installed via pip: <syntaxhighlight lang="bash"> $ cd /usr/local/Cellar/python@3.x/3.x.x/Frameworks/Python.framework/Versions/3.x/lib/python3.x/ $ ln -s /Users/[USER_ACCOUNT]/.pyenv/versions/3.x.x/lib/python3.x/site-packages/cloudscraper ./cloudscraper </syntaxhighlight> In addition to the `cloudscraper` package, I found that the Kick plugin also requires the `requests_toolbelt` package. Again, make a link to the system version of this package from within the brew distribution in the same way that the link was made for the `cloudscraper` package. After these steps are taken, streamlink should be able to record a Kick stream: <syntaxhighlight lang="bash"> $ streamlink o path/to/output.ts https://kick.com/[kickUser] best </syntaxhighlight>
Summary:
Please note that all contributions to Littledamien Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Littledamien Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information