Open TeomanEgeSelcuk opened 1 month ago
3. Run the following Docker command:
docker run -d -p 8081:8081 --name metube_yt_downloader -v C:\path\to\downloads:/downloads -e YTDL_OPTIONS="{\"writesubtitles\":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}]}" ghcr.io/alexta69/metube
works fine with my linux my suggestion is writing it to a text file and using YTDL_OPTIONS_FILE
Is there a way to configure it so that the subtitles will be of the extension as subtitle files (e.g., .srt, .vtt). It creates meta subtitles for me, but I am trying to use it in VLC media player in Windows 11 and I'm not able to get the subtitles to work correctly. Also, thanks for the help. Much appreciated.
you can convert the format of the subtitle after download with postprocessers like
YTDL_OPTIONS={"postprocessors": [{"format": "srt", "key": "FFmpegSubtitlesConvertor", when": "before_dl"}]}
Despite trying the suggested solutions, I still could not get the subtitles to work. The videos are downloaded fine in the quality and format that I like, but the subtitle functionality is not working as expected.
I attempted the following methods:
JSON File Integration: Created a JSON file with the following content:
{
"writesubtitles": 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
},
{
"key": "FFmpegSubtitlesConvertor",
"format": "srt",
"when": "before_dl"
}
]
}
Placed this file in the directory C:\Users\...\ytdl_options.json
and ran the following Docker command:
docker run -d -p 8081:8081 --name metube_yt_downloader -v C:\Users\...\Downloaded-YT-Vids:/downloads -v C:\Users\...\ytdl_options.json:/app/ytdl_options.json -e YTDL_OPTIONS_FILE=/app/ytdl_options.json ghcr.io/alexta69/metube
Direct JSON String in Docker Command: Attempted to pass the JSON string directly in the Docker command as follows:
docker run -d -p 8081:8081 --name metube_yt_downloader -v C:\Users\...\Downloaded-YT-Vids:/downloads -e YTDL_OPTIONS="{\"writesubtitles\":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},{\"key\":\"FFmpegSubtitlesConvertor\",\"format\":\"srt\",\"when\":\"before_dl\"}]}" ghcr.io/alexta69/metube
Both methods resulted in the same issue where subtitles are not working, while the videos are downloaded correctly.
Any further guidance on resolving the subtitle issue would be greatly appreciated. Thank you!
with -live_chat
, please confirm that the video is live streaming now.
on the other hand, you can set YTDL_OPTIONS={"verbose":true}
to see detailed debug logs. also you can use yt-dlp --list-subs https://www.youtube.com/watch?v=xxxxxx
to check which subtitle is available for the video.
I am having this same problem. I am running MeTube in Docker on Unraid, I added the variable as described in the documentation but it's saying that YTDL_OPTIONS is invalid.
In the Value field put only the value, you don't need YTDL_OPTIONS=
, and likely you don't need the quotes either.
Issue Description:
I am experiencing an issue with setting the
YTDL_OPTIONS
environment variable to download subtitles when running the MeTube Docker container. Despite following the documentation, the container exits immediately with the errorYTDL_OPTIONS is invalid
.Steps to Reproduce:
C:\path\to\downloads
.Expected Behavior:
The container should run successfully, allowing videos to be downloaded with embedded English subtitles.
Actual Behavior:
The container exits immediately with the error message:
Additional Information:
Logs:
Environment:
ghcr.io/alexta69/metube
Attempts to Resolve:
YTDL_OPTIONS
JSON string.YTDL_OPTIONS
might not be correctly interpreted by Docker.Request:
Could you provide guidance on the correct format for the
YTDL_OPTIONS
environment variable when using Docker on Windows? Any help in resolving this issue would be greatly appreciated.References:
Thank you!