topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday December 13, 2024, 4:14 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: IDEA: M3U8 playlists  (Read 19459 times)

oblivion

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 495
    • View Profile
    • Read more about this member.
    • Donate to Member
IDEA: M3U8 playlists
« on: August 05, 2013, 05:43 AM »
I have an idea for a useful -- and hopefully not-too-complicated -- program.

I have a music player with an expansion slot. If I want to make a "mixtape-style" playlist, it's quite complicated if I want to incorporate music from the expansion slot as well as the internal memory.

If I make a list of files for a playlist while the player's plugged into my PC, the files will include drive letters that the player won't understand.

So I'd like a playlist maker that'll make playlists my player can interpret. To achieve that, it'll need to be able to be told which drive letters map to what folders and where the playlists need to be stored on the player. Ideally, it should either be able to handle drag-and-drop OR have a file browser that can read the music files' tags. (Or even both!)

It would also be nice if it could shuffle a playlist randomly. (For some reason, my text editors don't seem to understand why I might want to sort the lines in a textfile randomly!)

In case this hasn't made much sense, here's what my present workflow looks like:

1. Plug in MP3 player. The PC assigns it to drives F: and K:.

2. Browse files on player from a file manager, select single or multiple filenames, copy the full pathnames to the clipboard, paste them into a text editor. Repeat until all the required music has been identified and named in the textfile.

3. Use search and replace features in the text editor to replace F:\ with \MUSIC\ and K:\ with \<microSD1>\

4. Use search and replace again to replace all \ with / (this is a Rockboxed player and it uses unix-ish path conventions)

5. Tweak order of lines to reflect needs. (If I want random, though, I have to shuffle the playlist using the player itself!)

6. Save file to the Playlists folder on F: as (whatever).m3u8


For all I know, there are 101 things out there that do something like this. However, all I seem to be able to find are playlist makers that make playlists for the device they're being run from -- and as the battery life of my MP3 player is better than my netbook and it doesn't make such an unsightly bulge in my shirt pocket, something like this would be Really Useful. :)
-- bests, Tim

...this space unintentionally left blank.
« Last Edit: August 05, 2013, 06:21 AM by oblivion »

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • View Profile
    • The Blind House
    • Donate to Member
Re: IDEA: M3U8 playlists
« Reply #1 on: August 05, 2013, 08:16 AM »
Let me see if I understand. You want a utility that you can drag and drop or select music from one (or both) of those drive letters and have it replace the letters with \MUSIC\ and \<microSD1>\ respectively and be able to randomize the list and save it as a file with .m3u8 extension <MyMix.m3u8>. Is that correct?

oblivion

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 495
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: M3U8 playlists
« Reply #2 on: August 05, 2013, 09:31 AM »
Let me see if I understand. You want a utility that you can drag and drop or select music from one (or both) of those drive letters and have it replace the letters with \MUSIC\ and \<microSD1>\ respectively and be able to randomize the list and save it as a file with .m3u8 extension <MyMix.m3u8>. Is that correct?
I never learned properly not to waffle. :) That sounds about right!

Oh, yes, it'll need to swap backslashes for forward slashes too.
-- bests, Tim

...this space unintentionally left blank.
« Last Edit: August 05, 2013, 09:32 AM by oblivion, Reason: added forgotten thing :) »

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • View Profile
    • The Blind House
    • Donate to Member
Re: IDEA: M3U8 playlists
« Reply #3 on: August 05, 2013, 09:33 AM »
Ok. I'm on it... Here is a screen shot so far. :-) http://cl.ly/image/2Q0S353V3t18


oblivion

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 495
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: M3U8 playlists
« Reply #4 on: August 05, 2013, 09:34 AM »
Ok. I'm on it... Here is a screen shot so far. :-)
That looks stunning already :)
-- bests, Tim

...this space unintentionally left blank.

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • View Profile
    • The Blind House
    • Donate to Member
Re: IDEA: M3U8 playlists
« Reply #5 on: August 05, 2013, 02:18 PM »
Changed the UI a bit. Give it a go and let me know if it works the way you wanted. :-)

URL Removed - See below for new URL
« Last Edit: August 05, 2013, 03:21 PM by c.gingerich, Reason: removed URL »

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: IDEA: M3U8 playlists
« Reply #6 on: August 05, 2013, 02:44 PM »
Nice, Chris.   :)  Couple of bugs:

  • Selecting multiple items in the list and then moving them (with the buttons) results in some odd behaviour.
  • If you select all the items in the list and then try to move them, it exits with a "Run time error 19 at line 244" message box.

The ability to drop a folder might be a nice addition, too.

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • View Profile
    • The Blind House
    • Donate to Member
Re: IDEA: M3U8 playlists
« Reply #7 on: August 05, 2013, 02:46 PM »
Hmm. Well moving a group of items is not possible, sorry about that I should have said. :-( I'll put in to protect from that and it would cause problems and the error.

I'll add the ability to drop folders.

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • View Profile
    • The Blind House
    • Donate to Member
Re: IDEA: M3U8 playlists
« Reply #8 on: August 05, 2013, 03:20 PM »
I have updated to include dropping of folders (including sub-folders) and fixed the crashing bug.
« Last Edit: August 05, 2013, 03:48 PM by c.gingerich, Reason: removed the url. see below »

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: IDEA: M3U8 playlists
« Reply #9 on: August 05, 2013, 03:42 PM »
I have updated to include dropping of folders (including sub-folders) and fixed the crashing bug.

Fixes/additions confirmed here.   :Thmbsup:

One thing left on the Tim's list and that was to convert backslashes to forward slashes.  Also, the app doesn't appear to process Unicode paths but I'm uncertain if that's important to Tim or not.

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • View Profile
    • The Blind House
    • Donate to Member
Re: IDEA: M3U8 playlists
« Reply #10 on: August 05, 2013, 03:43 PM »
Oops, I forgot the slashes.  :( I'll fix that right up!  :Thmbsup:

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • View Profile
    • The Blind House
    • Donate to Member
Re: IDEA: M3U8 playlists
« Reply #11 on: August 05, 2013, 03:48 PM »
fixed the slashes  :) [See below for new URL]
« Last Edit: August 06, 2013, 02:43 PM by c.gingerich »

oblivion

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 495
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: M3U8 playlists
« Reply #12 on: August 05, 2013, 04:09 PM »
I have updated to include dropping of folders (including sub-folders) and fixed the crashing bug.

http://cl.ly/083C1i3u2i0k

Thanks! That's pretty awesome :)

A couple of things, though: there should probably be some logic that prevents the same drive letter being mapped twice, to different things. (Maybe the available list of drives in the second box should exclude the current selection in the first box, and vice versa? Does that get painfully self-referential?) Also -- and this is probably unnecessary but I noticed it while testing -- the program clearly only makes a list of available drive letters at startup and any more that become available while the program's running don't get picked up.

In general, though: marvellous! Thanks! This will make an irritating job SO much easier!
-- bests, Tim

...this space unintentionally left blank.

oblivion

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 495
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: M3U8 playlists
« Reply #13 on: August 05, 2013, 04:12 PM »
Also, the app doesn't appear to process Unicode paths but I'm uncertain if that's important to Tim or not.
Not right now, anyway :) I daresay there will come a time when it does matter, but it's certainly not important to me now.
-- bests, Tim

...this space unintentionally left blank.

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • View Profile
    • The Blind House
    • Donate to Member
Re: IDEA: M3U8 playlists
« Reply #14 on: August 05, 2013, 06:20 PM »
I can make it auto-refresh the drive list, but removing the drive letter from one and not the other when selected might not be so easy. I may just have to show a warning if both are set to the same letter. I'll see what I can do and should have something tomorrow.

oblivion

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 495
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: M3U8 playlists
« Reply #15 on: August 06, 2013, 05:24 AM »
I can make it auto-refresh the drive list, but removing the drive letter from one and not the other when selected might not be so easy. I may just have to show a warning if both are set to the same letter. I'll see what I can do and should have something tomorrow.
OK, thanks!

I might be stretching things a little here but do you think the possibility of editing an existing playlist might be do-able? It's probably too much to sanity-check it (ie is it referring to files that actually exist, given that it'd be necessary to go backwards from replacements to drive letters before checking the files' existence) but the ability to reorder, reshuffle, delete lines or add new files would be a useful enhancement...

I completely get that I'm pushing the envelope from what I originally asked for. You know how it is, once you get something that works, the feeping creatures start looking round the corners at you :)
-- bests, Tim

...this space unintentionally left blank.

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • View Profile
    • The Blind House
    • Donate to Member
Re: IDEA: M3U8 playlists
« Reply #16 on: August 06, 2013, 10:47 AM »
Ha... :-) Yes I should be able to add the ability to edit existing as well. I got hit with a lot of work today so I may not get to the update today as I first thought. I'll get to it ASAP.

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • View Profile
    • The Blind House
    • Donate to Member
Re: IDEA: M3U8 playlists
« Reply #17 on: August 06, 2013, 02:43 PM »
I have the update available. You can now open .m3u8 files though it will not know the artist or album since there is no direct location for the files.

http://cl.ly/422W24212u3e

oblivion

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 495
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: M3U8 playlists
« Reply #18 on: August 06, 2013, 04:56 PM »
I have the update available. You can now open .m3u8 files though it will not know the artist or album since there is no direct location for the files.

http://cl.ly/422W24212u3e
Brilliant -- thanks!

Too busy myself to do much testing for the next day or so, but I'm sure it'll be fine -- many thanks again!
-- bests, Tim

...this space unintentionally left blank.

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • View Profile
    • The Blind House
    • Donate to Member
Re: IDEA: M3U8 playlists
« Reply #19 on: August 06, 2013, 05:58 PM »
Great! Let me know how it works for you!  :Thmbsup:

oblivion

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 495
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: M3U8 playlists
« Reply #20 on: September 06, 2013, 04:32 AM »
Great! Let me know how it works for you!  :Thmbsup:
It's been okay, but I've just had something very odd happen...

It MIGHT be because the title tag of the last imported track was formatted as "artist name" + "forward slash" + "title" -- I claim no responsibility for that, it was as whatever online CDDB archive delivered for that CD when I ripped it -- but the upshot is that while the program still seems to be responsive (I've just dragged the file column wider to display the full filename and that worked fine) the Artist and Album columns for that track are displaying garbage and I can't delete that entry, I can't start a new playlist and try again, in fact none of the buttons respond to a keypress (beyond the tiny visual feedback indicating that they've been pressed). I can't even close the program.

Screenshot - 06_09_2013 , 10_20_52.pngIDEA: M3U8 playlists

I'll forcibly close it and see if I can pin down an exact trigger (assuming the behaviour's repeatable!) and let you know anything I discover...

[later]

Okay, I'm still getting garbage in the artist and album columns, but I'm wrong about what's causing it -- editing the tags in Opus to remove the slashes hasn't helped. All the tracks on the album exhibited something similar... However, the program's working as expected apart from that, now -- I can't replicate the bit where it went mostly unresponsive.

I'll have to drop the file into a tag editor that can show me more detail of the tag info to see if there's something corrupt I can't currently see.

[later still]

I did that, and couldn't see an obvious problem. The tags were v3.2 and looked as you'd expect.

So I rewrote them all anyway: inserted "various" into the album artist tag, cut the artist name out of each title and pasted it -- minus the <space><slash><space> -- into the artist field. Finally renamed the files themselves to <trackname><space><dash><space><trackname>.

If I were the patient sort, I'd have changed one thing at a time until it worked properly. I'm not the patient sort. Sorry. It works as expected now, anyway. Oh, except that I'm getting "various" for the artist, so presumably either you're using the content of the album artist field or the tag editor I used has it backwards. No biggie.

Strikes me that it's most likely that whatever created the tags in the first place (I have no idea but it would probably have been CDex or fre:ac/BonkEnc as it was in 2010 and that's about when I started using things other than CDex) stuffed something up and me rewriting the tags has unstuffed them. Unless it was something to do with the slashes.

[yet later still]

I think it's something to do with fre:ac. That's what I use for MP3 ripping and conversion pretty much all the time now and I've just seen similar behaviour from a track I ripped only a couple of weeks ago. Phooey -- I LIKE fre:ac.


No, it's not that consistent. The more I play, the less I can get an idea of what the problem is. :(

Any ideas about what might be going on? I should think the problems aren't worse than cosmetic -- I still haven't replicated the crash and it's only the (entirely non-controversial) filename that's being written out, after all -- but if the tags, as written by fre:ac, aren't behaving properly I should probably think about ways to identify and then clean up the problem...
-- bests, Tim

...this space unintentionally left blank.
« Last Edit: September 06, 2013, 06:50 AM by oblivion, Reason: Added detail from later investigations »

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • View Profile
    • The Blind House
    • Donate to Member
Re: IDEA: M3U8 playlists
« Reply #21 on: September 06, 2013, 09:42 AM »
Hmm. I'm not sure what is the cause. Is there any way you can give me an MP3 that has the problem so I can do some testing?

oblivion

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 495
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: M3U8 playlists
« Reply #22 on: September 06, 2013, 10:24 AM »
Hmm. I'm not sure what is the cause. Is there any way you can give me an MP3 that has the problem so I can do some testing?

Yes -- please let me know as soon as you have it so I can take it down again! (NB this is now an encrypted zipfile -- I'll PM the password to you as the content is commercial.)

problem file
-- bests, Tim

...this space unintentionally left blank.
« Last Edit: September 06, 2013, 03:08 PM by oblivion »

oblivion

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 495
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: M3U8 playlists
« Reply #23 on: December 19, 2013, 05:32 AM »
It occurred to me that the problem here might just (hah! "Just!") be that the various fields containing track names etc might require unicode support after all, in order to display sensible content. (This isn't something I know much about -- I'd assumed that unicode would be a superset of the standard character set but if that's a naive assumption, then it might explain a lot.

At any rate, I'm still seeing the program occasionally just going completely unresponsive. Have you been able to look at it at all since we last discussed this?
-- bests, Tim

...this space unintentionally left blank.

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • View Profile
    • The Blind House
    • Donate to Member
Re: IDEA: M3U8 playlists
« Reply #24 on: December 19, 2013, 02:02 PM »
I am sorry I have not looked at this yet. To be honest, I got busy and just plain forgot. I'll try to get to this asap.  :-[