alexta69 / metube

Self-hosted YouTube downloader (web UI for youtube-dl / yt-dlp)
GNU Affero General Public License v3.0
4k stars 263 forks source link

Help with Youtube-dlp #296

Closed tarunkumar519 closed 12 months ago

tarunkumar519 commented 12 months ago

I cannot make this compose work no matter how much i tweak YTDL_OPTIONS. What is going wrong ? I want to download only first 3 vids on the playlist

version: "3"
services:
  metube:
    image: ghcr.io/alexta69/metube
    container_name: metube
    restart: unless-stopped
    ports:
      - "8081:8081"
    volumes:
      - /portainer/Files:/downloads
    environment:
      - YTDL_OPTIONS={"playlist-items":"1:3"}
PikuZheng commented 12 months ago

playlist_items please

tarunkumar519 commented 12 months ago

Wow that works thankyou. Is there anyway to overwrite files? I know there is force_overwrites but

I download vids as 3 files like 1.mp4, 2.mp4, 3.mp4

whenever there is new vids in playlist the first 3 vids in playlist changes. So i want to overwrite these files with new vids with same names such as 1.mp4, 2.mp4, 3.mp4

PikuZheng commented 12 months ago

I download vids as 3 files like 1.mp4, 2.mp4, 3.mp4

whenever there is new vids in playlist the first 3 vids in playlist changes. So i want to overwrite these files with new vids with same names such as 1.mp4, 2.mp4, 3.mp4

so what's the issue is

tarunkumar519 commented 12 months ago

The issue is, the new vids on the playlist dont replace the older vids. They show up as downloaded in metube web. But the files are not there. The older vids are still there. So there is no overwriting being done?

PikuZheng commented 12 months ago

I don't understand. metube parses the playlist into a queue of individual videos and downloads them. For files with the same name, the newly downloaded one will overwrite the old one.

tarunkumar519 commented 12 months ago

YTDL_OPTIONS={"playlist_items":"1:3","force_overwrites":true} OUTPUT_TEMPLATE=%(playlist_index)s.%(ext)s

This is what i use as env variables for the compose. Playlist items works great. But overwrites dont.

the newer vids in playlist shows up as downloaded inside metube web. But in the files they are not. Its just 1,2,3 files which are old ones. Is this a permissions issue in linux? Or something wrong with above config?

PikuZheng commented 12 months ago

{"playlist_items":"1:3","overwrites":true} works for me

tarunkumar519 commented 12 months ago

Working, well. Thank you. Someone else might get use of this thread. Closing issue