Jacmog 0 Posted October 27, 2021 Posted October 27, 2021 Hello everyone, I am new to Emby. I bought an Emby premiere couple of days ago as I would like to use IPTV with my Emby server. I successfully set up the live tv (even though I am still struggling with setting up the EPG for Italian channels - any suggestions?) and it is all working fine. My IPTV provider has also a VOD M3U. I looked here at the forum and I found a way to manage to convert M3U to STRM. The strm has all the folders listed correctly right but no files/content of my VOD. I did some testing adding the file folder system to my emby library but it is just a matryoshka of empty folders (correctly named though). Can anyone help me?
Luke 39394 Posted October 27, 2021 Posted October 27, 2021 Hi, this is what your strm files should look like: https://support.emby.media/support/solutions/articles/44001159147-strm-files So if you're going to generate them with a tool, then I would suggest making sure they end up looking like that. Please let us know if this helps. Thanks.
Jacmog 0 Posted October 27, 2021 Author Posted October 27, 2021 Hello, thanks for your prompt reply. I am a bit lost here, I believe. I did a create a text file and renamed as suggested. I imported a folder with the strm file within the library but it says playback error. Is there any other way then generate them? I do have the main VOD m3u and not one for each file...
Luke 39394 Posted October 27, 2021 Posted October 27, 2021 Maybe the url is bad? Let's look at an example: Thanks.
TvDamn 1 Posted February 20, 2022 Posted February 20, 2022 Hello , https://erdesigns.eu/app/tools/m3u-to-strm I use this site and it works perfectly for me. You will ahave a zip file with all strm of your movies. Just add it in a library and everything will be ok. But click the option original name to allow emby to find correct metadata
sundevil67 24 Posted July 2, 2022 Posted July 2, 2022 That site used to be where I went, but haven't been able to find one like it. I'd really like to refresh my movie list but I can't seem to figure out how to make this "simple" script work. Anyone able to provide a pointer or two, I'd love to hear some... I have some familiarity with PHP, but I'm lost as far as where to point to the m3u file.
sundevil67 24 Posted December 9, 2024 Posted December 9, 2024 On 2/19/2022 at 11:48 PM, TvDamn said: Hello , https://erdesigns.eu/app/tools/m3u-to-strm I use this site and it works perfectly for me. You will ahave a zip file with all strm of your movies. Just add it in a library and everything will be ok. But click the option original name to allow emby to find correct metadata Any chance you've stumbled upon another site that has an online conversion tool like this? I know I could probably accomplish it with MacOS Automator, or a Python script, but that stuff is just over my head & I don't have time to mess with it. I just need to find some kind of tool that'll extract STRM files from my M3U file.
Ugnaughts 53 Posted February 1 Posted February 1 On 12/9/2024 at 2:52 PM, sundevil67 said: . I just need to find some kind of tool that'll extract STRM files from my M3U file i made one that does that for apollotv m3u . each m3u will vary a little so its difficult to make a 1 size fits all. but possible. if you want post the format of a few of the vod links inside. here. makesure to remove your username and password from the link though.
sundevil67 24 Posted February 1 Posted February 1 19 hours ago, joekingcool said: i made one that does that for apollotv m3u . each m3u will vary a little so its difficult to make a 1 size fits all. but possible. if you want post the format of a few of the vod links inside. here. makesure to remove your username and password from the link though. Can it run on MacOS?
Ugnaughts 53 Posted February 2 Posted February 2 3 hours ago, sundevil67 said: Can it run on MacOS? sorry buddy, its windows exe. its autohotkey script that easily converts to exe. i can give you the script if you want to see how i made it. not sure how to make apps for mac yet. but ill say script is only about 20 lines of code. so it would be proaably one of the easiest scripts to convert. but once again, it might need tweaked a little for your m3u if the format is different. you could try workik .com its a free to use ai site that writes scripts for you. ive been learning other stuff. and its been real helpful, but not perfect for sure. i would try to convert for you , but i dont have macs ..
sundevil67 24 Posted February 2 Posted February 2 1 hour ago, joekingcool said: sorry buddy, its windows exe. its autohotkey script that easily converts to exe. i can give you the script if you want to see how i made it. not sure how to make apps for mac yet. but ill say script is only about 20 lines of code. so it would be proaably one of the easiest scripts to convert. but once again, it might need tweaked a little for your m3u if the format is different. you could try workik .com its a free to use ai site that writes scripts for you. ive been learning other stuff. and its been real helpful, but not perfect for sure. i would try to convert for you , but i dont have macs .. Thank you
Ugnaughts 53 Posted February 2 Posted February 2 18 minutes ago, sundevil67 said: Thank you if i would try, it would possibly be 1 of these 2. they dont need anything to run. just write cmds in order of what you want it to do. then run it. very low maintance , built in mac os and easier to use and learn The tools mentioned for macOS automation each have different requirements regarding dependencies: 1. AppleScript Dependencies: None. AppleScript is built into macOS, and you can write and run scripts directly using the Script Editor application. 2. Automator Dependencies: None. Automator is also built into macOS, allowing users to create workflows without any additional installations.
sundevil67 24 Posted February 5 Posted February 5 On 2/1/2025 at 7:45 PM, Ugnaughts said: if i would try, it would possibly be 1 of these 2. they dont need anything to run. just write cmds in order of what you want it to do. then run it. very low maintance , built in mac os and easier to use and learn The tools mentioned for macOS automation each have different requirements regarding dependencies: 1. AppleScript Dependencies: None. AppleScript is built into macOS, and you can write and run scripts directly using the Script Editor application. 2. Automator Dependencies: None. Automator is also built into macOS, allowing users to create workflows without any additional installations. Thanks for sharing your efforts. It's a shame that website that allowed me to generate a bunch of files in one shot went away. TBH though, I don't see myself spending any time on this unless it was that easy. The Apollo app is adequate & runs better than Emby.
Ugnaughts 53 Posted February 5 Posted February 5 1 hour ago, sundevil67 said: Thanks for sharing your efforts. It's a shame that website that allowed me to generate a bunch of files in one shot went away. TBH though, I don't see myself spending any time on this unless it was that easy. The Apollo app is adequate & runs better than Emby. It is nice. Although there is no way to back up watched state and favorites. Can't add own personal media. Can't customize the tv channels much. And not sure how long the guide is. I forget. One time I had a profile that got messed up and they said create a new one. Also you need vpn on for each client vs emby you just need on the server. Just to let you know some other reasons to ponder.
mickle026 553 Posted February 7 Posted February 7 I can do this internally within Emby - I have my own plugin that does it. I actually just saw this post because I did a little coding on it today to fix a bug and was reading the forum looking for examples. Then it is ran as a scheduled task, it creates the strm and downloads the logo as Poster.jpg into the movie folder with the strm file .(The path can be an url). Its a scheduled Task so it keeps the directory updated with new content. So I can run it daily, or weekly or whatever.. on a schedule. Because it mine for my needs only, its pretty basic. but i can make it better so that it can seperate TV VOD from Movie VOD. This is currently part of another plugin thats personal for myself, but if you want me to make this avaliable as a standalone plugin, I would need some examples though even if they dont work, just for the way they are named and formatted so that I can cover more bases on how to detect whether or not it was a VOD It would also add the ability to remove what was no longer avaliable via the task aswell, its not there currently but its no biggie.
sundevil67 24 Posted February 12 Posted February 12 On 1/31/2025 at 6:22 PM, Ugnaughts said: i made one that does that for apollotv m3u . each m3u will vary a little so its difficult to make a 1 size fits all. but possible. if you want post the format of a few of the vod links inside. here. makesure to remove your username and password from the link though. The m3u file looks like this for each entry: #EXTINF:-1 tvg-id="tt32249644" tvg-name="tt32249644" tvg-type="movies" group-title="Movies 2024" ,Bad Tidings (2024) https://IPTV-provider-URL/username/password/movie/tt32249644 So far, no luck with @mickle026's plugin unfortunately.
Ugnaughts 53 Posted February 12 Posted February 12 1 minute ago, sundevil67 said: The m3u file looks like this for each entry: looks the same as apollo. would work if you had windows for my exe. i would try to code for mac but i dont have a device to test it on. but im kinda in middle of my curretn project with emby. plugins is the ideal way to code. because its cross platform. although its a steep learning curve and setting things up with the right dependacys is not for noobs like me at that. i like making scripts that just follow steps. maybe i can find a mac emulator to test on if i make an app for macs.
sundevil67 24 Posted February 12 Posted February 12 4 hours ago, Ugnaughts said: looks the same as apollo. would work if you had windows for my exe. i would try to code for mac but i dont have a device to test it on. but im kinda in middle of my curretn project with emby. plugins is the ideal way to code. because its cross platform. although its a steep learning curve and setting things up with the right dependacys is not for noobs like me at that. i like making scripts that just follow steps. maybe i can find a mac emulator to test on if i make an app for macs. Yeah, same provider... I can't come close to making this work though. I added the m3u link as a new source (tried the direct link to their server, as well as a local version of the file), set up the scheduled task, the new library .. The task seems to run, but nothing happens.
mickle026 553 Posted February 12 Posted February 12 (edited) 20 hours ago, sundevil67 said: The m3u file looks like this for each entry: #EXTINF:-1 tvg-id="tt32249644" tvg-name="tt32249644" tvg-type="movies" group-title="Movies 2024" ,Bad Tidings (2024) https://IPTV-provider-URL/username/password/movie/tt32249644 So far, no luck with @mickle026's plugin unfortunately. It has not ever been published here, and the fact that you guys have only just answered my question hasnt enabled me to work on it to fit your needs yet This string is different to mine, so i will have to make some alterations to my code to make this one work with it. Mine doesnt have the tvg-type and has VOD in the group-title. So the next question is how can the "logic" determine this is a VOD and not a channel, what sets this apart from a movie tv channel for processing purposes? I just need to change the regex for yours to like this to cover yours and mine, but would it catch live tv channels in it? I have added segments of my code here with the regex as it might be helpful to you. This is mine: Detect vod in group title and any of the inclusive words in the moviename in brackets () or [] string incluseionwords = "vod|video on demand|movie|film"; Regex.IsMatch(groupTitle, @"^[\[\(]?vod", RegexOptions.IgnoreCase) && Regex.IsMatch(movieName, $@"[\[\(]({incluseionwords})[\]\)]", RegexOptions.IgnoreCase) This is what i would add for yours Detect imdb ttxxxx in both tvg-id & tvg-name aswell as the word movie in tvg-type & group-title || Regex.IsMatch(tvgId, @"^[tt]{2}\d{6,12}$", RegexOptions.IgnoreCase) && Regex.IsMatch(tvgName, @"^[tt]{2}\d{6,12}$", RegexOptions.IgnoreCase) && Regex.IsMatch(tvgType, @"^[\[\(]?movies", RegexOptions.IgnoreCase)) Here is my extraction code - incase it helps you with your script private string ExtractGroupTitle(string titleElement) { var match = Regex.Match(titleElement, @"group-title=""([^""]*)"""); return match.Success ? match.Groups[1].Value : string.Empty; } private string ExtracttvgType(string titleElement) { var match = Regex.Match(titleElement, @"tvg-type=""([^""]*)"""); return match.Success ? match.Groups[1].Value : string.Empty; } private string ExtractTvgId(string titleElement) { var match = Regex.Match(titleElement, @"tvg-id=""([^""]*)"""); return match.Success ? match.Groups[1].Value : string.Empty; } private string ExtractTvgName(string titleElement) { var match = Regex.Match(titleElement, @"tvg-name=""([^""]*)"""); return match.Success ? match.Groups[1].Value : string.Empty; } private string ExtractMovieName(string titleElement) { var split = titleElement.Split(new[] { ',' }, 2); return split.Length > 1 ? split[1] : string.Empty; } private string ExtractTvgLogoUrl(string titleElement) { var match = Regex.Match(titleElement, @"tvg-logo=""([^""]*)"""); return match.Success ? match.Groups[1].Value : string.Empty; } but then do you also need it to create the folder "Movies 2024", because thats where it makes my logic a bit more complex, my plugin already writes everything it detects with this string to your chosen folder. In your example in would create Chosen Folder/Bad Tidings (2024)/Bad Tidings (2024).strm with the STRM content https://IPTV-provider-URL/username/password/movie/tt32249644 Edited February 13 by mickle026 correct the regex
Ugnaughts 53 Posted February 12 Posted February 12 ;###################### UpdateVOD ############################### ;######################sec.all movie strms####################### UpdateVOD: GuiControl,,displayinfo, Started Updating Strm Files For Movies From Apollotv f := "" Runwait, %comspec% /c "powershell -Command Invoke-WebRequest -URI 'https://tvnow.best/api/list/%username%/%password%/m3u8/movies' -OutFile '%A_ScriptDir%\movies.m3u'",,hide Fileread, f, %A_ScriptDir%\movies.m3u FileDelete, %A_ScriptDir%\movies.m3u Loop, parse, f, `n, `r { If InStr(A_LoopField, "://") { SplitPath, A_LoopField, OutFileName if !FileExist(strm_movies "\" OutFileName ".strm") FileOpen(strm_movies "\" OutFileName ".strm", "w").Write(A_LoopField) } } ;######################sec.all series strms########################## GuiControl,,displayinfo, Finished Updating Strm Files For Movies, Working on Series Now From Apollotv num:=0 loop, 27 { num++ f := "" Runwait, %comspec% /c "powershell -Command Invoke-WebRequest -URI 'https://tvnow.best/api/list/%username%/%password%/m3u8/tvshows/%num%/' -OutFile '%A_ScriptDir%\tvshows%num%.m3u'",,hide Fileread, f, %A_ScriptDir%\tvshows%num%.m3u FileDelete, %A_ScriptDir%\tvshows%num%.m3u Loop, parse, f, `n, `r { If InStr(A_LoopField, "://") { A := StrSplit(A_LoopField, "/" ) FileCreateDir,% strm_series "\" A[9] FileCreateDir,% strm_series "\" A[9] "\season "A[10] if !FileExist(strm_series "\" A[9] "\season "A[10] "\S" A[10] "E" A[11] ".strm") FileOpen(strm_series "\" A[9] "\season "A[10]"\S" A[10] "E" A[11] ".strm", "w").Write(A_LoopField) } } } If (A_Args[1] = "VOD") exitapp GuiControl,,displayinfo, Finished Updating Strm Files For Movies and Series From Apollotv -Done- FileDelete, %A_ScriptDir%\tvshows*.m3u return this is my code for ahk. apollo has 3 different links. one for tv channels. one for moves. one for series. and since they save the title as imdb id number, then it finds title pretty well. regex is the best way to extract things. although its usually to complex for me lol i use chatgpt to get answers for regex stuff. i really need to rip off the band aide and just build a test plugin with emby and then start making plugins. this guy needs a way to do this in an emby plugin, because hes on a mac os. i have a way for windows users because its in my exe.
Ugnaughts 53 Posted February 12 Posted February 12 6 hours ago, mickle026 said: So the next question is how can the "logic" determine this is a VOD and not a channel, what sets this apart from a movie tv channel for processing purposes? so ours has them already separated into different m3us. but yours and others, will put into one m3u. i had that recently with another provider i tested. i used iptveditor.com 19 per yr to keep. you can import 1 m3u 3 times. but the end result would only be movies for one or series for the other and channels for the other. they give you new url, thats updated multiple times a day on its own. and it dose i pretty good job on cleanup of those extra descriptions of vod content. then you can treat each m3u for movies a certain way. after it identifys which provider m3u it has. by the url . then it knows how to process the m3u . this way you could get it to work for many m3u iptv providers. hope this helps
mickle026 553 Posted February 12 Posted February 12 (edited) What is your tvg-type for tv channels, and series (TV Shows)? I suppose I could make it very configurable if I am going to do this, I might aswell do it right! Edited February 12 by mickle026
Ugnaughts 53 Posted February 12 Posted February 12 2 hours ago, mickle026 said: What is your tvg-type for tv channels, and series (TV Shows)? -- channel format from one channels.m3u -- #EXTINF:-1 tvg-id="cw.wmdt.dt2.salisbury.md.us" tvg-name="cw.wmdt.dt2.salisbury.md.us" tvg-type="live" group-title="US Local" tvg-logo="https://media.starlite.best/cw.wmdt.dt2.salisbury.md.us.png",CW (WMDTDT2) Salisbury MD https://tvnow.best/api/stream/<username>/<password>/livetv.epg/cw.wmdt.dt2.salisbury.md.us.m3u8 -- movie format from one movies.m3u -- #EXTINF:-1 tvg-id="tt0078346" tvg-name="tt0078346" tvg-type="movies" group-title="Movies 1978" ,Superman (1978) https://tvnow.best/api/stream/<username>/<password>/movie/tt0078346 -- series format from 1-26 series.m3u -- #EXTINF:-1 tvg-id="tt0072562" tvg-name="tt0072562" tvg-type="tvshows" group-title="Saturday Night Live (1975)" ,Saturday Night Live (1975) S50 E11 https://tvnow.best/api/stream/<username>/<password>/tvshow/tt0072562/50/11 #EXTINF:-1 tvg-id="tt0072562" tvg-name="tt0072562" tvg-type="tvshows" group-title="Saturday Night Live (1975)" ,Saturday Night Live (1975) S50 E12 https://tvnow.best/api/stream/<username>/<password>/tvshow/tt0072562/50/12 there all separate m3u's you got this for sure! your tops with plugins in emby!
mickle026 553 Posted February 13 Posted February 13 (edited) I have done the code, its all working. Currently the progress bar doesnt work in the scheduled task either, but i am not worried about that yet, the scheduled task does though. I am concentrating on getting the tv shows into season folders at the moment. I have enabled the plugin to take 3 m3u urls or paths, but it is designed so that it can do it all from one m3u. its here: Edited February 13 by mickle026 1
mickle026 553 Posted February 14 Posted February 14 Updated it, to also split a stream providers m3u file into LiveTV,TVshows and Movies (3 seperate m3u files) and save them. 1
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