axcore / tartube

A GUI front-end for youtube-dl, partly based on youtube-dl-gui and written in Python 3 / Gtk 3
GNU Lesser General Public License v2.1
1.92k stars 105 forks source link

Can Check But Not Download Videos & Other Download Issues #589

Closed Foxxsayy closed 7 months ago

Foxxsayy commented 9 months ago

Thanks for taking the time to submit a bug report! Please include the following information:

What operating system are you using?

Windows 11 Home

What version of Tartube are you using?

v2.4.412 w/latest downloader updates.

If your bug report is "I can't download this video", please provide a link to the video

This will save a lot of time!

When first installed, either some videos will download or only some videos work and others don't. After that it seems like nothing will download. Classic downloads still work. When trying to download normally, everything finishes quickly with the following message:

image (Or it has videos checked: , Videos Downloaded: 0)

Typically there are no download warnings after this. I did get some errors in the logs when I tried to install and download with YouTube-dlp with dependencies. YouTube-dlp with dependencies fails to install and throws the logs shown.

After trying to install Youtube-dlp with dependencies the message changed, even when I tried to revert. As you can see, I have added all of the exceptions I can think of to Windows security Center, and I also tried adding ffmpeg to PATHs as well, although I'm not sure what version that is as Chocolatey installed it. Screenshots and logs listed below.

After downloading videos, Youtube dlp with withOUT dependencies

image

Error logs afterwards:

image

### After trying to install youtube-dlp WITH dependencies (even when using youtube-dlp without dependencies again): image

Sometimes the errors/warnings are blank again, I'm not sure whether this was the output after a video download attempt or a youtube-dlp update that I've gotten this (I think it was after a youtube-dlp with dependencies update):

image

Update Youtube-dlp WITH dependencies

Starting update operation, installing/updating yt-dlp
..\..\..\mingw64\bin\python3.exe ..\..\..\mingw64\bin\pip3-script.py install --upgrade yt-dlp
Requirement already satisfied: yt-dlp in c:/program files custom/tartube/msys64/mingw64/lib/python3.11/site-packages (2023.7.6)
  Obtaining dependency information for mutagen from https://files.pythonhosted.org/packages/b0/7a/620f945b96be1f6ee357d211d5bf74ab1b7fe72a9f1525aafbfe3aee6875/mutagen-1.47.0-py3-none-any.whl.metadata
Collecting mutagen (from yt-dlp)
  Using cached mutagen-1.47.0-py3-none-any.whl.metadata (1.7 kB)
Collecting pycryptodomex (from yt-dlp)
  Using cached pycryptodomex-3.18.0.tar.gz (4.6 MB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting websockets (from yt-dlp)
  Using cached websockets-11.0.3-py3-none-any.whl (118 kB)
Requirement already satisfied: certifi in c:/program files custom/tartube/msys64/mingw64/lib/python3.11/site-packages (from yt-dlp) (2023.5.7)
Collecting brotli (from yt-dlp)
  Using cached Brotli-1.1.0.tar.gz (7.4 MB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'

                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
             ^^^^^^^^^^^^^^^^^^^^^
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      exec(code, locals())
      json_out['return_val'] = hook(**hook_input['kwargs'])
      main()
      return hook(config_settings)
      return self._get_build_requires(config_settings, requirements=['wheel'])
      self.run_setup()
    File "<string>", line 9, in <module>
    File "C:/Program Files Custom/Tartube/msys64/mingw64/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
    File "C:/Program Files Custom/Tartube/msys64/mingw64/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
    File "C:/Program Files Custom/Tartube/msys64/mingw64/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
    File "C:/Program Files Custom/Tartube/msys64/tmp/pip-build-env-7qcdjemx/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
    File "C:/Program Files Custom/Tartube/msys64/tmp/pip-build-env-7qcdjemx/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in run_setup
    File "C:/Program Files Custom/Tartube/msys64/tmp/pip-build-env-7qcdjemx/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
  Getting requirements to build wheel did not run successfully.
  ModuleNotFoundError: No module named 'unittest'
  Traceback (most recent call last):
  [18 lines of output]
  [end of output]
  error: subprocess-exited-with-error
  exit code: 1
  note: This error originates from a subprocess, and is likely not a problem with pip.

error: subprocess-exited-with-error

Getting requirements to build wheel did not run successfully.
See above for output.
exit code: 1
note: This error originates from a subprocess, and is likely not a problem with pip.
Child process exited with non-zero code: 1
Update operation finished

Outputs

yt-dlp --newline -i --hls-prefer-native --write-description --write-info-json --write-annotations --cookies "L:/Program Databases SP8/CyberSecTartubeDb/cookies.txt" --write-thumbnail -f bestvideo[height<=?1440]+bestaudio/best[height<=?1440] --write-sub --windows-filenames --trim-filenames 256 --sub-lang en --output "L:/Program Databases SP8/CyberSecTartubeDb/Cybersec - Learning/Protocols - TCP-IP, ARP, etc/%(title)s-%(channel)s-%(release_date)s.%(ext)s" --download-archive "L:/Program Databases SP8/CyberSecTartubeDb/Cybersec - Learning/Protocols - TCP-IP, ARP, etc/ytdl-archive.txt" https://www.youtube.com/watch?v=ILErlaRp5cs
[Youtube] ILErlaRp5cs: has already been recorded in the archive
yt-dlp --newline -i --hls-prefer-native --write-description --write-info-json --write-annotations --cookies "L:/Program Databases SP8/CyberSecTartubeDb/cookies.txt" --write-thumbnail -f bestvideo[height<=?1440]+bestaudio/best[height<=?1440] --write-sub --windows-filenames --trim-filenames 256 --sub-lang en --output "L:/Program Databases SP8/CyberSecTartubeDb/Cybersec - Learning/Protocols - TCP-IP, ARP, etc/%(title)s-%(channel)s-%(release_date)s.%(ext)s" --download-archive "L:/Program Databases SP8/CyberSecTartubeDb/Cybersec - Learning/Protocols - TCP-IP, ARP, etc/ytdl-archive.txt" https://www.youtube.com/watch?v=d-zn-wv4Di8
[Youtube] d-zn-wv4Di8: has already been recorded in the archive
yt-dlp --newline -i --hls-prefer-native --write-description --write-info-json --write-annotations --cookies "L:/Program Databases SP8/CyberSecTartubeDb/cookies.txt" --write-thumbnail -f bestvideo[height<=?1440]+bestaudio/best[height<=?1440] --write-sub --windows-filenames --trim-filenames 256 --sub-lang en --output "L:/Program Databases SP8/CyberSecTartubeDb/Cybersec - Learning/Protocols - TCP-IP, ARP, etc/%(title)s-%(channel)s-%(release_date)s.%(ext)s" --download-archive "L:/Program Databases SP8/CyberSecTartubeDb/Cybersec - Learning/Protocols - TCP-IP, ARP, etc/ytdl-archive.txt" https://www.youtube.com/watch?v=CsektxtqA8c
[Youtube] CsektxtqA8c: has already been recorded in the archive
yt-dlp --newline -i --hls-prefer-native --write-description --write-info-json --write-annotations --cookies "L:/Program Databases SP8/CyberSecTartubeDb/cookies.txt" --write-thumbnail -f bestvideo[height<=?1440]+bestaudio/best[height<=?1440] --write-sub --windows-filenames --trim-filenames 256 --sub-lang en --output "L:/Program Databases SP8/CyberSecTartubeDb/Cybersec - Learning/Protocols - TCP-IP, ARP, etc/%(title)s-%(channel)s-%(release_date)s.%(ext)s" --download-archive "L:/Program Databases SP8/CyberSecTartubeDb/Cybersec - Learning/Protocols - TCP-IP, ARP, etc/ytdl-archive.txt" https://www.youtube.com/watch?v=a-zYm2KzqHQ
[Youtube] a-zYm2KzqHQ: has already been recorded in the archive
yt-dlp --newline -i --hls-prefer-native --write-description --write-info-json --write-annotations --cookies "L:/Program Databases SP8/CyberSecTartubeDb/cookies.txt" --write-thumbnail -f bestvideo[height<=?1440]+bestaudio/best[height<=?1440] --write-sub --windows-filenames --trim-filenames 256 --sub-lang en --output "L:/Program Databases SP8/CyberSecTartubeDb/Cybersec - Learning/Protocols - TCP-IP, ARP, etc/%(title)s-%(channel)s-%(release_date)s.%(ext)s" --download-archive "L:/Program Databases SP8/CyberSecTartubeDb/Cybersec - Learning/Protocols - TCP-IP, ARP, etc/ytdl-archive.txt" https://www.youtube.com/watch?v=_IOZ8_cPgu8
[Youtube] _IOZ8_cPgu8: has already been recorded in the archive
yt-dlp --newline -i --hls-prefer-native --write-description --write-info-json --write-annotations --cookies "L:/Program Databases SP8/CyberSecTartubeDb/cookies.txt" --write-thumbnail -f bestvideo[height<=?1440]+bestaudio/best[height<=?1440] --write-sub --windows-filenames --trim-filenames 256 --sub-lang en --output "L:/Program Databases SP8/CyberSecTartubeDb/Cybersec - Learning/Protocols - TCP-IP, ARP, etc/%(title)s-%(channel)s-%(release_date)s.%(ext)s" --download-archive "L:/Program Databases SP8/CyberSecTartubeDb/Cybersec - Learning/Protocols - TCP-IP, ARP, etc/ytdl-archive.txt" https://www.youtube.com/watch?v=UNrg38_I6oA
[Youtube] UNrg38_I6oA: has already been recorded in the archive
yt-dlp --newline -i --hls-prefer-native --write-description --write-info-json --write-annotations --cookies "L:/Program Databases SP8/CyberSecTartubeDb/cookies.txt" --write-thumbnail -f bestvideo[height<=?1440]+bestaudio/best[height<=?1440] --write-sub --windows-filenames --trim-filenames 256 --sub-lang en --output "L:/Program Databases SP8/CyberSecTartubeDb/Cybersec - Learning/Protocols - TCP-IP, ARP, etc/%(title)s-%(channel)s-%(release_date)s.%(ext)s" --download-archive "L:/Program Databases SP8/CyberSecTartubeDb/Cybersec - Learning/Protocols - TCP-IP, ARP, etc/ytdl-archive.txt" https://www.youtube.com/watch?v=ojT2Iza0I00
[Youtube] ojT2Iza0I00: has already been recorded in the archive
yt-dlp --newline -i --hls-prefer-native --write-description --write-info-json --write-annotations --cookies "L:/Program Databases SP8/CyberSecTartubeDb/cookies.txt" --write-thumbnail -f bestvideo[height<=?1440]+bestaudio/best[height<=?1440] --write-sub --windows-filenames --trim-filenames 256 --sub-lang en --output "L:/Program Databases SP8/CyberSecTartubeDb/Cybersec - Learning/Protocols - TCP-IP, ARP, etc/%(title)s-%(channel)s-%(release_date)s.%(ext)s" --download-archive "L:/Program Databases SP8/CyberSecTartubeDb/Cybersec - Learning/Protocols - TCP-IP, ARP, etc/ytdl-archive.txt" https://www.youtube.com/watch?v=b9HafRqtVWc
[Youtube] b9HafRqtVWc: has already been recorded in the archive
axcore commented 9 months ago

I can't install yt-dlp

First thing to do, is to try my "official" installer. It should work independently of anything you have installed with chocolatery.

For 99.9% of users, there is no need to install yt-dlp with "dependencies". So don't do that.

I can't download videos

Try downloading a single URL, then show me the contents of the Output tab, including the yellow text at the top.

"has already been recorded in the archive" error

Open the downloads folder (in this case, L:/Program Databases SP8/CyberSecTartubeDb/Cybersec - Learning/Protocols - TCP-IP, ARP, etc/) and delete the file ytdl-archive.txt

Foxxsayy commented 9 months ago

I'm fairly certain I used the official Git Hub installer. I also removed and reinstalled with the exact same issues, and there's no ytdl-archive.txt anywhere in the database location.

Right mouse click 1 video --> Download Output. image

yt-dlp --newline -i --hls-prefer-native --write-description --write-info-json --write-annotations --cookies "C:/Users/Sekiiro/OneDrive/OneDrive Program Databases/TarTube/Cybersec TT db (OneDrive)/cookies.txt" --write-thumbnail -f bestvideo[height<=?1440]+bestaudio/best[height<=?1440] --merge-output-format mkv --write-sub --windows-filenames --trim-filenames 256 --sub-lang en --output "C:/Users/Sekiiro/OneDrive/OneDrive Program Databases/TarTube/Cybersec TT db (OneDrive)/Cybersec - Learning/Protocols - TCP-IP, ARP, etc/%(title)s-%(channel)s-%(playlist)s-%(release_date)s.%(ext)s" --dump-json --download-archive "C:/Users/Sekiiro/OneDrive/OneDrive Program Databases/TarTube/Cybersec TT db (OneDrive)/Cybersec - Learning/Protocols - TCP-IP, ARP, etc/ytdl-archive.txt" https://www.youtube.com/watch?v=E5bSumTAHZE
[Protocols - TCP-IP, ARP, etc] <Simulated download of: 'Network Protocols - ARP, FTP, SMTP, HTTP, SSL, TLS, HTTPS, DNS, DHCP - Networking Fundamentals - L6-Practical Networking'>
axcore commented 9 months ago

I'm fairly certain I used the official Git Hub installer

I just re-read your first post. I thought that you had installed Tartube with chocolatery. If you in fact installed FFmpeg with chocolatery, then that version will not work with Tartube. You must install the MSYS2 version of FFmpeg via Tartube's menu.

From your screenshot, I can see that yt-dlp is in simulation mode, which is why no videos are downloading. Make sure you have not disabled downloads for the channel: right-click the channel, and make sure that neither Downloads > Disable checking/downloading nor Downloads > Just disable downloading are selected.

(When downloads are disabled, a red icon appears next to the channel name, like this:)

practical

Foxxsayy commented 9 months ago

I deleted the ffmpeg from Chocolatey, one I found in C:\ffmpeg, and anything for ffmpeg in PATHS, and it seems like we're in business. Seems like Tartube will call on external or system ffmpeg install before it's own? Can I install ffmpeg globally and still use TarTube?

axcore commented 9 months ago

You should be able to specify the path to the correct FFmpeg.

Edit > System preferences... If the Show advanced preferences button is visible, click it Click the tab Downloads > FFmpeg/AVConv Next to the text Path to the FFmpeg executable, click the Set button

For you, the FFmpeg executable should be C:/Program Files Custom/Tartube/msys64/mingww64/bin/ffmpeg.exe

If that path is set correctly, it shouldn't be necessary to uninstall other version of FFmpeg, such as the chocolatey one (but I haven't tested that today.)

Foxxsayy commented 9 months ago

Thanks. I found the option, but it's grayed out and won't let me select anything. I do have FFmpeg installed, and I successfully updated/installed it again (menu option still says install), but it's the same.

image

It seems to be in the TarTube directory as well.

image

Foxxsayy commented 9 months ago

Sorry to piggyback this - but can I ask if it's possible to store the videos in a folder that's separate from the database? I'd like to use my cloud drive to keep the database, but a physical drive to keep the videos.

axcore commented 9 months ago

I found the option, but it's grayed out and won't let me select anything.

Oops, I forgot about that! I have tweaked the code to re-enable the buttons. You can download today's release from here on github, and then use it to completely replace the old folder C:/Program Files Custom/Tartube/msys64/home/user/tartube

Sorry to piggyback this - but can I ask if it's possible to store the videos in a folder that's separate from the database?

It's possible, though some users report problems when yt-dlp is installed on one hard drive, but saving videos to another. I haven't tested your specific situation, in which yt-dlp and the videos are on hard drive 1, but the download folder (containing the database file) is on hard drive 2.

See here and here.

axcore commented 7 months ago

The changes mentioned above were added in v2.4.429.