fe80Grau / ytdlp2STRM

A little script to serve Youtube / Twitch / Crunchyroll videos without storage it. Uses yt-dlp HTTP data throught Flask and dynamic URLs. We can use this dynamic URLs to set STRM files.
https://github.com/fe80Grau/ytdlp2STRM
MIT License
228 stars 21 forks source link

can this service stream audio only from youtube #33

Closed fanyangto closed 7 months ago

fanyangto commented 8 months ago

This awesome plugin deserves a lot more attention.

Many want to listen to youtube's audio stream only. Can this service stream audio only ? Many other solutions require downloading files and use ffmpeg to generate and save an audio file. I see your self-hosted service as a great solution to youtube audio listening without saving audio files. Could you comment on audio streaming ?

Now that I have it installed and up running. I can see from the web interface, lots of powerful features. But it's not clear what I need to do in jellyfin to utilize this youtube plugin ? Can you add in your MD file what the user needs to do ?

For example, in your sample youtube channels, you have

Is the keyword-kbase for any keyword search ? what is extractaudio doing ? Does it extract audio of all files from the channel ?

fe80Grau commented 8 months ago

Thank you @fanyangto , yep the keyword- is the prefix to get videos from youtube search , you just need to add a new element in your youtube list with this prefix and the keyword you want seach. For example if you want to search for "football", add a new item like "keyword-football".

And the extractaudio- prefix means that the strm files only play the audio from all the videos in the channel. For example, if you want to stream only the audio of @LiveMusicRadio channel, add a new element like "extractaudio-https://www.youtube.com/@LiveMusicRadio"

fanyangto commented 8 months ago

Thanks a lot.

If youtube uses the direct method, no video/audio is actually downloaded. Instead, jelly fin will use strm to play the stream through the youtube plugin?

I also have the same issue as the other user in that after setting the crons schedule every hour at the hour, nothing happens to the /media dir. No youtube subdir and content were created. I use the docker image. I wonder if you could comment on this.

Now it seems to generate them not according to the schedule I set. But overnight, it does generate all the youtube channel content. Not sure why changing the schedule to every hour than every day didn't work.

fe80Grau commented 8 months ago

Try leaving the "quantity" field empty and in the "every" field set "hour" (singular). I'm using schedule library, take a look for more information https://schedule.readthedocs.io/en/stable/ *used in clases/cron/cron.py

call_constructor = "schedule.every({}).{}.at('{}').do(main_cli, {})".format(
    cron['qty'],
    cron['every'],
    cron['at'],
    cron['do']
)