Closed snppls closed 3 days ago
Can you copy here an example of your channel_list.json?
Hey there. I have maybe a similar problem (regarding only YouTube; Twitch works fine):
Everything from the channel_list downloads fine and I get the .strm
files as well as the .nfo
files but when I try to open the.strm
in Jellyfin it loads a little and then tells me
Playback Error
Playback failed due to a fatal player error.
I also tried accessing the link directly in firefox which redirects me to the underlying googlevideo link and results in a HTTP response of 403 (Forbidden) while the page stays blank. I am not sure if that helps but I thought providing that information doesn't hurt.
If I can help to further debug and fix this just let me know!
On another note: Thanks for providing and maintaining this cool project!
I just found the problem: It is an out of date version of yt-dlp
I went into the container via docker exec -it ytdlp2strm bash
and updated yt-dlp
to the latest version via pip install --upgrade yt-dlp --user
. And everything works after that.
A possible fix for machines able to run cron
is to just add a cronjob on your host machine that runs the update command once a day (maximum of 24h where the streaming does not work) like:
0 0 * * * docker exec ytdlp2strm pip install --upgrade yt-dlp --user
For machines (like Windows) that do not have cron
another possibility is to go into the docker container, install cron and put the update cronjob into the crontab there like:
user@yourmachine$ docker exec -it ytdlp2strm bash
root@<CONTAINER_ID>:/opt/ytdlp2STRM# apt install cron
root@<CONTAINER_ID>:/opt/ytdlp2STRM# echo "0 0 * * * docker exec ytdlp2strm pip install --upgrade yt-dlp --user" >> /var/spool/cron/crontabs/root
root@<CONTAINER_ID>:/opt/ytdlp2STRM# exit
It would be good to include the cronjob into the code (using the cron.py
class) but since this might add some work the fix above should be completely sufficient.
@fe80Grau If you want I can have a look into the code and create a pull request with the fix some time in the next weeks.
Upgrading to the latest version did not help. And also, when I try to reproduce the stream, I get a fatal error.
I tried to open those links that are created in a file that can be accessed by opening a link from the program. Google informs me that there is suspicious activity from my address and does not allow me to open the video stream. Could this be giving an error in jf?
I tried broadcasting from twitch, I get the same error about a fatal playback error.
Hi, sorry for the delay in getting back to you. I'm very busy with work. Let's try to solve your issue.
First of all, I see that in the first screenshot you sent, there's an error in detecting the name of the channel.. [ERROR unsupported URL...]
First, run the following command in your terminal and let's see its output:
yt-dlp https://www.youtube.com/@TheoVon --compat-options no-youtube-unavailable-videos --compat-options no-youtube-channel-redirect --print "%(channel)s" --restrict-filenames --playlist-items 1
Then, try to get a direct URL and see what happens:
yt-dlp -f best https://www.youtube.com/watch?v=tLFvJ7OvVP4 --get-url
This should return a URL. Try to play this URL with VLC or directly in a browser.
With this, I want to check whether the issue you're experiencing is with yt-dlp or due to some blockage from YouTube.
The error with determining the channel name is due to the fact that in the settings file (example) you suggest specifying the full link to the channel (stream). Because of this, the program adds an extra / when scanning . There is a mistake because of this .if you do it in the program as shown in the screenshot, then there is no such error.
But it also raises the question why does the program add /video at the end of the channel request line?
That's all I did after the update yt-dlp (pip install --upgrade yt-dlp --user)
Does the program not delete old files after creating new ones? She created a lot of files for me.
I have now started the broadcast that the program generated. And why is there no sound through vlc?
jf still throws a fatal playback error 8FVzwdbQnaE.txt This is the file that the program generates for me when requesting a link from a stream file. Without txt
When watching broadcasts, is there a need to enable hardware acceleration in Jf?
Point by point:
I am working correctly with the full URL. /videos is added to avoid shorts. Anyway I fixed the double slash in the URL // when rendering
To remove the old strm, edit ./config/config.json and change the value of ytdlp2strm_keep_old_strm to False
On all my strm files, including the channel tested here @TheoVon, it works for me with audio and video via vlc.
And no, hardware acceleration is not necessary in JF.
Honestly, with all the problems you are experiencing I think it must be related to the blocking by YouTube. How many channels have you declared in channel_list.json? And what is your value for videos_limit in ./plugins/youtube/config.json?
I admit, I may have had problems with the sound. I tried to make links to two streams. Today I will try to add more channels and streams. Youtube blocking works for me at the router level. I'm not the only one with this problem. Blocking youtube does not prevent me from opening the link in the vlc player. So jf should open it too. And that's why he can't ask her, that's the question.
Apparently you haven't updated the docker image yet.
Check last coomit please, I have rewritten the entire Youtube plugin
Thanks for the great project.
My instance seems to import videos but it won't play anything. I get playback errors every time I try to play something. Any suggestions?