Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Hardware & Software > Software players

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 3rd September 2012, 04:57   #20121  |  Link
Liisachan
李姗倩 Lǐ Shān Qiàn
 
Liisachan's Avatar
 
Join Date: Nov 2002
Posts: 1,340
Quote:
Originally Posted by Mikey2 View Post
Whenever I save anything from the "options" menu, MPC freezes for 10-30 seconds. It took me a while to see that in Windows explorer it is rebuilding "mpc-hc.ini". (I can see the file-size go up from 0 to the current size of 254 KB.)
This is just a guess, but it may have something to do with this line in mplayerc.cpp.
Code:
bool CMPlayerCApp::ChangeSettingsLocation(bool useIni)
{
...
    // In case an ini file is present, we remove it so that it will be recreated
    _tremove(GetIniPath());
AFAIK, the original intention of the above is, if the current .ini file is in ANSI, it will be deleted once and recreated as a Unicode (UTF-16LE) file so that a "Unicode" path can be stored in .ini (eg file names in Spanish and in Chinese at the same time).
Liisachan is offline  
Old 4th September 2012, 09:49   #20122  |  Link
cremor
Registered User
 
Join Date: Jun 2011
Posts: 81
Is the automatic loading of subtitles broken in 1.6.3? I remember that it used to work fine but I can't get it working now. I'm playing an avi file and the subtitles are in a "Subs" subfolder in idx/sub format.

Automatic loading of subtitles is enabled and the subtitle search path is using the default value.
cremor is offline  
Old 4th September 2012, 18:08   #20123  |  Link
Mikey2
Registered User
 
Join Date: Nov 2010
Posts: 80
Thanks for the responses re: my problem is simply that MPC-HC is rebuilding the ini file each time anything changes..


Re: anti-virus, I tried MSE, NOD32, and none at all. It doesn't seem like it is making anything "dirty" on that end since it is rebuilding the file.

That line of code looks exactly like what I think is happening! But why is it being called ever-time? Could there be something wrong with my ASCII/Unicode defaults? I know that on my system I have had several problems with this, from Notepad++ working differently depending on the type to My SQL Server stored procs for my other development activities always needed to be changed to ANSI.

I'm not home now but I'll play with procmon when I get home.

EDIT: Taking the simplest recreation steps, I did the following:
1) Open MPC-HC.
2) Close MPC-HC.

For this scenario, ProcMon is showing approximately 102,061 event lines that touch the mpc-hc.ini file! (18,268 Opens, 18,268 Closes, 11,741 Reads, 2,472 Writes, 132 Get ACL, 51,180 Other )


EDIT2 (back home now on the problem computer): I notice in Notepad++ that MPC-HC creates the file encoded in "UCS-2 Little Endian." When I try to re-save the file in ANSII or UTF-8, I MPC-HC rebuilds it back to UCS-2 Little Endian. (BTW the "rebuild" takes about 5 seconds, during which time MPC-HC is unresponsive.)

Edit3: Actually can you point me out to that part of the source code? I'd like to see what is calling that function. Inferring from the name of the method, it looks like it may also be called when MPC thinks it's storing the ini file to a different location. Again I'll have to check when I get home, but perhaps my shortcut is pointing to a virtualized path (e.g. libraries) and it is getting confused thinking it is in a different place each time.

Thanks much in advance.
MikeY.

Last edited by Mikey2; 4th September 2012 at 22:37. Reason: Added info/question
Mikey2 is offline  
Old 4th September 2012, 18:25   #20124  |  Link
Mikey2
Registered User
 
Join Date: Nov 2010
Posts: 80
Quote:
Originally Posted by cremor View Post
Is the automatic loading of subtitles broken in 1.6.3? .
Subtitles still work for me. I usually put it in the same directory, rename the file to the same as the mkv/avi and select "prefer external subtitles..." Also, if you're putting them into a subfder, make sure to include the subs\ relative path in that list. Finally, make sure "auto-load subtitles" is still selected on the playback screen. (I know this is obvious, but sometimes people forget that one.) (I'm sorry, I'm on my phone now so I don't remember the exact names for all this...)
Mikey2 is offline  
Old 4th September 2012, 23:48   #20125  |  Link
Liisachan
李姗倩 Lǐ Shān Qiàn
 
Liisachan's Avatar
 
Join Date: Nov 2002
Posts: 1,340
Quote:
Originally Posted by Mikey2 View Post
Edit3: Actually can you point me out to that part of the source code? I'd like to see what is calling that function. Inferring from the name of the method, it looks like it may also be called when MPC thinks it's storing the ini file to a different location. Again I'll have to check when I get home, but perhaps my shortcut is pointing to a virtualized path (e.g. libraries) and it is getting confused thinking it is in a different place each time.
mplayerc.cpp Line 418 CMPlayerCApp::ChangeSettingsLocation

This function is called in Line 1018 if IsIniValid() && !IsIniUTF16LE(). [There might be another place calling it, but I'm not sure.]

- IsIniValid() is FileExists(GetIniPath()). This may fail even when .ini does exists, if GetIniPath() fails, or if it returns an incorrect path for some reason. GetIniPath is:
Code:
    CString path = GetProgramPath(true);
    path = path.Left(path.ReverseFind('.') + 1) + _T("ini");
    return path;
This suggests that .ini must share the path with the program .exe. If, for example, a file-link (shortcut) is used for .ini, things may go wrong. Like you said, a virtualized path may be a problem. Also, GetProgramPath itself might fail, if for example the exe is remote.

- IsIniUTF16LE() returns false not only when it succeeds and the file is actually not UTF-16 LE, but also when CFile f fails, and when f.Read() fails. Also, if this is cross-platform, the below code has obviously an endianness problem. Though, I think CFile always reads a WORD as LE, since this is on Windows. A byte order mark (BOM) is 0xFEFF, which is 0xFF 0xFE if encoding is UTF16-LE. [Edit: I was wrong. The below is just fine, as f.Read is byte-by-byte reading.]
Code:
            WORD bom;
            if (f.Read(&bom, sizeof(bom)) == sizeof(bom)) {
                isUTF16LE = (bom == 0xFEFF);
            }

Last edited by Liisachan; 4th September 2012 at 23:52.
Liisachan is offline  
Old 5th September 2012, 01:21   #20126  |  Link
Mikey2
Registered User
 
Join Date: Nov 2010
Posts: 80
Wow thanks a lot Liisaschan! As I mentioned, I am a software engineer, so I think I will try getting down and dirty in the code. Just to make sure I'm in the right place, is current development being done on this svn repository: http://sourceforge.net/projects/mpc-hc/ and/or this onehttps://github.com/mpc-hc/mpc-hc ?

What version of VC++ are you using to compile? (I currently have Visual Studio 2008 installed, but my MSDN license should still be valid if I need to upgrade.) Is there any specific "gotcha's" involved in getting my environment setup to debug MPC-HC?

This sounds like it could be fun!

Oh and as far as changes, I won't checkin anything; I just want to step-into the code and see where it is going wrong... (It is weird, I am staring at Notepad++ which clearly stating the file is encoded UCS-2 Little Endian...)

MikeY
Mikey2 is offline  
Old 5th September 2012, 02:34   #20127  |  Link
Liisachan
李姗倩 Lǐ Shān Qiàn
 
Liisachan's Avatar
 
Join Date: Nov 2002
Posts: 1,340
@Mikey2
I'm just a hobbyist (a user), not an MPC-HC dev nor a professional programmer. I've never even tried to compile MPC-HC myself. MPC-HC things used to be on sourceforge, but now it's on github.com, starting from 1.6.3. You should check files in /docs, and http://sourceforge.net/apps/trac/mpc-hc/wiki/How_to_compile_the_MPC - it says vs2010 (maybe the free Express version will do).

In ChangeSettingsLocation, UpdateData(true) is always called anyway even when StoreSettingsToIni() fails. This means that if CreateFile(...GENERIC_WRITE...) fails but WriteProfile* doesn't fail, then an ANSI (non-Unicode) ini file is recreated every time you start MPC-HC, because it sees the ini is not in Unicode, and so it tries to recreate it, but the ini doesn't have an BOM if CreateFile fails, when WriteProfile* writes ANSI strings. Perhaps that's not your problem, though, since you say your ini is already in UTF-16. To make sure, you can rename a random sample media file like "中文 & español.avi" and try to bookmark it, while "Store settings to .ini" is enabled. Restart MPC-HC and select it from the bookmarks; it works if .ini is in Unicode, and doesn't work if .ini is in ANSI.

EDIT:

Another thing you can try easily is an old version like
4235
If builds before 4274 don't have your problem, then the 4274 changes may have caused it.

Last edited by Liisachan; 5th September 2012 at 03:11.
Liisachan is offline  
Old 5th September 2012, 09:33   #20128  |  Link
vBm
MPC-HC Helper xD
 
vBm's Avatar
 
Join Date: Aug 2006
Location: Belgrade, Serbia
Posts: 220
Quote:
Originally Posted by Mikey2 View Post
Just to make sure I'm in the right place, is current development being done on this svn repository: http://sourceforge.net/projects/mpc-hc/ and/or this onehttps://github.com/mpc-hc/mpc-hc ?

What version of VC++ are you using to compile? (I currently have Visual Studio 2008 installed, but my MSDN license should still be valid if I need to upgrade.) Is there any specific "gotcha's" involved in getting my environment setup to debug MPC-HC?
we're switched to github for development repository.
VS2010 is needed to compile mpc-hc.
__________________
MPC-HC Links: official nightlies | Trac | GitHub | git log | IRC | Twitter | Facebook
vBm is offline  
Old 5th September 2012, 10:50   #20129  |  Link
cremor
Registered User
 
Join Date: Jun 2011
Posts: 81
Quote:
Originally Posted by Mikey2 View Post
Subtitles still work for me. I usually put it in the same directory, rename the file to the same as the mkv/avi and select "prefer external subtitles..." Also, if you're putting them into a subfder, make sure to include the subs\ relative path in that list. Finally, make sure "auto-load subtitles" is still selected on the playback screen. (I know this is obvious, but sometimes people forget that one.) (I'm sorry, I'm on my phone now so I don't remember the exact names for all this...)
I just found out that it works fine when the subtitles have the exact same name as the movie file. But my subtitles are named "<movie file name>.en.<extension>" and "<movie file name>.de.<extension>". Shouldn't this work too? How are you supposed to automatically load more than one subtitle otherwise?
cremor is offline  
Old 6th September 2012, 23:28   #20130  |  Link
Thunderbolt8
Registered User
 
Join Date: Sep 2006
Posts: 2,197
is mpc-hc actually able to open/read BD menus like a normal playback software (e.g. powerdvd) or a standalone player?
__________________
Laptop Lenovo Legion 5 17IMH05: i5-10300H, 16 GB Ram, NVIDIA GTX 1650 Ti (+ Intel UHD 630), Windows 10 x64, madVR (x64), MPC-HC (x64), LAV Filter (x64), XySubfilter (x64) (K-lite codec pack)
Thunderbolt8 is offline  
Old 7th September 2012, 00:55   #20131  |  Link
JanWillem32
Registered User
 
JanWillem32's Avatar
 
Join Date: Oct 2010
Location: The Netherlands
Posts: 1,083
@TheCatcher: Today I had the spare time to do some programming, so I integrated the changes you wanted in the renderer. I modified the parameters a bit, so it can be used a bit more universally for other pixel shaders as well. I posted the builds and pixel shaders in the renderer fixes thread on this board.
__________________
development folder, containing MPC-HC experimental tester builds, pixel shaders and more: http://www.mediafire.com/?xwsoo403c53hv
JanWillem32 is offline  
Old 9th September 2012, 12:43   #20132  |  Link
mr.duck
quack quack
 
Join Date: Apr 2009
Posts: 259
The log has stopped updating? http://mpc-hc.svn.sourceforge.net/viewvc/mpc-hc/?view=log

Is there an updated URL?
__________________
Media Player Classic Home Cinema Icon Library: NORMAL VERSION / GLOWING VERSION
mr.duck is offline  
Old 9th September 2012, 12:47   #20133  |  Link
JEEB
もこたんインしたお!
 
JEEB's Avatar
 
Join Date: Jan 2008
Location: Finland / Japan
Posts: 512
Quote:
Originally Posted by mr.duck View Post
The log has stopped updating? http://mpc-hc.svn.sourceforge.net/viewvc/mpc-hc/?view=log

Is there an updated URL?
Yes, MPC-HC switched from svn to git: repository log
__________________
[I'm human, no debug]
JEEB is offline  
Old 9th September 2012, 13:10   #20134  |  Link
mr.duck
quack quack
 
Join Date: Apr 2009
Posts: 259
Quote:
Originally Posted by JEEB View Post
Yes, MPC-HC switched from svn to git: repository log
I see. Thanks.

Is there any way too see the the build number (such as r5940) from this new list?
__________________
Media Player Classic Home Cinema Icon Library: NORMAL VERSION / GLOWING VERSION
mr.duck is offline  
Old 9th September 2012, 13:51   #20135  |  Link
JEEB
もこたんインしたお!
 
JEEB's Avatar
 
Join Date: Jan 2008
Location: Finland / Japan
Posts: 512
Quote:
Originally Posted by mr.duck View Post
Is there any way too see the the build number (such as r5940) from this new list?
No. Git (like many other newer revision control systems, such as mercurial) basically have abolished the concept of a single-lined, unmodifiable revision histories, and thus every commit just has a hash of its own (usually the seven first symbols of it are long enough to be specific to one, so a shortened version is shown on github f.ex.), and the history is a line that tangles these commits together. So no, there is no automatical revision number in git (hg actually makes it harder for the user to rebase etc. + tries to "look the same" so it just counts the amount of commits and creates a revision number for the user from there when you check its command line log IIRC).

That said, the MPC-HC's master branch is supposed to be without rebasing, so the revision numbers you get when you build are gotten by counting from the last svn commit and adding the amount of commits after it to it (you can't otherwise match up the numbers because svn puts all branches in a single history line, while git only has the history of a certain branch in a branch).
__________________
[I'm human, no debug]
JEEB is offline  
Old 9th September 2012, 19:42   #20136  |  Link
e-t172
Registered User
 
Join Date: Jan 2008
Posts: 589
Quote:
Originally Posted by JEEB View Post
No. Git (like many other newer revision control systems, such as mercurial) basically have abolished the concept of a single-lined, unmodifiable revision histories, and thus every commit just has a hash of its own (usually the seven first symbols of it are long enough to be specific to one, so a shortened version is shown on github f.ex.), and the history is a line that tangles these commits together. So no, there is no automatical revision number in git (hg actually makes it harder for the user to rebase etc. + tries to "look the same" so it just counts the amount of commits and creates a revision number for the user from there when you check its command line log IIRC).

That said, the MPC-HC's master branch is supposed to be without rebasing, so the revision numbers you get when you build are gotten by counting from the last svn commit and adding the amount of commits after it to it (you can't otherwise match up the numbers because svn puts all branches in a single history line, while git only has the history of a certain branch in a branch).
"git describe" to the rescue!

Quote:
Originally Posted by git-describe(1)
The command finds the most recent tag that is reachable from a commit. If the tag points to the commit, then only the tag is shown. Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object and the abbreviated object name of the most recent commit.
So you just need to tag the tree you're building from with the build number, and you're all set.
e-t172 is offline  
Old 9th September 2012, 19:56   #20137  |  Link
Tiduz
Registered User
 
Join Date: Aug 2008
Posts: 16
ok, is it just me or is normalize broken for a while? my audio randomly gets softer and then when i disable and reenable it i get louder sound again, am i the only one with this problem?
Tiduz is offline  
Old 10th September 2012, 08:03   #20138  |  Link
patch1
Registered User
 
Join Date: Sep 2009
Posts: 19
Quote:
Originally Posted by mr.duck View Post
Is there any way too see the the build number (such as r5940) from this new list?
I agree it is a useful function even if it is now difficult to generate.
I now use the date to relate commit history to available builds

Not exact, I suspect due to time zone differences and multiple commits in a day but at least it limits the number of hash codes I need to check.
patch1 is offline  
Old 10th September 2012, 11:36   #20139  |  Link
Reino
Registered User
 
Reino's Avatar
 
Join Date: Nov 2005
Posts: 693
@ patch1:
Quote:
Originally Posted by Underground78 View Post
XhmikosR can probably put the hash in the filename of the nightlies.
Since it's unclear what rev. build corresponds with what commit, this suggestion made by Underground78 would help a lot, but as of yet XhmikosR hasn't answered to it.
__________________
My hobby website
Reino is offline  
Old 10th September 2012, 12:18   #20140  |  Link
Liisachan
李姗倩 Lǐ Shān Qiàn
 
Liisachan's Avatar
 
Join Date: Nov 2002
Posts: 1,340
Another VSFilter problem if anyone is interested:
VSFilter: Shadow is not drawn when Border is very thin (#2588)

When the border width is very small but not zero, MPC-HC "forgets" to draw the shadow, both in hardsubbing and softsubbing. Left to right, border=0.25 / 0.125 / 0.0625 / 0.062499 / 0 (@ 100%; if zoomed, the threshold will change):

This results in several realistic problems, such as unintended shadow blinking when the border width is slowly animated from non-zero to 0, or from 0 to non-zero (Sample clip).

User-side workaround: For example, instead of \bord1\t(0,2000,\bord0), try \bord1\t(0,1750,\bord0.125)\t(1750,2000,\3a&Hff). Instead of \bord0\t(0,2000,\bord1), try \bord0.125\3a&Hff\t(0,250,\3a&H00)\t(250,2000,\bord1).
Liisachan is offline  
Closed Thread

Tags
dxva, h264, home cinema, media player classic, mpc-hc

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 20:44.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.