A fix for MCE network video thumbnail slowness

Discussion in 'Windows Media Center' started by Roger Wolfson, Jul 2, 2003.

  1. Like some other people who have posted here, I've been looking into ways to
    speed up browsing a network-share My Videos directory in Media Center. I've
    finally managed a fix that I'm content with, so I'll post my results as
    methodically as I can. Enjoy!

    The setup:
    -----
    File server is XP Pro, and its Media share (D:\documents\media) is
    \\roger\Media
    This is a read-only share for general network safety reasons. This share
    contains My Music and My Videos.

    Media Center is \\roger2 and is connected by 802.11b to a netgear router,
    which is wired to \\roger. This will sustain about 5Mbps of throughput
    without WEP (I use IPsec instead). This PC's My Videos and My Music
    directories point to "\\roger\Media\My [blah]" thanks to TweakUI.

    The problem
    -----
    When browsing the tile view of my various folders in Media Center, it takes
    up to 8 seconds per tile item to resolve the image it will use. This happens
    every time I browse to or from a screen (it doesn't improve with time).
    Also, a directory with lots of files has an added hit when being switched
    to.

    The guess
    -----
    I remember seeing ehThumbs.db files from back before I had set the share as
    read-only. Aha! Media Center is *trying* to cache its results and can't,
    because of the share protection in place.

    The examination
    -----
    First I temporarily re-enabled write access to the share. Then on the file
    server \\roger, I openened the Computer Management console (right-click on
    My Computer and select Manage) Navigate to System Tools - Shared Folders -
    Open Files. Hitting F5 in this pane as Media center is slowly loading a new
    view is very informative. It shows when I'm touching files, when I'm only
    touching the ehthumbs.db cache, etc. I discovered that MCE limits the size
    of a thumbs file to 15MB, so if you have more than about 65 files (in my
    case) in a given directory, only the first 65 will be cached. So split them
    into subdirs so the rest can have their own ehthumbs.db file too. Also, the
    "Open Files" window shows that upon browsing to a directory, it does open
    all the files for a moment, so dividing them smartly will speed up MCE
    folder browsing for that reason as well.

    I'm typing in real-time as I look into this. I was hoping that after
    generating the thumbs, I could set the share back to read-only and have the
    benefit of the existing thumbs without the risk of altering them.
    Unfortunately, as soon as the share goes back to read-only mode, it's as if
    the thumbs didn't exist anymore. Time to use NTFS permissions to see if it's
    the thumbs or the media files that have to have write access for this to
    work...

    Incidentally, I find that if the ehthumbs.db in a given folder changes, that
    folder's thumbnail in its *parent's* view will regenerate. No big deal but
    worth noting. So generate thumbs by a depth-first method :)

    Ok, it turns out that only the ehthumbs.db file has to have write access,
    and it is "Write" access that it requires; namely, all 4 of the special
    subcategories of Write defined in Advanced properties, so just allow Write
    the simple way.

    But now that I thought I've straightened this all out, it has inexplicably
    started generating only the generic placeholder thumbs instead of real ones.
    A restart of the MCE PC cured this.

    So here's the workaround that I used for this whole deal to keep things
    locked as tightly as possible:
    1. Set up a new local user account on the file server. The account is called
    Roger2. Make this a Power User and a User.
    2. Set the media share \\roger\Media to allow Change access for the user
    Roger2 as whom I will connect from the MCE PC.
    2. Set up the video directory structure as I will want to keep it. I keep no
    more than about 65 files per directory so I can thumbnail them all within
    the 15MB cache limit.
    3. Use Media Center to browse through the entire video collection so that I
    generate all the thumbs I'll need. Media Center is now fast at browsing the
    entire collection.
    4. On the fileserver, go to the NTFS properties for My Videos and ensure
    that the Users group has Read (only) access (I could just do Power Users
    instead, but I'll be more granular and let other Users connect and read)
    5. In the media root directory on the fileserver (D:\documents\media), press
    F3 for Find and search for ehthumbs.db. This will pull up a listing of all
    my thumbs files in this directory structure. I select them all and add Write
    permission for Power Users. Now my "Roger2" Power User has read access to
    all the media files, and write access only to the thumbs. (Note: It's
    important to only set NTFS permissions for Windows' pre-defined users and
    groups like Power Users, because if you reinstall the OS, custom created
    local users will no longer resolve and you'll have to set up your NTFS
    permissions all over again. Pre-defined groups like Power Users persist
    across OS installs.)

    Now I have exactly what I want: my MCE computer can't accidentally tamper
    with my media files or directories, except the the ehthumb.db files which it
    created in the first place. If I add new directories of videos, I'll
    manually create an empty text file called ehthumbs.db in it and give Power
    Users write access.

    Whew... this is a long message, and I hope others find it useful. I'll try
    and keep an eye on this thread if others have follow-up questions.

    Roger Wolfson

    r : w )
     
    Roger Wolfson, Jul 2, 2003
    #1
    1. Advertisements

  2. Hi Luis,

    After I posted last night, I tried to extend my methods to "My Pictures"
    over the network and, like you, found that it would not successfully cache
    and read the thumbnails. So the method in my post only works for videos.

    As for linking the media folder, I use the WinXP powertoy TweakUI. In its
    tree of options, in "My Computer - Special Folders", it allows you to
    specify new paths including UNC paths for folders like My Videos. I mapped
    My Videos to "\\roger\Media\My Videos\" for the methods I used below.

    -Roger
     
    Roger Wolfson, Jul 2, 2003
    #2
    1. Advertisements

  3. For the public record - no special tricks for me. TweakUI just works fine to
    set the folders. (after you log off and back on). I'll take a look at my reg
    settings when I get home and follow up with you by email.

    -Roger
     
    Roger Wolfson, Jul 3, 2003
    #3
  4. Ben,

    Been there, done that. No luck.

    Any suggestions?

    Thanks,

    Luis
     
    Luis A. Burgos, Jul 3, 2003
    #4
  5. Roger Wolfson

    Ben Neville Guest

    The same keys exist on the "HKEY_LOCAL_MACHINE" side which I believe are for
    the shared folder settings. Which folder is it actually looking at by
    default for Video's

    "C:\Documents and Settings\All Users\Documents\My Videos" or "C:\Documents
    and Settings\Administrator\My Documents\My Videos"
     
    Ben Neville, Jul 3, 2003
    #5
  6. Roger Wolfson

    Ben Neville Guest

    Not 100% sure but you could try adding a value for CommonPictures under the
    key "HKLM\SoftwareMicrosoft\Windows\CurrentVersion\Explorer\User Shell
    Folders"

    I unfortunatly have not had a chance to play with these settings yet.

    Not sure whether maybe the stuff gets loaded into memory when Explorer
    starts and when explorer closes it rewritess the information to the
    registry.

    If this was the case one possibility would be to change these settings
    remotely on the PC before you log in. To do this you would have to connect
    to the registry remotly from one of your other PCs. After doing this you
    could reboot and check again remotly to try to determine at what point it is
    getting rewritten.

    Would also be worth see what Roger has in both the Shell folders and User
    Shell Folders keys.
     
    Ben Neville, Jul 3, 2003
    #6
  7. Ben,

    I tried your "User Folders" suggestion, and in fact, I can change the entire
    "Shared Folders" entry. In My Computer, "Shared Documents" is replaced by
    "Documents" (which is the name of my directory on the server. So far so
    good.

    Problem is, Media center still looks to "CommonPictures", regardless or the
    "User folders" documents entry.

    Anyway, thank you for all the suggestions and the great follow up.

    I'll keep playing with this, if I find anything, I'll let you all know.

    best regards,

    Luis

     
    Luis A. Burgos, Jul 3, 2003
    #7
  8. Ben,

    Media Center overwrites this value every time it runs. This is what I found
    out:

    App: ehshell.exe
    Process: 1612
    Action: SetValue
    Key: HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell
    Folders\CommonPictures
    Value: "C:\Documents and Settings\All Users\Documents\My Pictures"
    Result: SUCCESS

    Regards,

    Luis


     
    Luis A. Burgos, Jul 3, 2003
    #8
  9. Roger Wolfson

    Ben Neville Guest

    Does it rewrite it even if the value is already set to the "C:\Documents and
    Settings\All Users\Documents\My Pictures"

    If so it seems bizarre that Roger got it working. That said I just reread
    his post and it looks like he redirected Video's not pictures.

    If it only rewrites if it is not already that value we need to work out in
    what cases it does the rewrite. My guess would be it would rewrite if it
    cannot access the path that is already specified.

    When I get back from July 4th vacation I can try a regmon to see whether I
    get same results.

    Roger if you are out there can you let us know what is in the mentioned keys
    on your PC.

     
    Ben Neville, Jul 3, 2003
    #9
  10. Roger,

    Thanks for the info. I'll try "My Pictures" instead and see how it works.

    My goal is still remapping "Shared" as this is exactly my case. I'd like to
    keep "My Pictures" as mine, and point "Shared..." to the server, which is
    where the share material is.

    I have another computer at home, and 4 different users, so remapping each
    individual "My ..." in each profile is not very efficient, mostly if I need
    to re-install, for any reason.

    Anyway, if the "My ..." works, it would be a good workaround for the moment.

    Thanks again.

    regards,

    Luis

     
    Luis A. Burgos, Jul 3, 2003
    #10
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.