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

mpv yt-dlp cookies fail #15578

Open
6 tasks done
Flashwalker opened this issue Dec 26, 2024 · 0 comments
Open
6 tasks done

mpv yt-dlp cookies fail #15578

Flashwalker opened this issue Dec 26, 2024 · 0 comments
Labels

Comments

@Flashwalker
Copy link

Flashwalker commented Dec 26, 2024

mpv Information

mpv 0.38.0 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
 built on May 26 2024 13:22:41
libplacebo version: v7.349.0
FFmpeg version: 7.0.1
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:
PRETTY_NAME="KDE neon 6.2"
NAME="KDE neon"
VERSION_CODENAME=noble
UBUNTU_CODENAME=noble

- Kernel Version:
Linux redtop 6.12.5-x64v3-xanmod1 #0~20241215.gec9141f SMP PREEMPT_DYNAMIC Sun Dec 15 05:06:43 UTC x86_64 x86_64 x86_64 GNU/Linux

- GPU Model:
00:02.0 VGA compatible controller [0300]: Intel Corporation Meteor Lake-P [Intel Arc Graphics] [8086:7d55] (rev 08)

- Mesa/GPU Driver Version:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 24.3.0.20240801-2119~24.04 (git-9fc8668b66)

- Window Manager and Version:
kwin 6.2.4

- Source of mpv:
http://apt.fruit.je/ubuntu noble/mpv amd64

- Latest known working version:
That was a long time ago

- Issue started after the following happened:
mpv update

Reproduction Steps

If i want mpv and yt-dlp to use the same cookies file,
i create the cookies file like this (-u option generates the filename only without the actual file touch):

## Set cookies file:
cookies_file="$(mktemp -u ${TMPDIR:-/tmp/}youtube-cookies.XXXXXX)"

and then i run:

mpv --stop-screensaver --ytdl --script-opts=ytdl_hook-use_manifests=yes --script-opts=ytdl_hook-ytdl_path="/home/user/.local/bin/yt-dlp" --ytdl-raw-options=cookies=/tmp/youtube-cookies.sK94Qx --cookies=yes --cookies-file=/tmp/youtube-cookies.sK94Qx --alang=ru,uk,en,us --slang=ru,uk,en,us --ytdl-format='bestvideo[width<=854]+bestaudio/135+bestaudio' --vd-lavc-threads=22 --vd-lavc-skiploopfilter=all --sub-codepage=enca:ru:UTF-8 --msg-level=all=status 'https://youtu.be/aGpVwlY_nO8'

i get the mpv error like this:

[file] Cannot open file '/tmp/youtube-cookies.sK94Qx': No such file or directory
Failed to open /tmp/youtube-cookies.sK94Qx.

But if i create the cookies file like this (without the -u option, so with the actual creation of the file):

## Set cookies file:
cookies_file="$(mktemp ${TMPDIR:-/tmp/}youtube-cookies.XXXXXX)"

and then i run:

mpv --stop-screensaver --ytdl --script-opts=ytdl_hook-use_manifests=yes --script-opts=ytdl_hook-ytdl_path="/home/user/.local/bin/yt-dlp" --ytdl-raw-options=cookies=/tmp/youtube-cookies.kKC3wt --cookies=yes --cookies-file=/tmp/youtube-cookies.kKC3wt --alang=ru,uk,en,us --slang=ru,uk,en,us --ytdl-format='bestvideo[width<=854]+bestaudio/135+bestaudio' --vd-lavc-threads=22 --vd-lavc-skiploopfilter=all --sub-codepage=enca:ru:UTF-8 --msg-level=all=status 'https://youtu.be/aGpVwlY_nO8'

i get the yt-dlp error like this:

[ytdl_hook] ERROR: '/tmp/youtube-cookies.kKC3wt' does not look like a Netscape format cookies file
[ytdl_hook] ERROR: '/tmp/youtube-cookies.kKC3wt' does not look like a Netscape format cookies file
[ytdl_hook] youtube-dl failed: unexpected error occurred
Failed to recognize file format.
Exiting... (Errors when loading file)

Expected Behavior

mpv eats the cookieless cookie

Actual Behavior

mpv won't eat the cookieless cookie

Log File

unnecessary

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.
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

1 participant