Skip to content

plugins.x: new plugin#6387

Open
bastimeyer wants to merge 1 commit intostreamlink:masterfrom
bastimeyer:plugins/x/init
Open

plugins.x: new plugin#6387
bastimeyer wants to merge 1 commit intostreamlink:masterfrom
bastimeyer:plugins/x/init

Conversation

@bastimeyer
Copy link
Member

New plugin for X.com / Twitter.

Primary goal is live streams. I am not sure if that's still in beta or planned to be added by them at all... If this true, then this won't be merged (yet).

VOD content (videos) from regular tweets are also supported, but authentication is not, so not all content will be accessible. Videos are available as HLSStream (named by video resolution, requires muxing) or as HTTPStream (named by bitrate).


Past live stream (worked fine while it was still live)

$ streamlink --hls-duration=10 -o /dev/null https://x.com/i/broadcasts/1zqKVYPoZaMxB best
[cli][info] Found matching plugin x for URL https://x.com/i/broadcasts/1zqKVYPoZaMxB
[cli][info] Available streams: 224p (worst), 320p, 480p, 720p (best)
[cli][info] Opening stream: 720p (hls)
[cli][info] Writing output to
/dev/null
[stream.hls][info] Stopping stream early after 10
[download] Written 778.98 KiB to /dev/null (0s)
[cli][info] Stream ended
[cli][info] Closing currently open stream...

Video

$ streamlink -o /dev/null https://x.com/github/status/1876756576809201702 best
[cli][info] Found matching plugin x for URL https://x.com/github/status/1876756576809201702
[cli][info] Available streams: 281k (worst), 270p, 812k, 360p, 720p, 2125k, 1080p, 10125k (best)
[cli][info] Opening stream: 10125k (http)
[cli][info] Writing output to
/dev/null
[download] Written 9.24 MiB to /dev/null (0s)
[cli][info] Stream ended
[cli][info] Closing currently open stream...

Video index on tweet with multiple media items

$ streamlink -o /dev/null https://x.com/github/status/1843034290441056629/video/1 best
[cli][info] Found matching plugin x for URL https://x.com/github/status/1843034290441056629/video/1
[cli][info] Available streams: 281k (worst), 270p, 812k, 360p, 720p, 2125k, 1080p, 10125k (best)
[cli][info] Opening stream: 10125k (http)
[cli][info] Writing output to
/dev/null
[download] Written 953.03 KiB to /dev/null (0s)
[cli][info] Stream ended
[cli][info] Closing currently open stream...
$ streamlink -o /dev/null https://x.com/github/status/1843034290441056629/video/2 best
[cli][info] Found matching plugin x for URL https://x.com/github/status/1843034290441056629/video/2
[cli][info] Available streams: 281k (worst), 270p, 812k, 360p, 720p, 2125k, 1080p, 10125k (best)
[cli][info] Opening stream: 10125k (http)
[cli][info] Writing output to
/dev/null
[download] Written 1.92 MiB to /dev/null (0s)
[cli][info] Stream ended
[cli][info] Closing currently open stream...

Invalid tweet

$ streamlink -o /dev/null https://x.com/github/status/0 best
[cli][info] Found matching plugin x for URL https://x.com/github/status/0
error: No playable streams found on this URL: https://x.com/github/status/0

Tweet without a media item

$ streamlink -o /dev/null https://x.com/github/status/1876683973155287309 best
[cli][info] Found matching plugin x for URL https://x.com/github/status/1876683973155287309
error: No playable streams found on this URL: https://x.com/github/status/1876683973155287309

Tweet without video

$ streamlink -o /dev/null https://x.com/github/status/1876044781219942624 best
[cli][info] Found matching plugin x for URL https://x.com/github/status/1876044781219942624
error: No playable streams found on this URL: https://x.com/github/status/1876044781219942624

@bastimeyer bastimeyer added plugin issue A Plugin does not work correctly new plugin and removed plugin issue A Plugin does not work correctly labels Jan 8, 2025
Copy link
Member

@gravyboat gravyboat left a comment

Choose a reason for hiding this comment

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

Don't really agree with adding this plugin based on the direction the site has been going, the fact that this is pretty much still a beta feature, and their erratic behavior when it comes to new features but the code looks fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants