Skip to content

plugins.tvp: sport.tvp.pl handling #6097

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 28, 2024
Merged

plugins.tvp: sport.tvp.pl handling #6097

merged 4 commits into from
Jul 28, 2024

Conversation

czarek7711
Copy link
Contributor

Hello,

I've added handling of sport.tvp.pl live videos to the tvp plugin.

Admittedly I have little Python experience, but I tested the changes editing \pkgs\streamlink\plugins_plugins.json, \pkgs\streamlink\plugins\tvp.py while removing the cached compiled file.

Copy link
Member

@bastimeyer bastimeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.

Please post debug logs of a few streams. This site is geo-blocked and inaccessible from the VPNs I have access to.

editing \pkgs\streamlink\plugins_plugins.json

This is not how this works. You are not supposed to edit any Python distributions ("packages") directly. This will break things.

You need to install Streamlink in a virtual environment via pip in editable mode from the locally cloned git repo if you want to make direct changes. Please have a look at the docs.
https://streamlink.github.io/developing.html

Also, plugin matcher changes require plugin URL test changes.

@bastimeyer bastimeyer added plugin enhancement A new feature for a working Plugin restriction: geo blocked labels Jul 28, 2024
Copy link
Member

@bastimeyer bastimeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't forget to post a few debug logs. I don't even know if these changes cover live streams or VODs.

@czarek7711
Copy link
Contributor Author

Thanks for the feedback and those detailed instructions.

I was in the middle of typing out this comment, when you added yours.

Please find the logs below:

(streamlink) PS C:\Users\czys~\venvs\streamlink> streamlink https://sport.tvp.pl/79322729/paryz-2024-kajakarstwo-gorskie-judo-tenis-na-zywo-transmisja-online-live-stream-igrzyska-olimpijskie-2872024 best --loglevel=debug
NoTagError: git describe --long --dirty --always --tags could not find a tag
[cli][debug] OS: Windows 10
[cli][debug] Python: 3.12.4
[cli][debug] OpenSSL: OpenSSL 3.0.13 30 Jan 2024
[cli][debug] Streamlink: 0.0.0+unknown
[cli][debug] Dependencies:
[cli][debug] certifi: 2024.7.4
[cli][debug] isodate: 0.6.1
[cli][debug] lxml: 5.2.2
[cli][debug] pycountry: 24.6.1
[cli][debug] pycryptodome: 3.20.0
[cli][debug] PySocks: 1.7.1
[cli][debug] requests: 2.32.3
[cli][debug] trio: 0.26.0
[cli][debug] trio-websocket: 0.11.1
[cli][debug] typing-extensions: 4.12.2
[cli][debug] urllib3: 2.2.2
[cli][debug] websocket-client: 1.8.0
[cli][debug] Arguments:
[cli][debug] url=https://sport.tvp.pl/79322729/paryz-2024-kajakarstwo-gorskie-judo-tenis-na-zywo-transmisja-online-live-stream-igrzyska-olimpijskie-2872024
[cli][debug] stream=['best']
[cli][debug] --loglevel=debug
[cli][debug] --player=D:\Programy\VLC\vlc.exe
[cli][debug] --player-args=--file-caching=5000 --no-one-instance --play-and-exit --qt-minimal-view
[cli][debug] --ffmpeg-ffmpeg=D:\Programy\ffmpeg\bin\ffmpeg.exe
[cli][info] Found matching plugin tvp for URL https://sport.tvp.pl/79322729/paryz-2024-kajakarstwo-gorskie-judo-tenis-na-zywo-transmisja-online-live-stream-igrzyska-olimpijskie-2872024
[utils.l10n][debug] Language code: en_US
[utils.l10n][debug] Language code: en_US
[stream.dash][debug] Available languages for DASH audio streams: pl (using: pl)
[utils.l10n][debug] Language code: en_US
[stream.dash][debug] Available languages for DASH audio streams: pl (using: pl)
[utils.l10n][debug] Language code: en_US
[utils.l10n][debug] Language code: en_US
[utils.l10n][debug] Language code: en_US
[stream.dash][debug] Available languages for DASH audio streams: pl (using: pl)
[cli][info] Available streams: 288p_dash, 396p_dash, 576p_dash, 288p_dash_alt, 396p_dash_alt, 576p_dash_alt, 720p_dash, 1080p_dash, 288p_dash_alt2, 396p_dash_alt2, 576p_dash_alt2, 720p_dash_alt, 1080p_dash_alt, 340k_alt2 (worst), 340k_alt, 340k, 288p_alt2, 288p_alt, 288p, 396p_alt2, 396p_alt, 396p, 576p_alt2, 576p_alt, 576p, 720p_alt, 720p, 1080p (best)
[cli][info] Opening stream: 1080p (hls)
[cli][info] Starting player: D:\Programy\VLC\vlc.exe
[stream.hls][debug] Reloading playlist
[cli][debug] Pre-buffering 8192 bytes
[stream.hls][debug] First Sequence: 430545851; Last Sequence: 430546075
[stream.hls][debug] Start offset: 0; Duration: None; Start Sequence: 430546073; End Sequence: None
[stream.hls][debug] Adding segment 430546073 to queue
[stream.hls][debug] Adding segment 430546074 to queue
[stream.hls][debug] Adding segment 430546075 to queue
[stream.hls][debug] Writing segment 430546073 to output
[stream.hls][debug] Segment 430546073 complete
[cli.output][debug] Opening subprocess: ['D:\Programy\VLC\vlc.exe', '--input-title-format', 'https://sport.tvp.pl/79322729/paryz-2024-kajakarstwo-gorskie-judo-tenis-na-zywo-transmisja-online-live-stream-igrzyska-olimpijskie-2872024', '--file-caching=5000', '--no-one-instance', '--play-and-exit', '--qt-minimal-view', '-']
[stream.hls][debug] Writing segment 430546074 to output
[stream.hls][debug] Segment 430546074 complete
[stream.hls][debug] Writing segment 430546075 to output
[stream.hls][debug] Segment 430546075 complete
[cli][debug] Writing stream to output
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Adding segment 430546076 to queue
[stream.hls][debug] Writing segment 430546076 to output
[stream.hls][debug] Segment 430546076 complete
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Adding segment 430546077 to queue
[stream.hls][debug] Writing segment 430546077 to output
[stream.hls][debug] Segment 430546077 complete
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Adding segment 430546078 to queue
[stream.hls][debug] Writing segment 430546078 to output
[stream.hls][debug] Segment 430546078 complete
[stream.segmented][debug] Closing worker thread
[stream.segmented][debug] Closing writer thread
[stream.segmented][debug] Closing writer thread
[cli][info] Stream ended
Interrupted! Exiting...
[cli][info] Closing currently open stream...
(streamlink) PS C:\Users\czys~\venvs\streamlink>

@czarek7711 czarek7711 requested a review from bastimeyer July 28, 2024 16:41
@bastimeyer bastimeyer added the PR: squash commits Commits need to be squashed as a single commit - eg. multiple commits for a single component label Jul 28, 2024
@bastimeyer bastimeyer merged commit b603745 into streamlink:master Jul 28, 2024
23 checks passed
@bastimeyer
Copy link
Member

Thanks

@czarek7711 czarek7711 deleted the tvp_sport branch July 28, 2024 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin enhancement A new feature for a working Plugin PR: squash commits Commits need to be squashed as a single commit - eg. multiple commits for a single component restriction: geo blocked
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants