Author Topic: Auto-detection of .avi and .rm  (Read 6302 times)

davegravy

  • Addicted
  • *
  • Posts: 551
    • View Profile
Auto-detection of .avi and .rm
« on: March 25, 2009, 06:08:08 pm »
If I place a .wmv or .mp4 in the /home/public/data/videos directory they appear instantly in the videos list within the orbiter on my hybrid.

If I place an .avi or .rm file in this directory they do not appear and I must add them manually through the admin page. Is this a bug?

lmce3000

  • Veteran
  • ***
  • Posts: 56
    • View Profile
Re: Auto-detection of .avi and .rm
« Reply #1 on: March 25, 2009, 06:34:34 pm »
Hi,

I just copied a .avi file to my /home/public/data/videos directory and it appeared in my videos list right away.
Anyone else having this problem?

John.
* Give a man a fish, you feed him for a day
*Teach a man how to fish, you feed him for a lifetime.

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Auto-detection of .avi and .rm
« Reply #2 on: March 25, 2009, 09:12:43 pm »
Well, it should take until the next time UpdateMedia scans before it appears. UpdateMedia triggers every 2 mins, but obviously can take a while to complete if you have a lot of media.

.wmv .avi and .mp4 files are all recognised by the system at this point, .rm files are not recognised, so it is not surprising that these do not get added to your database. Test the .avi one again, I think you'll find it does pick those up, just let UpdateMedia complete its scan. You can monitor this by

tail -f /var/log/pluto/UpdateMedia.log

If there is still an issue, use the web admin and choose the media file sync option, then navigate to the folder and determine which files are sync'd and which are merely on-disk, then do a manual sync to see what happens.

wombiroller

  • Guru
  • ****
  • Posts: 340
    • View Profile
Re: Auto-detection of .avi and .rm
« Reply #3 on: March 26, 2009, 01:29:21 am »
Well, it should take until the next time UpdateMedia scans before it appears. UpdateMedia triggers every 2 mins, but obviously can take a while to complete if you have a lot of media.

Slightly off-topic but does it run very 2 min 24/7? In an attempt to reduce unnecessary HDD activity do you think it would it be worthwhile / possible to reduce the regularity during say 2am to 8am or some such (assuming it doesn't already)? I guess this may need to be configurable in the event we have some vampires users... Just a thought.

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Auto-detection of .avi and .rm
« Reply #4 on: March 26, 2009, 09:34:00 am »
Definitely not as the general/default, many of us are adding media all the time (literally numerous pieces every day) and want to be able to find and play them as soon as they are available.... personally, I have considered decreasing the period rather than the other way around! But if it suits your purpose you could always change it on your system, or make a patch that makes this configurable. But with the default as is now .... when there are arguments in both directions, generally the status quo should rule in the absence of any compelling argument!

But as for HDD activity. Seriously, scanning the directory structure for changes in meta data (which is essentially all it is doing most of the time), on a 2 min period, with little actual change is going to produce only a relatively minor amount of "hard" HDD activity on devices that are, realistically, intended to run flat out for several years. Particularly when much of the access is really going to be "soft", ie coming from cache rather than the actual platters. I don't think UpdateMedia really adds a huge amount of "wear"....

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Auto-detection of .avi and .rm
« Reply #5 on: March 26, 2009, 04:39:36 pm »
I don't think UpdateMedia really adds a huge amount of "wear"....

I think there are a couple of things here. It is not the wear per se, but the fact, that the HDD can't be set to sleep. BUT, iirc, the UpdateMedia daemon works in conjunction with famd. And I am not sure, it checks the whole directory structure again, but I never really looked into it.

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Auto-detection of .avi and .rm
« Reply #6 on: March 26, 2009, 11:35:48 pm »
True, it does prevent the sleep function, and so I guess there are power consumption concerns.... I don't think that there will be any way to maintain a "real time" library and allow the disk to sleep without an agent being installed on the remote device that could send "push" notifications of changes, additions or deletions, and UpdateMedia rely on those.... but that doesn't really fit with the idea of universality of LMCE connecting to anything...

What is famd? What does it do? I can't say with any certainty what UM actually does, but certainly if you tail the log, every 2 mins it appears to be scanning through every folder/file looking for changes...

wombiroller

  • Guru
  • ****
  • Posts: 340
    • View Profile
Re: Auto-detection of .avi and .rm
« Reply #7 on: March 26, 2009, 11:56:46 pm »
Hmmm, Talk about touchy - apparently posting this type of question brings bad Karma my way. Perhaps I should keep thoughts to myself in future before the cosmic ether starts attacking me.

Colinjones - understood and agree re default, I move allot of stuff about also, but not in the wee hours of the morning...and sleeping not far from the core I find on a quiet night I can hear the drives spinning up every now and then. Anyways, was just a thought.

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Auto-detection of .avi and .rm
« Reply #8 on: March 27, 2009, 12:27:48 am »
wombiroller

Really just ignore the karma, I seem to get applause when I don't really remember doing anything, and smites when my recent comments seem quite innocuous! Dunno :)

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: Auto-detection of .avi and .rm
« Reply #9 on: March 27, 2009, 12:54:30 am »
What is famd? What does it do? I can't say with any certainty what UM actually does, but certainly if you tail the log, every 2 mins it appears to be scanning through every folder/file looking for changes...

FAMD is an acronym for File Access Monitor Demon. See http://wiki.linuxquestions.org/wiki/Famd

UpdateMedia does not scan through looking for file changes... it gets alerted about them by FAMD.

Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Auto-detection of .avi and .rm
« Reply #10 on: March 27, 2009, 01:16:52 am »
What is famd? What does it do? I can't say with any certainty what UM actually does, but certainly if you tail the log, every 2 mins it appears to be scanning through every folder/file looking for changes...

FAMD is an acronym for File Access Monitor Demon. See http://wiki.linuxquestions.org/wiki/Famd

UpdateMedia does not scan through looking for file changes... it gets alerted about them by FAMD.

Andrew

Andrew, that's only true for the drive in a core, not for remote NAS or PC shares. (what about drives in an MD? Does FAMD monitor those as well and send events to the core, telling it to update?) If FAMD is monitoring your core HDD, does UpdateMedia completely ignore this drive for its periodic scans? Or does it still do those anyway, just in case?

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: Auto-detection of .avi and .rm
« Reply #11 on: March 27, 2009, 01:31:12 am »
What is famd? What does it do? I can't say with any certainty what UM actually does, but certainly if you tail the log, every 2 mins it appears to be scanning through every folder/file looking for changes...

FAMD is an acronym for File Access Monitor Demon. See http://wiki.linuxquestions.org/wiki/Famd

UpdateMedia does not scan through looking for file changes... it gets alerted about them by FAMD.

Andrew

Andrew, that's only true for the drive in a core, not for remote NAS or PC shares. (what about drives in an MD? Does FAMD monitor those as well and send events to the core, telling it to update?) If FAMD is monitoring your core HDD, does UpdateMedia completely ignore this drive for its periodic scans? Or does it still do those anyway, just in case?

Its true for all drives of any kind that are part of the Pluto file structure. Add a file to your NAS... and FAMD 'knows' about it... and UpdateMedia goes about its business.

Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Auto-detection of .avi and .rm
« Reply #12 on: March 27, 2009, 01:41:19 am »
Hang on though, that doesn't make any sense. A PC share on your internal network can be part of the Pluto file structure, but there is no way that FAMD can monitor for changes on that share, remotely, without either scanning the drive or having an agent installed on the remote PC - SMB just doesn't send events for changes to files/folders deep in the share's heirarchy, which would be needed for that to work. Also, tailing the UpdateMedia log shows that UpdateMedia is definitely scanning every folder on the remote shares... and when it is doing so, on a PC you can list the active share sessions and see UpdateMedia connecting to each folder/file in turn....