Index MKV files from right-click
- Qyot27
- Surreptitious fluffy bunny
- Joined: Fri Aug 30, 2002 12:08 pm
- Status: Creepin' between the bullfrogs
- Location: St. Pete, FL
- Contact:
Index MKV files from right-click
This is meant to do three things:
A) Not have to open the AviSynth script in a media player to get FFmpegSource2 to index the file, because it uses ffmsindex instead. This cuts way down on resource usage during the indexing phase, and you get to know how far along the indexing is, percentage-wise.
B) Not require users to use the Command Prompt, because ffmsindex does not have a GUI (yet, anyway).
C) Autogenerate an AviSynth script with the index file, like DGIndex's template option does*.
*it's not the same, though - DGIndex's template system is much nicer than this is if you want to have more than the source function in the script.
I know that there are some complaints about FFMS2 crashing AviSynth when it tries to open the files (or that it simply takes too long to index+play them). I use the CLI ffmsindex app to do the indexing before I ever try to playback the files, so I've never encountered this problem.
But I understand that a lot of users are very reluctant to use the command line, and so I've whipped up a solution for them. Using this method, you never have to touch the command line, and shouldn't have to deal with those file opening problems I just mentioned either.
As a bit of forewarning, I have no idea how this works on Vista and Win7; you may need to do this as Administrator.
Download mkvindex_contextmenu.zip here:
http://www.mediafire.com/?wzjitzzxtqz
XP users: double-click on install-xp.bat
Vista users (maybe Win7 users too): follow the directions in vista-install-instructions.txt
Vista SP1 users: bats differ for scripting reasons.
Unpack the zip file, and then double-click on install.bat. When it asks, click OK. Now you should be able to right-click on any MKV file and not only index it, but also have a basic, functional AviSynth script outputted for you as well. Index will only index the video track of the MKV, while Index (w/Audio) will index the video and audio tracks.
One caveat is that if the file doesn't have an audio track at all, don't use the w/Audio option - the script it generates will fail unless you remove the atrack=-1 portion.
[MOD 258: Updated link and instructions.]
A) Not have to open the AviSynth script in a media player to get FFmpegSource2 to index the file, because it uses ffmsindex instead. This cuts way down on resource usage during the indexing phase, and you get to know how far along the indexing is, percentage-wise.
B) Not require users to use the Command Prompt, because ffmsindex does not have a GUI (yet, anyway).
C) Autogenerate an AviSynth script with the index file, like DGIndex's template option does*.
*it's not the same, though - DGIndex's template system is much nicer than this is if you want to have more than the source function in the script.
I know that there are some complaints about FFMS2 crashing AviSynth when it tries to open the files (or that it simply takes too long to index+play them). I use the CLI ffmsindex app to do the indexing before I ever try to playback the files, so I've never encountered this problem.
But I understand that a lot of users are very reluctant to use the command line, and so I've whipped up a solution for them. Using this method, you never have to touch the command line, and shouldn't have to deal with those file opening problems I just mentioned either.
As a bit of forewarning, I have no idea how this works on Vista and Win7; you may need to do this as Administrator.
Download mkvindex_contextmenu.zip here:
http://www.mediafire.com/?wzjitzzxtqz
XP users: double-click on install-xp.bat
Vista users (maybe Win7 users too): follow the directions in vista-install-instructions.txt
Vista SP1 users: bats differ for scripting reasons.
Unpack the zip file, and then double-click on install.bat. When it asks, click OK. Now you should be able to right-click on any MKV file and not only index it, but also have a basic, functional AviSynth script outputted for you as well. Index will only index the video track of the MKV, while Index (w/Audio) will index the video and audio tracks.
One caveat is that if the file doesn't have an audio track at all, don't use the w/Audio option - the script it generates will fail unless you remove the atrack=-1 portion.
[MOD 258: Updated link and instructions.]
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog
- Qyot27
- Surreptitious fluffy bunny
- Joined: Fri Aug 30, 2002 12:08 pm
- Status: Creepin' between the bullfrogs
- Location: St. Pete, FL
- Contact:
Re: Index MKV files from right-click
Gah, double post.
This assumes that ffmsindex is residing in C:\Program Files\AviSynth 2.5\plugins. If you unpack FFmpegSource2 to that directory, this shouldn't be an issue.
This assumes that ffmsindex is residing in C:\Program Files\AviSynth 2.5\plugins. If you unpack FFmpegSource2 to that directory, this shouldn't be an issue.
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog
- mirkosp
- The Absolute Mudman
- Joined: Mon Apr 24, 2006 6:24 am
- Status: (」・ワ・)」(⊃・ワ・)⊃
- Location: Gallarate (VA), Italy
- Contact:
Re: Index MKV files from right-click
Running with administrator and UAC disabled on Vista Home Premium 32bit, and the voice is not showing up in the context menu. I did check and the keys did get properly registered, so I'm not exactly sure what's not working out. :\
EDIT: Ah, and yeah, I do have ffmsindex.exe in C:\Program Files\AviSynth 2.5\plugins
EDIT: Ah, and yeah, I do have ffmsindex.exe in C:\Program Files\AviSynth 2.5\plugins
- Qyot27
- Surreptitious fluffy bunny
- Joined: Fri Aug 30, 2002 12:08 pm
- Status: Creepin' between the bullfrogs
- Location: St. Pete, FL
- Contact:
Re: Index MKV files from right-click
I'm troubleshooting a bit on my mom's laptop, since it runs Vista Home Premium 32-bit, and it seems a couple of things go wrong:
1) Trying to run install.bat as Administrator means it cannot find mkvindex.bat or mkvindex-audio.bat because it looks for them in C:\Windows\system32 - these need to be copied to C:\Windows. Running the install script as Administrator also seems to cause Regedit to fail.
2) Running the script with normal privileges allows Regedit to do its job, but the copy portion fails because the regular user doesn't have normal access to C:\Windows. There might be a per-operation override for it, but I don't know what it is.
There were also some rather wonky issues with the registry entries and the scripts in the original file concerning file paths and double quotes. I'm close to getting it sorted out and I'll repost an updated pack with both XP and Vista install scripts included (AviSynth doesn't mind double-quotations on XP - and actually the script to generate the stuff requires them on there, but on Vista it spazzes out on them and the double-quotes aren't needed; let's hope Win7 doesn't need a third way to get this working, as I don't have a copy of it to test on). On Vista it may still be required to manually copy the indexing scripts to C:\Windows, though.
1) Trying to run install.bat as Administrator means it cannot find mkvindex.bat or mkvindex-audio.bat because it looks for them in C:\Windows\system32 - these need to be copied to C:\Windows. Running the install script as Administrator also seems to cause Regedit to fail.
2) Running the script with normal privileges allows Regedit to do its job, but the copy portion fails because the regular user doesn't have normal access to C:\Windows. There might be a per-operation override for it, but I don't know what it is.
There were also some rather wonky issues with the registry entries and the scripts in the original file concerning file paths and double quotes. I'm close to getting it sorted out and I'll repost an updated pack with both XP and Vista install scripts included (AviSynth doesn't mind double-quotations on XP - and actually the script to generate the stuff requires them on there, but on Vista it spazzes out on them and the double-quotes aren't needed; let's hope Win7 doesn't need a third way to get this working, as I don't have a copy of it to test on). On Vista it may still be required to manually copy the indexing scripts to C:\Windows, though.
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog
- Qyot27
- Surreptitious fluffy bunny
- Joined: Fri Aug 30, 2002 12:08 pm
- Status: Creepin' between the bullfrogs
- Location: St. Pete, FL
- Contact:
Re: Index MKV files from right-click
Ok, here's the updated pack:
http://www.mediafire.com/?bonzhaw2zjy
XP users: double-click on install-xp.bat
Vista users (maybe Win7 users too): follow the directions in vista-install-instructions.txt
Hopefully that fixes things. The file linked in the first post has been deleted, so it might be a good idea to add a note to the post about the updated package.
http://www.mediafire.com/?bonzhaw2zjy
XP users: double-click on install-xp.bat
Vista users (maybe Win7 users too): follow the directions in vista-install-instructions.txt
Hopefully that fixes things. The file linked in the first post has been deleted, so it might be a good idea to add a note to the post about the updated package.
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog
- mirkosp
- The Absolute Mudman
- Joined: Mon Apr 24, 2006 6:24 am
- Status: (」・ワ・)」(⊃・ワ・)⊃
- Location: Gallarate (VA), Italy
- Contact:
Re: Index MKV files from right-click
Perhaps I'm being the failguy here, but if I run it as a normal user it doesn't allow me to add info to regedit, and running as an admin user, while adding info to the regedit, still doesn't get me the context menu. In all this I haven't rebooted yet because I can't reboot atm and I won't be able to for about a day still, but I don't think reboot is required, is it now? >_>
- Qyot27
- Surreptitious fluffy bunny
- Joined: Fri Aug 30, 2002 12:08 pm
- Status: Creepin' between the bullfrogs
- Location: St. Pete, FL
- Contact:
Re: Index MKV files from right-click
It shouldn't be. I was adding/deleting/readding the reg files on my mom's laptop and it worked fine. If you add the entries to Regedit manually, does it work? The methodology I used was thus:
Search for mkv_auto_file in Regedit. Expand the entry, and then expand the 'shell' entry underneath it. Open, Index, and Index (w/Audio) should all be there. If they are, then Windows Explorer may be the one with the problem. If they aren't there, then right-click on 'shell' and select New->Key. Name this 'Index', and then right-click on Index, New->Key, and name it 'command'. The actual entry on the right pane should be defined as "C:\Windows\mkvindex-vista.bat" %1 - repeat this for Index (w/Audio), so that it finally looks like this:
The only time I had to reboot was when testing with UAC on/off - but this worked with or without UAC enabled. The install script didn't work, though - I had to copy mkvindex-vista.bat and mkvindex-audio-vista.bat to C:\Windows manually using Windows Explorer. The thing that was infuriating for me were the file associations - if the indexing bat files weren't where they were supposed to be, the menu entries would launch the Open With dialog instead.
If it is an issue with Explorer refreshing itself, you could simply quit Explorer using the Task Manager and reload it, which might resolve the changes.
Search for mkv_auto_file in Regedit. Expand the entry, and then expand the 'shell' entry underneath it. Open, Index, and Index (w/Audio) should all be there. If they are, then Windows Explorer may be the one with the problem. If they aren't there, then right-click on 'shell' and select New->Key. Name this 'Index', and then right-click on Index, New->Key, and name it 'command'. The actual entry on the right pane should be defined as "C:\Windows\mkvindex-vista.bat" %1 - repeat this for Index (w/Audio), so that it finally looks like this:
- mkv_auto_file
- shell
- Index
- command [defined in the right pane as "C:\Windows\mkvindex-vista.bat" %1]
- Index (w/Audio)
- command [defined in the right pane as "C:\Windows\mkvindex-audio-vista.bat" %1]
The only time I had to reboot was when testing with UAC on/off - but this worked with or without UAC enabled. The install script didn't work, though - I had to copy mkvindex-vista.bat and mkvindex-audio-vista.bat to C:\Windows manually using Windows Explorer. The thing that was infuriating for me were the file associations - if the indexing bat files weren't where they were supposed to be, the menu entries would launch the Open With dialog instead.
If it is an issue with Explorer refreshing itself, you could simply quit Explorer using the Task Manager and reload it, which might resolve the changes.
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog
- Qyot27
- Surreptitious fluffy bunny
- Joined: Fri Aug 30, 2002 12:08 pm
- Status: Creepin' between the bullfrogs
- Location: St. Pete, FL
- Contact:
Re: Index MKV files from right-click
Wait, was Explorer running as Administrator? It just occurred to me that if Regedit added the entries without issue if it was run as Admin, then Explorer may not be able to see them unless it's running as Admin also.
Honestly, this would be demonstrably easier if Vista and 7 user permissions worked similarly to the way sudo/gksudo do in *nix-based OSes. Maybe it wouldn't be easy with Regedit, though.
Honestly, this would be demonstrably easier if Vista and 7 user permissions worked similarly to the way sudo/gksudo do in *nix-based OSes. Maybe it wouldn't be easy with Regedit, though.
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog
- mirkosp
- The Absolute Mudman
- Joined: Mon Apr 24, 2006 6:24 am
- Status: (」・ワ・)」(⊃・ワ・)⊃
- Location: Gallarate (VA), Italy
- Contact:
Re: Index MKV files from right-click

Should be right.
And as far as explorer is concerned, it either is already running as admin or it won't let me do so, since the voice doesn't show up with right click...
EDIT: Oh, and yeah, I'm running SP1, so perhaps might change something...
- Zarxrax
- Joined: Sun Apr 01, 2001 6:37 pm
- Contact:
Re: Index MKV files from right-click
You might want to try making an installer with InnoSetup.
With the ISTool editor, you can probably whip up an installer to easily handle this on all systems in a matter of minutes.
With the ISTool editor, you can probably whip up an installer to easily handle this on all systems in a matter of minutes.