Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#361557 - 03/05/2014 00:30 Rubbing the Lamp: Synology - Turning Off Metadata Searching?
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
I've posted this on the Synology forums, and also googled and faqed etc., but haven't got an answer. A search on the Synology forums indicates that others have asked the same question and only gotten crickets in return. So I'm going to rub EmpegBBS genie lamp and see if anyone here knows this one...

I just got a new Synology DS214play NAS. It's pretty nifty so far. But it's got one major breaking bug. When you copy video files to the NAS, their "DS Video" app tries to automatically search the internet for metadata about the video files. It's terrible at this job.

It took the file "Cosmos - 09 - The Lives of the Stars.avi" - that's Carl Sagan by the way - and gave me metadata for a movie about porn stars called "The Secret Lives of Adult Stars".

It lets me correct it after-the-fact, but I want to shut off the automatic metadata gathering now, early, before I upload all my files onto this thing, so I don't have to keep correcting these things. So far it's been wrong about 5 percent of the time for the few sample groups I've sent to it.

Anyone know how to do thia? Shut off this feature on a Synology? Or, alternatively, how I can possibly selectively "break" this misfeature through some kind of hacking or editing or port blocking?
_________________________
Tony Fabris

Top
#361558 - 03/05/2014 11:29 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: tfabris]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Presumably the box runs on Linux inside, so first step is to gain root access to your own machine. Once you have that, the rest should be simple enough.

Top
#361559 - 03/05/2014 16:38 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: mlord]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
Yes, it's a Linux box. Root access is easy, I can already reach its entire file system as root. The question is knowing exactly what to do in its file system to accomplish what I'm looking for. I have no idea where to look for where this "DS Video" app configures that information, nor any idea how to modify it so that it stops trying to retrieve that information. And of course, doing it in such a way as to not damage the other features of DS Video.

Example: I could maybe block DS Video from reaching the internet at all. Though that would stop it from trying to find title matches on IMDB, that would also prevent it from being able to stream the video library to my smartphone while I'm on the road (one of the features of this thing).
_________________________
Tony Fabris

Top
#361560 - 03/05/2014 16:52 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
Vague poking at it looks like MAYBE they store the video info in a PostgreSQL database, though I'm not sure which one, there are several files with "video" in the title. I'd have to go digging. Might be a way to prune the bad video info from that, but even if I could figure out how to do that, it doesn't solve the problem of it auto-detecting the wrong information for new file additions.
_________________________
Tony Fabris

Top
#361561 - 03/05/2014 17:35 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: tfabris]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
On the NAS, edit the /etc/init/synoindexd.conf file; add "exit 1" right after the "pre-start script" line.

That might be using a sledgehammer on a walnut, but...
_________________________
-- roger

Top
#361562 - 03/05/2014 18:20 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: tfabris]
StigOE
addict

Registered: 27/10/2002
Posts: 568
You could possibly find out which ip address or url it uses to lookup the metadata and block this/these.

Top
#361564 - 03/05/2014 21:09 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: Roger]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
Originally Posted By: Roger
On the NAS, edit the /etc/init/synoindexd.conf file; add "exit 1" right after the "pre-start script" line.

That might be using a sledgehammer on a walnut, but...


Oh hells yes, that totally looks like it would be the right thing. Just kill the synology index daemon so it doesn't run at all. Hells yes.

Unless... If that daemon is responsible for all file indexing and not just the metadata lookups, then I'll be in trouble. We'll see how it does. Ima try it out and report back.

I love this BBS and its denizens so much. You all rock, right now especially you, Roger. Thanks!
_________________________
Tony Fabris

Top
#361565 - 03/05/2014 21:35 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
Okay, that seems to do the undesired thing of killing all file indexing on the system. I removed one file and added a different file, and those changes were not reflected in the database of movies on the NAS, even after telling it to do a full re-index. Additionally, the re-index processes never finished, making me think that perhaps they locked up.

So from the looks of it, that file controls all file indexing, not just the metadata lookups. But we're on the right track.
_________________________
Tony Fabris

Top
#361566 - 03/05/2014 21:55 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
I wonder if the process I'm looking for is the media parse daemon? (usr\syno\sbin\synomediaparserd)

Can you think of a way to disable just that bit?
_________________________
Tony Fabris

Top
#361567 - 03/05/2014 22:01 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
Trying: Removing the Execute bit from synomediaparserd and rebooting the system...
_________________________
Tony Fabris

Top
#361568 - 03/05/2014 22:41 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
Nope, that produced the same results as killing the index service: File additions and deletions stopped getting registered altogether, up until I put things back the way they were. Hm.
_________________________
Tony Fabris

Top
#361569 - 03/05/2014 23:05 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: tfabris]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Roger was definitely onto something good there, though.
Can you pass along the contents (everything) of /etc/ to Roger.. (don't post publicly, it might have passwords and crap too).

There're bound to be some Really Good Clues in there!

Top
#361570 - 03/05/2014 23:25 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: mlord]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
I thought that the only reason he knew about the synology index daemon was because he owned one himself and went spelunking. i.e., I don't have to pass him anything because he's got more or less the same OS on his NAS.

By the way, here is how I can tell I'd messed things up: There is an option in the DS video program, in the "settings" screen, to select a folder and "re-index" it. When things are working correctly, that indexing procedure finished fairly quickly. After making each of the modifications I tried above, that indexing process never finishes and new/deleted files do not appear/disappear as they should.
_________________________
Tony Fabris

Top
#361571 - 03/05/2014 23:50 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
Since I know that IMDB is one of the sources for the metadata, I'm currently doing grep -r -i "imdb" / to see if I can find out which program actually accesses imdb (or better yet, which config file controls which sites it searches so I can mangle the config).
_________________________
Tony Fabris

Top
#361572 - 04/05/2014 01:54 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
I may have hit paydirt.

The folder /volume1/@appstore/VideoStation/plugins has several different movie database search scripts. Looks like they're in PHP. Could be easy peasy.
_________________________
Tony Fabris

Top
#361573 - 04/05/2014 03:05 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: tfabris]
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12338
Loc: Sterling, VA
This post will be unhelpful:

Is it necessary to use the "DS Video" app? Can it simply be disabled? You're better off using Plex anyway.

Again, sorry this isn't helping your question...
_________________________
Matt

Top
#361574 - 04/05/2014 04:23 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: Dignan]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
I like Plex, and in fact I have it installed on there now, but it has a few problems.

1. It does not yet take advantage of the hardware-GPU-based transcoding that is built into this particular Synology DS214play. I proved this today by trying to use it to Chromecast a high def video file that was shot at one of our recent concerts. Because the GPU-transcoding was not working in Plex, it was only able to play about 2 seconds before it had to pause and rebuffer for 5 seconds, lather rinse repeat. It also pegged the DSM's CPU at 99 percent while doing the above. On the other hand, the DS Video Station app chromecasted it fine at 1080p, launched from my phone straight to the chromecast, using the hardware GPU transcoding. So, DS Video Station big win there.

2. The mobile apps for Plex cost five bucks per person in my household. I could probably make them all pay the five bucks but it would be weird. I think that if I spent the money on a media server, it should serve media for what I spent for it. The DS Video Station should theoretically do that, but for this bug that I want to fix. Note: there is a thingy on the plex web site saying you get a free android app if you get a lifetime subscription to plex (which is inexpensive at something like 79.00). That's tempting, but that offer is not on the table for iOS (I don't have an android device I have an IOS device), and additionally, I think the freebie app works only for me, not my whole household.

3. It doesn't solve the problem. Plex gets the metadata wrong too. Not as badly as DS Video Station, but still. At least Plex offers the following options:
- a much faster/easier way to clear out bad metadata
- an option to switch the video metdata control to be "just internal" so that it only tries to tag the files with data from the files themselves, not a best-guess internet search.

Still, I really really like Plex. It's a lot less klunky than DS Video Station. I'm going to leave it installed and see if they eventually release a version that will use the hardware transcoding available on the DS214play. One of the engineers said on a post on their forum that they are "looking into it" because users have an interest in that. While I'm waiting for that, it's DS Video Station for me.
_________________________
Tony Fabris

Top
#361575 - 04/05/2014 05:29 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
Okay, I think I have a solution. I'll post it here and also on the Synology forums. Thanks, Roger!

EDIT:
I have posted a BETTER SIMPLER solution here:
http://forum.synology.com/enu/viewtopic.php?f=222&t=85425&p=323055#p323055

Just tell Video Station to index everything as "Home Movies". Then it won't search the internet for the metadata. More details at the link I just posted.

Old information below. Do not use:

Steps to wipe incorrect metadata from Synology Video Station and start over from scratch, while also disabling the metadata search.

Problem:

- You are running Synology DiskStation 5.x on a Synology DS214play. (Note: I have tested this procedure on DSM 5.0-4482 and Video Station 1.3-0544 only. This might work on other devices or versions, but I don't know.)
- You are using Synology Video Station to manage videos.
- Synology Video Station automatically searches the internet for Metadata for your video files.
- Synology Video Station makes bad choices about the Metadata, such as (among other things) tagging innocent kids/educational films with metadata and box art for Porn movies. Woopsie daisy.
- Synology has not yet issued a fix for this problem (check for that first, before trying this procedure).
- Synology has not yet offered a menu option to turn off the automatic internet metadata searching feature (check for that first, before trying this procedure).
- You would personally prefer to just have the file names of the video files, and not bother to attempt metadata searches, and you're OK with not having any metadata at all.

DISCLAIMER:

This is the first time I've ever owned a Synology NAS, I've only had it for two days, so I'm no expert. I don't actually know if this will work correctly for everyone. I know it worked for me, that's all. My NAS is set up bare-bones so far, so if you have other software on your NAS, I don't know how this will work for you. Although I have Plex and it's still working OK. Mainly, the worry here is that this involves modifying files on your NAS that Synology doesn't expect you to be modifying. Do not do this procedure unless you understand each of the steps and are willing to take the risk of possibly rendering your NAS nonfunctional or losing important data on the NAS and having to reformat the whole thing.

Steps to fix the problem:

1. Have a tool on hand which allows you to edit the files on the hard disk of the DiskStation remotely across the network. In my case I used the freely available and very popular WINSCP tool to do this. You can use whatever tool you're comfortable with. Note that you will need to configure the DSM to allow this, the setting is under Control Panel, Terminal & SNMP, "Enable SSH Service".

2. Write down your existing settings for the Video Station program. Go into Video Station, hit Settings, and write everything down, including the links to the folders on your disk which are currently being indexed for videos. Write down the permissions you assigned in the Privileges tab. Write down any other settings you care about.

3. Go to Package Center, and deinstall Video Station.

4. Important: When deinstalling Video Station, make sure to tick the tickybox that says to "Remove Video Station Database". The reason you are deinstalling Video Station is to stop Video Station from running, to clear out all of its folder links which collect and index video files on your hard disk, clear out its permissions list, and to allow it to cleanly get rid of its existing database (full of bad metadata) so that we can start over from scratch. This is the simplest way I know how to do this. If you have ways of easily doing those things that don't involve deinstalling, feel free to do that instead.

5. Log into the DSM using your tool (WINSCP or whatever you have). When logging in, use the username of "root" and use your admin password. Using your tool, remove the folder /volume1/@appstore/VideoStation if it is not fully removed already. (Again, if you know how to make Video Station forget EVERYTHING without doing this step, feel free to do that. I had to do all of these steps or else it kept re-adding the existing metadata from the old Video Station database.)

6. RESTART the DSM now to make sure everything about the Video Station is cleared out of memory.

7. At this point, if you had placed video files in the default "video" folder on the DSM's hard disk, you might possibly need to move them temporarily out of that folder to prevent the Video Station reinstall from automatically re-indexing everything. I didn't have to, but, I deliberately had not put any videos in there to begin with. All my videos are in separate user folders which I'd had to link separately. Feel free to try these steps WITHOUT moving the video files first. It might work without moving the files, not sure.

8. In Package Center, reinstall Video Station. DO NOT RUN IT YET.

9. Hopefully it will not automatically begin indexing your video files if you haven't run Video Station yet. I'm not certain if that's how it works, but I think so. That's the way it worked on my system.

10. Using your tool, navigate to /volume1/@appstore/VideoStation/plugins folder.

11. You will need to edit two files. In the subfolders "syno_themoviedb" and "syno_thetvdb", there is, in each folder, a file called "search.php". That is the file you will edit in each folder.

12. At the top of each of the two "search.php" files are some variables and URLs which define where it gets its search results. Find those.

13. For the variables "API_URL" and "BANNER_URL", mangle the main name of the site, the part right before ".com". For example, if it says "http://www.thetvdb.com/api/", change it to "http://www.NOPEthetvdbNOPENOPE.com/api/" or something like that. Anything to make the URL fail utterly.

14. Save both of the files you edited.

15. Using your tool, navigate to /volume1/@appstore/VideoStation/sbin

16. Locate the file synovideometadatad which is the metadata gathering daemon.

17. Modify the file properties and turn off all three EXECUTE PERMISSONS on that file. If you are using WINSCP, here is how that is done: Right click on the file and select PROPERTIES. There will be a PERMISSONS section with OWNER, GROUP, and OTHERS for that file. Each of those rows will have a tickbox for Read, Write, and Execute permissions labeled R, W, and X. You are going to untick the "X" tickbox for all three. Save those changes by pressing OK.

18. The "rights" on the file synovideometadatad should now read "rw-r--r--".

19. RESTART the DSM again to make sure it is no longer running the synovideometadatad daemon that you've tagged as non-executable.

20. If you moved files out of the main "video" folder at the start of this process, you can move them back now.

21. Run Video Station from the DSM's main menu.

22. The first thing it will ask you to do is to add your folders that contain your videos. Go ahead and do that, using the stuff you wrote down at the start of this procedure. Also go into the Privileges tab and set your desired privileges for your users. Go through the rest of the settings panel and put all your settings back the way they were.

23. In theory it should re-index and all should be well, no more bad metadata, just file names.

24. Go into the Package Center and under Settings, Auto Updates, set it so that it does not auto-update Video Station. (If an update becomes available, you can update it by hand if you are willing to make the above modifications all over again when it updates.)





_________________________
Tony Fabris

Top
#361576 - 04/05/2014 07:11 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: tfabris]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
Originally Posted By: tfabris
I thought that the only reason he knew about the synology index daemon was because he owned one himself and went spelunking.


I've got a DS211, and I upgraded it to the latest version. Just for you.
_________________________
-- roger

Top
#361577 - 04/05/2014 07:12 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: tfabris]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
Originally Posted By: tfabris
Have a tool on hand which allows you to edit the files on the hard disk of the DiskStation remotely across the network.


Yes. That's called SSH (or PuTTY) and vi. :-P
_________________________
-- roger

Top
#361578 - 04/05/2014 07:27 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: Roger]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
I made sure the instructions were editor-agnostic. Butterfly option would work perfectly well too. smile
_________________________
Tony Fabris

Top
#361579 - 04/05/2014 07:30 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
By the way, I wrote an Amazon review of the 214play which details the problem, awaiting clearance to be posted. Most of my reviews get approved quickly, but I think this one might get flagged and take a while to go live because the word "porn" is repeated in the review several times. smile

Edit: guess not. smile
_________________________
Tony Fabris

Top
#361581 - 04/05/2014 14:45 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: tfabris]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
Originally Posted By: tfabris
I made sure the instructions were editor-agnostic. Butterfly option would work perfectly well too. smile


Heh.

My point was that copying the files backwards and forwards is tedious and error prone. This is a Unix box. It'll have some flavour of 'vi' installed by default. It almost certainly won't have a copy of emacs. Unless you've somehow travelled back in time to the dark ages, in which case use 'ed' or kill yourself.

If you're going to do any kind of Unix sysadmin work, you need to learn (at least the basics of) vi.

Or you can start drinking the kool-aid, and use it for your everyday editor.
_________________________
-- roger

Top
#361582 - 04/05/2014 18:23 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: Roger]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
You're hardcore. smile
_________________________
Tony Fabris

Top
#361585 - 05/05/2014 03:17 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: Roger]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
Originally Posted By: Roger
It almost certainly won't have a copy of emacs.

Unless you hold a C position at a company. Then yes, every box has emacs. And a special deployment to limit a runaway emacs, umm, thing.

Top
#361641 - 12/05/2014 04:26 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
I have posted a BETTER SIMPLER solution here:
http://forum.synology.com/enu/viewtopic.php?f=222&t=85425&p=323055#p323055

Just tell Video Station to index everything as "Home Movies". Then it won't search the internet for the metadata. More details at the link I just posted. smile
_________________________
Tony Fabris

Top
#361657 - 12/05/2014 16:59 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: tfabris]
canuckInOR
carpal tunnel

Registered: 13/02/2002
Posts: 3212
Loc: Portland, OR
Originally Posted By: tfabris
You're hardcore. smile

What's hardcore about using vim for daily use? (20 years and counting)

Top
#362046 - 18/06/2014 09:14 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: tfabris]
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12338
Loc: Sterling, VA
Tony, do you know if there's been any progress on Plex for this Synology model? It looks like Plex (in 1080p) is very much not supported by pretty much all of their products (and most NAS devices).
_________________________
Matt

Top
#362049 - 18/06/2014 14:24 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: Dignan]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
No, I have not heard any word on this. I also haven't been looking... I'm happy with the Synology now that I have the work-around for DS Video. I still run Plex on it for some stuff; mostly the stuff I can't easily get any other way like the Zero Punctuation channel. In general, I just switch back and forth between the DS Video app and the Plex app as needed.

I will say this: Even when Plex is playing a video correctly, their app on the iPhone is a bit iffy. For example, sometimes it will exit the app (crash to desktop) while playing a video and then I have to go back into the app and hope it lets me continue controlling the video playback. Other times, while playing a video, if I try to press the pause button, instead of pressing pause it will drop back to the main menu screen without pausing the movie. And yet other times, if I sleep/lock the phone (press the button so the screen turns off) so that I'm not wasting the phone battery while the movie plays, there are problems getting it to control the movie when I wake up and unlock the phone.
_________________________
Tony Fabris

Top
#362050 - 18/06/2014 14:35 Re: Rubbing the Lamp: Synology - Turning Off Metadata Searching? [Re: Dignan]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
And I just wanted to say... when you say "not supported", all that means is:

1. The the CPU in the NAS is not powerful enough for Plex to transcode high-rez videos using the CPU alone.

2. The FFEMPEG library which Plex uses for transcoding hasn't yet been updated to take advantage of the video processing capabilities of the Intel Evansport chip.


OH HEY. HERE IS SOME NEWS. From just a few days ago:
http://forum.serviio.org/viewtopic.php?f=14&t=16921

Someone seems to have done some hacky level of support for the Evansport in FFEMPEG. Not sure what the latency time will be between that getting rolled back into the actual FFEMPEG package, then rolled into Plex, if at all. But we can hope. I don't know under whom to light fires to get this happening.
_________________________
Tony Fabris

Top