WinError 2 when trying to run
dougyp opened this issue ยท 3 comments
๐ Bug Report
I am running on a Windows 10 machine with gitbash. I installed the software and no errors during installation. When I run it, it never did ask for the cookie (first problem)
But when I try to run it for any URL at xvideos it gives the video name, video page, resolution, etc. and then an error. Here is the output with one random sample:
$ xvideos-dl https://www.xvideos.com/video65461739/madison_summers_step_brother_cums_in_his_pants
Downloading: โ
Video ID : 65461739
Video Name : Madison Summers Step Brother Cums In His Pants
Video Page : https://www.xvideos.com/video65461739/_
Resolution : 720p @ 1280x720
Destination: C:\Users\doug\Downloads\xvideos\Madison Summers Step Brother Cums
In His Pants(#65461739).mp4
[WinError 2] The system cannot find the file specified
๐ฌ How To Reproduce
Steps to reproduce the behavior:
- Run xvideo-dl from the command prompt
Code sample
Environment
- OS: [e.g. Linux / Windows / macOS] Windows 10 running gitbash
- Python version, get it with: Python version 3.7.0
python --version
Screenshots
๐ Expected behavior
I hoped it would create a file. It does create ./xvideos folder.
๐ Additional context
When I ran it, it never asked for the cookie like the instructions said it would. I did finally create a file ~/.xvideo/cookie and pasted "session_token=". But that made no difference.
Hello @dougyp, thank you for your interest in our work!
If this is a bug report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.
The cause of the error is that the ffmpeg
command was not found. Refer to the following steps to install it and set environment variables:
- Download a built windows package from https://ffmpeg.org/download.html#build-windows, an available: https://www.gyan.dev/ffmpeg/builds/ffmpeg-git-essentials.7z
- Unzip it to anywhere. For example: G:\Downloads\Develop\ffmpeg-2021-12-02-git-4a6aece703-essentials_build
- Run following two command on CMD or GItBash to add ffmpeg
bin folder
to environment variables. Theset
command only sets the environment variable for the current session. Thesetx
command sets it permanently. Or you can set on Settings Window, refer here.
set PATH="%PATH%;G:\Downloads\Develop\ffmpeg-2021-12-02-git-4a6aece703-essentials_build\bin"
setx PATH "%PATH%;G:\Downloads\Develop\ffmpeg-2021-12-02-git-4a6aece703-essentials_build\bin"
In addition, downloading a single video via ffmpeg does not require cookies, so this is not a problem.