-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metadata transfer for input.m3u to output.m3u for streaming #615
Comments
I haven't worked with .m3u playlists, so I don't quite understand what problem you are trying to solve. Under what circumstances would you want to create a custom .m3u playlist, to piped into VLC? |
Thanks for responding I just thought that with Tartube as #1media downloader, we might as well have integration for IPTV m3u playlists streaming only, no downloads integration. That are lots of people using Kodi, Jellyfin and Plex and VLC who put together their own IPTV playlists and stream for live channels, without any DVR. It looks like Tartube can use both streamlink or yt_dlp to allow an input.m3u to be processed into an output.m3u playlist without downloads. But the #EXTM3U metadata tags, tvg-id, -logo, -name, -epg etc from input.m3u are not available in output.m3u, because streamlink or yt_dlp don't retain these tags, just process stream URLs, by definition. So for streamlink you will need to write a sed regex loop to extract these tags. For yt_dlp, luckily there is an inbuilt --exec command that extracts these tags. Of course cli typing is onerous and error prone with multiple lists and updates. A Tartube GUI feature add will be great ! Examples: ( Just start with tvhlink m3u playlists section, for streamlink piping.)
#!/bin/bash Define the input and output playlist filesinput_playlist="input.m3u" add /data/myscripts and /data/myscripts2#or, PATH=/root:$PATH This will allow you #to run the script by just typing script.sh Define the URL of the input playlistinput_url="URL_input_m3u" Download the input playlist from a remote server using wgetwget -O $input_playlist $input_url Run yt-dlp with the desired optionsyt-dlp -a input.m3u -f "bestvideo[height<=720]+bestaudio/best" --skip-download --hls-use-mpegts --no-progress --playlist-metadata-from-title "%(tvg_id)s %(tvg_name)s %(tvg_logo)s %(group_title)s %(tvg_chno)s %(tvg_epg)s" --no-playlist-metafiles --exec "echo #EXTINF:-1, tvg-id="{id}", tvg-name="{title}", tvg-logo="{thumbnail}", group-title="{playlist_title}", tvg-chno="{tvg_chno}", tvg-epg="{tvg_epg}", {title} >> output.m3u; echo {url} >> output.m3u" chmod +x yt_dlp.sh#set up cronjob to refresh m3u files !. |
A small update: I don't understand how to implement your request, so I have not tried to do it yet. |
Perhaps you can look at this tvlink project (Google translated from Ukrainian) that builds a GUI on top of streamlink with full m3u metadata transfer, etc: The first link for x86 goes to the GitHub with source code. |
Great work 👏
I was wondering if the Tartube platform can be enhanced for tv channels streaming, without necessarily video downloading, by using a custom input.m3u playlist ( including live and VoD YouTube channels, and other sites) that can then output to output.m3u for feeding into external players like VLC, Kodi and Jellyfin m3u tuner?
Here the problem I see is that metadata like tvg-chno, tvg_name, tvg_logo, tvg_epg etc are not transferred to the output.m3u playlist, as I can surmise ?
Maybe also some options for selecting metadata tags that are available already in input.m3u ?
People can write Linux bash scripts loops to transfer metadata but then looping multiple stream URLs for streamlink or yt_dlp processing can also be included, obviating need for a GUI tool. Not clear how such a script works work with Tartube, without any CLI menu.
But incorporating metadata transfer in Tartube avoids writing CLI or scripts which is the whole GUI idea ! And Tartube is quite comprehensive.
The text was updated successfully, but these errors were encountered: