Author Topic: Video Continuous Play plugin (Require MusicBee 2.4 or later)  (Read 18861 times)

lamrongol

  • Jr. Member
  • **
  • Posts: 51
About
-----
This is a plugin to play music and music videos continuously.
(On default behavior, MusicBee doesn't play next track when video play is finished. This plugin fixes it).

Requires
-----
1. You need MusicBee 2.4 or later.
   v2.4 Patch: http://musicbee.niblseed.com/V2_4/MusicBee_Exe_Patched.zip
2. Install VLC media player if you haven't
   VLC: http://www.videolan.org/vlc/
3. Download dll file to MusicBee plugin folder (C:\Program Files (x86)\MusicBee\Plugins, frequently)
   DLL: https://github.com/lamrongol/MusicBeeVlcVideoPlayPlugin/releases
4. Set VLC path on the plugin setting if you've installed VLC not to default path.
5. Before MusicBee 2.4, by default when a video file is added to the library the "skip when shuffling" flag is set.
    So you must set  "skip when shuffling" flag off if you want to play video files when shuffling, following procedure
    1, Select all video files in Video Library
    2. Shift+Enter
    3. Select [Settings] tab
    4. Check "exclude from playback" and select "No"
    5. [Save]

source code:
https://github.com/lamrongol/MusicBeeVlcVideoPlayPlugin

Update: 2014/04/02
Last Edit: April 02, 2014, 03:31:30 PM by tfujikawa

Volkoff

  • Guest
Well, the plugin certainly needs some work (though idea isn't bad). I think, to work properly, it needs to somehow bind MusicBee's controls with VLC's, so MusicBee would know, when VLC has finished playing, 'cause right now if user would skip some part of video, when the playback ends, the plugin won't jump to the next file.

Docking VLC (like Mediamonkey's video-player) and starting/closing it along with MusicBee would also be very welcome.

But anyway, it's a nice start )

lamrongol

  • Jr. Member
  • **
  • Posts: 51
Well, the plugin certainly needs some work (though idea isn't bad). I think, to work properly, it needs to somehow bind MusicBee's controls with VLC's, so MusicBee would know, when VLC has finished playing, 'cause right now if user would skip some part of video, when the playback ends, the plugin won't jump to the next file.

This plugin stops playing if a user close vlc along the way, to be exact, if vlc is closed before original video time length elapse.
Because I think it is supposed that a user want to stop playing.
However, it is applied, as you say, when a user skip some part of video.
And this feature is implemented when MusicBee video API is not added. Maybe I should modify this feature, for example, to stop only when a user clicks stop button on MusicBee.

Volkoff

  • Guest
Maybe I should modify this feature, for example, to stop only when a user clicks stop button on MusicBee.
Or the stop button in VLC.
Last Edit: April 07, 2014, 05:57:37 AM by Volkoff

lamrongol

  • Jr. Member
  • **
  • Posts: 51
Thanks to Steven, now I updated the plugin not to stop when a user close vlc before finishing playing, stop when a user click stop button on MusicBee.

You need 'newest' MusicBee 2.4 or over from below link,
http://getmusicbee.com/forum/index.php?topic=12148.0

You can download plugin from below link
https://github.com/lamrongol/MusicBeeVlcVideoPlayPlugin/releases/tag/v1.1

>Or the stop button in VLC.
It is difficult to detect what users do on external application.
Last Edit: August 24, 2014, 04:36:54 PM by tfujikawa



lamrongol

  • Jr. Member
  • **
  • Posts: 51
This plugin now works correctly again by MusicBee patch( https://getmusicbee.com/patches/MusicBee35_Patched.zip ).
Detail:
1. You need MusicBee and patch: https://getmusicbee.com & https://getmusicbee.com/patches/MusicBee35_Patched.zip
2. Install VLC media player if you haven't. VLC: https://www.videolan.org/vlc/
3. Download dll file to MusicBee plugin folder (C:\Program Files (x86)\MusicBee\Plugins, frequently) DLL: https://github.com/lamrongol/MusicBeeVlcVideoPlayPlugin/releases
4. Set VLC path on the plugin setting if you've installed not to default path.

https://github.com/lamrongol/MusicBeeVlcVideoPlayPlugin



lamrongol

  • Jr. Member
  • **
  • Posts: 51
@Steven
From 3.5 RC2( https://getmusicbee.com/forum/index.php?topic=36464.msg207222#msg207222 ), this plugin sometimes doesn't play next track after playing video. I used "full download" to clean re-install. I also confirmed this problem doesn't happen RC1( https://getmusicbee.com/forum/index.php?topic=36464.msg206683#msg206683 ).

However,  sometimes the problem occurs and sometimes it doesn't, and I don't know what the reproducible conditions are.
For now, I will just report.

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 34416
trying out your plugin in debug mode, sometimes the plugin throws an System.InvalidOperationException: Process has exited, so the requested information is not available. in the StopCurrentVlc function after receiving a NotificationType.TrackChanged notification from MB - this happens from the 2nd video onwards, so might have something to do with it.
I suggest you debug the plugin to confirm it is actually calling: Player_PlayNextTrack in all cases

lamrongol

  • Jr. Member
  • **
  • Posts: 51
@Steven
Hmm... I found `VlcProcess_Exited` function is not called sometimes but the code always sets it to the `Exited` event.
Perhaps the problem exists in `Process` class of C# or VLC but I can't know why this problem doesn't occur on 3.5(RC1)

lamrongol

  • Jr. Member
  • **
  • Posts: 51
@Steven
I found from ver 3_5_8402, `PlayState` sometimes changes `Stopped` when playing a video.

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 34416
i dont think anything has been changed since RC1 but looking at the code i could imagine it might happen at the very start of a video in the cases when you were playing a music file as the music file comes to an end. Perhaps just ignore it if its in the first couple of seconds at the start the video?