[Support] MeTube


Recommended Posts

Ok so as a temp solution to the permission issue I am using the "user scripts" plugin with the following...

 

Name of Script:

"chmod and chown metube" (replace metube to any other container if you have issues elsewhere or create another script without "")

 

Bash Script:

#!/bin/bash
find /mnt/user/data/media/youtube/metube/downloads -type f \( -iname \*.* \) -cmin -2 -exec chmod -R u-x,go-rwx,go+u,ugo+X '/mnt/user/data/media/youtube/metube/downloads' \;
find /mnt/user/data/media/youtube/metube/downloads -type f \( -iname \*.* \) -cmin -2 -exec chown -R nobody:users '/mnt/user/data/media/youtube/metube/downloads' \;

(You will need to change "/mnt/user/data/media/youtube/metube/downloads" twice on each line to your specific directory)

 

Cron: Custom:

*/1 * * * *

 

Not sure if there is a better bash script approach to maybe watch the folder for changes (I'm a complete noob when it comes to bash) and then apply the chmod/chown but I guess this works for now or until a better solution is found. I hope this helps anyone that is running into this issue too.

 

*Extra Note*

With this solution, there is 1 major flaw... You will have to wait 1 full min before you can move/delete or modify the file(s)

 

 

  • Like 1
Link to comment
5 hours ago, Banuseka said:

Hi,

 

unfortunately I am not able to get MeTube running on any other port than 8081. Changing the port in the template simply doesn't work. Can anyone second that behavior?

 

I have MeTube running on its own IP (meaning: "network type: Custom: br0")

 

Best, Banu

OK port change is working on bridge mode, but not custom... anyone has an idea why?

Link to comment
14 minutes ago, Banuseka said:

OK port change is working on bridge mode, but not custom... anyone has an idea why?

If the container has its own ip address, all ports on that address are open, no need to map ports, just change the port in the application itself.

 

In bridge, the container shares the hosts IP, so only mapped ports are available, and you can map container ports to any port that's available on the host IP.

 

Mapping doesn't apply to anything but bridge modes.

Link to comment

Hello there,

 

nice work on the docker, thanks for that!

 

Is there a way to specify the audio download format beyond Any (which is "bestaudio" i guess) and MP4 (which is m4a)?

On my short testvideo, Any results into a .webm file (OPUS codec) and MP4 as expected in a .m4a file (AAC LC).

It would be nice, to select MP3 and/or FLAC.

 

Also is there a way you can implement conversion of thumbnails to jpg as of now they are downloaded as webp?

 

FFMPEG should be capable of both converting to MP3 and JPG.

 

And could you please update readme.md with an example for use of multiple YTDL_OPTIONS e.g. {"writedescription":"DESCRIPTION", "writethumbnail":"THUMBNAIL"}?

 

Thank you!

 

BreKa

 

Link to comment
5 hours ago, BreKa said:

Hello there,

 

nice work on the docker, thanks for that!

 

Is there a way to specify the audio download format beyond Any (which is "bestaudio" i guess) and MP4 (which is m4a)?

On my short testvideo, Any results into a .webm file (OPUS codec) and MP4 as expected in a .m4a file (AAC LC).

It would be nice, to select MP3 and/or FLAC.

 

Also is there a way you can implement conversion of thumbnails to jpg as of now they are downloaded as webp?

 

FFMPEG should be capable of both converting to MP3 and JPG.

 

And could you please update readme.md with an example for use of multiple YTDL_OPTIONS e.g. {"writedescription":"DESCRIPTION", "writethumbnail":"THUMBNAIL"}?

 

Thank you!

 

BreKa

 

Hey,

Glad you're enjoying it!

There's actually a PR being worked on right now (https://github.com/alexta69/metube/pull/73) that adds MP3 support. So hopefully that will be in the master version soon enough. Other features are not planned at the moment from my side, but contributions are welcome, if you want to take a stab at it :)

Regarding YTDL_OPTIONS, it's specified that it's expected to be in JSON format, so it doesn't look to me that there's any information missing there.

 

Alex

  • Like 1
Link to comment
  • 3 weeks later...
54 minutes ago, Nuuki said:

Love the simplicity of this. However I'm struggling with setting an option - I'd like to use the --split-chapters option but spluggling with it. I've tried setting the YTDL_OPTIONS variable to {"split_chapters"} but no luck.

 

What am I doing wrong?

YTDL_OPTIONS is set according to this spec: https://github.com/yt-dlp/yt-dlp/blob/master/yt_dlp/YoutubeDL.py#L176

As the documentation says, not all command line options are represented there, and I don't see split-chapters there. Maybe it can be set via the postprocessors option. But to see if that's the case you'd need to delve into the yt-dlp source code and its handling of the --split-chapters option to see if it indeed uses postprocessors for its implementation.

Link to comment

If anyone's interested, here's the YTDL_OPTIONS string I'm using. It'll embed english subtitles and chapter markers (for videos that have them). It'll also fix the permissions on the downloaded video. (The downloaded subtitles file will be deleted, change already_have_subtitle to true to keep it)

Quote

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

 

Edited by cdiv
  • Like 1
Link to comment
8 minutes ago, cdiv said:

If anyone's interested, here's the YTDL_OPTIONS string I'm using. It'll embed english subtitles and chapter markers (for videos that have them). It'll also fix the permissions on the downloaded video. (The downloaded subtitles file will be deleted, change already_have_subtitle to true to keep it)

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

 

Do you mind if I add this as an example in the MeTube README? If it's cool, let me know how (and if) I should credit you ("cdiv" and link to https://forums.unraid.net/profile/120892-cdiv/ or something else).

Link to comment
  • 3 weeks later...
On 12/10/2021 at 6:35 PM, JimmyGerms said:

Hey there,

 

I wanted to ask the question if anyone was able to get this docker running when piped through a container VPN. I'm not able to get to the interface if I have it running through binhex-DelugeVPN. Seems like the docker only works when it's in bridge mode?

Works fine, you just have to follow the normal directions to allow all the needed access through the other container. You won't have a shortcut in the container popup, so you will need to manually type the web address with port, or simply create a browser shortcut. Exactly the same procedure, nothing special.

Link to comment
  • 2 weeks later...

Hey, hoping someone can help. I'm trying to avoid AV1 codec as it just isn't compatible with most things. I've tried 

Quote

--format "bestvideo[ext=mp4][vcodec!*=av01]+bestaudio[ext=m4a]"

putting this in the YTDL_OPTIONS variable and have just being getting an error in the log YTDL_OPTIONS is not valid. If anyone can point me in the right direction, I'm having no luck on my own. Thank you!

Link to comment
  • 1 month later...

Not sure how much support there is for using the command line directly, but that is how I use yt-dlp and ffmpeg in this container. I recently switched over from a different one I used to use (liquid-dl) since they were just using youtube-dl and most people seem to recommend using yt-dlp at this point instead.

 

I start up the container in unRAID and then go into using "docker exec -it MeTube /bin/sh".

 

So the error I get when I try to use yt-dlp at the command line is the following:

 

/mnt/misc/_music_staging/chloe $ yt-dlp -x --embed-thumbnail --audio-format mp3 --audio-quality 3 https://www.youtube.com/watch?v=Dyl6EoU0rNY
[youtube] Dyl6EoU0rNY: Downloading webpage
[youtube] Dyl6EoU0rNY: Downloading android player API JSON
[youtube] Dyl6EoU0rNY: Downloading player 495d0f2b
WARNING: Writing cache to '/.cache/yt-dlp/youtube-sigfuncs/js_495d0f2b_108.json' failed: Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/yt_dlp/cache.py", line 49, in store
    os.makedirs(os.path.dirname(fn))
  File "/usr/local/lib/python3.8/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/usr/local/lib/python3.8/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/usr/local/lib/python3.8/os.py", line 223, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/.cache'

 

This isn't a big deal since it still downloads the video/music, so it must be falling back to some other way to cache it, but thought I'd check see if there is a way to fix it or not.

Link to comment
6 hours ago, alexta69 said:

You can pass the --no-cache-dir argument to avoid this error.

 

Thanks for the suggestion! Any benefit to just creating /.cache myself manually? I have a script I run when I first connect to the CLI to create some aliases for me and such. I could easily add a couple lines to create the directory instead in there, if needed or useful.

Link to comment
11 hours ago, deusxanime said:

 

Thanks for the suggestion! Any benefit to just creating /.cache myself manually? I have a script I run when I first connect to the CLI to create some aliases for me and such. I could easily add a couple lines to create the directory instead in there, if needed or useful.

Within the container you normally don't run as root, so you aren't supposed to have permissions to create it...

It just wasn't built with this purpose in mind :) after all MeTube is a GUI for yt-dlp, so that's how it's meant to be used.

 

Link to comment
2 hours ago, alexta69 said:

Within the container you normally don't run as root, so you aren't supposed to have permissions to create it...

It just wasn't built with this purpose in mind :) after all MeTube is a GUI for yt-dlp, so that's how it's meant to be used.

 

 

I understand, no problem. 😁  Thanks for the help/hints before, gives me ideas and a simple solution anyway.

  • Like 1
Link to comment
  • 1 month later...

Can anyone help me with the following? I'd like to use the following option (to avoid duplicate files), but I'm unsure how I would configure it in Unraid.

 

Download only videos not listed in the archive file. Record the IDs of all downloaded videos in it

--download-archive FILE

 

Do I need to manually create the file for each Channel/Playlist, or can this be done automatically?

 

Thanks!

Edited by ssean
Link to comment
  • 2 weeks later...

I keep getting this error when trying to add a video to download - any ideas? Metube was working for me back in December

Error adding URL: ERROR: [youtube:tab] PLc2DXFHTVWiHEfVnxVnMcWJ1jQRoAK6MI: Unable to download API page: <urlopen error [Errno -3] Try again> (caused by URLError(gaierror(-3, 'Try again')))

Link to comment
8 hours ago, thompn4 said:

I keep getting this error when trying to add a video to download - any ideas? Metube was working for me back in December

Error adding URL: ERROR: [youtube:tab] PLc2DXFHTVWiHEfVnxVnMcWJ1jQRoAK6MI: Unable to download API page: <urlopen error [Errno -3] Try again> (caused by URLError(gaierror(-3, 'Try again')))

Can you paste the URL you're trying to download?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.