GithubHelp home page GithubHelp logo

lauwarm / docker-streamlink-recorder Goto Github PK

View Code? Open in Web Editor NEW
58.0 58.0 28.0 132 KB

automated dockerfile to record livestreams with streamlink

License: MIT License

Dockerfile 70.49% Shell 29.51%
docker dockerfile streamlink

docker-streamlink-recorder's People

Contributors

dependabot[bot] avatar lauwarm avatar leematt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

docker-streamlink-recorder's Issues

Request to change path of the script

Hi, is it maybe possible to move the "streamlink-recorder.sh"-script from "/home" to "/home/script" or similar to give the possibility for access from the docker-host?
Reason is that I'm using Unraid and want to edit the script to my needs. If I would know how to build a container by myself, I would do it by myself. Thanks a lot.

Looking to add stream game name to filename

Hello and happy new year!
I am trying to get the output filename to include the game name as part of the file, i have tried the category & game variables but either get errors or the file just has 'game' in the filename
the variables in the script file use $variables and i have tried adding them, but im clueless with this im afraid. and not sure if i should be using "{category}" or $category somewhere.
id just like to be able to have "Streamername - Gametheyareplaying - Date .mp4"
Really appreciate any assistance you can offer me!

Update Streamlink

Would you be so kind and update to streamlink 2.4.0? This would be very nice.

([Errno 13] Permission denied:

Log:

UID : 1000
GID : 1000
[cli][info] Found matching plugin twitch for URL twitch.tv/stream
[cli][info] Available streams: audio_only, 160p (worst), 360p, 480p, 720p60, 1080p60 (best)
[cli][info] Opening stream: 1080p60 (hls)
[cli][info] Writing output to
/home/download/stream-20231027-032017.mkv
error: Failed to open output: /home/download/stream-20231027-032017.mkv ([Errno 13] Permission denied: '/home/download/stream-20231027-032017.mkv')
[cli][info] Closing currently open stream...

docker run
  -d
  --name='twitcher'
  --net='bridge'
  -e TZ="Europe/London"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="homeserver"
  -e HOST_CONTAINERNAME="twitcher"
  -e 'streamLink'='twitch.tv/stream'
  -e 'streamQuality'='best'
  -e 'streamName'='stream'
  -e 'streamOptions'='--twitch-disable-reruns'
  -e 'uid'='1000'
  -e 'gid'='1000'
  -l net.unraid.docker.managed=dockerman
  -v '/mnt/user/downloads/streams/twitch/':'/home/vod':'rw' 'lauwarm/streamlink-recorder

Passing in OAuth Token

When i try to run the container with the --twitch-api-header stream option, it fails, and gives the the fail messages of
streamlink: error: unrecognized arguments: best

The options i pass in look like this
--twitch-disable-hosting --twitch-api-header=Authorization=OAuth MyOAuthTokenHere

Any idea of what i am doing wrong?

permissions on created folder

sudo docker run -v /home/chod/twitch/download:/home/download -e streamLink='twitch.tv/p0lyt0xxx' -e streamQuality='best' -e streamName='twitch' -e streamOptions='--twitch-disable-hosting' lauwarm/streamlink-recorder
UID : 9001
GID : 9001
[cli][info] Found matching plugin twitch for URL twitch.tv/p0lyt0xxx
[cli][info] Available streams: audio_only, 1080p (worst, best)
[cli][info] Opening stream: 1080p (hls)
error: Failed to open output: /home/download/twitch-20210523-201925.mkv ([Errno 13] Permission denied: '/home/download/twitch-20210523-201925.mkv')
[cli][info] Closing currently open stream...

apologies if/i am in error but i am quite convinced the issue is permissions inside the docker

Issue with chaturbate plugin after update

Hi again.
look, i know both times ive messaged is because of this plugin.. im sorry :)
I moved recently and got my server back up and running today and found a whole bunch of errors for any docker using this plugin (twitch is fine) after you helped me last time get it running its been solid so i hope you can help again!
or can i force it to use the old docker release?

I havent changed anything from when you told me to use "--plugin-dirs=/home/plugins/" in the streamOptions setting
Any help greatly appreciated..

[session][error] Failed to load plugin chaturbate from /home/plugins/ Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/streamlink-2.0.0-py3.9.egg/streamlink/session.py", line 423, in load_plugins mod = load_module(module_name, path) File "/usr/local/lib/python3.9/site-packages/streamlink-2.0.0-py3.9.egg/streamlink/utils/__init__.py", line 25, in load_module spec.loader.exec_module(mod) File "<frozen importlib._bootstrap_external>", line 790, in exec_module File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed File "/home/plugins/chaturbate.py", line 5, in <module> from streamlink.plugin.api import http ImportError: cannot import name 'http' from 'streamlink.plugin.api' (/usr/local/lib/python3.9/site-packages/streamlink-2.0.0-py3.9.egg/streamlink/plugin/api/__init__.py) [cli][info] streamlink is running as root! Be careful! error: No plugin can handle URL: www.chaturbate.com/editedforprivacyusername

Sorry no issue, but a question

Hi lauwarm,

Ich glaube, dass du deutsch sprichst, daher schreibe ich zuerst in deutsch.

Ich habe gestern dein docker Image installiert und einen stream eingerichtet. Da der User auf twitch gerade online war, startete sofort die Aufnahme. Daher glaubte ich, dass eh alles funktioniert. Nachdem der Streamer seinen livestream beendet hatte, wurde auch die Aufnahme beendet. Soweit so gut.
Heute hat der Streamer wieder einen livestream gemacht. Leider wurde dieser aber nicht aufgezeichnet. Ist das so gewollt? Also dass der Stream nur aufgenommen wird, wenn man den container startet während der Streamer online ist und dann aufgenommen wird? Das regelmäßige checken ob er noch online ist, ist nur für das beenden der Aufnahme gedacht? Oder sich zum starten? Wenn zweiteres, was mache ich falsch?

Hi, now in english.
I installed your Image yesterday. I created it with a link to a Streamer, which was at this time in a live stream. The Container records the stream. As soon as the Streamer finished his live stream, the Container stopps the recording. Thats good.
Today the Streamer did a new live stream, but the Container didn't recorded it. Is it my mistake? Or is the Container only able to automatically finish the recording, but i have to Start it, if a new live stream starts?

ImportError: PyGen_GetCode

2023-08-09 14:34:17 Traceback (most recent call last):
2023-08-09 14:34:17   File "/usr/local/bin/streamlink", line 33, in <module>
2023-08-09 14:34:17     sys.exit(load_entry_point('streamlink==6.0.1', 'console_scripts', 'streamlink')())
2023-08-09 14:34:17              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-08-09 14:34:17   File "/usr/local/bin/streamlink", line 25, in importlib_load_entry_point
2023-08-09 14:34:17     return next(matches).load()
2023-08-09 14:34:17            ^^^^^^^^^^^^^^^^^^^^
2023-08-09 14:34:17   File "/usr/local/lib/python3.12/importlib/metadata/__init__.py", line 203, in load
2023-08-09 14:34:17     module = import_module(match.group('module'))
2023-08-09 14:34:17              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-08-09 14:34:17   File "/usr/local/lib/python3.12/importlib/__init__.py", line 124, in import_module
2023-08-09 14:34:17     return _bootstrap._gcd_import(name[level:], package, level)
2023-08-09 14:34:17            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-08-09 14:34:17   File "<frozen importlib._bootstrap>", line 1175, in _gcd_import
2023-08-09 14:34:17   File "<frozen importlib._bootstrap>", line 1148, in _find_and_load
2023-08-09 14:34:17   File "<frozen importlib._bootstrap>", line 1119, in _find_and_load_unlocked
2023-08-09 14:34:17   File "<frozen importlib._bootstrap>", line 682, in _load_unlocked
2023-08-09 14:34:17   File "<frozen importlib._bootstrap_external>", line 1009, in exec_module
2023-08-09 14:34:17   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
2023-08-09 14:34:17   File "/usr/local/lib/python3.12/site-packages/streamlink-6.0.1-py3.12.egg/streamlink_cli/main.py", line 16, in <module>
2023-08-09 14:34:17     import streamlink.logger as logger
2023-08-09 14:34:17   File "/usr/local/lib/python3.12/site-packages/streamlink-6.0.1-py3.12.egg/streamlink/__init__.py", line 19, in <module>
2023-08-09 14:34:17     from streamlink.api import streams
2023-08-09 14:34:17   File "/usr/local/lib/python3.12/site-packages/streamlink-6.0.1-py3.12.egg/streamlink/api.py", line 1, in <module>
2023-08-09 14:34:17     from streamlink.session import Streamlink
2023-08-09 14:34:17   File "/usr/local/lib/python3.12/site-packages/streamlink-6.0.1-py3.12.egg/streamlink/session.py", line 13, in <module>
2023-08-09 14:34:17     from streamlink.logger import StreamlinkLogger
2023-08-09 14:34:17   File "/usr/local/lib/python3.12/site-packages/streamlink-6.0.1-py3.12.egg/streamlink/logger.py", line 14, in <module>
2023-08-09 14:34:17     from streamlink.utils.times import fromlocaltimestamp
2023-08-09 14:34:17   File "/usr/local/lib/python3.12/site-packages/streamlink-6.0.1-py3.12.egg/streamlink/utils/__init__.py", line 5, in <module>
2023-08-09 14:34:17     from streamlink.utils.parse import parse_html, parse_json, parse_qsd, parse_xml
2023-08-09 14:34:17   File "/usr/local/lib/python3.12/site-packages/streamlink-6.0.1-py3.12.egg/streamlink/utils/parse.py", line 5, in <module>
2023-08-09 14:34:17     from lxml.etree import HTML, XML
2023-08-09 14:34:17 ImportError: /usr/local/lib/python3.12/site-packages/lxml-4.9.3-py3.12-linux-aarch64.egg/lxml/etree.cpython-312-aarch64-linux-gnu.so: undefined symbol: PyGen_GetCode

Old API

Heute habe ich deinen Docker unter unRaid installiert. Soweit scheint auch alles richtig zu sein, allerdings schlägt die Authentifizierung Fehl. Vermutet wird eine Veraltete Version von Streamlink die noch die Alte API von Twitch nutzt.

Werde gleich mal versuchen das manuell irgendwie zu updaten, aber ich bin neu was sowas angeht.
Von Haus aus integriert wäre also wünschenswert. ^^

Thread im unRaid Forum: https://forums.unraid.net/topic/98395-twitch-recorder-dockerapp/

PS: Bevor ich mich vertue und nichts mehr verständlich ist scheibe ich mal auf Deutsch.
Mein Englisch ist etwas eingerostet und du kannst scheinbar Deutsch. :D

Recording Streams

Is there a way for me to pass extra flags to streamlink when I use this container?
Like the flag --twitch-disable-hosting to stop recording for channels there are hosting instead of being live.

In general it would be great if its posible to pass extra flags

error: Unable to open URL: https://gql.twitch.tv/gql

Yesterday i wanted to record a stream but the logs says this:

[cli][info] Found matching plugin twitch for URL twitch.tv/sweeettails

error: No playable streams found on this URL: twitch.tv/sweeettails

[cli][info] Found matching plugin twitch for URL twitch.tv/sweeettails

error: Unable to open URL: https://gql.twitch.tv/gql (HTTPSConnectionPool(host='gql.twitch.tv', port=443): Max retries exceeded with url: /gql (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7fa4a6022540>: Failed to resolve 'gql.twitch.tv' ([Errno -3] Temporary failure in name resolution)")))

[cli][info] Found matching plugin twitch for URL twitch.tv/sweeettails

error: Unable to open URL: https://gql.twitch.tv/gql (HTTPSConnectionPool(host='gql.twitch.tv', port=443): Max retries exceeded with url: /gql (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7f1d40a41130>: Failed to resolve 'gql.twitch.tv' ([Errno -3] Temporary failure in name resolution)")))

[cli][info] Found matching plugin twitch for URL twitch.tv/sweeettails

error: Unable to open URL: https://gql.twitch.tv/gql (HTTPSConnectionPool(host='gql.twitch.tv', port=443): Max retries exceeded with url: /gql (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7f7660771130>: Failed to resolve 'gql.twitch.tv' ([Errno -3] Temporary failure in name resolution)")))

[cli][info] Found matching plugin twitch for URL twitch.tv/sweeettails

error: No playable streams found on this URL: twitch.tv/sweeettails

chaturbate plugin not working

Hi, I have recently discovered your docker and it was exactly what i was looking for, so i have set ot up on my unraid server and for twitch it seems to be recording fine, however accessing chaturbate streams gives an error that no plugin is available to handle the stream, even though the plugin is installed into the plugins folder as part of the install.
is there some additional option i need to active to get it to function..
any help greatly appreciated..

[cli][info] streamlink is running as root! Be careful!
error: No plugin can handle URL: www.chaturbate.com/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.