Giter VIP home page Giter VIP logo

youtubedl-material's Introduction

YoutubeDL-Material

Docker pulls badge Docker image size badge Heroku deploy badge GitHub issues badge License badge

YoutubeDL-Material is a Material Design frontend for youtube-dl. It's coded using Angular 15 for the frontend, and Node.js on the backend.

Now with Docker support!


Getting Started

Check out the prerequisites, and go to the installation section. Easy as pie!

Here's an image of what it'll look like once you're done:

Dark mode:

Prerequisites

NOTE: If you would like to use Docker, you can skip down to the Docker section for a setup guide.

Required dependencies:

  • Node.js 16
  • Python

Optional dependencies:

  • AtomicParsley (for embedding thumbnails, package name atomicparsley)
  • Twitch Downloader CLI (for downloading Twitch VOD chats)
Debian/Ubuntu
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install nodejs youtube-dl ffmpeg unzip python npm
CentOS 7
sudo yum install epel-release
sudo yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm
sudo yum install centos-release-scl-rh
sudo yum install rh-nodejs12
scl enable rh-nodejs12 bash
curl -fsSL https://rpm.nodesource.com/setup_16.x | sudo bash -
sudo yum install nodejs youtube-dl ffmpeg ffmpeg-devel

Installing

If you are using Docker, skip to the Docker section. Otherwise, continue:

  1. First, download the latest release!

  2. Drag the youtubedl-material directory to an easily accessible directory. Navigate to the appdata folder and edit the default.json file.

NOTE: If you are intending to use a reverse proxy, this next step is not necessary

  1. Port forward the port listed in default.json, which defaults to 17442.

  2. Once the configuration is done, run npm install to install all the backend dependencies. Once that is finished, type npm start. This will run the backend server, which serves the frontend as well. On your browser, navigate to to the server (url with the specified port). Try putting in a youtube link to see if it works. If it does, viola! YoutubeDL-Material is now up and running.

If you experience problems, know that it's usually caused by a configuration problem. The first thing you should do is check the console. To get there, right click anywhere on the page and click "Inspect element." Then on the menu that pops up, click console. Look at the error there, and try to investigate.

Build it yourself

If you'd like to install YoutubeDL-Material, go to the Installation section. If you want to build it yourself and/or develop the repository, then this section is for you.

To deploy, simply clone the repository, and go into the youtubedl-material directory. Type npm install and all the dependencies will install. Then type cd backend and again type npm install to install the dependencies for the backend.

Once you do that, you're almost up and running. All you need to do is edit the configuration in youtubedl-material/appdata, go back into the youtubedl-material directory, and type npm run build. This will build the app, and put the output files in the youtubedl-material/backend/public folder.

Lastly, type npm -g install pm2 to install pm2 globally.

The frontend is now complete. The backend is much easier. Just go into the backend folder, and type npm start.

Finally, if you want your instance to be available from outside your network, you can set up a reverse proxy.

Alternatively, you can port forward the port specified in the config (defaults to 17442) and point it to the server's IP address. Make sure the port is also allowed through the server's firewall.

Docker

Host-specific instructions

If you're on a Synology NAS, unRAID, Raspberry Pi 4 or any other possible special case you can check if there's known issues or instructions both in the issue tracker and in the Wiki!

Setup

If you are looking to setup YoutubeDL-Material with Docker, this section is for you. And you're in luck! Docker setup is quite simple.

  1. Run curl -L https://github.com/Tzahi12345/YoutubeDL-Material/releases/latest/download/docker-compose.yml -o docker-compose.yml to download the latest Docker Compose, or go to the releases page to grab the version you'd like.
  2. Run docker-compose pull. This will download the official YoutubeDL-Material docker image.
  3. Run docker-compose up to start it up. If successful, it should say "HTTP(S): Started on port 17443" or something similar. This tells you the container-internal port of the application. Please check your docker-compose.yml file for the external port. If you downloaded the file as described above, it defaults to 8998.
  4. Make sure you can connect to the specified URL + external port, and if so, you are done!

Custom UID/GID

By default, the Docker container runs as non-root with UID=1000 and GID=1000. To set this to your own UID/GID, simply update the environment section in your docker-compose.yml like so:

environment:
    UID: YOUR_UID
    GID: YOUR_GID

MongoDB

For much better scaling with large datasets please run your YoutubeDL-Material instance with MongoDB backend rather than the json file-based default. It will fix a lot of performance problems (especially with datasets in the tens of thousands videos/audios)!

Tutorial.

API

API Docs

To get started, go to the settings menu and enable the public API from the Extra tab. You can generate an API key if one is missing.

Once you have enabled the API and have the key, you can start sending requests by adding the query param apiKey=API_KEY. Replace API_KEY with your actual API key, and you should be good to go! Nearly all of the backend should be at your disposal. View available endpoints in the link above.

iOS Shortcut

If you are using iOS, try YoutubeDL-Material more conveniently with a Shortcut. With this Shorcut, you can easily start downloading YouTube video with just two taps! (Or maybe three?)

You can download Shortcut here.

Contributing

If you're interested in contributing, first: awesome! Second, please refer to the guidelines/setup information located in the Contributing wiki page, it's a helpful way to get you on your feet and coding away.

Pull requests are always appreciated! If you're a bit rusty with coding, that's no problem: we can always help you learn. And if that's too scary, that's OK too! You can create issues for features you'd like to see or bugs you encounter, it all helps this project grow.

If you're interested in translating the app into a new language, check out the Translate wiki page.

Authors

  • Isaac Grynsztein (me!) - Initial work

Official translators:

  • Spanish - tzahi12345
  • German - UnlimitedCookies
  • Chinese - TyRoyal

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Legal Disclaimer

This project is in no way affiliated with Google LLC, Alphabet Inc. or YouTube (or their subsidiaries) nor endorsed by them.

Acknowledgments

  • youtube-dl
  • AllTube (for the inspiration)

youtubedl-material's People

Contributors

adripo avatar atalanttore avatar benashby avatar comradekingu avatar dejan995 avatar dependabot[bot] avatar diveflo avatar fitojb avatar fluxtendu avatar fpiesche avatar glassedsilver avatar gratisan98 avatar hrtk92 avatar kachelkaiser avatar lisapple avatar lk-kevin avatar martadinata666 avatar mholmqvist avatar notwoods avatar oersen avatar sebdanielsson avatar supersandro2000 avatar tzahi12345 avatar u0a1009 avatar unlimitedcookies avatar vistaus avatar web-connect avatar weblate avatar yangyangdaji avatar ymisterxy 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  avatar  avatar  avatar  avatar

youtubedl-material's Issues

Toggle for generation of JSON file

Its always generating a JSON file for each downloaded video. It would be really great to have a toggle to have the json generation on/off. Thanks

Download failed

I'm unable to setup this on my server.
Screenshot_20200228-211743~01
Screenshot_20200228-215039

If I'm hosting on server what values should i change for backend and frontend url?
Tried

My server ip
localhost
0.0.0.0
127.0.0.1

But still it's not working.
I'm using docker-compose with nginx proxy (to assign hostname https://github.com/jwilder/nginx-proxy) to deploy.

Clean up the settings menu

The settings menu right now is a bit clunky. It could be difficult to find the setting you need, and the large amount of expansion panels hurt overall performance.

One possible alternative to organizing settings by expansion panel is to use Tabs, maybe in conjunction with lazy loading to keep performance reasonable. It will help reduce the density of information, but might require horizontal scrolling to reach the category you want.

Running UID/GID for the docker

I run the docker version of this and over ride the UID/GID with docker run command. However this is causing permission problem when the docker try to download the latest youtube-dl package.

As it is a common practice to not run docker as root user, the fixed could be changing the write permission of "modules/youtube-dl/bin/" folder.

internal/streams/legacy.js:59
throw er; // Unhandled stream error in pipe.
^

[Error: EACCES: permission denied, open 'node_modules/youtube-dl/bin/youtube-dl'] {
errno: -13,
code: 'EACCES',
syscall: 'open',
path: 'node_modules/youtube-dl/bin/youtube-dl'
}

Progress-bar keeps in Indeterminate mode

Hi,
Thanks for doing this so awesome project. I'm not sure if it's an issue or something I misunderstand. Hopefully I make it here right.

I'm running it in docker. When a video is downloading, the progress bar doesn't show a percent complete, just keep looping from left to right. I tested it on Safari, Firefox and Chrome on macOS. I found it that this's called Indeterminate mode on this link: https://material.angular.io/components/progress-bar/overview.

How can I set it to show Determinate mode?

File creation umask

Please provide a method to change the file creation umask, preferably via an environmental variable.

I run this app in a docker container if that matters.

[Feature Request] Specify subdirectory at download time

It'd be very convenient for me to be able to specify a subdirectory I'd like videos to be downloaded to at download time. This would greatly help keeping the download directories somewhat organized. Especially useful for channel and playlist downloads (which seem to explode everywhere, unless I've missed a setting).

Subscriptions dissappear after page refresh.

When adding a Channel or Playlist to your Subscriptions it is initially listed on the page. However after any page refresh (or going into the added channel/playlist) it dissappears from your Subscriptions page.

Running this in a Docker Container on UnRaid. GIF of the behavior below:

Screen-Recording-2020-04-29-at-9 41 30-am

Does dot work when not at root of web server

if it is helpful this is what the console shows:

192.168.1.4/:1 GET http://192.168.1.4/ytdlm/systemjs.config.js net::ERR_ABORTED 404 (Not Found)
main.5df17f13314d77194c63.bundle.js:1 PostsService Initialized...
main.5df17f13314d77194c63.bundle.js:1 Config location: http://192.168.1.4/ytdlm/backend/config/default.json
192.168.1.4/:1 Access to XMLHttpRequest at 'http://192.168.1.4:17442/getMp3s' from origin 'http://192.168.1.4' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header has a value 'http://192.168.1.4/ytdlm' that is not equal to the supplied origin.
main.5df17f13314d77194c63.bundle.js:1 e {_body: ProgressEvent, status: 0, ok: false, statusText: "", headers: t, …}headers: t {_headers: Map(0), _normalizedNames: Map(0)}ok: falsestatus: 0statusText: ""type: 3url: null_body: ProgressEvent {isTrusted: true, lengthComputable: false, loaded: 0, total: 0, type: "error", …}bubbles: falsecancelBubble: falsecancelable: falsecomposed: falsecurrentTarget: XMLHttpRequest {__zone_symbol__xhrSync: false, __zone_symbol__xhrURL: "http://192.168.1.4:17442/getMp3s", __zone_symbol__loadfalse: null, __zone_symbol__errorfalse: null, __zone_symbol__xhrListener: ƒ, …}defaultPrevented: falseeventPhase: 0isTrusted: truelengthComputable: falseloaded: 0path: []returnValue: truesrcElement: XMLHttpRequest {__zone_symbol__xhrSync: false, __zone_symbol__xhrURL: "http://192.168.1.4:17442/getMp3s", __zone_symbol__loadfalse: null, __zone_symbol__errorfalse: null, __zone_symbol__xhrListener: ƒ, …}target: XMLHttpRequest {__zone_symbol__xhrSync: false, __zone_symbol__xhrURL: "http://192.168.1.4:17442/getMp3s", __zone_symbol__loadfalse: null, __zone_symbol__errorfalse: null, __zone_symbol__xhrListener: ƒ, …}timeStamp: 1414.6799999289215total: 0type: "error"__proto__: ProgressEvent__proto__: t
192.168.1.4/:1 Access to XMLHttpRequest at 'http://192.168.1.4:17442/getMp4s' from origin 'http://192.168.1.4' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header has a value 'http://192.168.1.4/ytdlm' that is not equal to the supplied origin.
main.5df17f13314d77194c63.bundle.js:1 e {_body: ProgressEvent, status: 0, ok: false, statusText: "", headers: t, …}

and the config file:

{
    "YoutubeDLMaterial": {
        "Host": {
            "frontendurl": "http://192.168.1.4/ytdlm",
            "backendurl": "http://192.168.1.4:17442/"
        },
      "Encryption": {
        "use-encryption": false,
        "cert-file-path": "/etc/letsencrypt/live/example.com/fullchain.pem",
        "key-file-path": "/etc/letsencrypt/live/example.com/privkey.pem"
      },
      "Downloader": {
        "path-base": "http://192.168.1.4:17442/",
        "path-audio": "audio/",
        "path-video": "video/"
      },
      "Extra": {
        "title_top": "Youtube Downloader",
		"file_manager_enabled": true
      }
    }
  }

Error during posintall script during npm install

Ran npm install on the main dir (front end) and received the following error durinf the post install script.


> [email protected] postinstall C:\Users\username\YouTubeDL\YoutubeDL-Material
> ng build --prod && mkdir dist/backend && mkdir dist/backend/config && mkdir dist/backend/audio && mkdir dist/backend/video && cp src/assets/default.json dist/backend/config/default.json && cp backend/app.js dist/backend/app.js

Generating ES5 bundles for differential loading...
ES5 bundle generation complete.

chunk {0} runtime-es2015.c5fa8325f89fc516600b.js (runtime) 1.45 kB [entry] [rendered]
chunk {0} runtime-es5.c5fa8325f89fc516600b.js (runtime) 1.45 kB [entry] [rendered]
chunk {2} polyfills-es2015.b0638ec1e72267738494.js (polyfills) 82 kB [initial] [rendered]
chunk {3} polyfills-es5.12553af63efad0b3e192.js (polyfills-es5) 172 kB [initial] [rendered]
chunk {1} main-es2015.ab362dbf073a0f09d159.js (main) 1.11 MB [initial] [rendered]
chunk {1} main-es5.ab362dbf073a0f09d159.js (main) 1.28 MB [initial] [rendered]
chunk {4} styles.3889f9a03e77147fd89c.css (styles) 177 kB [initial] [rendered]
Date: 2020-02-24T14:40:54.559Z - Hash: ec1d0da4cb79918ca13c - Time: 112975ms
The syntax of the command is incorrect.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `ng build --prod && mkdir dist/backend && mkdir dist/backend/config && mkdir dist/backend/audio && mkdir dist/backend/video && cp src/assets/default.json dist/backend/config/default.json && cp backend/app.js dist/backend/app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\username\AppData\Roaming\npm-cache\_logs\2020-02-24T14_40_54_823Z-debug.log

heroku

blank page after deployment on heroku

Create an updater for YoutubeDL-Material

One missing feature that would significantly improve the updating process for users is an updater.

Most importantly, this should include the ability to update through the UI.

Additional notes:

  • Need to investigate how this will affect Docker installs. The docker-compose will not be updated, so if they pull again it will presumably revert to the original version..
  • A button to update the youtube-dl binary from the UI would also be nice
  • To prevent errors during migration (such as new config items added), config items not found should revert to the default (stored in backend/config.js)

Download queue management and retires

Is there a way/option to set the maximum concurrent downloads?

I added a channel with over 100 videos. I can see there are 10 to 12 youtube-dl processes inside the docker. Looking at the process ids some appear to be stale. The memory usage of the container gradually climbs to around 500MB. Is it possible to control how many videos can be download at the same time? As this is a background downloader, it's okay to have as low as one active video download to avoid OOS situation on the server and not to overload the Internet line.

There are some videos that only the beginning few minutes are playable, the rest of them are choppy or even unwatchable. Seems like that some partitions of the videos are not downloaded correctly. Is there an option to report such error and control the number of retries for failed segment?

Add possibility to set ID3 tag of audio file

It would be great to have the possibility to set the ID3 tag of the audio file before creating it, as can get pretty messy in software like iTunes which uses the song title from the ID3 tag rather than the file name.

Add multi-user mode

A often-requested feature is adding the ability to have user logins. I have generally avoided it as doing authentication wrong is extremely easy (see "How NOT to Store Passwords!" by Computerphile).

As a result, I'll be implementing this feature slowly, and (hopefully) do it right the first time. Anyways here are the primary features I'd like to see implemented:

  • Each user has their own set of video/audio files and permissions
  • Include an enable checkbox for multi-user mode. This disables the settings pin, and if one does not exist already, creates a default admin account. Before creating the default admin account, the user will be asked for the admin password.
    • Settings pin gets disabled as only admins will be able to edit the settings from the UI
  • Basic user management as a new tab in the settings menu. At least two roles: User and admin, with override-able permissions for each user. Users can get created from here, and registration can be disabled/enabled as well
  • Lost admin password: users should disable and re-enable multi-user mode by manually editing the config

If anyone has more thoughts or a better way of implementing this, make sure to comment in this thread.

ENOENT: no such file or directory

I installed and ran the app on a fresh sub domain, but the download of a converted does not work.
I checked the file names in the video/ directory and indeed they differ from the requested file name:

  • file name should be: ETH Zürich - Bereit.mp4
  • file name is: ETH Zürich - Bereit.f137.mp4

QA: API?

Hi

Is there some API calls that cna be used to push videos for download remotely via curl or some other way?

thanks

Update youtube-dl on every start of the application/container

So I noticed the latest release notes have some really nice and welcome notes, props to that!

However, there is one glaring issue and that is youtube-dl's version. From user feedback I've seen in regards to other applications that work as a wrapper for youtube-dl I've learnt that it's best practice to always auto-update youtube-dl constantly almost at any chance, specifically container restarts, since Youtube is an unpredictably fast moving beast on the back-end and youtube-dl will OFTEN break requiring youtube-dl to be updated.

Relegating the update of youtube-dl to a mere restart of the container and maybe additionally periodically when no task is running would also move the spotlight away from you when your wrapper isn't to blame for something breaking. :)

Cheers!

Do NOT put archive.txt and related entries into the download location paths, also allow output filename to be set

Personally, I'd favor putting the archive related files into a specified directory.

But whatever you do, if you put them into the path for downloaded files you'll have a bad time if you have a variable output directory.

Related here is another issue. If you wanna have an output directory with spaces you need quotation marks, those however escape the -o command arg if I'm not mistaken.

Even when using a directory with underscores I get download failed errors.

Snippet of error log when using video/%(uploader)s [%(channel_id)s]/%(upload_date)s - %(title)s [%(id)s] as output:

at Object.openSync (fs.js:440:3)
at /app/app.js:923:33
at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
at next (/app/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/app/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
at /app/node_modules/express/lib/router/index.js:281:22
at Function.process_params (/app/node_modules/express/lib/router/index.js:335:12)
at next (/app/node_modules/express/lib/router/index.js:275:10)
at compression (/app/node_modules/compression/index.js:220:5)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:1) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open 'video/%(uploader)s [%(channel_id)s]/%(upload_date)s - %(title)s [%(id)s]archive.txt'

Snippet when using just video/ as output.

at Object.openSync (fs.js:440:3)
at /app/app.js:923:33
at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
at next (/app/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/app/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
at /app/node_modules/express/lib/router/index.js:281:22
at Function.process_params (/app/node_modules/express/lib/router/index.js:335:12)
at next (/app/node_modules/express/lib/router/index.js:275:10)
at compression (/app/node_modules/compression/index.js:220:5)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)

Another thing I noticed. You have coded a way to set the output directory and that's sweet. However, as you can see there are definitely users who want to have a variable output directory, so expect that in your coding, but also a variable filename.

I expected to set the filename in the path setting by simply not putting an / in the end. Well I was wrong to assume this. :P

Docker ENv questions

Hi

I am looking at the docker-compose file and I am a bit confused. I am wondering if I could get some answers to q below

  • Why do we have 2 ports, one ytdl and one for docker ports?

  • I do not want to serve it over web. How do I disable LE certs?

  • How do I set external download folders? Where are they saved as of now?

  • Which option is neded for saving downloads on the server, and disabling clientside download.

thanks

Docker install errors

I get this error after the initial image build:

root@ssd:~/zDocker/docker-YoutubeDL-Tzahi12345# docker-compose up
Recreating ytdl_material ... done
Attaching to ytdl_material
ytdl_material    | internal/modules/cjs/loader.js:796
ytdl_material    |     throw err;
ytdl_material    |     ^
ytdl_material    | 
ytdl_material    | Error: Cannot find module '/app/app.js'
ytdl_material    |     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:793:17)
ytdl_material    |     at Function.Module._load (internal/modules/cjs/loader.js:686:27)
ytdl_material    |     at Function.Module.runMain (internal/modules/cjs/loader.js:1043:10)
ytdl_material    |     at internal/main/run_main_module.js:17:11 {
ytdl_material    |   code: 'MODULE_NOT_FOUND',
ytdl_material    |   requireStack: []
ytdl_material    | }

Only allow modification of settings for admins + Autossl

Hello,

I don’t like the fact that anyone visiting the downloader is able to modify anything in the settings. It should’ve been made that only admins can modify that.

Also, It would be great to have autossl built in with auto-renew.

Thanks

Bookmarklet (and maybe Firefox extension?)

A Chrome extension is fine and dandy, but what about users whose main browser is Firefox or basically every mobile user? Bookmarklets are universal and resource-friendly. If I had extensions for all the bookmarklets I use I'd have some of the bloated browsers out there. :D

In the case of Firefox extensions you'd get the added benefit of having the Android version (at least the OG Firefox for Android, the new generation of Firefox is still rebuilding extension support) support the extension as well.

Persistence: Settings Panel for user-prefered youtube-dl parameters (always apply) and archive.txt

Ideally something beyond a copy and paste text box that let's you dump your settings string in there, because youtube-dl - as mighty as it is - has TONS of parameters and digesting them can take - I kid you not - dozens of minutes.

I think it'd be nice to have both, a text field to add parameters manually and then you append (and in case of conflict overwrite this) with UI elements like check boxes and the like.

Having proper "settings" as user expects to stay in tact during a docker container update or a reinstall would necessitate having an appdata config diretory that needs to be bound to a host path.

Also: we should store an archive.txt there or in a separate folder. When the user moves out downloaded items we want to make sure that the items don't get downloaded again through an eventual feature like playlist/channel subscriptions/manual downloads. Why a separate location for the archive.txt? Well, it would make it easily sharable with other instanced of youtube-dl regardless of frontend and device. (think youtube-dl on your laptop storing the archive in a dropbox.)

No player is shown

I download 3.3 release and run node app.js but once finished downloads, no player was shown.
Why?

Shot005

Server: Debian 10.3, ffmpeg 4.2.2
Client: Google Chrome 80.0.3987.122

EmbedThumbnailPPError: AtomicParsley was not found. Please install

Hi, AtomicParsley is required to perform postprocessing on the downloaded videos. I tried installing it manually, however, I am still getting the same error "EmbedThumbnailPPError: AtomicParsley was not found. Please install". Perhaps, I am not installing it in the correct directory. Could anyone please help me where exactly I should install AtomicParsley?

Post-processing commands used:
--embed-thumbnail
--add-metadata
-v
--postprocessor-args "-id3v2_version 3"

Thank you in advance!

HTML not rendering when behind nginx

First of all thank you for such good project.
I'm using it in docker and everything is working fine when its accessed using IP:Port. But when behind nginx I get the following html code in browser and webpage is not rendered:

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>YoutubeDLMaterial</title>
  <base href="./">

  <meta name="viewport" content="width=device-width, initial-scale=1">
  
  <link href="https://fonts.googleapis.com/css?family=Roboto&display=swap" rel="stylesheet">
  <link rel="icon" type="image/x-icon" href="favicon.ico">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined" rel="stylesheet"/>
<link rel="stylesheet" href="styles.5112d6db78cf21541598.css"></head>
<body>
  <app-root></app-root>
<script src="runtime-es2015.7757e6af49e295bdf676.js" type="module"></script><script src="runtime-es5.7757e6af49e295bdf676.js" nomodule defer></script><script src="polyfills-es5.06526edb6162145ab1a0.js" nomodule defer></script><script src="polyfills-es2015.93d5fad15036291d32c6.js" type="module"></script><script src="main-es2015.b37a2ecdb3f1967e5c1d.js" type="module"></script><script src="main-es5.b37a2ecdb3f1967e5c1d.js" nomodule defer></script></body>
</html>

Here is my Nginx config

server {
    listen        80;
    server_name   youtubedl.example.com;
    include       conf.d/redirect_http.inc;
}
server {
    listen                  443 ssl http2;
    server_name             youtubedl.example.com;
    ssl_certificate         /etc/acme/*.example.com/certificates/_.example.com.crt;
    ssl_certificate_key     /etc/acme/*.example.com/certificates/_.example.com.key;

    include /etc/nginx/conf.d/ssl-params.inc; # SSL parameters

    location / {
        #include     conf.d/proxy_set_header.inc;
        proxy_pass  http://ip:8998;
    }
}

Let me know if you need any other logs etc.
Cheers

Visual Changes

Hey, a few things I noticed and want to address now that some major milestones have been addressed or seem just a line change away from working on my end. See issue #37. :D

For the dark mode I think we can still use the same hue of blue for the top bar. The dark blue seems a bit too toned down and I much prefer the vividness of the lighter blue. It's more friendly.

To maintain the general idea of a dark mode better, imho, the background should be either a real black or very strong anthracite with the two areas for the downloads and the download control view each staying what they are.

I created a little mock up by web inspecting and changing values on the fly. For the background I used the values 20,20,20.

mockup

The about dialog's close button should probably just be an X in the top right. In any case, buttons like the close button be it an X button Windows-window-style like I imagine or the way you implemented it should have much more contrast against the background. The idea is that you don't need to read and process the language and context in order to realize it might be an area to interact with. I think with a close button especially so. This is a pet peeve of mine since often times flat UIs are understood as having less contrast and being best when everything blends into each other. I'm a huge fan of Material Design but only in its first iteration. Version 2 is already giving up in a lot of areas, but still not as bad as iOS ever since its flat redesign. Oh iOS, how much I loathe you...

Thirdly: Settings
We have a Save button, a cancel button... But no close button. Cancelling after saving is very unintuitive and confusing UX. Personally I know what to expect from a cancel button on the backend and that the save happens when I click save and not get the window out of my sight, however... It isn't pretty and neat that way. :D I think you know what I mean. :)

Fourthly: Stay safe! I wish everyone who is reading this the best of luck in not catching corona and staying healthy in general. Also extending on that I wish all of us that a vaccine is found as fast as possible and that it can be used really quick. Staying at home is the best thing to do right now, but I really wish that we have to do this for as little time as necessary. I'm usually at home a lot anyhow when I'm not traveling, at work, grocery shopping or at uni. But to know that my movement is limited to work and groceries right now and that I CANNOT see friends etc... It's a real downer. Technology be blessed though, hard to imagine how I'd get through this without the amazing things technology lets us achieve from the comfort of our homes. :D

Doesn’t always work on iOS safari

Hello,

When using this on safari on iOS, I don’t always get the download prompt. In most cases, it just plays the video with absolutely no prompt to download at all!

Implement a better logging system

A real logging system would help users/contributors debug errors more effectively by providing persistence and the ability to select verbosity (so you can view only errors or debug info).

A good location for these logs would be appdata/logs.

After some initial research, the winston NPM package looks well-suited for our purposes.

Note that this logging system would be backend-only. Front-end errors will still be visible from the browser console.

Streams instead of downloading

When I "Download" a video or mp3 it streams it on my browser instead of directly downloading it.
(google chrome and nginx)

youtubedl-material_ytdl_material_1 exited with code 1

Hi

I just did a docker pull and it is crashing now. I am not sure what the issue issue is. Bear in mind that this used to work.

I am using Docker-compose on Debian Testing X64

docker-compose up                                                                                                                                                         
Creating network "youtubedl-material_default" with the default driver                                                                                                                                              
Creating youtubedl-material_ytdl_material_1 ... done                                                                                                                                                               
Attaching to youtubedl-material_ytdl_material_1                                                                                                                                                                    
ytdl_material_1  | Config items set using ENV variables.                                                                                                                                                           
ytdl_material_1  | HTTP: Started on PORT 17442                                                                                                                                                                     
ytdl_material_1  | INFO: Found new update for youtube-dl. Updating binary...                                                                                                                                       
ytdl_material_1  | (node:1) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be one of type string, Buffer, or URL. Received type object                               
ytdl_material_1  |     at Object.access (fs.js:177:10)                                                                                                                                                             
ytdl_material_1  |     at /app/app.js:680:12                                                                                                                                                                       
ytdl_material_1  |     at new Promise (<anonymous>)                                                                                                                                                                
ytdl_material_1  |     at checkExistsWithTimeout (/app/app.js:673:12)                                                                                                                                              
ytdl_material_1  |     at /app/app.js:656:23                                                                                                                                                                       
ytdl_material_1  |     at processTicksAndRejections (internal/process/task_queues.js:94:5)                                                                                                                         
ytdl_material_1  | (node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise wh
ich was not handled with .catch(). (rejection id: 2)                                                                                                                                                               
ytdl_material_1  | (node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero ex
it code.                                                                                                                                                                                                           
ytdl_material_1  | /app/app.js:676                                                                                                                                                                                 
ytdl_material_1  |             watcher.close();                                                                                                                                                                    
ytdl_material_1  |                     ^                                                                                                                                                                           
ytdl_material_1  |                                                                                                                                                                                                 
ytdl_material_1  | TypeError: Cannot read property 'close' of undefined                                                                                                                                            
ytdl_material_1  |     at Timeout._onTimeout (/app/app.js:676:21)                                                                                                                                                  
ytdl_material_1  |     at listOnTimeout (internal/timers.js:531:17)                                                                                                                                                
ytdl_material_1  |     at processTimers (internal/timers.js:475:7)                 

Can't issue any downloads at all right now

This has been the case in a previous version already, I think it started with 3.5, but I chalked it up to possibly a temporary issue. Looking back and actually reading the error code I might have a little bit of actual issue with the software itself. I think what's happening is that youtubedl-material is passing a broken or bad argument? Idk

Here's the log (freshly updated as you can see):

2020-04-13T09:00:57.265Z INFO: Beginning migration: 3.5->3.6+
2020-04-13T09:00:57.297Z INFO: 3.5->3.6+ migration complete!
2020-04-13T09:00:57.300Z INFO: YoutubeDL-Material v3.6 started on PORT 17442
2020-04-13T09:10:20.619Z ERROR: ERROR: u'' is not a valid URL. Set --default-search "ytsearch" (or run youtube-dl "ytsearch:" ) to search YouTube
(node:1) UnhandledPromiseRejectionWarning: Error: Command failed with exit code 1: /app/node_modules/youtube-dl/bin/youtube-dl -o video/%(uploader)s_[%(channel_id)s]/%(upload_date)s_-_%(title)s_[%(id)s].mp4 -f bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4 --write-info-json --print-json --download-archive video/merged.txt --write-sub --write-thumbnail --no-call-home --embed-thumbnail --sub-format srt/ass/best --sub-lang en,eng,de,ger,deu http://www.youtube.com/watch?v=J-2VSNPID2g
at makeError (/app/node_modules/execa/lib/error.js:56:11)
at handlePromise (/app/node_modules/execa/index.js:114:26)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

This is when using regular YoutubeDL-Material on the WebUI in Docker. No extension, bookmarklet or API used.

Is the docker maybe missing a dependency?

API Not Working

Hello,

When sending an API video download command from within my own network, tnothing happens.

I am using the Docker version. When I type the below directly in my browser, I get a blank response and nothing is downloaded.

http://192.168.0.201:17442/api/tomp4?apiKey=692-xxx59df57b&url=https://www.youtube.com/watch?v=i82528KGDdo
*the above API is edited for security.

I can properly access the Web GUI at:
http://192.168.0.201:17442/#/home

Am I missing something? Is the API not yet implemented?

Thank you.

H.

Add a streaming-only mode for subscriptions

If a YouTube channel is large enough, users may not want to download all the videos. Instead, they may just want a list of videos, and when they click a particular one, it gets streamed directly to the user.

I need to do more research on the viability of this, but this excerpt from the youtube-dl README makes it seem possible:

If you want to play the video on a machine that is not running youtube-dl, you can relay the video content from the machine that runs youtube-dl. You can use -o - to let youtube-dl stream a video to stdout, or simply allow the player to download the files written by youtube-dl in turn.

A refactoring would need to be done of the subscriptions system. It would also make sense to have "streaming-only mode" be a playlist or channel-specific setting, rather than a global setting.

Download selected file to client

Is there a way to download a file from the site to my local client? I'm thinking this might be most useful once multi-user mode is finished up, but still helpful in any case.

Essentially, once someone is on the site and they are browsing through the Video Files - they click on the video and then click to download directly to their device. This is especially useful when the ytdl path is saving files to a shared drive that the user doesn't have easy access to.

If that function is already there, fantastic! Otherwise, I think it would be very useful.

Thanks

Player stops opening after a while

The link on the thumb tiles representing downloaded videos supposed to open the player page for it. That works for a few times. At some point clicking on them the browser is doing nothing. When this happen it happens to all videos no matter played before or not. Used latest version of Firefox and Edge on Windows 10. I try the Firefox inspector and it seems the browser is sending a getMP4 request, gets a 304, then sit still. When this work normally the browser will sent a POST to /api/getMP4 with an uuid parameter; when things get stuck only GET /api/getMP4 is sent with same apiKey no uuid.

Auto download

Hi, any way to auto download videos from a channel i subscribe on?. Great work so far

Allow for URL base path in settings

I wanted to host the software on a subpath on my domain, but was unable to do so, and had to resort to creating a new subdomain for it.

Allowing a subpath to be specified in the configuration would be very helpful.

volumes

Hi,

Firstly - thank you so much for this tool.
I tested many and this is the only one that worked for me!

I'm using the docker version and was wondering why it's not possible to mount a volume, so I can have the files downloaded to the docker host.
I added sth like this:

        volumes:
            - ./video:/video

but it doesn't work.
The videos are downloaded and when I check inside the docker container - it is there in the /video folder, but the folder outside of the container is empty...

Also - should the ytdl_download_only_mode mode (when it's set to true) provide a way for the user to download the video in the browser somehow?
Because when I set this to true (and the ytdl_file_manager_enabled to false) - nothing happens after the video is downloaded...

The videos are not in the volume mapping

HI

I am having a weird issue. I used volume mapping as below. /media/YOUTUBE is a samba drive with proper permissions.

            ytdl_audio_folder_path: audio/
            ytdl_video_folder_path: video/


       volumes:
            - /media/YOUTUBE:/app/audio
            - /media/YOUTUBE:/app/video

When I download any video I see that info.json is written to thta folder but I cant find the actual videos themselves in that folder. Is it possible that the videos are not saved in that folder at all?

I also logged into the container and I see that /app/video is actually /media/YOUTUBE so that idea is working.

The videos are watchable as far as I can tel, so it is clear that they are saved somewhere, but where? Because they are not in the named volume

Add password

Just realised that anyone on the internet could use my server. Any ideas to add a simple htpasswd?

youtube-dl module not found

nodejs app.js

module.js:549
throw err;
^

Error: Cannot find module 'youtube-dl'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (/var/www/html/backend/app.js:4:17)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)

Quality selection

I'm having some problems with latest version.
No matter what quality i select but ytdl-m ignores it and download highest quality video.
Screenshot_20200301-154021
Here i select 144p but it's still downloading 1080p
Screenshot_20200301-154148

I also tried using custom args to fetch different resolution
-f bestvideo[height=360][ext=mp4]+bestaudio
Or
-o "%(title)s.%(ext)s" -f bestvideo[height=360][ext=mp4]+bestaudio

But this causes download failed and shows error in terminal.
ERROR: u'' is not a valid URL. Set --default-search "ytsearch" (or run youtube-dl "ytsearch:" ) to search YouTube (node:1) UnhandledPromiseRejectionWarning: Error: Command failed with exit code 1: /app/node_modules/youtube-dl/bin/youtube-dl -i -o "%(title)s" -f bestvideo[height=360][ext=mp4]+bestaudio[ext=m4a] https://youtu.be/992OYXQY18w at makeError (/app/node_modules/execa/lib/error.js:56:11) at handlePromise (/app/node_modules/execa/index.js:114:26) at runMicrotasks (<anonymous>) at processTicksAndRejections (internal/process/task_queues.js:94:5) (node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 5)

Ideas

I love this simple clean downloader.
My ideas for the future:

  • Add setting to select quality (video and music quality)
  • Make it possible to create translations
  • Feature to not save the mp4/mp3 file on the server
  • Feature to search a video in ytdl-material instead of copying and pasting a link (useful on phones)
  • Feature to download a whole youtube playlist

Integration with self-hosted hubs

This is more of a long-term thing I'd like to do, but getting YoutubeDL-Material integrated with hubs like Homelab OS and Sandstorm would help users get an easier deployment of this app on their favorite platform.

I've warmed up with getting Heroku support up and running, check out the button below:

Deploy

So one-click installers is something that is very much possible! I'm interested in hearing what integrations you guys would like the most. Here is what I have so far, but feel free to discuss:

Some of these require some configuration to do on our end, but there are some lesser-known "app catalogs" like Puffin which seemingly doesn't require much at all besides a docker-compose.yml.

Comments and help would be very much appreciated! Hope you are all doing well through the extended quarantine :)

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.