INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Library server questions  (Read 1342 times)

audunth

  • Citizen of the Universe
  • *****
  • Posts: 634
Library server questions
« on: September 17, 2022, 08:00:39 am »

Hi,

I am currently running MC on my Windows HTPC. I used to have this running 24h most of the time, but now, with ridicolously high electricity prices, I am putting it in Standby whenever I don't use it. So, to be able to play videos on my other devices around the house from MC when my HTPC is off, I wanna set up an MC server on a small Asus EEE pc which I use for some home automation and run 24/7. I have a screen, keyboard and mouse connected, so it's actually more convenient to do all tagging, importing etc. on the server than on my HTPC (which only has a keyboard with touchpad). Both server and HTPC are connected via Gigabit Ethernet cable.

So what I am wondering is how to best play the files on my HTPC. Is it
1) Connecting my HTPC to the library on the server and playing all files over the network from the server (the files are on a NAS, so they play over LAN anyway). That way, I don't have to enable library sync, right? Are there any issues with this? Any files that might not play correctly with seek functionality, for example? Obviously I want to disable all transcoding.
2) Playing on my HTPC from the local library like now, and enabling Library Sync with the server. Is this a better option in any way, except from the possibility to do tagging etc. on the HTPC, which I don't really need?
Logged
Cheers,
Audun

My system:
ASUS  P8Z68 V-PRO/GEN3, 8GB RAM, Core i5-2500K
EVGA Nvidia GTX 970 SSC, 4GB RAM
Antec P180 case w/Seasonic X460 fanless PSU, water cooled by Zalman Reserator 1+ w/extra DDC pump
Windows 7 Ultimate 64 bit
Sony VPL-HW30ES 3D projector
Yamaha RX-V3900 receiver and custom built 2Ch power amp for front/stereo speakers
Klipsch Reference/SVS 7.1 speaker system
Always running the latest available version of MC

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2674
Re: Library server questions
« Reply #1 on: September 17, 2022, 09:45:46 am »

1) is the way to go. Use MC on the HTPC connected to the Server's library. Files are streamed directly from the NAS, no transcoding, no seek issues.

Not sure what you mean by "enable library sync". That's what happens when you have an MC client connected to a library on an MC Server... otherwise there's no sync option to enable, you would need to manually copy the Library folder from the server to the client to "sync" it.
Logged

audunth

  • Citizen of the Universe
  • *****
  • Posts: 634
Re: Library server questions
« Reply #2 on: September 17, 2022, 10:05:34 am »

Thanks, this is what I initially thought.

My understanding is that with library sync enabled, I can have a local library on the HTPC that I sync with the server's library, so that if the server is off or disconnected, I wouldn't notice the difference. And changes made on either server or HTPC would sync to the other.

By just using the library on the server (and not having a local library to maintain at all) it seems obvious that library sync is not needed. But of course then I am dependent on the server always being accessible.

If I misunderstood anything, let me know!  :)
Logged
Cheers,
Audun

My system:
ASUS  P8Z68 V-PRO/GEN3, 8GB RAM, Core i5-2500K
EVGA Nvidia GTX 970 SSC, 4GB RAM
Antec P180 case w/Seasonic X460 fanless PSU, water cooled by Zalman Reserator 1+ w/extra DDC pump
Windows 7 Ultimate 64 bit
Sony VPL-HW30ES 3D projector
Yamaha RX-V3900 receiver and custom built 2Ch power amp for front/stereo speakers
Klipsch Reference/SVS 7.1 speaker system
Always running the latest available version of MC

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2674
Re: Library server questions
« Reply #3 on: September 17, 2022, 04:30:47 pm »

AFAIK there's no offline sync mode in MC. If the server is offline you get an error in the client MC. The library is cached locally but you can't use it while the server is offline.
 
Logged

audunth

  • Citizen of the Universe
  • *****
  • Posts: 634
Re: Library server questions
« Reply #4 on: September 17, 2022, 04:39:45 pm »

Well, I know for a fact that is not the case. I can use MC on my laptop playing local files and files on the NAS no problem without the server connected, running from the local library on the laptop itself. When the HTPC is on (which now functions as my MC server), I can connect my laptop to the Media Server of the HTPC and play from the library there.

I am not talking about playing on my phone here, but using my HTPC as a client. For Windows there is no Client Only or Server Only install of MC, so each Windows PC can run MC without a server.

If you go to Media Server on the Wiki you can see that MC indeed has a Library Sync feature.
Logged
Cheers,
Audun

My system:
ASUS  P8Z68 V-PRO/GEN3, 8GB RAM, Core i5-2500K
EVGA Nvidia GTX 970 SSC, 4GB RAM
Antec P180 case w/Seasonic X460 fanless PSU, water cooled by Zalman Reserator 1+ w/extra DDC pump
Windows 7 Ultimate 64 bit
Sony VPL-HW30ES 3D projector
Yamaha RX-V3900 receiver and custom built 2Ch power amp for front/stereo speakers
Klipsch Reference/SVS 7.1 speaker system
Always running the latest available version of MC

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9165
Re: Library server questions
« Reply #5 on: September 17, 2022, 11:18:38 pm »

So what I am wondering is how to best play the files on my HTPC. Is it
1) Connecting my HTPC to the library on the server and playing all files over the network from the server (the files are on a NAS, so they play over LAN anyway). That way, I don't have to enable library sync, right? Are there any issues with this? Any files that might not play correctly with seek functionality, for example? Obviously I want to disable all transcoding.
2) Playing on my HTPC from the local library like now, and enabling Library Sync with the server. Is this a better option in any way, except from the possibility to do tagging etc. on the HTPC, which I don't really need?

#1 is the way to go. (re. #2., library sync does not work like that, more later...) Getting back to #1....

In order to do that, you need to set up the direct file access on the HTPC so that the filename paths match those on the server. This depends on how you reference files, for example, on the NAS. If the server is using a mapped drive letter, and references a video file at, say, X:\Videos\Movies\My Movie.mkv, then setup the same mapping on the HTPC. However you do it, the important thing is that the file paths on the server and the HTPC match.

Having done that, go into MC's settings on the HTPC and type local in the search bar at the bottom. There is only one result. Make sure it's ticked.

Now, if that option is not enabled, then when your HTPC, connected as a client to the server, requests a file, the server fetches the file and 'serves' it to the HTPC. With the option enabled, if the HTPC can reach the file directly, it does so. This results in better (imo) playback and a lot less work for the server to do. It also means that if the server goes offline in the middle of a movie, the HTPC will continue to play the movie without faltering.

Library sync...
Library sync is a system that allows MC clients, such as your HTPC, to send changes and updates to the library back to the server. Think of things like [Number Plays], [Last Played], [Rating] etc. etc. If library sync is not enabled, changes here will not be reflected in the server library. The HTPC will discard them.

Library sync WILL NOT, and cannot, 'merge' two separate 'local' libraries.

Also, in order for library sync to work, you must set up a username and password (authentication) in the Media Network options on the server, and use these on the HTPC to connect to the server.

Get yourself setup this way and you should find things pretty much rock solid. We've had little to no issues in more than ten years. The only mild frustration can be with library sync and things like [Number Plays] and [Last Played].... Typically, before bed, we watch a movie, the movie ends, we turn off the HTPC and go to bed. As library sync is not an instaneous thing (it's quick, as in minutes or less, but not instaneous), the playback data has not had time to sync back to the server, and is lost. Other than that, everything else will be golden.

Hopefully that helps, fire away if you still have questions.

-marko

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2674
Re: Library server questions
« Reply #6 on: September 18, 2022, 02:54:26 am »

Thanks Marko for saving me from an extensive reply.

@audunth, there is no offline sync. What you describe in your previous post is simply toggling between a local and a remote (server) library. Any change you make to the local library (=database) will NOT be sent to the server library, and vice-versa. Only when you connect as a Client will your changes on either side be reflected on the other side.

A Client/Server connection syncs all tags, playlists, covers, settings (except local preferences), auto-import folders, etc; you see the same things on both sides. When you use a local library disconnected from the server your changes are saved to a different database (library), even if you have the same set of NAS folders imported on that library. Those local changes will NEVER be sent to the server.

An exception: many tags can be saved to the media files themselves by Library A, and then when Library B scans those files during auto-import it will detect the changed tags and import them into B (assuming both libraries are importing the same folders). However, this is NOT sync, it's just auto-import. It is not a replacement for a true client/server connection.

Reminder: "Library" in MC is the database, not the set of Media files.
Logged
Pages: [1]   Go Up