Firmware: Model U to Non-U Cross Update Firmware | [A-500 PRO] [10 April 2017] | [A-500] [10 April 2017] | [VTEN] [10 April 2017] |[A-400, A-410 & A-410U] Beta 2 Firmware 05-08-160616-25-POP | [A-500 PRO & A-500 PRO-U] Android-6-OTA.20160906

Just got your NMT | WIKI has the answers | Search the forum | Forum Rules/Policy | Firmware & Official NMT News | Popcornhour manuals



User(s) browsing this thread: 1 Guest(s)
Post Reply 
On-Demand network share mounting
02-21-2009, 08:50 PM (This post was last modified: 08-21-2009 08:52 AM by journey4712.)
Post: #1
On-Demand network share mounting
I have a little present for you guys. This has received a decent amount of testing and at this point is considered beta quality software. Some of you may remember my on-demand mounting script play.cgi. It worked for some but not for others, and it was a a little hard to setup. I've got a re-write complete which should address those issues.

This program is called mono.wrapper. When used together with a static jukebox like YAMJ or MLMJ stored on your internal disk you will no longer have to worry about a share being mounted to play a video off of it. The software is configured to work with all configured NMT shares, NFS and SMB. As the software matures, the releases become less daily, and is proven to work for the majority of NMT users it will soon be added to the NMT Community Installer

The software works with all media the NMT plays(iso support soonish), the only requirement is the jukebox must be on the internal hard disk. This program is invoked whenever you click a link to a media file(but not a link to view folder contents). It will try and make sure the destination share is mounted. This program also adds support for links in your jukeboxs to .pls and .m3u playlists. The files in the playlist still need to all point to the same share though.

This only works properly when the jukeboxes are stored on the internet hard drive, and the videos are on multiple network shares.

In addition this program will also preserves all your video player bookmarks and settings through a reboot.

Download mono.wrapper-0.10. Put the contents of the zip onto the base of your NMT's hard disk. Make install.cgi executable(with ftp issue `quote chmod 755 install.cgi`), then load install.html in the NMT file browser(forth icon, all the way to the right after you select HARD_DISK from the source menu)

Alternativly you can put the contents of the zip on a USB stick. Browse to the usb stick and go to the same 4th icon all the way to the right, and select install.html

journey4712



If you experience a Bug!

Please post to this thread if you experience any bugs in the software. To help me debug your problem please do the following so as to offer more information about the exact problem:

1. Reboot NMT
2. Browse to a jukebox and select a video file
3. Report on what exactly you see(screen flashes and stays on details page, screen black for 3secs and then file not found, then back to details page, etc.)
4. Browse to the exact same file through the NMT file browser(select the share from the sources menu and manually play the video, you may have to move an index.html file out of the way to be able to manually browse the share).
5. Also report on what exactly you see here(works when manually chosen, screen flashes and stays on details, etc.)
6. Its important to only try and play the same video so the logging information is as relevant as possible.
7. From your pc load up http://ip-of-pch:8088/stream/file=/tmp/mono.log and post the contents of that as well.
Find all posts by this user
Add Thank You Quote this message in a reply
[+] 23 users say Thank You to journey4712 for this post
02-21-2009, 08:55 PM
Post: #2
RE: On-Demand network share mounting
haven't tried it yet, but i'm definitly looking forward to it.

Your work is always appreciated man....thanks!
Find all posts by this user
Add Thank You Quote this message in a reply
02-21-2009, 10:25 PM
Post: #3
RE: On-Demand network share mounting
not working for me confused

Find all posts by this user
Add Thank You Quote this message in a reply
02-21-2009, 11:00 PM (This post was last modified: 02-22-2009 07:56 AM by journey4712.)
Post: #4
RE: On-Demand network share mounting
EDIT: looks like i messed up the installer routine. I could swear i tested it out before release but i must have tweaked something after the test.

Ok, i've just started from a fresh NMT install, installed wrapper, verified works, rebooted, verified works. Here for the download and i've also updated the first post

journey4712
Find all posts by this user
Add Thank You Quote this message in a reply
02-21-2009, 11:48 PM
Post: #5
RE: On-Demand network share mounting
ill give it a try.

Find all posts by this user
Add Thank You Quote this message in a reply
02-22-2009, 10:59 AM
Post: #6
RE: On-Demand network share mounting
can you explain this part a bit more?

Quote:Basically this program is a wrapper to the NMT video player mono. When you try and play a video/playlist with mono this program will first try and mount the necessary share if its not mounted, then also if it was passed a playlist with a .m3u or .pls extension it will convert that to jsp and give mono the jsp instead. You still have to make your own anchors to point to the playlists though(NMT filebrowser still wont recognize them).

Find all posts by this user
Add Thank You Quote this message in a reply
02-22-2009, 11:23 AM (This post was last modified: 03-01-2009 10:45 AM by journey4712.)
Post: #7
RE: On-Demand network share mounting
Mono is the program that plays videos(avi, mkv etc, but not dvd structures like iso) on all NMT's. Mono.Wrapper moves the mono program to a new location(mono.real) and makes itself the mono application.

The Result of that is if you click any link to play a video in a jukebox, it will load up Mono.Wrapper instead of mono without any further configuration by the user.

From there this program will look over the options passed to mono. It will find the url that mono is being told to play, and inspect the URL. if the url starts with "file:///opt/sybhttpd/localhost.drives/NETWORK_SHARE/shareName/" then mono.wrapper will recognize you are trying to play a video on a network share. First it will run the 'mount' command and look at its output to determine if the requested share is already mounted, if not It will query the NMT /tmp/setting.txt file for all the currently set network shares. If it finds one with the same name it will issue the mount command for that share(just as if you had clicked on the share from the source menu, except the output isn't displayed on screen). It is important when building url's to remember that linux is case sensitive, so sharename and shareName are not the same.

At this point the mounting is done. mono.wrapper will look at the file extension of the file being passed to it. if the extension after being lowercased is .m3u or .pls then it will load the playlist with a couple of php classes(m3u playlist currently requires having extinf info in the playlist in addition to filenames) and then write it back out as a .jsp(to a new file, it wont overwrite the original). The playlist support is merely something extra i was trying to offer though, its superfluous and probably easier to just remove if its not working right. The important part is automatically mounting network shares.

After those two parts are done mono.wrapper calls the real mono. Hope that answers your question.

journey4712
Find all posts by this user
Add Thank You Quote this message in a reply
02-22-2009, 11:29 AM (This post was last modified: 02-22-2009 02:02 PM by RiChaDo.)
Post: #8
RE: On-Demand network share mounting
Yess!!Tongue

the more the better?! haha

doing is one thing knowing is something different

Find all posts by this user
Add Thank You Quote this message in a reply
02-22-2009, 01:35 PM
Post: #9
RE: On-Demand network share mounting
this is a genius way in solving the network share problem.

BRAVO!

gonna test it with LLink today, in theory it should work
Find all posts by this user
Add Thank You Quote this message in a reply
02-22-2009, 04:28 PM
Post: #10
RE: On-Demand network share mounting
Well it's not working for me.

The installation went fine, but if I try to play a movie from the Jukebox from a share that is not mounted I get the usual message "Could not play".

Here is the mono.log:

Code:
mountFilesystemByPath
input: file:///opt/sybhttpd/localhost.drives/NETWORK_SHARE/Media/Video/Sorozatok/Heroes/Season 2/2x01 - Four Months Later.mkv
mountFilesystemByName: Media

no matching share
executeMono
/bin/mono.real '-single' 'file:///opt/sybhttpd/localhost.drives/NETWORK_SHARE/Media/Video/Sorozatok/Heroes/Season 2/2x01 - Four Months Later.mkv' '-dram' '1'single
mountFilesystemByPath
input: file:///opt/sybhttpd/localhost.drives/NETWORK_SHARE/Media/Video/Sorozatok/Heroes/Season 2/2x02 - Lizards.mkv
mountFilesystemByName: Media

no matching share
executeMono
/bin/mono.real '-single' 'file:///opt/sybhttpd/localhost.drives/NETWORK_SHARE/Media/Video/Sorozatok/Heroes/Season 2/2x02 - Lizards.mkv' '-dram' '1'single
mountFilesystemByPath
input: file:///opt/sybhttpd/localhost.drives/NETWORK_SHARE/Media/Video/Sorozatok/Heroes/Season 2/2x01 - Four Months Later.mkv
mountFilesystemByName: Media
486
Media already mounted
executeMono
/bin/mono.real '-single' 'file:///opt/sybhttpd/localhost.drives/NETWORK_SHARE/Media/Video/Sorozatok/Heroes/Season 2/2x01 - Four Months Later.mkv' '-dram' '1'single
mountFilesystemByPath
input: file:///opt/sybhttpd/localhost.drives/NETWORK_SHARE/Media/Video/Sorozatok/Heroes/Season 2/2x02 - Lizards.mkv
mountFilesystemByName: Media
486
Media already mounted
executeMono
/bin/mono.real '-single' 'file:///opt/sybhttpd/localhost.drives/NETWORK_SHARE/Media/Video/Sorozatok/Heroes/Season 2/2x02 - Lizards.mkv' '-dram' '1'

The last two attempt shows the result after I mounted the share manually.
I have an A100 with the latest fw. and NMT apps.

Media player 01: PCH-A100, 160 GB 2,5" WD HDD, Composite, CAT5 wired.
Media player 02: PCH-C200, 320 GB 2,5" Samsung HDD, LG CH10-LS20 BD, HDMI, CAT5e wired.
Display: Samsung LE-40R88BD
A/V receiver: Yamaha RXV-630 coax conn.
NAS: Synology CS407e, DS411j 8 TB (RAID5)
Find all posts by this user
Add Thank You Quote this message in a reply
02-22-2009, 04:40 PM
Post: #11
RE: On-Demand network share mounting
(02-22-2009 01:35 PM)mercenary Wrote:  this is a genius way in solving the network share problem.

BRAVO!

gonna test it with LLink today, in theory it should work

How did the test turn out?

This looks like a really smart idea. I guess it could partially solve llink's inability to play DVD's with menu by doing the "change http link to networkshare" trick for iso/img files without the hassle to mount the share before starting llink..

PCH-A100 (beta fw) + PCH-C200
Streaming from ReadyNas (llink and nfs)
Sony 40-x3500 TV
Visit this user's website Find all posts by this user
Add Thank You Quote this message in a reply
02-22-2009, 05:37 PM (This post was last modified: 02-22-2009 05:38 PM by lordy.)
Post: #12
RE: On-Demand network share mounting
(02-22-2009 04:40 PM)PoPEye Wrote:  I guess it could partially solve llink's inability to play DVD's with menu by doing the "change http link to networkshare" trick for iso/img files without the hassle to mount the share before starting llink..

Hi, Iso's are not played via mono but by amp_test.
Looking at amp_test help it says
Code:
amp_test start

[snip]

FATAL ERROR: Missing media URL 1

Advanced Media Provider test options:

Media format identification **(default: autodetect, files/streams handled by MRUA'             s MONO)**
**        -f:lpb : force media file/stream, handled by MRUA's MONO**
        -f:cdda : force CD-DA media
        -f:dvd : force DVD media
        -f:vr :  force DVD-VR media
        -f:m2v : force MPEG2 video file, handled by DCC-HD unless followed by -s             hell option
        -f:jpg : force JPEG video file, handled by DCC-HD unless followed by -sh             ell option
        -f:img : force image file (JPEG, PNG, GIF) through a DirectFB image prov  ....

Which might mean that its amp_test that hands off to mono for non-iso files??? Maybe a wrapper on amp_test, perhaps???

Oversight: Jukebox | FeedTime: Automatic nzbs
Find all posts by this user
Add Thank You Quote this message in a reply
02-22-2009, 08:17 PM (This post was last modified: 02-22-2009 08:20 PM by journey4712.)
Post: #13
RE: On-Demand network share mounting
@mar_tin

Hmm, looking over your log its the getServLinkByName function thats failing. Also take a look at your /tmp/setting.txt file. Inside this file area a bunch of a=b statements. Mono.Wrapper looks through the file for the folowing:
Code:
servname1=Media
servlink1=smb://UBUNTU/vids&smb.user=&smb.pass=

It seems most likely in my head that perhaps your setting.txt is layed out slightly different? the routine currently depends on those two lines directly following each other, if they are not always that way i can tweak the routine to handle that.

@popeye/ydrol
a wrapper for amp_test could also be written of course, i just want to make sure the basics are all working good first before i start tacking on new features Smile One problem i can think of right now though is that if you want to translate from http:// links to file:/// links, the wrapper would have to have some knowledge of your network to know which links translate to which network shares

@all
so umm, has this worked for anyone but me? Mostly replies seem to be broken or will try when u have a chance Smile


journey4712
Find all posts by this user
Add Thank You Quote this message in a reply
02-22-2009, 08:45 PM
Post: #14
RE: On-Demand network share mounting
I'm gonna give this a go tonight... just to be clear i don't have to modify my href="file:///opt/stuff" right? i just use MLMJ or yamj as normal and your program does the rest?
Find all posts by this user
Add Thank You Quote this message in a reply
02-22-2009, 09:07 PM
Post: #15
RE: On-Demand network share mounting
(02-22-2009 08:45 PM)excal Wrote:  I'm gonna give this a go tonight... just to be clear i don't have to modify my href="file:///opt/stuff" right? i just use MLMJ or yamj as normal and your program does the rest?

Correct, should just be install and go. For local testing i just copied my regular jukebox off the network share and into the NMT hard disk, no modifications.

journey4712
Find all posts by this user
Add Thank You Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Streaming from PCH to network naight 9 4,312 02-11-2011 05:26 PM
Last Post: naight
  Stream movie audio over network Irri 0 1,848 11-06-2010 11:52 AM
Last Post: Irri
  PCH doesn't share my USB drive anymore Danishdude 5 2,792 08-30-2010 04:38 PM
Last Post: Willem53
  Transmission and network hd hairball 3 2,282 07-08-2010 10:26 AM
Last Post: hairball
  edit network share from within a100 graf 7 2,840 07-08-2010 01:08 AM
Last Post: graf
  Problem mounting windows shares after reset kruuth 0 1,568 06-22-2010 06:14 AM
Last Post: kruuth
Sad Problem reading network dir jaccoswart 2 2,246 06-13-2010 11:00 AM
Last Post: jaccoswart
  Re-enable the network share from command line? glorifyday 0 2,297 03-04-2010 05:06 PM
Last Post: glorifyday
  Gigabit USB network adapter? tiwas 3 2,762 01-29-2010 11:55 AM
Last Post: ASD2003ru
  mounting hdx shares from Linux - read only schnaaf 0 1,530 01-24-2010 01:21 PM
Last Post: schnaaf

Forum Jump: