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. |
3rd September 2012, 04:57 | #20121 | Link | |
李姗倩 Lǐ Shān Qiàn
Join Date: Nov 2002
Posts: 1,340
|
Quote:
Code:
bool CMPlayerCApp::ChangeSettingsLocation(bool useIni) { ... // In case an ini file is present, we remove it so that it will be recreated _tremove(GetIniPath()); |
|
4th September 2012, 09:49 | #20122 | Link |
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. |
4th September 2012, 18:08 | #20123 | Link |
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 |
4th September 2012, 18:25 | #20124 | Link |
Registered User
Join Date: Nov 2010
Posts: 80
|
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...)
|
4th September 2012, 23:48 | #20125 | Link | |
李姗倩 Lǐ Shān Qiàn
Join Date: Nov 2002
Posts: 1,340
|
Quote:
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; - 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. |
|
5th September 2012, 01:21 | #20126 | Link |
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 |
5th September 2012, 02:34 | #20127 | Link |
李姗倩 Lǐ Shān Qiàn
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. |
5th September 2012, 09:33 | #20128 | Link | |
MPC-HC Helper xD
Join Date: Aug 2006
Location: Belgrade, Serbia
Posts: 220
|
Quote:
VS2010 is needed to compile mpc-hc. |
|
5th September 2012, 10:50 | #20129 | Link | |
Registered User
Join Date: Jun 2011
Posts: 81
|
Quote:
|
|
6th September 2012, 23:28 | #20130 | Link |
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) |
7th September 2012, 00:55 | #20131 | Link |
Registered User
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 |
9th September 2012, 12:47 | #20133 | Link | |
もこたんインしたお!
Join Date: Jan 2008
Location: Finland / Japan
Posts: 512
|
Quote:
__________________
[I'm human, no debug]
|
|
9th September 2012, 13:10 | #20134 | Link | |
quack quack
Join Date: Apr 2009
Posts: 259
|
Quote:
Is there any way too see the the build number (such as r5940) from this new list? |
|
9th September 2012, 13:51 | #20135 | Link | |
もこたんインしたお!
Join Date: Jan 2008
Location: Finland / Japan
Posts: 512
|
Quote:
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]
|
|
9th September 2012, 19:42 | #20136 | Link | ||
Registered User
Join Date: Jan 2008
Posts: 589
|
Quote:
Quote:
|
||
10th September 2012, 08:03 | #20138 | Link | |
Registered User
Join Date: Sep 2009
Posts: 19
|
Quote:
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. |
|
10th September 2012, 11:36 | #20139 | Link |
Registered User
Join Date: Nov 2005
Posts: 693
|
@ patch1:
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 |
10th September 2012, 12:18 | #20140 | Link |
李姗倩 Lǐ Shān Qiàn
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). |
Tags |
dxva, h264, home cinema, media player classic, mpc-hc |
Thread Tools | Search this Thread |
Display Modes | |
|
|