m3u4strm - Printable Version +- Jellyfin Forum (https://forum.jellyfin.org) +-- Forum: Off Topic (https://forum.jellyfin.org/f-off-topic) +--- Forum: General Discussion (https://forum.jellyfin.org/f-general-discussion) +--- Thread: m3u4strm (/t-m3u4strm) |
m3u4strm - Hanna Yusuf - 2025-01-28 Hey everyone, I have recently released a beta version of a web app I have been working on, it manages your m3u plus files and helps you keep everything in order. It also has a UI where you can view your movies and series. Yes it is mainly for movies and series, it helps turn your m3us into a compatible strm structure and then you can add the movies and series to Jellyfin by submitting a watch list. This web app is completely free and open source! I would love if people can further develop it. I am not the greatest programmer ever, but it works! Some features aren't implemented yet I am hoping the community will help. You can deploy it as a docker container using docker compose or using portainer. https://github.com/hannayusuf97/m3u4strmV2 RE: m3u4strm - xaque - 2025-01-28 I created a similar project, no web ui just a docker image. I briefly looked over your code and am I to assume that if the file extension is absent from the provided m3u then this will not correctly parse the Movies and or series? I know a lot of providers do not put formats/files extensions. I see you're using ffmpeg/ffprobe to get video info, but it only seems to grab the duration and resolution, surely you could use this method to get the file extension as well? Also, how does using ffmpeg to get video info affect the speed of large m3us? I'd very curious to know as it may be something I'd like to implement into my project. I found that m3u are formatted very differently across providers and adjusting to accommodate this is a big hurdle in correctly parsing out movie/series titles. Currently I use a bunch of regex to determine stream types and titles, but I've though about using something like this, and I'd be interested to know what are your thoughts? https://pypi.org/project/guessit/ RE: m3u4strm - Hanna Yusuf - 2025-01-29 Yes you are right if the file extension is not there you can't upload the file anyway ... I assumed all m3u files have the extension but that is something I work on, a good solution would be to check the file heading of the file. Considering ffmpeg, I am not immediately scanning all the links, I found an effective but maybe less accurate solution. You have to manually check every movie before upload using the get media info button then it either returns the resolution and duration or "Error" which indicates that the link doesn't work. If you get multiple (I am implementing a counter for the providers in the admin panel at the moment) you can assume that the provider has stopped working, then you can remove it from the admin panel. Thank you a lot for suggesting guessit, I have been looking for such a project! I will definitely look into using it. If you are interested, I am wondering if you think we could integrate our projects together in case you have a better implementation for the processing, and we can implement guessit to help identify new series and movies. I am also planning on implementing auto library scan when new media is moved using the JellyfinAPI RE: m3u4strm - xaque - 2025-01-29 (Yesterday, 04:43 AM)Hanna Yusuf Wrote: Yes you are right if the file extension is not there you can't upload the file anyway ... I assumed all m3u files have the extension but that is something I work on, a good solution would be to check the file heading of the file. So here is my project for reference, I have 3 branches, the main one is simply the parser script which creates a strm library of Movie and TV shows that can be directly ingested by jellyfin. It does allow you to pass a apikey and your jellyfin url as variables through a .env file to run a library scan. https://github.com/Xaque8787/m3uparser The other two branches kind of take things a step further and the compose file I provide is a stack that includes the jellyfin server, but I've added a bunch of re-branding to change the jellyfin logo and stuff, it even ships with a re branded apk of the jellyfin android tv client that gets exposed on a webserver. The only difference between these two branches is one directly uses jellyfins live tv capabilities to add tuner and xmltv data and the other uses Threadfin (m3u proxy) which is then added to the jellyfin server. https://github.com/Xaque8787/m3uparser/tree/ezpztv https://github.com/Xaque8787/m3uparser/tree/ezpztv_threadfin Any of these branches have the ability to supply multiple m3u files at once, and in addition to creating the strm libraries will produce a single livetv.m3u which contains any livetv streams from any of the supplied m3u files. This file is what is used when adding a tuner to either jellyfin or theadfin. There is a fourth branch but that is currently just being used for another project I have in the works. I've been fortunate enough to have people supply me with various m3u files to see how providers format them, and I haven't came across any that use file extensions in the movie/series name or in the stream url. I've used the information I've obtained to allow users to pass environment variables that can: exclude streams that contain certain terms (like language tags DE, RU or genres), remove certain terms found in titles (x265, FHD, etc), replace terms (replacing any instance of 1/2 with ½ or \ with a -) and the ability to scrub out other un wanted strings. My current implementation for deciding what is what is to use the group-tile values and run them through a series of regex, which kind of goes like this. If S00E00 (or other common variations like 00x00) are found mark it as tv series. If tv show but also includes a date like 12 9 2025 then mark that as live tv show. (Things like late night talk shows ie The Daily Show, Jimmy Kimmel Live, etc) If not series or tv show then look for year date format (1995, 2003, etc) and consider this to be a movie. If not series, live tv, movie and has a -1 as the duration in the EXTINF line then consider this live tv. If not any of the above then consider this "unsorted" which often contains poorly named titles or things like Ufc 303 Dude vs SomeGuy. This has kind of been fine tuned to where I rarely get any unsorted titles if any, and when used in conjunction with the filters provided by environment variables, has a very high success rate of parsing very large m3u files. And it's pretty dang fast too. With all that being said I would like to mention I am in no way any kind of programmer, I actually work in a kitchen, and this has been a side project of mine and I've had to teach myself as I go. I will say I've come a long way since this first began though, and wouldn't at all mind collaborating on something. I'd say the perfect solution would be a jellyfin plugin that can take any number of m3u inputs and be pointed to a Movie and TV library. But perhaps that is for a discussion to be had in another time/place. Lastly I'd like to say I've only glanced at your code, haven't actually spun up the image/container, and my weeks currently a bit busy, but when I get some free time this weekend I hope to get it running and check it out, then perhaps I'd have more of an idea on a collaboration, in whatever shape that may be, but I'd like you to know I'm super interested in being able to collab with someone in some capacity. The wheels are spinning good sir, and your project has already got me thinking ton! |