Giter Site home page Giter Site logo

alexta69 / metube Goto Github PK

View Code? Open in Web Editor NEW
3.6K 30.0 237.0 4.63 MB

Self-hosted YouTube downloader (web UI for youtube-dl / yt-dlp)

License: GNU Affero General Public License v3.0

Python 38.44% JavaScript 4.39% HTML 17.05% TypeScript 35.54% Dockerfile 1.50% Sass 1.99% Shell 1.10%
youtube-dl self-hosted youtube yt-dlp

metube's Introduction

MeTube

NOTE: 32-bit ARM builds have been retired (a full year after other major players), as new Node versions don't support them, and continued security updates and dependencies require new Node versions. Please migrate to a 64-bit OS to continue receiving MeTube upgrades.

Build Status Docker Pulls

Web GUI for youtube-dl (using the yt-dlp fork) with playlist support. Allows you to download videos from YouTube and dozens of other sites.

screenshot1

Run using Docker

docker run -d -p 8081:8081 -v /path/to/downloads:/downloads ghcr.io/alexta69/metube

Run using docker-compose

version: "3"
services:
  metube:
    image: ghcr.io/alexta69/metube
    container_name: metube
    restart: unless-stopped
    ports:
      - "8081:8081"
    volumes:
      - /path/to/downloads:/downloads

Configuration via environment variables

Certain values can be set via environment variables, using the -e parameter on the docker command line, or the environment: section in docker-compose.

  • UID: user under which MeTube will run. Defaults to 1000.
  • GID: group under which MeTube will run. Defaults to 1000.
  • UMASK: umask value used by MeTube. Defaults to 022.
  • DEFAULT_THEME: default theme to use for the ui, can be set to light, dark or auto. Defaults to auto.
  • DOWNLOAD_DIR: path to where the downloads will be saved. Defaults to /downloads in the docker image, and . otherwise.
  • AUDIO_DOWNLOAD_DIR: path to where audio-only downloads will be saved, if you wish to separate them from the video downloads. Defaults to the value of DOWNLOAD_DIR.
  • DOWNLOAD_DIRS_INDEXABLE: if true, the download dirs (DOWNLOAD_DIR and AUDIO_DOWNLOAD_DIR) are indexable on the webserver. Defaults to false.
  • CUSTOM_DIRS: whether to enable downloading videos into custom directories within the DOWNLOAD_DIR (or AUDIO_DOWNLOAD_DIR). When enabled, a drop-down appears next to the Add button to specify the download directory. Defaults to true.
  • CREATE_CUSTOM_DIRS: whether to support automatically creating directories within the DOWNLOAD_DIR (or AUDIO_DOWNLOAD_DIR) if they do not exist. When enabled, the download directory selector becomes supports free-text input, and the specified directory will be created recursively. Defaults to true.
  • STATE_DIR: path to where the queue persistence files will be saved. Defaults to /downloads/.metube in the docker image, and . otherwise.
  • TEMP_DIR: path where intermediary download files will be saved. Defaults to /downloads in the docker image, and . otherwise.
    • Set this to an SSD or RAM filesystem (e.g., tmpfs) for better performance
    • Note: Using a RAM filesystem may prevent downloads from being resumed
  • DELETE_FILE_ON_TRASHCAN: if true, downloaded files are deleted on the server, when they are trashed from the "Completed" section of the UI. Defaults to false.
  • URL_PREFIX: base path for the web server (for use when hosting behind a reverse proxy). Defaults to /.
  • OUTPUT_TEMPLATE: the template for the filenames of the downloaded videos, formatted according to this spec. Defaults to %(title)s.%(ext)s.
  • OUTPUT_TEMPLATE_CHAPTER: the template for the filenames of the downloaded videos, when split into chapters via postprocessors. Defaults to %(title)s - %(section_number)s %(section_title)s.%(ext)s.
  • YTDL_OPTIONS: Additional options to pass to youtube-dl, in JSON format. See available options here. They roughly correspond to command-line options, though some do not have exact equivalents here, for example --recode-video has to be specified via postprocessors. Also note that dashes are replaced with underscores.
  • YTDL_OPTIONS_FILE: A path to a JSON file that will be loaded and used for populating YTDL_OPTIONS above. Please note that if both YTDL_OPTIONS_FILE and YTDL_OPTIONS are specified, the options in YTDL_OPTIONS take precedence.

The following example value for YTDL_OPTIONS embeds English subtitles and chapter markers (for videos that have them), and also changes the permissions on the downloaded video and sets the file modification timestamp to the date of when it was downloaded:

    environment:
      - '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}]}'

The following example value for OUTPUT_TEMPLATE sets:

  • playlist name and author, if present
  • playlist number and count, if present (zero-padded, if needed)
  • video author, title and release date in YYYY-MM-DD format, falling back to UNKNOWN_... if missing
  • sanitises everything for valid UNIX filename
    environment:
      - 'OUTPUT_TEMPLATE=%(playlist_title&Playlist |)S%(playlist_title|)S%(playlist_uploader& by |)S%(playlist_uploader|)S%(playlist_autonumber& - |)S%(playlist_autonumber|)S%(playlist_count& of |)S%(playlist_count|)S%(playlist_autonumber& - |)S%(uploader,creator|UNKNOWN_AUTHOR)S - %(title|UNKNOWN_TITLE)S - %(release_date>%Y-%m-%d,upload_date>%Y-%m-%d|UNKNOWN_DATE)S.%(ext)s'

Using browser cookies

In case you need to use your browser's cookies with MeTube, for example to download restricted or private videos:

  • Add the following to your docker-compose.yml:
    volumes:
      - /path/to/cookies:/cookies
    environment:
      - YTDL_OPTIONS={"cookiefile":"/cookies/cookies.txt"}
  • Install in your browser an extension to extract cookies:
  • Extract the cookies you need with the extension and rename the file cookies.txt
  • Drop the file in the folder you configured in the docker-compose.yml above
  • Restart the container

Browser extensions

Browser extensions allow right-clicking videos and sending them directly to MeTube. Please note that if you're on an HTTPS page, your MeTube instance must be behind an HTTPS reverse proxy (see below) for the extensions to work.

Chrome: contributed by Rpsl. You can install it from Google Chrome Webstore or use developer mode and install from sources.

Firefox: contributed by nanocortex. You can install it from Firefox Addons or get sources from here.

iOS Shortcut

rithask has created an iOS shortcut to send the URL to MeTube from Safari. Initially, you'll need to enter the server address and port, but after that, it will be saved and you can just run the shortcut from the share menu in Safari. The address should include the protocol (http/https) and the port, if it's not the default 80/443. For example: https://metube.example.com or http://192.168.1.1:8081. The shortcut can be found here.

Bookmarklet

kushfest has created a Chrome bookmarklet for sending the currently open webpage to MeTube. Please note that if you're on an HTTPS page, your MeTube instance must be behind an HTTPS reverse proxy (see below) for the bookmarklet to work.

GitHub doesn't allow embedding JavaScript as a link, so the bookmarklet has to be created manually by copying the following code to a new bookmark you create on your bookmarks bar. Change the hostname in the URL below to point to your MeTube instance.

javascript:!function(){xhr=new XMLHttpRequest();xhr.open("POST","https://metube.domain.com/add");xhr.send(JSON.stringify({"url":document.location.href,"quality":"best"}));xhr.onload=function(){if(xhr.status==200){alert("Sent to metube!")}else{alert("Send to metube failed. Check the javascript console for clues.")}}}();

shoonya75 has contributed a Firefox version:

javascript:(function(){xhr=new XMLHttpRequest();xhr.open("POST","https://metube.domain.com/add");xhr.send(JSON.stringify({"url":document.location.href,"quality":"best"}));xhr.onload=function(){if(xhr.status==200){alert("Sent to metube!")}else{alert("Send to metube failed. Check the javascript console for clues.")}}})();

The above bookmarklets use alert() as a success/failure notification. The following will show a toast message instead:

Chrome:

javascript:!function(){function notify(msg) {var sc = document.scrollingElement.scrollTop; var text = document.createElement('span');text.innerHTML=msg;var ts = text.style;ts.all = 'revert';ts.color = '#000';ts.fontFamily = 'Verdana, sans-serif';ts.fontSize = '15px';ts.backgroundColor = 'white';ts.padding = '15px';ts.border = '1px solid gainsboro';ts.boxShadow = '3px 3px 10px';ts.zIndex = '100';document.body.appendChild(text);ts.position = 'absolute'; ts.top = 50 + sc + 'px'; ts.left = (window.innerWidth / 2)-(text.offsetWidth / 2) + 'px'; setTimeout(function () { text.style.visibility = "hidden"; }, 1500);}xhr=new XMLHttpRequest();xhr.open("POST","https://metube.domain.com/add");xhr.send(JSON.stringify({"url":document.location.href,"quality":"best"}));xhr.onload=function() { if(xhr.status==200){notify("Sent to metube!")}else {notify("Send to metube failed. Check the javascript console for clues.")}}}();

Firefox:

javascript:(function(){function notify(msg) {var sc = document.scrollingElement.scrollTop; var text = document.createElement('span');text.innerHTML=msg;var ts = text.style;ts.all = 'revert';ts.color = '#000';ts.fontFamily = 'Verdana, sans-serif';ts.fontSize = '15px';ts.backgroundColor = 'white';ts.padding = '15px';ts.border = '1px solid gainsboro';ts.boxShadow = '3px 3px 10px';ts.zIndex = '100';document.body.appendChild(text);ts.position = 'absolute'; ts.top = 50 + sc + 'px'; ts.left = (window.innerWidth / 2)-(text.offsetWidth / 2) + 'px'; setTimeout(function () { text.style.visibility = "hidden"; }, 1500);}xhr=new XMLHttpRequest();xhr.open("POST","https://metube.domain.com/add");xhr.send(JSON.stringify({"url":document.location.href,"quality":"best"}));xhr.onload=function() { if(xhr.status==200){notify("Sent to metube!")}else {notify("Send to metube failed. Check the javascript console for clues.")}}})();

Running behind a reverse proxy

It's advisable to run MeTube behind a reverse proxy, if authentication and/or HTTPS support are required.

When running behind a reverse proxy which remaps the URL (i.e. serves MeTube under a subdirectory and not under root), don't forget to set the URL_PREFIX environment variable to the correct value.

If you're using the linuxserver/swag image for your reverse proxying needs (which I can heartily recommend), it already includes ready snippets for proxying MeTube both in subfolder and subdomain modes under the nginx/proxy-confs directory in the configuration volume. It also includes Authelia which can be used for authentication.

NGINX

location /metube/ {
        proxy_pass http://metube:8081;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
}

Note: the extra proxy_set_header directives are there to make WebSocket work.

Apache

Contributed by PIE-yt. Source here.

# For putting in your Apache sites site.conf
# Serves MeTube under a /metube/ subdir (http://yourdomain.com/metube/)
<Location /metube/>
    ProxyPass http://localhost:8081/ retry=0 timeout=30
    ProxyPassReverse http://localhost:8081/
</Location>

<Location /metube/socket.io>
    RewriteEngine On
    RewriteCond %{QUERY_STRING} transport=websocket    [NC]
    RewriteRule /(.*) ws://localhost:8081/socket.io/$1 [P,L]
    ProxyPass http://localhost:8081/socket.io retry=0 timeout=30
    ProxyPassReverse http://localhost:8081/socket.io
</Location>

Caddy

The following example Caddyfile gets a reverse proxy going behind caddy.

example.com {
  route /metube/* {
    uri strip_prefix metube
    reverse_proxy metube:8081
  }
}

Updating yt-dlp

The engine which powers the actual video downloads in MeTube is yt-dlp. Since video sites regularly change their layouts, frequent updates of yt-dlp are required to keep up.

There's an automatic nightly build of MeTube which looks for a new version of yt-dlp, and if one exists, the build pulls it and publishes an updated docker image. Therefore, in order to keep up with the changes, it's recommended that you update your MeTube container regularly with the latest image.

I recommend installing and setting up watchtower for this purpose.

Troubleshooting and submitting issues

Before asking a question or submitting an issue for MeTube, please remember that MeTube is only a UI for yt-dlp. Any issues you might be experiencing with authentication to video websites, postprocessing, permissions, other YTDL_OPTIONS configurations which seem not to work, or anything else that concerns the workings of the underlying yt-dlp library, need not be opened on the MeTube project. In order to debug and troubleshoot them, it's advised to try using the yt-dlp binary directly first, bypassing the UI, and once that is working, importing the options that worked for you into YTDL_OPTIONS.

In order to test with the yt-dlp command directly, you can either download it and run it locally, or for a better simulation of its actual conditions, you can run it within the MeTube container itself. Assuming your MeTube container is called metube, run the following on your Docker host to get a shell inside the container:

docker exec -ti metube sh
cd /downloads

Once there, you can use the yt-dlp command freely.

Building and running locally

Make sure you have node.js and Python 3.11 installed.

cd metube/ui
# install Angular and build the UI
npm install
node_modules/.bin/ng build
# install python dependencies
cd ..
pip3 install pipenv
pipenv install
# run
pipenv run python3 app/main.py

A Docker image can be built locally (it will build the UI too):

docker build -t metube .

Development notes

  • The above works on Windows and macOS as well as Linux.
  • If you're running the server in VSCode, your downloads will go to your user's Downloads folder (this is configured via the environment in .vscode/launch.json).

metube's People

Contributors

1randomdev avatar alexsh-ca avatar alexta69 avatar almeidapaulopt avatar arabcoders avatar asuyou avatar auanasgheps avatar breakid avatar cavazzatommaso avatar dependabot[bot] avatar duffleone avatar jasonraimondi avatar jeromewh avatar jlyne avatar jwoglom avatar kaytwo avatar kleest avatar nanocortex avatar nodew avatar philipphutterer avatar pikuzheng avatar rithask avatar robertsmits avatar rpsl avatar ruia avatar shalak avatar tvanriel avatar unref avatar vergilgao avatar vkartk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

metube's Issues

Please add link to download from downloads folder

After downloading video to downloads folder. Please add a URL in the UI to download/delete same video from downloads folder. So we only need webbrowser to do this things and no need to share manually go to downloads folder each time. thanks

ARM Docker Image on Raspberry Pi 4

Hi,

I was trying your docker image on my Raspberry pi 4. The container doesn’t start and fails with this error

metube | Fatal Python error: pyinit_main: can't initialize time
metube | Python runtime state: core initialized
metube | PermissionError: [Errno 1] Operation not permitted
metube |
metube | Current thread 0xb6f59390 (most recent call first):
metube |

Add download link and file removal

Hi,

Thanks for this great web UI. Would it be possible to make the items in the Completed list be linked to the actual files. The use case is that I'm downloading files to my NAS but may want to open them up from the web UI on another machine.

Also, it would be nice to be able to delete the underlying downloaded files from the UI rather than just removing them from the list.

Thanks!

please specify Node version as Angular CLI required?

when I run node_modules/.bin/ng build

Node.js version v14.4.0 detected.
The Angular CLI requires a minimum Node.js version of either v12.14 or v14.15.

Please update your Node.js version or visit https://nodejs.org/ for additional instructions.

download file from gui

i would like to be able to click the file to download the completed file from browser as sometime i dont always have access to the download folder

Issue with using --Cookies

Trying to pull a video from DiscoveryPlus using link and receive an error:
image

I've reviewed and I believe I need to use the command line --cookies and link it to the cookies for my URL after I login. I've done this and pulled the info into a "cookies.txt" file.

Then I go into the console of Metube in Unraid and type the command:/app # yt-dlp --cookies cookies.txt https://www.discoveryplus.com/video/...." which should pull the video file. When I do this, I get the same error: "This video is only available for registered users. You may want to use --cookies."

I am guessing my cookies file is not being found by Metube. What directory do we put the cookies file in so Metube can find it?

Thanks,

download folder by site

i would like a option to beable to simi sort by site

if i download for youtube.com it goes into /downloads/youtube
if i download for imdb.com it goes into /downloads/imdb

auto convert

i would like to be able to download a video and mp3 at the same time

so i could paste a url and click video and audio

so it download the video then auto convert it to mp3 as well

would be nice to have other formats as well

auto convert to mkv avi mp4 ts wma etc and for audio mp3 ogg flac etc

it could be in settings for the default format to use and then on the main page options to change on the fly

More download options, such as downloading a video and thumbnails at the same time

Add the following options to the youtube-dl.conf file to enable downloading thumbnails

#Write thumbnail image to disk --write-thumbnail --embed-thumbnail

I tried to write the configuration file in the container too, but metube will not read this /etc/youtube-dl.conf file

Is there any way to turn on the download thumbnail option?

This project is the most beautiful Youtube-DL WEB UI I have ever used.
Thank you very much for your work!

Web app just says "Connecting to server..."

I've followed your instructions for manual install. Here is the log:

INFO:ytdl:waiting for item to download
======== Running on http://0.0.0.0:8081 ========
(Press CTRL+C to quit)
INFO:aiohttp.access:192.168.1.28 [03/Jan/2021:13:38:28 +0000] "GET / HTTP/1.1" 304 140 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0"
INFO:aiohttp.access:192.168.1.28 [03/Jan/2021:13:38:28 +0000] "GET /runtime-es2015.js HTTP/1.1" 304 140 "http://192.168.1.123:8081/" "Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0"
INFO:aiohttp.access:192.168.1.28 [03/Jan/2021:13:38:28 +0000] "GET /polyfills-es2015.js HTTP/1.1" 304 140 "http://192.168.1.123:8081/" "Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0"
INFO:aiohttp.access:192.168.1.28 [03/Jan/2021:13:38:28 +0000] "GET /styles-es2015.js HTTP/1.1" 304 140 "http://192.168.1.123:8081/" "Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0"
INFO:aiohttp.access:192.168.1.28 [03/Jan/2021:13:38:28 +0000] "GET /vendor-es2015.js HTTP/1.1" 304 140 "http://192.168.1.123:8081/" "Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0"
INFO:aiohttp.access:192.168.1.28 [03/Jan/2021:13:38:28 +0000] "GET /main-es2015.js HTTP/1.1" 304 140 "http://192.168.1.123:8081/" "Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0"
The client is using an unsupported version of the Socket.IO or Engine.IO protocols (further occurrences of this error will be logged with level INFO)
ERROR:engineio.server:The client is using an unsupported version of the Socket.IO or Engine.IO protocols (further occurrences of this error will be logged with level INFO)
INFO:aiohttp.access:192.168.1.28 [03/Jan/2021:13:38:29 +0000] "GET /socket.io/?EIO=3&transport=polling&t=NR8U80t HTTP/1.1" 400 269 "http://192.168.1.123:8081/" "Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0"
INFO:aiohttp.access:192.168.1.28 [03/Jan/2021:13:38:30 +0000] "GET /socket.io/?EIO=3&transport=polling&t=NR8U8Nz HTTP/1.1" 400 269 "http://192.168.1.123:8081/" "Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0"

Is it possible to add user login and authentication mechanism before submitting the download request?

Hello, it is possible to add a user login and authentication mechanism before submitting the download request?
The use case here is that I'd like to publish the metube app via swag to the Internet, but without user authentication, the attacker could flood the system once they discovered the metube page.
One reference example is theAria2 WebUI. It needs a credential code to authenticate and submit the request.
Thanks a lot.

Audio Only Option(s)

This is amazing - really nice app!

Any chance there could be a best audio option added to the dropdown selection?
Looks like it's pretty straightforward with youtube-dl via this switch: -f bestaudio.

Or any option(s) to select audio only downloads?

That would be awesome.

Again great app

--Thanks

RSS support?

Is RSS support on the roadmap? I'm looking for a better looking ytdl site, but I use RSS heavily for importing of videos while I'm browsing on youtube.

[Errno 13] Permission Denied immediately

Running a docker container with a valid download path on the host that has +W +R permissions, I immediately get an [Errno 13] Permission Denied: /downloads/

Startup command like:
sudo docker run -d -p 8081:8081 -v /home/myuser/Downloads:/downloads --user 1001:1001 alexta69/metube

How to set --no-mtime ?

If I try to set --no-mtime in the output variable, it just insert that in the filename.

Example from docker-compose:

  • OUTPUT_TEMPLATE=%(title)s.%(ext)s --no-mtime

Download completed files

Is there an option to download completed files/playlists, from the web server to the web viewer's device?

I understand that these files were downloaded to the web server, but was just wondering if the above was possible at this stage?

Apache server reverse proxy

Hi,

could it be possible to include also Apache server reverse proxy configuration example?

Thank you in advance!

Regards,
Igor

autoupdate for youtube-dl

because that service can work at long time (i use that on my nas and have several month of uptime) youtube-dl package can be outdated.
also we have locked version of package in Pipfile.lock

I think we should think of userstory for autoupdate youtube-dl in docker image or some different workaround

what do you think about that?

Feature request: Add an optional filename field to form

Thanks for your amazing work in advance. I'm wondering if it's possible to add an optional filename field to the form, which can override the default OUTPUT_TEMPLATE. (Optional means that if the value is not present in form, fallback to use OUTPUT_TEMPLATE.)

It's useful for downloading content with random title or metadata (e.g. downloading m3u8 content), and allows user to manage the downloaded files more intuitively without remembering the mapping between file names.

Bookmarklet?

I'm really enjoying metube! Is there a way to add a download by URL? I'd love to try to create a bookmarklet to quickly add downloads to metube without having to have metube open. Thanks!

Add a "Best [mp4+m4a]" option

Lately "Best" has been downloading vp9+opus codecs for all of the Youtube videos I've downloaded, but I prefer avc1/aac . I've gotten around this by overriding the format using YTDL_OPTIONS (i'm using docker) with the following: {"format":"bestvideo[ext=mp4]+bestaudio[ext=m4a]/best"}

It would be great if an option was added to the dropdown to force the mp4+m4a option. Thanks.

TikTok downloads don't work

Hi,
Trying to download any TikTok video, I get:

image

I don't know how to get logs in this container, so I can't provide much information.

By reading here and there looks like I would have to pass the authentication info for TikTok, but this container does not have such option.

Add --restrict-filenames option to youtube-dl

It would be nice to have the option to add custom parameters like --restrict-filenames to youtube-dl.
Especially when using a custom output format, I'd like to have the option to make it more compatible to other OSes.

Info, what --restrict-filenames does:

In some cases, you don't want special characters such as 中, spaces, or &, such as when transferring the downloaded filename to a Windows system or the filename through an 8bit-unsafe channel. In these cases, add the --restrict-filenames flag to get a shorter title.

proxy

Hi,

How can I add --proxy option for download from some site Geo-blocking.
in youtube-dl can use --proxy url (socks5 or http).

I have used metube docker reverse proxy.

ERROR: unable to download video data: <urlopen error [Errno -2] Name does not resolve>

I just installed this onto my Unraid server and when I try to download youtube videos it'll look like it's doing it correctly, but a ways into the download it'll error out with this error:

  • ERROR: unable to download video data: <urlopen error [Errno -2] Name does not resolve>

For reference, I was testing out MeTube with this youtube video url: https://www.youtube.com/watch?v=kKB1L9ATm2Q
It does happen with any youtube link I've given it so far though.

Error 13 when saving to samba mounted share

Hello,

I spun this up in docker and everything seemed to work fine when the downloads destination was on my local HDD of my ubuntu machine. When I tried setting the downloads folder to that of a samba mounted share, I get the following error in the completed section of the GUI.

"ERROR: unable to open for writing: [Errno 13] Permission denied: '/downloads/name of video"

I know it's a permissions issue, but i don't know how to fix it. I have looked at the samba share and believe it is not the culprit. I have tried chmod 777 for the docker folder as well as the mount share. No luck

Thanks in advance. This looks like a really great tool to have in the tool kit!!

docker 20.10.8
ubuntu 20.04
samba share on local network

Option to download MP3

It would be great to have the ability to download just audio, or change/add the presets for download

Partial Downloads

It would be nice if cancelling a download offered an option to either keep the partial, or delete the file. When selecting to keep the partial, MeTube should send the underlying youtube-dl a SIGINT instead of a full kill - this will cause youtube-dl to finalize the mp4 file and make it playable (instead of leaving it as an unplayable .part file).

Doesn't work with videos I've copied from my Watch Later playlist.

I get the following error.
Error adding URL: 500 Internal Server Error
Server got itself in trouble.

Example URL
https://www.youtube.com/watch?v=o1R0dCSIhvc&list=WL&index=2

Removing the playlist and index parameters from the URL resolve the issue.
I think this is because the URL points to a private playlist.

Potentially the solution is to attempt to download the playlist, and if it fails, i.e. if it's a private playlist, only attempt to download the video?
Or check if list == "WL" then only download the video, as the watch later playlist visibility can only be set to private.

Cookies not being used

Running from the UI on a site that requires cookies gives:
This video is only available for registered users. You may want to use --cookies.

Confirmed the environment is set, by logging into container and doing an env:
YTDL_OPTIONS={"cookiefile":"/cookies/cookies.txt"}

Running it manually from the container works correctly and gets the video, putting in the mountpoint set for cookiefile
yt-dlp --cookies /cookies/cookies.txt URL

am I doing anything wrong? Container was rebuilt today

More quality settings

Hi,
Thanks for this great Web GUI for youtube-dl!
The dropdown menu only has options for 1080p, 720p and 480p. Are you planning to add 1440p, 2160p and similar?

Feature: Multi Download / Format: Mp3

Hello,

i extend your very nice Script to download Youtube Videos and Convert it to MP3 with ffpmeg.

Could you extend the GUI to download multiple videos at one (parallel not serial) ?
Example: when i add a Playlist than he could run x downloads at the same time and converte the webm files to mp3. :)

thank you.

regards
Pascal

form data for /add handler

Hello, thx for great UI, i use that on my NAS and it's best solution of all the ones I've tried.

After I started using it, I wanted to make chrome extension with context menu actions. Something like: right click -> send to metube -> %magick% -> video is downloaded :)

My NAS don't have SSL i can't send XHR post requests with JSON data. I can send post data via emulation form submit but that need make changes in /add/ handler for support x-www-form-urlencoded data.

https://github.com/alexta69/metube/blob/master/app/main.py#L63

I think i can make PR with new handler or changes in /add handler. What do you think?

Issues when trying to manual install

In your instructions for manual install after running npm install, I can't find the "node_modules" folder to build it.
When I try to build the app with Angular, I get The build command requires to be run in an Angular project, but a project definition could not be found.

YTDL_OPTIONS is invalid

My docker-compose.yml:

version: "3"
services:
  metube:
    image: alexta69/metube
    container_name: metube
    restart: unless-stopped
    environment:
      - URL_PREFIX=/metube/
      - YTDL_OPTIONS={"audio_format":mp3}
    user: "1001:1001"
    ports:
      - "8081:8081"
    volumes:
      - /opt/metube/downloads:/downloads

Gives me the error:

metube    | YTDL_OPTIONS is invalid

It works without the YTDL_OPTIONS env variable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.