Skip to content
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

Can't Play x.com Videos Anymore #14233

Closed
6 tasks done
InklingGirl opened this issue May 26, 2024 · 20 comments
Closed
6 tasks done

Can't Play x.com Videos Anymore #14233

InklingGirl opened this issue May 26, 2024 · 20 comments
Labels

Comments

@InklingGirl
Copy link

mpv Information

mpv v0.38.0 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
libplacebo version: v6.338.2
FFmpeg version: n7.0
FFmpeg library versions:
   libavutil       59.8.100
   libavcodec      61.3.100
   libavformat     61.1.100
   libswscale      8.1.100
   libavfilter     10.1.100
   libswresample   5.1.100

Other Information

  • Linux version: Ubuntu 22.04.4 LTS (Jammy Jellyfish)
  • Kernel Version: Linux 6.5.0-35-generic
  • GPU Model: 03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Picasso/Raven 2 [Radeon Vega Series / Radeon Vega Mobile Series] [1002:15d8] (rev c2)
  • Mesa/GPU Driver Version: Mesa 23.3.6 - kisak-mesa PPA (LLVM 15.0.7)
  • Window Manager and Version: Wayland window server w/ Mutter 42.9-0ubuntu7.1 video compositor, GNOME 42.9 desktop environment
  • Source mpv: Flatpak via https://flathub.org/apps/io.mpv.Mpv
  • Introduced in version: N/A

Reproduction Steps

mpv <INSERT_ANY_X.COM_URL>

Expected Behavior

For the A/V to play in an mpv borderless window.

Actual Behavior

Video to play[ytdl_hook] ERROR: Unsupported URL: https://x.com/shitposts_mp4/status/1794247036771942564
[ytdl_hook] youtube-dl failed: unexpected error occurred
Failed to recognize file format.

A/V from https://x.com/ URLS does not play, likely because mpv/youtube-dl is still expecting a https://twitter.com/ URL.

Log File

output.txt

Sample Files

No response

I carefully read all instruction and confirm that I did the following:

  • I tested with the latest mpv version to validate that the issue is not already fixed.
  • I provided all required information including system and mpv version.
  • I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of --log-file=output.txt.
  • I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
  • I attached the full, untruncated log file.
  • I attached the backtrace in the case of a crash.
@llyyr
Copy link
Contributor

llyyr commented May 26, 2024

youtube-dl

youtube-dl is unmaintained nowadays, switch to yt-dlp

@InklingGirl
Copy link
Author

I do use yt-dlp.

@llyyr
Copy link
Contributor

llyyr commented May 26, 2024

The commit that adds support for it isn't in any release yet, you need to install the nightly or master branch. yt-dlp/yt-dlp@4813173

Use something like pipx to install yt-dlp, pipx install https://github.com/yt-dlp/yt-dlp/archive/master.tar.gz

Either way not a mpv issue.

@InklingGirl
Copy link
Author

The commit that adds support for it isn't in any release yet, you need to install the nightly or master branch. yt-dlp/yt-dlp@4813173

Use something like pipx to install yt-dlp, pipx install https://github.com/yt-dlp/yt-dlp/archive/master.tar.gz

Either way not a mpv issue.

I did do just that @llyyr but x.com videos still don't won't stream, could it be because I'm using the Flatpak version of mpv?

@llyyr
Copy link
Contributor

llyyr commented May 27, 2024

I did do just that @llyyr but x.com videos still don't won't stream, could it be because I'm using the Flatpak version of mpv?

mpv version shouldn't matter, is mpv using the right yt-dlp executable? You can check with which yt-dlp and whereis yt-dlp

@InklingGirl
Copy link
Author

InklingGirl commented May 27, 2024

So would that be mpv which yt-dlp whereis yt-dlp or mpv which yt-dlp & mpv whereis yt-dlp?

EDIT: I see, just which yt-dlp & whereis yt-dlp:
/home/christian/.local/bin/yt-dlp &
yt-dlp: /home/christian/.local/bin/yt-dlp respectively.

@llyyr
Copy link
Contributor

llyyr commented May 27, 2024

yt-dlp just tagged a new release few hours ago, so you can probably just upgrade to it normally instead of installing from master https://github.com/yt-dlp/yt-dlp/releases/tag/2024.05.26

@InklingGirl
Copy link
Author

Did that & mpv still can't stream from the site, even w/ ytdl-raw-options=cookies=Documents/cookies.txt (& I recently regenerated my cookies file w/ all the new x.com URL login credentials, too).

@llyyr
Copy link
Contributor

llyyr commented May 27, 2024

Did that & mpv still can't stream from the site, even w/ ytdl-raw-options=cookies=Documents/cookies.txt (& I recently regenerated my cookies file w/ all the new x.com URL login credentials, too).

does yt-dlp x.com/something work? If not then it's a yt-dlp issue

@InklingGirl
Copy link
Author

InklingGirl commented May 27, 2024

does yt-dlp x.com/something work? If not then it's a yt-dlp issue

Yeah that works (since fixes from yt-dlp's end), I do it multiple times per day, so it is mpv &/or its interactions w/ yt-dlp.

@llyyr
Copy link
Contributor

llyyr commented May 27, 2024

Can you regenerate the log file with updated yt-dlp? In the previous one, yt-dlp just says the url isn't supported because it wasn't at that version.

@InklingGirl
Copy link
Author

Here you go: output-redux.txt

@llyyr
Copy link
Contributor

llyyr commented May 27, 2024

[   0.651][d][ytdl_hook] Running: yt-dlp --no-warnings -J --flat-playlist --sub-format ass/srt/best --format bestvideo+bestaudio/best --all-subs --no-playlist -- https://x.com/shitposts_mp4/status/1794247036771942564
[   0.651][d][cplayer] Run command: subprocess, flags=64, args=[args="yt-dlp,--no-warnings,-J,--flat-playlist,--sub-format,ass/srt/best,--format,bestvideo+bestaudio/best,--all-subs,--no-playlist,--,https://x.com/shitposts_mp4/status/1794247036771942564", playback_only="yes", capture_size="67108864", capture_stdout="yes", capture_stderr="yes", detach="no", env="", stdin_data="", passthrough_stdin="no"]
[   6.200][v][ytdl_hook] Found youtube-dl with path yt-dlp in PATH
[   6.200][v][ytdl_hook] status: 1
[   6.200][v][ytdl_hook] reason: 
[   6.200][v][ytdl_hook] stdout: null
[   6.200][v][ytdl_hook] 
[   6.200][v][ytdl_hook] stderr: ERROR: Unsupported URL: https://x.com/shitposts_mp4/status/1794247036771942564
[   6.200][v][ytdl_hook] 
[   6.200][e][ytdl_hook] ERROR: Unsupported URL: https://x.com/shitposts_mp4/status/1794247036771942564
[   6.200][e][ytdl_hook] youtube-dl failed: unexpected error occurred

yt-dlp says unsupported URL so you probably have an older yt-dlp shadowing the newer one in your PATH, otherwise this is inexplicable. Not a mpv bug either way

@InklingGirl
Copy link
Author

I have no idea how to fix that. How should I proceed?

@llyyr
Copy link
Contributor

llyyr commented May 27, 2024

Explicitly point mpv to the yt-dlp executable that you know for sure is updated. --script-opts=ytdl_hook-ytdl_path=/home/christian/.local/bin/yt-dlp or wherever it is

@InklingGirl
Copy link
Author

--script-opts=ytdl_hook-ytdl_path=/home/christian/.local/bin/yt-dlp

Is that a command I can just run on its own or appended to mpv?

@llyyr
Copy link
Contributor

llyyr commented May 27, 2024

Is that a command I can just run on its own or appended to mpv?

It's a mpv flag so you run it appended to mpv like mpv --script-opts=..., if it works then you can put it inside your mpv config file later after removing the --

@InklingGirl
Copy link
Author

if it works then you can put it inside your mpv config file later after removing the --

I was going to ask that next. I will try.

@InklingGirl
Copy link
Author

This is the output:

[ytdl_hook] Traceback (most recent call last):
[ytdl_hook]   File "/home/christian/.local/bin/yt-dlp", line 5, in <module>
[ytdl_hook]     from yt_dlp import main
[ytdl_hook] ModuleNotFoundError: No module named 'yt_dlp'
[ytdl_hook] youtube-dl failed: unexpected error occurred
Failed to recognize file format.
Exiting... (Errors when loading file)

@InklingGirl
Copy link
Author

Huh, I regenerated the cookies.txt file & mpv can stream from x.com now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants