Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Support] MeTube

Featured Replies

Hi,

 

Is it possible to add sponsor block options from yt-dlp in YTDL_OPTIONS?

  • Replies 140
  • Views 61k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • Sure, template updated

  • I see the PUID/PGID variables in the template. They won't have any effect with this docker image and should be removed. (UMASK too I think, though I'm not sure, it may have effect on the system level.

  • Glad to hear! We're limited by the options that yt-dlp implements, so if they don't do Embed, we won't have it...

Posted Images

On 11/21/2021 at 9:24 AM, 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}]}

After copying and pasting this to YTDL_OPTIONS , the subtitles and chapters work but the permissions still dont.  I still cant delete files.  I also tried to change the chmod to 777 but it made no difference.  Does anyone have any suggestions?

So I figured out that the permissions issue is at the folder level,  it is fine at the file level.  When something is downloaded it creates a folder with the creators name and then the file inside is the video.  When I use Krusader to check the permissions the file is correct with read/write but the folder is read only.  Can anyone offer any suggestions on how to fix this.  I really want to use this program but unless I can get the permissions set correctly I wont be able too.  Thanks in advance.

  • 2 weeks later...

Its been a couple weeks and I still cant the permissions working properly.  Is there anyone that can offer any advice?

  • 2 weeks later...

The umask is not set to unraid's expected 000 (or even 002) value in order to read/write these files, and defaults to the docker image's default 022.

Some containers in unraid use the UMASK variable for docker containers to change this, but manually adding this parameter to the template doesn't result in the umask actually being set to 000 or 002 since it's not built into the app.


According to https://codeyarns.com/tech/2017-07-21-how-to-set-umask-for-docker-container.html and https://forums.unraid.net/topic/32629-how-to-edit-a-dockerfile-locally/

the only way to go about this as-is would be to clone the MeTube repo locally, create a script which sets the umask to 000 when the container is run, then add that script in as the entrypoint of the local copy of the dockerfile.

Doing this obviously keeps you from updating the container from its remote repo, which stinks, so the above solution seems unreasonably hacky.

The current behavior is that the files created by MeTube are -rw-r--r-- when we'd hope they'd be -rw-rw-rw. We can't delete them or move them without hitting up the terminal on the unraid box itself to manually set perms as-is.

 

If the maintainer could throw ENV UMASK 0000 into the startup script, I think we'd be in good shape.


Other references:
https://forums.unraid.net/topic/39289-adapting-container-user-and-group-ids-to-the-host/

https://forums.unraid.net/topic/32278-docker-container-developer-best-practice-guidelines-for-unraid/

 

  • 3 weeks later...

Hi all, I haven't touched this docker yet, but seeing the issues with permissions, I've got an arm-chair solution here. You can use something like inotify-command to watch output directory and run a chmod script every time theres a change. I'll try it out myself as well later.

 

EDIT:

 

It's the next day and I've done this now. It was pretty simple and seems to be working. Here's my script for inotify-command, just be sure to change the "WATCH_DIR:" to whatever the directory mapped in YOUR inotify-command container is (I believe it's dir1 by default).

 

WATCH_DIR=/tubesync
SETTLE_DURATION=5
MAX_WAIT_TIME=05:00
MIN_PERIOD=00:01
COMMAND="chmod 777 -R $WATCH_DIR"
USER_ID=0
GROUP_ID=0
UMASK=0000
IGNORE_EVENTS_WHILE_COMMAND_IS_RUNNING=1
USE_POLLING=no
DEBUG=0

 

On 5/4/2022 at 4:45 PM, Tonitram said:

Its been a couple weeks and I still cant the permissions working properly.  Is there anyone that can offer any advice?

 

On 4/19/2022 at 5:34 PM, Tonitram said:

So I figured out that the permissions issue is at the folder level,  it is fine at the file level.  When something is downloaded it creates a folder with the creators name and then the file inside is the video.  When I use Krusader to check the permissions the file is correct with read/write but the folder is read only.  Can anyone offer any suggestions on how to fix this.  I really want to use this program but unless I can get the permissions set correctly I wont be able too.  Thanks in advance.

 

Edited by naturalcarr
I actually did the thing I was talking about

On 5/4/2022 at 4:45 PM, Tonitram said:

Its been a couple weeks and I still cant the permissions working properly.  Is there anyone that can offer any advice?

This worked for me:

 

in Unraid, Tools > New Permissions

selects all Disks and then whichever shares you are trying to fix and run it.

11 hours ago, jacobjezek said:

This worked for me:

 

in Unraid, Tools > New Permissions

selects all Disks and then whichever shares you are trying to fix and run it.

This will fix the permissions for the files you already downloaded but any files downloaded after doing it would still not have the correct permissions.  So you will have to keep running this, which isnt really a fix.

  • 4 weeks later...
  • 2 weeks later...

Is there anyway to bulk import urls? or maybe format something like a YouTube playlist for downloading stuff not on youtube?

 

On 4/10/2022 at 10:32 PM, 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')))

 

Im getting this error as well. this is the video im trying to download
https://www.youtube.com/watch?v=_E0QSFHR86I

 

I have downloaded it fine with exe from youtube dlp

 

Edited by Goldmaster

  • 3 months later...

Is it possible to get the files in .mkv and h265, or is this something I need to use a seperate container for to process the mp4 file that metube grabs? 

  • 2 weeks later...
On 9/2/2021 at 11:29 AM, Hawkins12 said:

Requesting assistance from anyone familiar with how to set up environment variables for Metube.  Here's what I am trying to accomplish.  I need to "mount" a cookies.txt file so Metube knows how to properly pull the cookies file when retrieving video.  I have a cookies.txt file generated I just need to set an environment variable to recognize it.  Below are instructions from the Dev but I am lost on a couple points.  

 

I am not sure how to set up the environment variable to recognize the cookies file since Metube doesn't have an appdata folder, etc.  Any assistance would be helpful. 

 

Based on the above, I mounted the path as follows (note the cookies.txt file is in the "/downloads/Metube/ directory:

image.png.0b578dfec6a7d085564696123150dc78.png

 

And here is what I have for Env. Variable...What am I doing wrong??

image.png.e501c0be0cf03ca5a9845637fe9220f2.png

 

 

Has anyone got this to work?  I am getting the following error.

image.png.3115815427aba41496dbba65b70d9470.png

I followed the gethub instructions to get the cookies and create the cookies.txt file.  What I am not clear on is how to enter the YTDL_OPTIONS in the unraid form.  The instructions on the gethub page show for a docker compose file but I am unsure how to enter this in the unraid format.  A screen shot of a working config like the one above would be great.  It would also be helpful to see an example of multiple YTDL_OPTIONS such as subs, audio, etc.  Have seen some example strings in this thread but am not sure how to enter it in the Key:, Value: format, unraid uses.

 

Thanks

 

  • 1 month later...

Hello.  I added a single link for a Youtube clip, yet it seems as though MeTube is cycling through an unending amount of videos as if it is processing a massive playlist.  I can't get it to stop, and I can't find a config director where I could wipe out some data to stop MeTube from continuing to grab videos.  I have removed the docker from my Unraid setup, re-installed it, and found that despite this the MeTube instance just picks up right where it left off.  Is there a good way to reset this?

1 hour ago, jackfalveyiv said:

Hello.  I added a single link for a Youtube clip, yet it seems as though MeTube is cycling through an unending amount of videos as if it is processing a massive playlist.  I can't get it to stop, and I can't find a config director where I could wipe out some data to stop MeTube from continuing to grab videos.  I have removed the docker from my Unraid setup, re-installed it, and found that despite this the MeTube instance just picks up right where it left off.  Is there a good way to reset this?

Stop the container, delete the .metube directory in your downloads folder, and start the container again.

Thank you

  • 5 weeks later...
On 11/5/2022 at 10:27 AM, linenoise said:

Has anyone got this to work?  I am getting the following error.

image.png.3115815427aba41496dbba65b70d9470.png

I followed the gethub instructions to get the cookies and create the cookies.txt file.  What I am not clear on is how to enter the YTDL_OPTIONS in the unraid form.  The instructions on the gethub page show for a docker compose file but I am unsure how to enter this in the unraid format.  A screen shot of a working config like the one above would be great.  It would also be helpful to see an example of multiple YTDL_OPTIONS such as subs, audio, etc.  Have seen some example strings in this thread but am not sure how to enter it in the Key:, Value: format, unraid uses.

 

Thanks

 

Same here...did you figure this out?

On 2/3/2023 at 8:48 PM, theryno said:

Same here...did you figure this out?

Same here...

  • 2 weeks later...
On 2/6/2023 at 5:05 PM, morethanenough said:

Same here...


Also same...

 

any answers? 

 

Traceback (most recent call last):
  File "app/main.py", line 85, in <module>
    dqueue = DownloadQueue(config, Notifier())
  File "/app/app/ytdl.py", line 195, in __init__
    self.queue = PersistentQueue(self.config.STATE_DIR + '/queue')
  File "/app/app/ytdl.py", line 150, in __init__
    with shelve.open(path, 'c'):
  File "/usr/local/lib/python3.8/shelve.py", line 243, in open
    return DbfilenameShelf(filename, flag, protocol, writeback)
  File "/usr/local/lib/python3.8/shelve.py", line 227, in __init__
    Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback)
  File "/usr/local/lib/python3.8/dbm/__init__.py", line 95, in open
    return mod.open(file, flag, mode)
_gdbm.error: [Errno 13] Permission denied: '/downloads/.metube/queue'
Setting umask to 022
Creating download directory /downloads and state directory /downloads/.metube
User set by docker; running MeTube as 99:100

 

Changing the "Extra Parameters" from "--user 99:100" to "--user 1000:1000" seems to work.

Not sure 1000:1000 is the correct solution.

1 hour ago, Jaybau said:

 

Traceback (most recent call last):
  File "app/main.py", line 85, in <module>
    dqueue = DownloadQueue(config, Notifier())
  File "/app/app/ytdl.py", line 195, in __init__
    self.queue = PersistentQueue(self.config.STATE_DIR + '/queue')
  File "/app/app/ytdl.py", line 150, in __init__
    with shelve.open(path, 'c'):
  File "/usr/local/lib/python3.8/shelve.py", line 243, in open
    return DbfilenameShelf(filename, flag, protocol, writeback)
  File "/usr/local/lib/python3.8/shelve.py", line 227, in __init__
    Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback)
  File "/usr/local/lib/python3.8/dbm/__init__.py", line 95, in open
    return mod.open(file, flag, mode)
_gdbm.error: [Errno 13] Permission denied: '/downloads/.metube/queue'
Setting umask to 022
Creating download directory /downloads and state directory /downloads/.metube
User set by docker; running MeTube as 99:100

 

Changing the "Extra Parameters" from "--user 99:100" to "--user 1000:1000" seems to work.

Not sure 1000:1000 is the correct solution.

I was having a problem with the container not being able to search for updates.

+ some kind of error with the link, not the same as the others.

Changing the UID and GID to 1000:1000 fixed it for me.
And I was able to put them back to 99:100 and it kept working.

Weird, and thanks.

Is this app still being maintained?  How can I keep it up to date?
 

image.png

 

image.png.84f0b9c85d2ed639f3703c50f4c017ea.png

 

image.png.39ed5f13437e28c2f15a94ae86207dfa.png

 

Sorry, I'm not a Linux guy so I'm not sure what to do.

Edited by TimTheSettler

Regarding updating, I went into the Docker section on the left side in Unraid and clicked a force update... after that, my video downloads are working again! 

On 2/23/2023 at 3:10 AM, TimTheSettler said:

Is this app still being maintained?  How can I keep it up to date?
 

image.png

 

image.png.84f0b9c85d2ed639f3703c50f4c017ea.png

 

image.png.39ed5f13437e28c2f15a94ae86207dfa.png

 

Sorry, I'm not a Linux guy so I'm not sure what to do.

The app is maintained, and when a new yt-dlp version is released, a new MeTube version is automatically built with the newest yt-dlp, and uploaded to docker hub. You need to set up your system to automatically upgrade your containers with the latest image versions (I use https://containrrr.dev/watchtower/ on a regular Linux box, maybe Unraid has already such functionality built in, I don't know, I'm not an Unraid user myself), and then you'll always have the newest version of yt-dlp.

5 hours ago, alexta69 said:

The app is maintained, and when a new yt-dlp version is released, a new MeTube version is automatically built with the newest yt-dlp, and uploaded to docker hub. You need to set up your system to automatically upgrade your containers with the latest image versions (I use https://containrrr.dev/watchtower/ on a regular Linux box, maybe Unraid has already such functionality built in, I don't know, I'm not an Unraid user myself), and then you'll always have the newest version of yt-dlp.

 

Thanks for the update alexta69.  Unraid has a built-in updater and it works for all other apps but not for MeTube.  There's a post somewhere saying that the place it looks at might have been changed so it can't find the update info there anymore.

 

12 hours ago, DanYak said:

Regarding updating, I went into the Docker section on the left side in Unraid and clicked a force update... after that, my video downloads are working again! 

 

Where do you see "Force Update"?  The "Update" option only shows up when Unraid knows there is an update and my problem is that Unraid does not seem to know.

 

Am I the only one who has this problem?  Just to be clear, it's only MeTube that is giving me this problem as you can see below.

 

image.png.9a800ef58566338ea27f7ae78d791b3d.png

 

If no one knows then in a couple days I will remove the app and re-install it.  Hopefully that will fix it but that's not really the right solution.

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.