metube icon indicating copy to clipboard operation
metube copied to clipboard

[YouTube] No video formats found (Solved)

Open JohnyBeGood opened this issue 9 months ago • 27 comments

I ran into an issue where I could not download a public youtube video. Searched the internet and found that using cookies fixed the issue. I used Get cookies.txt LOCALLY Chrome extension and copied "Netscape" export option inside below environment file. More info here https://github.com/yt-dlp/yt-dlp/wiki/FAQ#how-do-i-pass-cookies-to-yt-dlp

    environment:
      - YTDL_OPTIONS={"cookiefile":"/cookies/cookies.txt"}
Image

Nothing else worked. Hope it helps someone!

JohnyBeGood avatar Mar 20 '25 01:03 JohnyBeGood

Impossible to me to make this working inside a podman container with a properly set up volume for information. If it make people avoid to loosing some time. However , I used -> ghcr.io/alexta69/metube:2025-03-22 image and it's ok for me.

bubu-bubu-85 avatar Mar 24 '25 18:03 bubu-bubu-85

Problem comes back today. Unfortuately , I think Youtube dev are pushing some problematic changes

bubu-bubu-85 avatar Mar 26 '25 14:03 bubu-bubu-85

Yeah I tried this today. It has worked fine in the past, but right now it's not working

need4swede avatar Mar 26 '25 18:03 need4swede

Same here. I did saw there are some additional methods like using Oauth, but wasn't able to find any working docker compose config. If someone could share, that would be great.

JohnyBeGood avatar Mar 26 '25 18:03 JohnyBeGood

same issue, using fresh new cookies(logged out and back in) did not help.

latest metube image seems to be using old yt-dlp version. latest image is 03-26 but the yt-dlp version is 03.25 not 26 which seems to fix the issue. anyway to force yt-dlp update maybe?

Pesoen avatar Mar 26 '25 19:03 Pesoen

same issue, using fresh new cookies(logged out and back in) did not help.

latest metube image seems to be using old yt-dlp version. latest image is 03-26 but the yt-dlp version is 03.25 not 26 which seems to fix the issue. anyway to force yt-dlp update maybe?

upgrade yt-dlp to nightly build works for me.

docker exec "metube" pip install --force-reinstall "https://github.com/yt-dlp/yt-dlp-nightly-builds/releases/latest/download/yt-dlp.tar.gz"
docker restart metube

(change "metube" to your container's name

PikuZheng avatar Mar 26 '25 23:03 PikuZheng

same issue, using fresh new cookies(logged out and back in) did not help. latest metube image seems to be using old yt-dlp version. latest image is 03-26 but the yt-dlp version is 03.25 not 26 which seems to fix the issue. anyway to force yt-dlp update maybe?

upgrade yt-dlp to nightly build works for me.

docker exec "metube" pip install --force-reinstall "https://github.com/yt-dlp/yt-dlp-nightly-builds/releases/latest/download/yt-dlp.tar.gz"
docker restart metube

(change "metube" to your container's name

That fixed the issue for now. @PikuZheng thanks for sharing.

Crackz avatar Mar 26 '25 23:03 Crackz

docker exec "metube" pip install --force-reinstall "https://github.com/yt-dlp/yt-dlp-nightly-builds/releases/latest/download/yt-dlp.tar.gz" docker restart metube

this also did the trick for me. thanks @PikuZheng

rad1n5ky avatar Mar 27 '25 00:03 rad1n5ky

Last update solved the issue , thanks

bubu-bubu-85 avatar Mar 27 '25 01:03 bubu-bubu-85

I'm on TrueNAS Scale. I ran this to get it to work:

sudo docker exec -u root ix-metube-metube-1 pip install -U --force-reinstall "https://github.com/yt-dlp/yt-dlp-nightly-builds/releases/latest/download/yt-dlp.tar.gz"

Confirmed update:

sudo docker exec ix-metube-metube-1 yt-dlp --version

Output: 2025.03.26.000420

Then restarted the container

sudo docker stop ix-metube-metube-1
sudo docker start ix-metube-metube-1

need4swede avatar Mar 27 '25 05:03 need4swede

yup, latest image fixed the issue.

Pesoen avatar Mar 27 '25 10:03 Pesoen

Thank you all for posting your updated solution. It works again and hopefully for a long time!

Tip: Make sure to verify new version was installed and restart container afterwards.

JohnyBeGood avatar Mar 27 '25 13:03 JohnyBeGood

Still no joy for me. Running in docker on UnRaid. I re-installed MeTube from scratch and also ran the yt-dlp force reinstall. Yt-dlp is version 2025.03.27.233514

mpgraber avatar Mar 28 '25 11:03 mpgraber

@mpgraber You need to add a cookies file as mentioned in the initial issue-post. I exported my yt-cookies from firefox with the cookies.txt addon, put the file in the '.metube' folder (which should be in your configured downloads-folder) and added {"cookiefile":"/downloads/.metube/cookies.txt"} to the YTDL Options: field in the docker config.

Also using Unraid and it works even with the regular latest version no need for force reinstall nightly.

marbrink avatar Mar 28 '25 12:03 marbrink

@marbrink You need to add a cookies file as mentioned in the initial issue-post. I exported my yt-cookies from firefox with the cookies.txt addon, put the file in the '.metube' folder (which should be in your configured downloads-folder) and added {"cookiefile":"/downloads/.metube/cookies.txt"} to the YTDL Options: field in the docker config.

Also using Unraid and it works even with the regular latest version no need for force reinstall nightly.

I appreciate the insight. I've exported my cookies.txt and added the YTDL Options setting, but I'm struggling with your reference to "yt-cookies". I don't see any cookies referring to yt-dlp or yt anything for that matter.

mpgraber avatar Mar 28 '25 14:03 mpgraber

@marbrink You need to add a cookies file as mentioned in the initial issue-post. I exported my yt-cookies from firefox with the cookies.txt addon, put the file in the '.metube' folder (which should be in your configured downloads-folder) and added {"cookiefile":"/downloads/.metube/cookies.txt"} to the YTDL Options: field in the docker config. Also using Unraid and it works even with the regular latest version no need for force reinstall nightly.

I appreciate the insight. I've exported my cookies.txt and added the YTDL Options setting, but I'm struggling with your reference to "yt-cookies". I don't see any cookies referring to yt-dlp or yt anything for that matter.

What I've meant is: I've opened Youtube in a tab, clicked on the cookies.txt-extension and selected "Current Website" to export only the cookies for Youtube. But if you just export all your cookies it should work too, I guess.

marbrink avatar Mar 28 '25 14:03 marbrink

@marbrink You need to add a cookies file as mentioned in the initial issue-post. I exported my yt-cookies from firefox with the cookies.txt addon, put the file in the '.metube' folder (which should be in your configured downloads-folder) and added {"cookiefile":"/downloads/.metube/cookies.txt"} to the YTDL Options: field in the docker config. Also using Unraid and it works even with the regular latest version no need for force reinstall nightly.

I appreciate the insight. I've exported my cookies.txt and added the YTDL Options setting, but I'm struggling with your reference to "yt-cookies". I don't see any cookies referring to yt-dlp or yt anything for that matter.

What I've meant is: I've opened Youtube in a tab, clicked on the cookies.txt-extension and selected "Current Website" to export only the cookies for Youtube. But if you just export all your cookies it should work too, I guess.

That did it. I had originally just pivoted to Firefox as my client for MeTube, and that worked for a couple of days. I had never gone to YouTube with it! Thanks! Working now.

mpgraber avatar Mar 28 '25 14:03 mpgraber

I'm on TrueNAS Scale. I ran this to get it to work:

sudo docker exec -u root ix-metube-metube-1 pip install -U --force-reinstall "https://github.com/yt-dlp/yt-dlp-nightly-builds/releases/latest/download/yt-dlp.tar.gz"

@need4swede I am using TrueNAS Scale too but have a hard time getting it to work. I have put the cookie file in the download directory and setup the additional environment variables in the following way:

  • "Name" field set to YTDL_OPTIONS
  • "Value" field set to {"cookiefile":"/mnt/media/PlexData/MeTubeDownload/cookies.txt"}

I double check the cookie file is using LF for new line and the cookies are for YouTube.

I am using the latest version of MeTube and has run the script to update yt-dlp to nightly built.

ivanlau2000 avatar Mar 30 '25 16:03 ivanlau2000

I'm on TrueNAS Scale. I ran this to get it to work:

sudo docker exec -u root ix-metube-metube-1 pip install -U --force-reinstall "https://github.com/yt-dlp/yt-dlp-nightly-builds/releases/latest/download/yt-dlp.tar.gz"

@need4swede I am using TrueNAS Scale too but have a hard time getting it to work. I have put the cookie file in the download directory and setup the additional environment variables in the following way:

  • "Name" field set to YTDL_OPTIONS
  • "Value" field set to {"cookiefile":"/mnt/media/PlexData/MeTubeDownload/cookies.txt"}

I double check the cookie file is using LF for new line and the cookies are for YouTube.

I am using the latest version of MeTube and has run the script to update yt-dlp to nightly built.

I would recommend ensuring that you can access the cookies file from within the container, as many of the issues were related to permissions.

/mnt/media/PlexData/MeTubeDownload/cookies.txt

JohnyBeGood avatar Mar 30 '25 17:03 JohnyBeGood

I would recommend ensuring that you can access the cookies file from within the container, as many of the issues were related to permissions.

/mnt/media/PlexData/MeTubeDownload/cookies.txt

@JohnyBeGood I put the file inside the download directory "/mnt/media/PlexData/MeTubeDownload/" to avoid permission issues. However, is that the correct way of doing that? I copy the "Host Path" I used when setting up the Storage Configuration.

Is there a log file that I can examine to see whether it is really a permission issue?

My cookie file look like this:

Image

ivanlau2000 avatar Mar 30 '25 17:03 ivanlau2000

So, inside your metube container, can you do cd /mnt/media/PlexData/MeTubeDownload and cat cookies.txt ?

Not sure if it matters, but I removed all # lines and spaces. So that the file starts with .youtube.......

JohnyBeGood avatar Mar 30 '25 18:03 JohnyBeGood

So, inside your metube container, can you do cd /mnt/media/PlexData/MeTubeDownload and cat cookies.txt ?

Not sure if it matters, but I removed all # lines and spaces. So that the file starts with .youtube.......

@JohnyBeGood I get into the container. The download directory is mapped to /downloads. I can find the file and use cat to show the content. I change the value of the environment variable to {"cookiefile":"/downloads/cookies.txt"}. I can also confirm that MeTube is trying to load the file since it gives an error when I deleted the lines started with #. It said the file does not look like a Netscape format cookies file.

ivanlau2000 avatar Mar 30 '25 19:03 ivanlau2000

I apologize, but I'm running out of ideas. Perhaps someone else could provide a suggestion.

JohnyBeGood avatar Mar 30 '25 19:03 JohnyBeGood

I apologize, but I'm running out of ideas. Perhaps someone else could provide a suggestion.

@JohnyBeGood. Thanks for you help. Your direct me to the container help me to enter the right values to the environment variables. I finally get it to work. Instead of export the cookie file, I do a copy and paste into a new file. Change the EOL from CRLF to LF and it magically works. Still not sure why there is a difference between export and copy and paste. I checked the EOL and the exported file is already using LF.

ivanlau2000 avatar Mar 30 '25 19:03 ivanlau2000

I speak too early. It works for 2 files and now does not work again. Even for the same video.

ivanlau2000 avatar Mar 31 '25 02:03 ivanlau2000

If you find that it works for a while and then stop working, you need to follow the instructions in the following link to prepare the cookies. So far, it works for me: https://github.com/yt-dlp/yt-dlp/wiki/Extractors#exporting-youtube-cookies

YouTube rotates account cookies frequently on open YouTube browser tabs as a security measure. To export cookies that will remain working with yt-dlp, you will need to export cookies in such a way that they are never rotated.

One way to do this is through a private browsing/incognito window:

Open a new private browsing/incognito window and log into YouTube Open a new tab and close the YouTube tab Export youtube.com cookies from the browser then close the private browsing/incognito window so the session is never opened in the browser again.

ivanlau2000 avatar Apr 02 '25 00:04 ivanlau2000

If you find that it works for a while and then stop working, you need to follow the instructions in the following link to prepare the cookies. So far, it works for me: https://github.com/yt-dlp/yt-dlp/wiki/Extractors#exporting-youtube-cookies

YouTube rotates account cookies frequently on open YouTube browser tabs as a security measure. To export cookies that will remain working with yt-dlp, you will need to export cookies in such a way that they are never rotated. One way to do this is through a private browsing/incognito window: Open a new private browsing/incognito window and log into YouTube Open a new tab and close the YouTube tab Export youtube.com cookies from the browser then close the private browsing/incognito window so the session is never opened in the browser again.

Thanks for sharing!

JohnyBeGood avatar Apr 02 '25 16:04 JohnyBeGood

same issue, using fresh new cookies(logged out and back in) did not help. latest metube image seems to be using old yt-dlp version. latest image is 03-26 but the yt-dlp version is 03.25 not 26 which seems to fix the issue. anyway to force yt-dlp update maybe?

upgrade yt-dlp to nightly build works for me.

docker exec "metube" pip install --force-reinstall "https://github.com/yt-dlp/yt-dlp-nightly-builds/releases/latest/download/yt-dlp.tar.gz"
docker restart metube

(change "metube" to your container's name

That fixed the issue for now. @PikuZheng thanks for sharing.

That works for me. Issue fixes/solved. Tnx

mese1000 avatar Oct 03 '25 20:10 mese1000