Difference between revisions of "YAMJ"

From YobiWiki
Jump to navigation Jump to search
m (Created page with "Another technique for Dune HD is to export movies library to external browsers rather than using the embedded dune_folder.txt mechanism. <br>My favorite is for now [http://co…")
 
m
Line 6: Line 6:
 
* Good old background/foreground unix principles: one data grabber (YAMJ) independent of the player and one frontend (a skin)
 
* Good old background/foreground unix principles: one data grabber (YAMJ) independent of the player and one frontend (a skin)
 
* Manual changes to data grabbing performed with simple file-based annotations, so easily scriptable too
 
* Manual changes to data grabbing performed with simple file-based annotations, so easily scriptable too
  +
==YAMJ alone==
  +
Actually I almost never use the remote control to navigate the media library directly on the DuneHD.
  +
<br>I prefer to do it either from the PC or from the Android tablet.
  +
<br>We've seen eversion but it doesn't work on the PC neither on DMC for Android so it doesn't really fit my need...
  +
<br>YAMJ produces directly HTML which is ok for the PC as we can control the DuneHD by HTTP requests and it's also ok for the tablet via a web browser or via DMC as there is a script to convert YAMJ output to dune_folder structure as we'll see later.
  +
===Installation===
  +
I downloaded moviejukebox-2.8.zip from [https://code.google.com/p/moviejukebox/downloads/list here]
  +
<br>Some [https://code.google.com/p/moviejukebox/wiki/Installation installation notes here]
  +
===YAMJ Tuning===
  +
I'm using several setups for parents & kids, here e.g. I'll create a "foo" setup
  +
====library-foo.xml====
  +
Trick is to use Dune IP control in the URL
  +
<br>Example:
  +
<pre>
  +
<libraries>
  +
<library>
  +
<path>/media/nas/video/</path>
  +
<playerpath>http://ip_of_dune/cgi-bin/do?cmd=launch_media_url&amp;media_url=smb://user:password@ip_of_nas/video/</playerpath>
  +
<exclude name="sample,tmp/,temp/,RECYCLE.BIN/,/._"/>
  +
<description>Movies</description>
  +
<prebuf></prebuf>
  +
<scrapeLibrary>true</scrapeLibrary>
  +
</library>
  +
</libraries>
  +
</pre>
  +
====categories-foo.xml====
  +
It's a copy of categories-default.xml where I disable most categories, e.g. to keep it simple for my kid
  +
<br>Just change "<enable>false</enable>" into "<enable>false</enable>" for each category to suppress
  +
====moviejukebox-foo.properties====
  +
The main tuning file
  +
<br>Major stuffs:
  +
# This is the skin property, you will need to change this if you want to change the look of YAMJ
  +
mjb.skin.dir=./skins/default
  +
# new yamj feature to enabled directory hashing layout for image storage. Results in more speed on larger jukeboxes
  +
mjb.dirHash=true
  +
# Unix/Linux/Mac users will need to install Mediainfo on their own and remove the # from the front of this setting
  +
mediainfo.home=/usr/bin/
  +
# Set to true to have YAMJ monitor your settings and adjust overwrites as needed automatically for you.
  +
mjb.monitorJukeboxProperties=true
  +
# Create TV show Boxsets automatically (group all tv show seasons together as 1 show)
  +
mjb.singleSeriesPage=true
  +
# threading for speed
  +
mjb.MaxThreadsProcess=3
  +
mjb.MaxThreadsDownload=3
  +
mjb.MaxDownloadSlots=.*=2,.*imdb.*=3,.*google.*=3,.*yahoo.*=3,.*themoviedb.*=4,.*thetvdb.*=2,.*apple.*=1
  +
Personal settings
  +
mjb.jukeboxRoot=/media/nas/Jukebox
  +
mjb.libraryRoot=library-foo.xml
  +
mjb.detailsDirName=Movies
  +
mjb.xmlCategoryFile=categories-foo.xml
  +
Reduce further indexes
  +
# Comma-separated list of indexes to generate. Valid indexes include:
  +
# Other, Genres, Title, Certification, Year, Library, Cast, Director, Writer and Country
  +
mjb.categories.indexList=Other,Title,Library,Set
  +
IMDB/TVDB languages
  +
imdb.site=fr
  +
thetvdb.language=fr
  +
#mjb.internet.plugin=com.moviejukebox.plugin.AllocinePlugin
  +
====MovieJukebox-foo.sh====
  +
Just MovieJukebox.sh with the proper options
  +
#!/bin/sh
  +
java -Xms256m -Xmx1024m -classpath .:./resources:./lib/* com.moviejukebox.MovieJukebox -p moviejukebox-foo.properties -c "$@"
  +
  +
===YAMJ Filename conventions===
  +
Cheat sheet, much more details on [https://code.google.com/p/moviejukebox/w/list YAMJ Wiki]!
  +
Standard:
  +
/Movies/My Movie.avi
  +
/Movies/My Movie/VIDEO_TS/...
  +
/Movies/My Movie/BDMV/STREAM/...
  +
/Movies/My Serie/Season 1/My Serie S01E01.avi
  +
#Special episode:
  +
/Movies/My Serie/Season 1/My Serie S00E01.avi
  +
Separator: " ", "." or "_"
  +
/Movies/My Movie.avi
  +
/Movies/My.Movie.avi
  +
/Movies/My_Movie.avi
  +
Tokens: "[]" or "()"
  +
<br>With Year:
  +
/Movies/My Movie.[YYYY].avi
  +
/Movies/My Movie (YYYY).avi
  +
With Language: (see moviejukebox.properties::filename.scanner.language.keywords.*)
  +
/Movies/My Movie.[YYYY]_FR.avi
  +
/Movies/My Movie.[YYYY]_FRENCH.avi
  +
With video source (See [https://code.google.com/p/moviejukebox/wiki/VideoSources supported keywords])
  +
/Movies/My Movie_DVDRip.avi
  +
Anything after "-" is ignored, usually used for episode title or part title, e.g.
  +
/Movies/My Serie/Season 1/My Serie S01E01 - Title.avi
  +
Trailers:
  +
/Movies/My Movie [...Trailer...].avi
  +
/Movies/My Movie [Bonus - Title of the bonus].avi
  +
NFO:
  +
/Movies/My Movie.nfo
  +
/Movies/My Movie [PART1].nfo
  +
/Movies/My Serie/Season 1/My Serie S01E01.nfo
  +
/Movies/My Serie/Season 1/Season 1.nfo
  +
Movie IDs (instead of using a NFO):
  +
/Movies/My Movie [ID IMDB tt1234567].avi
  +
Posters: replace movie extension by .jpg or .png or (see moviejukebox.properties::poster.scanner.coverArtExtensions)
  +
/Movies/My Movie.jpg
  +
/Movies/My Serie/Season 1/My Serie S01E01.jpg
  +
/Movies/My Serie/Season 1/Season 1.jpg
  +
Fanarts: idem with token .fanart (see skin.properties::mjb.scanner.fanartToken)
  +
/Movies/My Movie.fanart.jpg
  +
/Movies/My Serie/Season 1/My Serie S01E01.fanart.jpg
  +
/Movies/My Serie/Season 1/Season 1.fanart.jpg
  +
Banners: idem with token .banner (see skin.properties::mjb.scanner.bannerToken)
  +
/Movies/My Serie/Season 1/My Serie S01E01.banner.jpg
  +
/Movies/My Serie/Season 1/Season 1.banner.jpg
  +
Videoimages: idem with token .videoimage
  +
/Movies/My Serie/Season 1/My Serie S01E01.videoimage.jpg
  +
/Movies/My Serie/Season 1/My Serie S01E02.videoimage.jpg
  +
Multi-part: CDx, DISCx, DISKx or PARTx
  +
/Movies/My Movie [DISC1].avi
  +
/Movies/My Movie [DISC2].avi
  +
/Movies/My Movie [DISC2-Title of part 2].avi
  +
Sets:
  +
/Movies/My Movie [SET setname].avi
  +
/Movies/My Movie [SET setname-order].avi
  +
/Movies/My Movie [SET setname][SET otherset].avi
  +
/Movies/My Movie [SET MySet].avi
  +
/Movies/My Movie [SET MySet-3].avi
  +
/Movies/Set_MySet_1.jpg # otherwise poster of first movie will be used for set
  +
/Movies/My Serie/Set_My Serie_1.jpg
  +
#Rem: setname="My: Set"? => "My$3A Set"
  +
Excluding a directory:
  +
/Movies/path_to_ignore/.mjbignore
  +
#See also skip instructions in library.xml if used, e.g. *sample*, *tmp/,...
  +
Flag as watched:
  +
/Movies/My Movie.avi.watched
  +
  +
===Broken PLAY ALL===
  +
One broken thing is the "play all" button for series.
  +
<br>I'll have to convert the .jsp into proper .m3u playlists
  +
<br>and change in e.g. myserie.html
  +
href="myserie S01E01.playlist.jsp"
  +
into sth like
  +
href="http://ip_of_dune/cgi-bin/do?cmd=launch_media_url&media_url=smb://user:password@ip_of_nas/video/myserie S01E01.m3u"
  +
Meanwhile we can remove that button:
  +
<source lang=diff>
  +
--- a/skins/default/skin-options.xsl
  +
+++ b/skins/default/skin-options.xsl
  +
@@ -48,8 +48,8 @@
  +
  +
<!-- Detail Option #3: Where to show Play All link on the details page -->
  +
<!-- Valid values are: top, bottom, false/none, where top is now the default for movies -->
  +
-<xsl:variable name="skin-playAllMovie">top</xsl:variable>
  +
-<xsl:variable name="skin-playAllTV">bottom</xsl:variable>
  +
+<xsl:variable name="skin-playAllMovie">none</xsl:variable>
  +
+<xsl:variable name="skin-playAllTV">none</xsl:variable>
  +
</source>
  +
  +
===Force to fetch again default covers===
  +
We look for the default covers (well detection only based on filesize for speed reasons, use sha1sum if you want something more robust) in Jukebox and remove the corresponding movie XML file:
  +
find . -size 20524c|awk '{sub(/.jpg/,".xml");sub(/\/.\/..\//,"/"); system( "rm \""$0"\";\n")}'
  +
  +
===[https://github.com/puramoca/pydun Pydun]===
  +
Converts a YAMJ structure into a dune_folder, useful for Android DMC
  +
<br>Quite rough
  +
<br>YAMJ libraries need to get a name (description)
  +
===TODO===
  +
Try [http://mediaplayersite.com/iSkin iSkin], a YAMJ skin made for "real" browsers on PC, iOS or Android, which is exactly what I'm looking for!
  +
<br>Check iSkin2 for tablet...
  +
[http://mediaplayersite.com/system/files/178-gfb107/iskin2_preview5_zip_87752.zip iskin2_preview5_zip_87752.zip] from [http://www.networkedmediatank.com/showthread.php?tid=25613&pid=574573#pid574573 this post]
  +
  +
===Misc===
  +
* [https://code.google.com/p/moviejukebox/w/list YAMJ Wiki] is quite useful to start, especially
  +
** [https://code.google.com/p/moviejukebox/wiki/YAMJ_Basics YAMJ Basics]
  +
** [https://code.google.com/p/moviejukebox/wiki/PropertiesConfiguration Properties Configuration]
  +
** [https://code.google.com/p/moviejukebox/wiki/SkinConfiguration Skin Configuration]
  +
** [https://code.google.com/p/moviejukebox/wiki/NFO_Files NFO Files]
  +
** [https://code.google.com/p/moviejukebox/wiki/FileNaming File Naming]
  +
** [https://code.google.com/p/moviejukebox/wiki/TVSeriesNaming TV Series Naming] and you'll get automatically nice sets
  +
** [https://code.google.com/p/moviejukebox/wiki/BoxedSets Boxed Sets] to make additional sets
  +
** [https://code.google.com/p/moviejukebox/wiki/Artwork Artwork]
  +
  +
* [http://mediaplayersite.com/YAMJ_Step-by-Step Some notes] on proper filenames for movie detection
  +
  +
* [https://code.google.com/p/yayman/ Yayman] is a GUI for YAMJ but it's not clear what it does, it already renamed all my versionned files in lib/ :-(
   
 
==[https://github.com/accident12123/eversion/wiki Eversion] and [http://code.google.com/p/moviejukebox/ YAMJ]==
 
==[https://github.com/accident12123/eversion/wiki Eversion] and [http://code.google.com/p/moviejukebox/ YAMJ]==

Revision as of 21:14, 26 December 2012

Another technique for Dune HD is to export movies library to external browsers rather than using the embedded dune_folder.txt mechanism.
My favorite is for now YAMJ with an adequate skin.
Big advantages are IMHO:

  • Solution cross-platform (while Dune HD specific solutions are all .Net not even compatible with Wine)
  • Data easily exportable (while I had quite hard time exporting my data out of Zappiti)
  • Good old background/foreground unix principles: one data grabber (YAMJ) independent of the player and one frontend (a skin)
  • Manual changes to data grabbing performed with simple file-based annotations, so easily scriptable too

YAMJ alone

Actually I almost never use the remote control to navigate the media library directly on the DuneHD.
I prefer to do it either from the PC or from the Android tablet.
We've seen eversion but it doesn't work on the PC neither on DMC for Android so it doesn't really fit my need...
YAMJ produces directly HTML which is ok for the PC as we can control the DuneHD by HTTP requests and it's also ok for the tablet via a web browser or via DMC as there is a script to convert YAMJ output to dune_folder structure as we'll see later.

Installation

I downloaded moviejukebox-2.8.zip from here
Some installation notes here

YAMJ Tuning

I'm using several setups for parents & kids, here e.g. I'll create a "foo" setup

library-foo.xml

Trick is to use Dune IP control in the URL
Example:

<libraries>
    <library>
        <path>/media/nas/video/</path>
        <playerpath>http://ip_of_dune/cgi-bin/do?cmd=launch_media_url&media_url=smb://user:password@ip_of_nas/video/</playerpath>
        <exclude name="sample,tmp/,temp/,RECYCLE.BIN/,/._"/>
        <description>Movies</description>
        <prebuf></prebuf>
        <scrapeLibrary>true</scrapeLibrary>
    </library>
</libraries>

categories-foo.xml

It's a copy of categories-default.xml where I disable most categories, e.g. to keep it simple for my kid
Just change "<enable>false</enable>" into "<enable>false</enable>" for each category to suppress

moviejukebox-foo.properties

The main tuning file
Major stuffs:

# This is the skin property, you will need to change this if you want to change the look of YAMJ
mjb.skin.dir=./skins/default
# new yamj feature to enabled directory hashing layout for image storage.  Results in more speed on larger jukeboxes
mjb.dirHash=true
# Unix/Linux/Mac users will need to install Mediainfo on their own and remove the # from the front of this setting
mediainfo.home=/usr/bin/
# Set to true to have YAMJ monitor your settings and adjust overwrites as needed automatically for you.
mjb.monitorJukeboxProperties=true
# Create TV show Boxsets automatically (group all tv show seasons together as 1 show)
mjb.singleSeriesPage=true
# threading for speed
mjb.MaxThreadsProcess=3
mjb.MaxThreadsDownload=3
mjb.MaxDownloadSlots=.*=2,.*imdb.*=3,.*google.*=3,.*yahoo.*=3,.*themoviedb.*=4,.*thetvdb.*=2,.*apple.*=1

Personal settings

mjb.jukeboxRoot=/media/nas/Jukebox
mjb.libraryRoot=library-foo.xml
mjb.detailsDirName=Movies
mjb.xmlCategoryFile=categories-foo.xml

Reduce further indexes

# Comma-separated list of indexes to generate. Valid indexes include:
#  Other, Genres, Title, Certification, Year, Library, Cast, Director, Writer and Country
mjb.categories.indexList=Other,Title,Library,Set

IMDB/TVDB languages

imdb.site=fr
thetvdb.language=fr
#mjb.internet.plugin=com.moviejukebox.plugin.AllocinePlugin

MovieJukebox-foo.sh

Just MovieJukebox.sh with the proper options

#!/bin/sh
java -Xms256m -Xmx1024m -classpath .:./resources:./lib/* com.moviejukebox.MovieJukebox -p moviejukebox-foo.properties -c "$@"

YAMJ Filename conventions

Cheat sheet, much more details on YAMJ Wiki! Standard:

/Movies/My Movie.avi
/Movies/My Movie/VIDEO_TS/...
/Movies/My Movie/BDMV/STREAM/...
/Movies/My Serie/Season 1/My Serie S01E01.avi
#Special episode:
/Movies/My Serie/Season 1/My Serie S00E01.avi

Separator: " ", "." or "_"

/Movies/My Movie.avi
/Movies/My.Movie.avi
/Movies/My_Movie.avi

Tokens: "[]" or "()"
With Year:

/Movies/My Movie.[YYYY].avi
/Movies/My Movie (YYYY).avi

With Language: (see moviejukebox.properties::filename.scanner.language.keywords.*)

/Movies/My Movie.[YYYY]_FR.avi
/Movies/My Movie.[YYYY]_FRENCH.avi

With video source (See supported keywords)

/Movies/My Movie_DVDRip.avi

Anything after "-" is ignored, usually used for episode title or part title, e.g.

/Movies/My Serie/Season 1/My Serie S01E01 - Title.avi

Trailers:

/Movies/My Movie [...Trailer...].avi
/Movies/My Movie [Bonus - Title of the bonus].avi

NFO:

/Movies/My Movie.nfo
/Movies/My Movie [PART1].nfo
/Movies/My Serie/Season 1/My Serie S01E01.nfo
/Movies/My Serie/Season 1/Season 1.nfo

Movie IDs (instead of using a NFO):

/Movies/My Movie [ID IMDB tt1234567].avi

Posters: replace movie extension by .jpg or .png or (see moviejukebox.properties::poster.scanner.coverArtExtensions)

/Movies/My Movie.jpg
/Movies/My Serie/Season 1/My Serie S01E01.jpg
/Movies/My Serie/Season 1/Season 1.jpg

Fanarts: idem with token .fanart (see skin.properties::mjb.scanner.fanartToken)

/Movies/My Movie.fanart.jpg
/Movies/My Serie/Season 1/My Serie S01E01.fanart.jpg
/Movies/My Serie/Season 1/Season 1.fanart.jpg

Banners: idem with token .banner (see skin.properties::mjb.scanner.bannerToken)

/Movies/My Serie/Season 1/My Serie S01E01.banner.jpg
/Movies/My Serie/Season 1/Season 1.banner.jpg

Videoimages: idem with token .videoimage

/Movies/My Serie/Season 1/My Serie S01E01.videoimage.jpg
/Movies/My Serie/Season 1/My Serie S01E02.videoimage.jpg

Multi-part: CDx, DISCx, DISKx or PARTx

/Movies/My Movie [DISC1].avi
/Movies/My Movie [DISC2].avi
/Movies/My Movie [DISC2-Title of part 2].avi

Sets:

/Movies/My Movie [SET setname].avi
/Movies/My Movie [SET setname-order].avi
/Movies/My Movie [SET setname][SET otherset].avi
/Movies/My Movie [SET MySet].avi
/Movies/My Movie [SET MySet-3].avi
/Movies/Set_MySet_1.jpg # otherwise poster of first movie will be used for set
/Movies/My Serie/Set_My Serie_1.jpg
#Rem: setname="My: Set"? => "My$3A Set"

Excluding a directory:

/Movies/path_to_ignore/.mjbignore
#See also skip instructions in library.xml if used, e.g. *sample*, *tmp/,...

Flag as watched:

/Movies/My Movie.avi.watched

Broken PLAY ALL

One broken thing is the "play all" button for series.
I'll have to convert the .jsp into proper .m3u playlists
and change in e.g. myserie.html

href="myserie S01E01.playlist.jsp"

into sth like

href="http://ip_of_dune/cgi-bin/do?cmd=launch_media_url&media_url=smb://user:password@ip_of_nas/video/myserie S01E01.m3u"

Meanwhile we can remove that button:

--- a/skins/default/skin-options.xsl
+++ b/skins/default/skin-options.xsl
@@ -48,8 +48,8 @@
 
 <!-- Detail Option #3: Where to show Play All link on the details page -->
 <!-- Valid values are: top, bottom, false/none, where top is now the default for movies -->
-<xsl:variable name="skin-playAllMovie">top</xsl:variable>
-<xsl:variable name="skin-playAllTV">bottom</xsl:variable>
+<xsl:variable name="skin-playAllMovie">none</xsl:variable>
+<xsl:variable name="skin-playAllTV">none</xsl:variable>

Force to fetch again default covers

We look for the default covers (well detection only based on filesize for speed reasons, use sha1sum if you want something more robust) in Jukebox and remove the corresponding movie XML file:

find . -size 20524c|awk '{sub(/.jpg/,".xml");sub(/\/.\/..\//,"/"); system( "rm \""$0"\";\n")}'

Pydun

Converts a YAMJ structure into a dune_folder, useful for Android DMC
Quite rough
YAMJ libraries need to get a name (description)

TODO

Try iSkin, a YAMJ skin made for "real" browsers on PC, iOS or Android, which is exactly what I'm looking for!
Check iSkin2 for tablet... iskin2_preview5_zip_87752.zip from this post

Misc

  • Some notes on proper filenames for movie detection
  • Yayman is a GUI for YAMJ but it's not clear what it does, it already renamed all my versionned files in lib/ :-(

Eversion and YAMJ

This is entirely different from the other approaches:

  • frontend / backend: Eversion is one of the compatible frontends, YAML is one of the compatible backends
  • frontend with flashlite
  • both are open-source
  • runs under Linux but not only, YAML is actually a Java CLI

On the dark side, things are not very well documented or to be more exact documentation is quite scattered...
Many combinations are possible but to get it running on Dune, apparently Eversion + YAMJ is the proper way to go.
My scrap notes, ongoing as everything is rather new to me...

Resources

Installation

Get both tools in a combined archive from Eversion download page. I took aio_eversion_yamj_r0179c.zip. See also Github downloads page.
Unzip
Before you run yamj the first time, edit the dune_folder.txt file found in yamj/skins/eversion/interface to adjust the path. the path will be swf://(dune compatible path )/Jukebox/eversion.swf

apt-get install mediainfo

Edit moviejukebox.properties

  • uncomment mediainfo.home=/usr/bin
  • Add a link to the file where we'll describe sources: mjb.libraryRoot=library.xml
  • Add a link to the directory where we'll output the generated data: mjb.jukeboxRoot=/media/nas/Share/

Copy and adapt example-library.xml => library.xml, e.g. for a nas folder mounted locally and to be accessed by Dune over Samba:

<path>/media/nas/Share/video/</path>
<playerpath>smb://user:pwd@nas_ip/Share/video/</playerpath>

Usage

Now we can run the tool:

./MovieJukebox.sh

Warning when editing XML files: if you get the following error when running the tool "The reference to entity * must end with the ';' delimiter" it's because URI must be html-escaped, e.g. replace & by &

Quick way to test out the generated stuff:

wget -q -O - "http://dune/cgi-bin/do?cmd=launch_media_url&media_url=swf://smb://user:pwd@nas_ip/Share/Jukebox/eversion.swf"

It works but it's pretty slow on Dune HD