[YouTube] No video formats found (Solved)
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"}
Nothing else worked. Hope it helps someone!
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.
Problem comes back today. Unfortuately , I think Youtube dev are pushing some problematic changes
Yeah I tried this today. It has worked fine in the past, but right now it's not working
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.
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?
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
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.
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
Last update solved the issue , thanks
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
yup, latest image fixed the issue.
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.
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
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 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.
@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 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.
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'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
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:
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.......
So, inside your metube container, can you do
cd /mnt/media/PlexData/MeTubeDownloadandcat 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.
I apologize, but I'm running out of ideas. Perhaps someone else could provide a suggestion.
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.
I speak too early. It works for 2 files and now does not work again. Even for the same video.
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.
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!
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