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

Subtitles not downloading #305

Closed drd2aiki closed 11 months ago

drd2aiki commented 11 months ago

Using this string in my docker-compose file:

- YTDL_OPTIONS={"writesubtitles":true,"allsubtitles":true,"subtitleslangs":["en","-live_chat"],"updatetime":false,"postprocessors":[{"key":"Exec","exec_cmd":"chmod 0664","when":"after_move"},{"key":"FFmpegEmbedSubtitle","already_have_subtitle":false},{"key":"FFmpegMetadata","add_chapters":true}]}

But I still cannot get subtitles to download with the video/audio. What am I doing wrong?

PikuZheng commented 11 months ago

I suspect that YTDL_OPTIONS is not properly configured. Due to https://github.com/alexta69/metube/issues/303#issuecomment-1650666547, try changing array to object please.

drd2aiki commented 11 months ago

I've reviewed that thread (#303) and I'm not sure what you mean. I'm running Metube through Docker. Here's my compose file:

version: "3.6"
services:
  metube:
    container_name: metube
    image: alexta69/metube:latest
    environment:
      - TZ=America/New_York
      - UMASK_SET=022
      - PUID=1005
      - PGID=100
      - DELETE_FILE_ON_TRASHCAN=true
      - DOWNLOAD_DIR=/downloads
      - STATE_DIR=/downloads/.metube
      - YTDL_OPTIONS={"writesubtitles":true,"verbose":true,"allsubtitles":true,"subtitleslangs":["en","-live_chat"],"updatetime":false,"postprocessors":[{"key":"Exec","exec_cmd":"chmod 0664","when":"after_move"},{"key":"FFmpegEmbedSubtitle","already_have_subtitle":false},{"key":"FFmpegMetadata","add_chapters":true}]}
    logging:
      driver: json-file
      options: {}
    ports:
      - 8081:8081/tcp
    restart: unless-stopped
    volumes:
      - /mnt/data/media/metube:/downloads
      - /etc/localtime:/etc/localtime:ro
    working_dir: /app

Is my YTDL_OPTIONS line incorrect?

Thank you!

PikuZheng commented 11 months ago

Using the compose you provided, it looks like everything works fine

image

try this video if you like https://www.youtube.com/watch?v=yG8sFwBISVU

drd2aiki commented 11 months ago

Yes. That worked! Awesome, thank you so much.