Mixed video&music playlists
#1
Is there any interest on having mixed video&music playlists?

Until version 12, it was easy to add songs into a video playlist and vice versa, but since the inclusion of "GUI_MSG_QUEUE_NEXT_ITEM" it's not possible anymore.

Looking at the code seems to be possible to add a check that would process GUI_MSG_QUEUE_NEXT_ITEM only if the next item is of the same type of the current, or let the playback finish otherwise (creating a new player for the next item).

I could work on it if there're enough interest.
Reply
#2
I would just looove to see this. Personally I'd really appreciate it, if at least mixing music and music videos would truly be possible. Here's a thread where I describe my findings.

http://forum.kodi.tv/showthread.php?tid=214511

Completely mixing them however is just the next logical step. Actually this has been wished for quite frequently if you search the forum.

Personally I don't see any advantage in having two strictly separate playlists at all.
Reply
#3
I'd just like to add that playback of a mixed playlist of music files and (music) videos is absolutely possible with kodi right now once you managed to create such a playlist. It's just insanely difficult to create a mixed playlist.

1.) Create a playlist (video or music doesn't matter) and save it
2.) Leave kodi, go to userdate folder, look for that particular playlist (it's in m3u format)
3.) Manually copy that file to the playlist folder "mixed"
4.) Open that playlist and add more songs to the now playing list through the context menu (only music files work though, music videos don't, argh)
5.) Save it again (it will be saved as a mixed playlist)
6.) To add a further music video you have to start playing that particular video (the now playing playlist gets erased by this), then go to music library and enqueue the mixed playlist from before. You'll now have the playlist from before plus that one more music video. Save that list.
7.) Repeat for every single further music video you'd like to add (sigh).

Playback of such a list is absolutely flawless. No noticeable interruptions between music files and video files.

The means are basically there already, the tools to make it comfortable are missing.
Reply
#4
I guess you're working with the nightly builds. They merged my implementation for mixed playlist three days ago, and now I'm working in the next step, that would be... I don't know.

I can think of three options:
1- Radical one: use a single playlist for music and video.
Pros:
. Consistent.
Cons:
. How to handle party mode?
. The big one: API/ABI incompatibilities.

2- Less radical: make video_playlist=music_playlist
Pros:
. Easy to implement, just remove a few lines of code here and there.
. No changes necessary in API, UI or plugins.
Cons:
. It can be confusing for the user?
. How to handle party mode?

3- Treat music videos as songs:
Pros:
. Intuitive.
. No API changes.
Cons:
. Complicated implementation


I'm totally for option 2, but it needs some system perspective.
Reply
#5
Could be that I'm using nightly builds. I don't know the branch of these test builds here

http://forum.kodi.tv/showthread.php?tid=216275

Anyways, thanks a heap for working on it. It used to work to some extent in the past but not very well, so I kinda gave up on it and just recently started playing around with mixed playlists again. And then your thread came along...perfect timing.

I need some time to think the alternatives through.

One thing I recently discovered was that Yatse, my android remote is having difficulties fetching a playlist of mixed content. It shows an empty list. Yatse only shows only one playlist, whereas the official ios remote lets you pick between a music and a video playlist. It receives a mixed list as a music playlist but when a video is playing it switches to the view of the video list (the playlist is correctly shown if you manually choose the music playlist though). I guess the remote decides based an the now playing media which playlist to show and in its logic it picks the video playlist when a video is played,

I guess there will be many more such obstacles
Reply
#6
Warning, long posting, but hopefully worth reading :-) There is a summary at the end.

I played around some more. Looking at the alternatives you presented could you please elaborate a little the differences between options 1 and 2? Understand I'm just a user with no knowledge of the code involved, but as a user "use a single playlist for music and video" and "make video_playlist=music_playlist" look similar.

Maybe it's helpful to look further into how kodi is handling playlists right now and check the rationale for why it does what it does. And then just to make sure everyone is speaking of the same, distinguish between the different playlists in kodi.

As I understand there are three possible playlists in kodi right now. There are three folders inside the userdata folder "playlists": music, video and mixed.

The contents of the folder video will show up in the video library, the contents of the folder music will show up in the music library. The contents of the folder mixed will show up in both libraries.

Then there is also the "now playing" list in kodi. I guess this list is what most user would consider and call THE playlist. There are two now playing lists: music and video. Each can be filled individually with items. You can have a now playing music list with songs and a now playing video list with videos in it at the same time and play them individually. The now playing lists can be reached through the music library or the video library accordingly.

The now playing list can consist of one item or many items.

For music the default behaviour seems to be the following:
By playing or enqueueing a song, an album, all songs from an artist the music library these items will be loaded into the now playing music list and these items will be played in the order of the now playing list.

Saving the now playing list from the music part will result in an m3u file in the playlist folder "music".

For videos the default behaviour seems to be:

By playing or enqueueing a video (movie or tv show or music video does not matter), a season from the video library these items will be loaded into the now playing video list and these items will be played in the order of the now playing list.

Saving the now playing list from the music part will result in an m3u file in the playlist folder "video".

I couldn't find any way to save a playlist into the folder "mixed", even though the playlist content is mixed.
According to the wiki creating mixed playlists is possible through smart playlists. I have never worked with these but might try it out.

There is also no way to enqueue a file from the video library to the now playing music list and vice versa from the music library to the now playing video list. Hence it's quite complicated to create a mixed playlist. I described a way in my second posting.

Now I did the following:

I put a music playlist containing only mp3 files inside the video folder of playlists, loaded that playlist from within the video library and played it.

It worked. Music playback started just like it would from the music library.
The playlist was loaded into the now playing music list even though I started the playlist from the video library.

I then put a video playlist containing only iso files inside the music folder of playlists, loaded that playlist from within the music library and played it.

It worked. Video playback started just like it would from the video library.
The playlist was loaded into the now playing music list. This is somehow expected behaviour but it differs from the handling of a pure music playlist from within the video library.

Note the difference.

I then created a totally mixed playlist that contains a tv show (iso format), a music video (avi format), a music file (mp3) and even a movie (video_ts format) and put that in the playlist folder video and started playback from the music library.

It worked as well. I could play a tv show followed by an mp3 file followed by a music video followed by a movie.
The items of the playlist were loaded into the now playing video list (even the music file).

I put that same playlist into the playlist folder music and started playback.
The tv show worked, the mp3 file worked, the music video worked. The movie however did not work. It was skipped.
The items of the playlist were loaded into the now playing music list.

The same happened when I put that playlist into the folder mixed. It was loaded into the now playing music list and the movie was skipped.

One obvious bug:
In a mixed playlist, once a music file has finished playing, kodi will skip any videos of the now playing list until the next music file is reached and start playback of that music file. By skipping manually to the next track while a music file is playing it will correctly skip to a video if that is of course the next item in the now playing list.

So to sum the current behaviour up:
1.) There is no way inside of kodi to save to the playlist folder mixed
2.) It seems to matter, from which library a playlist gets started
3.) A pure music playlist will be loaded into the now playing music list even when playback was started from within the video library.
4.) A pure video playlist will still be loaded into the now playing music list when playback was started from within the music library.
5.) Playlists from the folder mixed will always be loaded to the now playing music list
6.) The now playing video list seems to offer more functions (even a movie within a playlist worked whereas it didn't when the list was loaded to the now playing music list).

Apart from video playlists only showing up in the video library and music playlists only showing up in the music library, the differences really are marginal. Video playlists work in the music library and vice versa. That's a good thing I guess.

My suggestion so far would be to have only one now playing list instead of two. I guess that would be your alternative 1. Any media gets loaded to THE now playing list.

One obvious problem with saved playlists would be where would these show up when there is only one now playing list? How can kodi distinguish between a video, music or mixed playlist? Consistency first, it would be consistent if any playlist would show up in any library. Yes, that would mean pure music playlists would show up in the video library and vice versa but with a unified or mixed playlist this would just be consistent.

I have logs for everything I tried today. I'll upload them tomorrow.
Reply
#7
Logs:

Playing a mixed playlist (music videos and mp3) from the music library:

http://pastebin.com/cHPqemz9

Playing the same playlist from the music library but skip to the next track while a music track is playing:

http://pastebin.com/SN2vz7kL

Playing a pure music playlist from the video library:

http://pastebin.com/SfVRM1gZ

Playing a pure video playlist from the music library:

http://pastebin.com/PsFUXspj

Playing a totally mixed playlist from the music library:

http://pastebin.com/ri6mjYwZ

Playing a totally mixed playlist from the video library:

http://pastebin.com/4m4EuxPF
Reply
#8
Quote: Looking at the alternatives you presented could you please elaborate a little the differences between options 1 and 2?

Option 1 means that there will be only one "now playing" playlist. It means that all the parties that interact with the playlist have to be aware that there is only one playlist. It will certainly break backwards compatibility with third party software, and a lot of addons, because you have to decide in which playlist (named '0' and '1') you want to add the media you want to play.

Option 2 means that from API point of view there are still two playlists, but they're actually the same. It will keep compatibility with existing plugins and third party software. Most remote controls (e.g Yatse) show only the "now playing" playlist for the active player (music or video), but some others like Chorus explicitly show two different playlist for Video and Music, what means that Yatse users won't notice any change, while Chorus users will notice that selecting one or other playlist "doesn't do anything."

Option 2 has also the advantage of allowing implementation of mixed playlists support in different steps. It is irrelevant from the user's point of view, but it's very useful from the developer's point of view. I have a build (for linux) using option two, and working in a party-mode manager that selects both songs and music videos.

Quote:One obvious problem with saved playlists would be where would these show up when there is only one now playing list? How can kodi distinguish between a video, music or mixed playlist? Consistency first, it would be consistent if any playlist would show up in any library. Yes, that would mean pure music playlists would show up in the video library and vice versa but with a unified or mixed playlist this would just be consistent.

From my point of view, music videos should appear both in Music and Videos, while movies and tv-shows should only appear in Videos (assuming Confluence). Notice that some skins don't have a Music and Videos menus, but instead Music, Movies, TV-Shows. Treating music videos as songs makes even more sense in that situation.

For playlists it's not that clear for me. Should I be able to add a movie to a music playlist? Maybe one song or two between episodes of a show? I'm with you about having just "playlists," and making them available from any Music/Video menu, but I don't know how intuitive would it be for users.

It needs some bigger discussion. Unfortunately, developers seem to be ignoring this thread :-(
Reply
#9
(2015-02-10, 12:21)redviolet Wrote:
Quote: Looking at the alternatives you presented could you please elaborate a little the differences between options 1 and 2?

Option 1 means that there will be only one "now playing" playlist. It means that all the parties that interact with the playlist have to be aware that there is only one playlist. It will certainly break backwards compatibility with third party software, and a lot of addons, because you have to decide in which playlist (named '0' and '1') you want to add the media you want to play.

Option 2 means that from API point of view there are still two playlists, but they're actually the same. It will keep compatibility with existing plugins and third party software. Most remote controls (e.g Yatse) show only the "now playing" playlist for the active player (music or video), but some others like Chorus explicitly show two different playlist for Video and Music, what means that Yatse users won't notice any change, while Chorus users will notice that selecting one or other playlist "doesn't do anything."

Option 2 has also the advantage of allowing implementation of mixed playlists support in different steps. It is irrelevant from the user's point of view, but it's very useful from the developer's point of view. I have a build (for linux) using option two, and working in a party-mode manager that selects both songs and music videos.

All right, understood. I'm all for option 2 then.

I have never really worked with party mode. I often use a script called lastfm playlist generator. It reads the now playing song and adds similar songs based on last.fm to the now playing list. However only music files are considered. It would be my dream that music videos would also be added (preferably with a higher priority than music files).

(2015-02-10, 12:21)redviolet Wrote:
Quote:One obvious problem with saved playlists would be where would these show up when there is only one now playing list? How can kodi distinguish between a video, music or mixed playlist? Consistency first, it would be consistent if any playlist would show up in any library. Yes, that would mean pure music playlists would show up in the video library and vice versa but with a unified or mixed playlist this would just be consistent.

From my point of view, music videos should appear both in Music and Videos, while movies and tv-shows should only appear in Videos (assuming Confluence). Notice that some skins don't have a Music and Videos menus, but instead Music, Movies, TV-Shows. Treating music videos as songs makes even more sense in that situation.

Oh, absolutely. To me personally music videos ARE songs. The only difference is the file format and that there's a "moving background" instead of a visualization or whatever's playing in the background. I have no idea, how music videos are implemented in the music database or if they're even in there.

(2015-02-10, 12:21)redviolet Wrote: For playlists it's not that clear for me. Should I be able to add a movie to a music playlist? Maybe one song or two between episodes of a show? I'm with you about having just "playlists," and making them available from any Music/Video menu, but I don't know how intuitive would it be for users.

Assuming we break the wall between playlists here, it would make sense that all playlists show up in any library. I have no idea what users would do with a mixed playlist function. Maybe mix movies with tv shows with a soundtrack in between? Maybe that could even be done with a smart playlist. Generate a playlist with every media connected to some movie, actor, singer, whatever. Hell, you could even throw pictures in there.

To work with what's available right now, I'd say that all playlists should therefore be saved to the folder "mixed" in the userdata folder and the other folders "music" and "video" can be ignored.

(2015-02-10, 12:21)redviolet Wrote: It needs some bigger discussion. Unfortunately, developers seem to be ignoring this thread :-(

Sadly yes. It has been stated quite frequently that very few devs even use the music section. Therefore sadly there is indeed only little interest in that section in general. Personally I could live without the movie section and hardly use that part of kodi.
Reply
#10
(2015-02-08, 23:27)DarkHelmet Wrote: One obvious bug:
In a mixed playlist, once a music file has finished playing, kodi will skip any videos of the now playing list until the next music file is reached and start playback of that music file. By skipping manually to the next track while a music file is playing it will correctly skip to a video if that is of course the next item in the now playing list.

Redviolet or anyone, can you confirm that behaviour?
Reply
#11
(2015-02-10, 17:04)DarkHelmet Wrote: One obvious bug:
In a mixed playlist, once a music file has finished playing, kodi will skip any videos of the now playing list until the next music file is reached and start playback of that music file. By skipping manually to the next track while a music file is playing it will correctly skip to a video if that is of course the next item in the now playing list.

Redviolet or anyone, can you confirm that behaviour?

I didn't notice that part. That was actually the problem I was referring to in my original post. Until Frodo, you could create smart playlists of type "mixed" that would play videos and songs, but they stopped working in Gotham because the music player will skip videos. I already sent a patch to fix that problem that was included in the nightly builds one week ago and "mixed" smart playlists are working again.

But changing the UI in a way that creating mixed playlist becomes obvious sounds quite important and useful, too.
Reply
#12
(2015-02-09, 12:52)DarkHelmet Wrote: Logs:

Playing a mixed playlist (music videos and mp3) from the music library:

http://pastebin.com/cHPqemz9

Playing the same playlist from the music library but skip to the next track while a music track is playing:

http://pastebin.com/SN2vz7kL

Could you (or anyone) please check these logs? Apparently a mixed playlist works for you but for me it doesn't. The build is from the 5th of February but I'm still not sure it includes the implementation you made, because the build was mainly done to fix a bug in the windows build.
Reply
#13
(2015-02-13, 21:27)DarkHelmet Wrote: Could you (or anyone) please check these logs? Apparently a mixed playlist works for you but for me it doesn't. The build is from the 5th of February but I'm still not sure it includes the implementation you made, because the build was mainly done to fix a bug in the windows build.

You're using the "Helix test" builds, but should use one of the "development builds." They're less stable than the ones you're using, but if you can test the changes, I could try to push them into 14.2 release.
Reply
#14
I'm on a windows system. There are stability issues with windows right now and a possible fix hasn't been included in the master branch. Therefore there's not a lot of testing I can do before the fix is included in the development builds. Kodi would most likely constantly crash on me.

Appreciate the work you do.
Reply
#15
can provide you with a build though
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply

Logout Mark Read Team Forum Stats Members Help
Mixed video&music playlists0