Solution trix77 4 Posted November 18, 2020 Solution Posted November 18, 2020 (edited) Hi all! I've been working on this for quite some time now, first as a bash script, now as a console app written in C#. Please check it out an give feedback! I am atm using Jellyfin and Kodi, so I am not 100 that everything works with Emby. To run it in Windows, first open a cmd-window with administrator rights and then cd to the directory where you've downloaded the file, then type m2strm.exe /? to get the help content. To run it in Linux, you need first need to install Mono, in Debian that is: sudo apt-get install mono-devel mono-vbnc Then run it with mono m2strm.exe M3U8 is the same as m3u_plus. Download it from github under Releases here: https://github.com/trix7777/m2strm Edited January 11, 2021 by trix77 1 1 1
Mark II 2 Posted February 17, 2021 Posted February 17, 2021 trix77, Just wanted to say thanks for this tool! I ran my entire m3u file through it and am adding entries to Emby on an as-want basis. Took awhile to run, but we're talking about a 36M input file here. C:\m2strm\Bin>m2strm 2/17/2021 1:21:02 PM: *** Using config set M3U8-file: C:\m2strm\Bin\VOD.m3u 2/17/2021 1:21:02 PM: *** BaseDirectory: C:\m2strm\Bin\ 2/17/2021 1:21:02 PM: *** OutDirectory: C:\m2strm\Bin\Output 2/17/2021 1:21:02 PM: *** Movie subfolder: VOD Movies 2/17/2021 1:21:02 PM: *** Series subfolder: VOD Series 2/17/2021 1:21:02 PM: *** TV subfolder: TV Channels 2/17/2021 1:21:02 PM: *** Configuration file in use: C:\m2strm\Bin\m2strm.exe.config 2/17/2021 1:21:02 PM: *** Unwanted groups file in use: C:\m2strm\Bin\uwgroups.cfg 2/17/2021 1:21:02 PM: *** Processing C:\m2strm\Bin\VOD.m3u 2/17/2021 1:37:34 PM: *** Purging files in: C:\m2strm\Bin\Output 2/17/2021 1:37:37 PM: *** Movies summary: 18459 new, 1182 skipped (whereof 1182 dupes), 19641 in total 2/17/2021 1:37:37 PM: *** Episodes summary: 130927 new, 246 skipped (whereof 246 dupes), 131173 in total 2/17/2021 1:37:37 PM: *** TV-channels summary: 0 new 2/17/2021 1:37:37 PM: *** Processing time: 00:16:35.19 C:\m2strm\Bin> The only suggestion I would make is that you put a "Release" package on github or at the very least, leave an .exe in the Release directory of the project. This would allow for more people that might not code to use it. Thanks again, Mark 1
trix77 4 Posted February 18, 2021 Author Posted February 18, 2021 21 hours ago, Mark II said: trix77, Just wanted to say thanks for this tool! I ran my entire m3u file through it and am adding entries to Emby on an as-want basis. Took awhile to run, but we're talking about a 36M input file here. C:\m2strm\Bin>m2strm 2/17/2021 1:21:02 PM: *** Using config set M3U8-file: C:\m2strm\Bin\VOD.m3u 2/17/2021 1:21:02 PM: *** BaseDirectory: C:\m2strm\Bin\ 2/17/2021 1:21:02 PM: *** OutDirectory: C:\m2strm\Bin\Output 2/17/2021 1:21:02 PM: *** Movie subfolder: VOD Movies 2/17/2021 1:21:02 PM: *** Series subfolder: VOD Series 2/17/2021 1:21:02 PM: *** TV subfolder: TV Channels 2/17/2021 1:21:02 PM: *** Configuration file in use: C:\m2strm\Bin\m2strm.exe.config 2/17/2021 1:21:02 PM: *** Unwanted groups file in use: C:\m2strm\Bin\uwgroups.cfg 2/17/2021 1:21:02 PM: *** Processing C:\m2strm\Bin\VOD.m3u 2/17/2021 1:37:34 PM: *** Purging files in: C:\m2strm\Bin\Output 2/17/2021 1:37:37 PM: *** Movies summary: 18459 new, 1182 skipped (whereof 1182 dupes), 19641 in total 2/17/2021 1:37:37 PM: *** Episodes summary: 130927 new, 246 skipped (whereof 246 dupes), 131173 in total 2/17/2021 1:37:37 PM: *** TV-channels summary: 0 new 2/17/2021 1:37:37 PM: *** Processing time: 00:16:35.19 C:\m2strm\Bin> The only suggestion I would make is that you put a "Release" package on github or at the very least, leave an .exe in the Release directory of the project. This would allow for more people that might not code to use it. Thanks again, Mark Thank you Mark! Yeah, strange thing is that if run in Linux through Mono it's lightning fast even on 30MB+, if it takes like 15 mins in Windows it only takes 20 seconds in Linux. I guess the file management works quite different in the two OS's. Well, there is a release .exe if you click "Releases" (right column) and then "Assets" Cheers
Mark II 2 Posted February 19, 2021 Posted February 19, 2021 Yes indeed! Hopefully more will give it a go. Regards and thanks.
jimbo94 0 Posted September 2, 2021 Posted September 2, 2021 (edited) Hi, Great tool. But it is skipping files "Dublicates" I have for instance one group that has the name "Movie- Multi Subtitles" and one with the name "Movie- 4K" I don't want the tool to skip files in these as of now there is maybe 20 4k files out of 250. and that is because the tool already found them in "Movie- Multi Subtitles" I wouldn't mind if I have doublicates as long as they are in different groups so to speak. Best Regards Edited September 2, 2021 by jimbo94
trix77 4 Posted September 2, 2021 Author Posted September 2, 2021 5 hours ago, jimbo94 said: Hi, Great tool. But it is skipping files "Dublicates" I have for instance one group that has the name "Movie- Multi Subtitles" and one with the name "Movie- 4K" I don't want the tool to skip files in these as of now there is maybe 20 4k files out of 250. and that is because the tool already found them in "Movie- Multi Subtitles" I wouldn't mind if I have doublicates as long as they are in different groups so to speak. Best Regards Hi, glad to see that someone finds it useful! Regarding your post, I'm sorry to say that I am not interested in adding or removing features to it atm, read about how it works under the section "Notes about dupes". The app strips the 4K from the title in the following code: //remove [4K] tag fileName = Regex.Replace(fileName, @"\[4K\]", "", RegexOptions.IgnoreCase); //remove 4K tag fileName = Regex.Replace(fileName, @"4K", "", RegexOptions.IgnoreCase); Cheers
revengineer 136 Posted April 2, 2022 Posted April 2, 2022 Thank you for sharing! Compiled easily with VS2022 and works great and better the Xtream-Downloader, which is now defunct. 1
thecubasekid 1 Posted May 16, 2022 Posted May 16, 2022 (edited) @trix77 Signed up just to say thanks for this awesome tool!! initially i set it up on win 10 and was working great. later on saw about running in mono. i had never heard of mono before. after much searching and some painful trial and error (kodi suggests mono is installed, but actually it is corrupted and needs everything copying manually oto the initial addon install), i have mono running as an addon inside CoreELEC matrix launching m2strm.exe, fully automated with cron. Well pleased. Thank you very much! Edited May 16, 2022 by thecubasekid info 1
griam01 12 Posted September 20, 2023 Posted September 20, 2023 @trix77wanted to thank you for your work on this one. I am just now using this and it is working great for me. Does anyone have any suggestions on how they are doing 24x7 streams? Series and Movies work well for me....but struggling with 24x7 streams. Thanks in advance for your time. 1
trix77 4 Posted September 22, 2023 Author Posted September 22, 2023 On 9/20/2023 at 7:29 PM, griam01 said: @trix77wanted to thank you for your work on this one. I am just now using this and it is working great for me. Does anyone have any suggestions on how they are doing 24x7 streams? Series and Movies work well for me....but struggling with 24x7 streams. Thanks in advance for your time. Thanks! You are welcome 24/7 streams are just as tv-channels and should be treated as such. Nothing for this script but for say tvheadend instead!
sundevil67 25 Posted February 4, 2024 Posted February 4, 2024 Anything like this that'd run in MacOS by any chance?
trix77 4 Posted February 4, 2024 Author Posted February 4, 2024 (edited) 7 minutes ago, sundevil67 said: Anything like this that'd run in MacOS by any chance? It should run under mono on MacOS, but untested: https://www.mono-project.com/docs/getting-started/install/mac/ Edited February 4, 2024 by trix77
sundevil67 25 Posted February 6, 2024 Posted February 6, 2024 On 2/4/2024 at 2:26 PM, trix77 said: It should run under mono on MacOS, but untested: https://www.mono-project.com/docs/getting-started/install/mac/ Thanks ... It's nice to know someone's figured out how to do this with the same provider I use...been looking for something like this for ages...but the implementation is waaay over my head. I appreciate the reply.
Nastream 2 Posted February 7, 2024 Posted February 7, 2024 Hello @trix77 thank you for this great script. I'm using this script on both Windows and Debian (with Mono). However, I'm encountering an issue with a server using "HTTPS" under Debian and Mono, with an => error: PM: ERROR: Error: TrustFailure (Authentication failed, see inner exception.) I've updated the SSH keys with Mono and tried various things, but without success. Do you have any idea how to solve this problem or work around it? Just for your information, the same HTTPS server works perfectly fine under Windows. Thank you trix77
trix77 4 Posted February 8, 2024 Author Posted February 8, 2024 4 hours ago, Nastream said: Hello @trix77 thank you for this great script. I'm using this script on both Windows and Debian (with Mono). However, I'm encountering an issue with a server using "HTTPS" under Debian and Mono, with an => error: PM: ERROR: Error: TrustFailure (Authentication failed, see inner exception.) I've updated the SSH keys with Mono and tried various things, but without success. Do you have any idea how to solve this problem or work around it? Just for your information, the same HTTPS server works perfectly fine under Windows. Thank you trix77 I'm just guessing here, what version of Debian? Did you do sudo apt update and sudo apt upgrade ? Sound like the problems lies in not updating the certificates.
Nastream 2 Posted February 8, 2024 Posted February 8, 2024 Hello @trix77 I am in Debian version 11 and the apt update and upgrade are updated correctly Is it possible to bypass the verification of SSL certificates?
Nastream 2 Posted February 8, 2024 Posted February 8, 2024 Good morning, I solved the problem with this command line: Quote sed -i 's/^mozilla\/DST_Root_CA_X3.crt$/!mozilla\/DST_Root_CA_X3.crt/' /etc/ca-certificates.conf update-ca-certificates cert-sync /etc/ssl/certs/ca-certificates.crt thanks again for this great script 1
Webdoc 2 Posted April 19, 2024 Posted April 19, 2024 Hello just started to use your script and noticed the vod movies have not been placed in folders, am I missing anything? Thanks
grimevil 62 Posted April 20, 2024 Posted April 20, 2024 18 hours ago, Webdoc said: Hello just started to use your script and noticed the vod movies have not been placed in folders, am I missing anything? Thanks I have the same issue, all movies are just in each folder. example \netflix\film (year).strm \netflix\film2 (year).strm instead of \netflix\film (year)\film (year).strm \netflix\film2 (year)\film (year).strm
Radical924 23 Posted December 24, 2024 Posted December 24, 2024 On 20/04/2024 at 01:16, grimevil said: I have the same issue, all movies are just in each folder. example \netflix\film (year).strm \netflix\film2 (year).strm instead of \netflix\film (year)\film (year).strm \netflix\film2 (year)\film (year).strm You need to set the setting "MovieGroupSubdirEnabled" in the config file after creating it with /c command to "True". Follow the instructions on the github page https://github.com/trix7777/m2strm?tab=readme-ov-file
grimevil 62 Posted January 14 Posted January 14 On 24/12/2024 at 11:46, Radical924 said: You need to set the setting "MovieGroupSubdirEnabled" in the config file after creating it with /c command to "True". Follow the instructions on the github page https://github.com/trix7777/m2strm?tab=readme-ov-file I have the option set in my config <add key="MoviesSubDir" value="Movies" /> <add key="SeriesSubDir" value="Series" /> <add key="TVSubDir" value="TV" /> <add key="DeletePreviousDirEnabled" value="False" /> <add key="UnwantedCFGEnabled" value="True" /> <add key="VerboseConsoleOutputEnabled" value="True" /> <add key="ProgramLogEnabled" value="True" /> <add key="PurgeFilesEnabled" value="True" /> <add key="SeriesGroupSubdirEnabled" value="True" /> <add key="MovieGroupSubdirEnabled" value="True" /> <add key="DownloadM3U8Enabled" value="True" /> It still does not create separate folders for each movie, I can send you the log if it helps debug it and screenshots of the folder setup?
trix77 4 Posted January 14 Author Posted January 14 (edited) 29 minutes ago, grimevil said: I have the option set in my config <add key="MoviesSubDir" value="Movies" /> <add key="SeriesSubDir" value="Series" /> <add key="TVSubDir" value="TV" /> <add key="DeletePreviousDirEnabled" value="False" /> <add key="UnwantedCFGEnabled" value="True" /> <add key="VerboseConsoleOutputEnabled" value="True" /> <add key="ProgramLogEnabled" value="True" /> <add key="PurgeFilesEnabled" value="True" /> <add key="SeriesGroupSubdirEnabled" value="True" /> <add key="MovieGroupSubdirEnabled" value="True" /> <add key="DownloadM3U8Enabled" value="True" /> It still does not create separate folders for each movie, I can send you the log if it helps debug it and screenshots of the folder setup? I'm sorry, but the MovieGroupSubdirEnabled option is for groups, there is no option to create a separate directory for each movie. I know this feature has been requested before, but I have not implemented it yet and I have no plans to work on this application at the moment. I still don't understand why on earth you would want to do this? Edited January 14 by trix77 . 1
MajidKorai 0 Posted March 17 Posted March 17 Old topic, but I think it's worth posting here. I went through hassle of converting m3u files to strm previously and spent a lot of time trying to make these python based tools to work. Sometimes they work sometimes they don't and result is also not the same as you want it to be. But recently I found an online tool for doing that. https://m3u2stream.talkingtech.io/ It's simple to use, create an account and upload your file and wait for a few minutes for tool to process the files for you, then just download the strm files in zip folder format. Tool has a small subscription fee to use it, which allows you to convert as many files as you want for a week or so.
sftech13 21 Posted March 18 Posted March 18 I wrote this one the other day and it's free for anyone who wants to use it. Has user options available. https://github.com/sftech13/m3u2strm
trix77 4 Posted March 18 Author Posted March 18 (edited) 2 hours ago, MajidKorai said: ... spent a lot of time trying to make these python based tools to work ... I don't know why you felt the need to hijack my thread writing about a certain online tool that might or might not be malicious. Kindly, please refrain from using this thread to spam. Also, the app that I've written is open source and can easily be forked or/and checked, it's written in 100% C#, no python there. Edited March 18 by trix77
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now