(working) Packer plugin for M3U/M3U8 playlist creation?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Helix751
Senior Member
Senior Member
Posts: 239
Joined: 2004-06-16, 21:16 UTC
Location: Chile

(working) Packer plugin for M3U/M3U8 playlist creation?

Post by *Helix751 »

Hi. I've been trying to use this plugin for the Subject mater, with no luck. Plugin fails and doesn't work under x68/x64 versions of TC.
M3U/M3U8 1.0.0: https://totalcmd.net/plugring/M3U.html

Is there another plugin that can generate M3U/M3U8/PLS playlists from a selection of audio files? Couldn't find any in the official plugins page, nor in the unofficial totalcmd.net site.

Thanks
Regards,
Sergio

TCmd license #12059
TC11.03x86/x64 | Win11 Pro
wetware05
Junior Member
Junior Member
Posts: 64
Joined: 2023-05-15, 16:10 UTC

Re: (working) Packer plugin for M3U/M3U8 playlist creation?

Post by *wetware05 »

Hi.

Not the most elegant method though..., having the files selected, hit "copy path (long)", make a new text file, paste the contents of the clipboard and save as the .m3u extension

I have this AutoHotkey script, which creates a random list of songs. Look for the music in the directories that are in the file "Full_Directory.txt" which can be something like this:

h:\Mp3\
f:\Temp\
i:\Music\Foundry\
g:\MP3\temp\
m:\temp_mp3\

Save the lists in "h:\PlayList\", which can be changed to suit each one.

Code: Select all

FileDelete, Full_Mp3.txt

loop, h:\PlayList\NewList_*.m3u
Iniciate := % Floor(A_Index)+1

Loop, Read, Full_Directory.txt
NumDirectory:= % Floor(A_Index)

PlayerList:= "h:\PlayList\NewList_" Iniciate ".m3u"

Number:=""

InputBox, Number, Number of Mp3 in the List, , , 250, 100

Loop, %NumDirectory%
{
FileList := ""
FileReadLine, NameFile, Full_Directory.txt, %A_Index%
NameFileTemp:= NameFile "\*.mp3"
Loop, Files, %NameFileTemp%, R
FileList .= A_LoopFileFullPath "`n"
FileAppend, %FileList%, Full_Mp3.txt
}

Loop, Read,  Full_mp3.txt
NumLines := A_Index

Loop, %Number%
{
NumList:= UniqueRands( 1, NumLines, 25 )
FileReadLine, NameFile, Full_mp3.txt, %NumList%
FileAppend, %NameFile%`n, %PlayerList%
}

FileDelete, Full_Mp3.txt

SoundPlay, *64
MsgBox, Ended process!!

UniqueRands( Low, High, HowMany=1 ) ; integers only
{
   If (Low > High)
      return UniqueRands( High, Low, HowMany )
   If ( HowMany > 1 && Howmany - 1 <= High - Low )
   {
      Nums := Low
      Loop % High - Low
         Nums .= "`n" Low + A_Index
      Sort, Nums, Random
      Pos := 0
      Loop %HowMany%
         Pos := InStr( Nums "`n", "`n", 0, Pos+1 )
      return SubStr( Nums "`n", 1, Pos-1 )
   }
   Random, Nums, %Low%, %High%
   return Nums
}
User avatar
Dalai
Power Member
Power Member
Posts: 9963
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: (working) Packer plugin for M3U/M3U8 playlist creation?

Post by *Dalai »

Helix751 wrote: 2023-08-06, 22:59 UTCPlugin fails and doesn't work under x68/x64 versions of TC.
M3U/M3U8 1.0.0: https://totalcmd.net/plugring/M3U.html
Works fine here for me in TC versions 8.52a and 10.52 (32-bit and 64-bit). How exactly does it fail for you? Did you try to create the playlist in a writable location?

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3378
Joined: 2003-05-06, 11:46 UTC

Re: (working) Packer plugin for M3U/M3U8 playlist creation?

Post by *Sir_SiLvA »

2Helix751
Why do you need a plugin to create a m3u doesnt TCs SAVESELECTION do what you need?

example button (m3u filename = -=<current folder name>=-.m3u):

Code: Select all

TOTALCMD#BAR#DATA
SAVESELECTION
-=%B0=-.m3u
<YOUR ICON HERE>
Create M3U from selected files

0
-1
Last edited by Sir_SiLvA on 2023-08-07, 16:16 UTC, edited 1 time in total.
Hoecker sie sind raus!
User avatar
Helix751
Senior Member
Senior Member
Posts: 239
Joined: 2004-06-16, 21:16 UTC
Location: Chile

Re: (working) Packer plugin for M3U/M3U8 playlist creation?

Post by *Helix751 »

Dalai wrote: 2023-08-07, 02:34 UTC Works fine here for me in TC versions 8.52a and 10.52 (32-bit and 64-bit). How exactly does it fail for you?
Upon clicking OK on the Pack files dialogue with M3U selected as packer, it displays an error warning window "Error packing files" with no further information.
Did you try to create the playlist in a writable location?
Yes. Tried many different locations.
Regards,
Sergio

TCmd license #12059
TC11.03x86/x64 | Win11 Pro
User avatar
Dalai
Power Member
Power Member
Posts: 9963
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: (working) Packer plugin for M3U/M3U8 playlist creation?

Post by *Dalai »

Maybe some packer option(s) are the culprit, so I recommend to test different ones. If that doesn't help, I suggest to try TC with a fresh INI file, install the plugin there and try again.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
Helix751
Senior Member
Senior Member
Posts: 239
Joined: 2004-06-16, 21:16 UTC
Location: Chile

Re: (working) Packer plugin for M3U/M3U8 playlist creation?

Post by *Helix751 »

Sir_SiLvA wrote: 2023-08-07, 03:22 UTC 2Helix751
Why do you need a plugin to create a m3u doesnt TCs SAVESELECTION do what you need?
Just because there was a plugin avilable and it made sense to have a packer plugin for this.

Thanks for the alternative solution, btw. It works Ok.
Regards,
Sergio

TCmd license #12059
TC11.03x86/x64 | Win11 Pro
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3378
Joined: 2003-05-06, 11:46 UTC

Re: (working) Packer plugin for M3U/M3U8 playlist creation?

Post by *Sir_SiLvA »

Helix751 wrote: 2023-08-06, 22:59 UTC Is there another plugin that can generate M3U/M3U8/PLS playlists from a selection of audio files?
Couldn't find any in the official plugins page...
Are you sure you locked at the official page at https://www.ghisler.com/plugins.htm ???
Helix751 wrote: 2023-08-07, 16:36 UTC It works Ok.
Well if thats not good enough for you for whatever still not specified reasons, you could always try the MakeBAT-Plugin:
Write-only plugin to create batch files (*.bat) with all the selected files, e.g. for repetitive tasks. May also be used to create mp3 playlists. Source included!
Page: https://www.ghisler.com/plugins.htm
Download: https://plugins.ghisler.com/plugins/makebat.zip
Hoecker sie sind raus!
User avatar
Helix751
Senior Member
Senior Member
Posts: 239
Joined: 2004-06-16, 21:16 UTC
Location: Chile

Re: (working) Packer plugin for M3U/M3U8 playlist creation?

Post by *Helix751 »

Sir_SiLvA wrote: 2023-08-07, 19:34 UTC Are you sure you locked at the official page at https://www.ghisler.com/plugins.htm ???
Indeed yes. I looked in the official list of plugins (nothing there) and also in the unofficial one in totalcmd.net (where the non.working M3U/M3U8 plugin was published).
Well if thats not good enough for you for whatever still not specified reasons, you could always try the MakeBAT-Plugin:
Thanks. It's a nice plugin-oriented solution as well.
Regards,
Sergio

TCmd license #12059
TC11.03x86/x64 | Win11 Pro
User avatar
Gerd K
Junior Member
Junior Member
Posts: 73
Joined: 2003-02-11, 07:40 UTC
Location: Europa, Nordfriesland

Re: (working) Packer plugin for M3U/M3U8 playlist creation?

Post by *Gerd K »

I tried this button, it works fine. But the first piece is never played. Only when you put a blank line at the beginning will the first piece be played.
Is there a way to automatically insert a blank line using the button?
#77116
User avatar
Dalai
Power Member
Power Member
Posts: 9963
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: (working) Packer plugin for M3U/M3U8 playlist creation?

Post by *Dalai »

2Gerd K
This is most likely due to a BOM (Byte Order Mark) at the file's beginning (first three bytes). When saving the file as ANSI, it should work. To do that use SAVESELECTIONA instead of SAVESELECTION. Be aware that saving filenames from a different codepage (Chinese, Cyrillic and so on) will probably not work when saving the list that way.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
Gerd K
Junior Member
Junior Member
Posts: 73
Joined: 2003-02-11, 07:40 UTC
Location: Europa, Nordfriesland

Re: (working) Packer plugin for M3U/M3U8 playlist creation?

Post by *Gerd K »

2 Dalai

This works, thanks!
#77116
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3378
Joined: 2003-05-06, 11:46 UTC

Re: (working) Packer plugin for M3U/M3U8 playlist creation?

Post by *Sir_SiLvA »

Dalai wrote: 2023-09-12, 18:10 UTC This is most likely due to a BOM (Byte Order Mark) at the file's beginning (first three bytes). When saving the file as ANSI, it should work. To do that use SAVESELECTIONA instead of SAVESELECTION. Be aware that saving filenames from a different codepage (Chinese, Cyrillic and so on) will probably not work when saving the list that way.
Thanks a lot Dalai! I had the problem that SAVESELECTION filelist with VLC always lead to a "file not found" for the first file and thought it must be a VLC bug (because MP3 lists created with SAVESELECTION play just fine in AIMP) :oops:
Hoecker sie sind raus!
Post Reply