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
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 28th December 2006, 06:44   #1201  |  Link
Liisachan
李姗倩 Lǐ Shān Qiàn
 
Liisachan's Avatar
 
Join Date: Nov 2002
Posts: 1,340
Probably it has a name for windows, something like this
Code:
ITCFranklinGothic LT BookCn
12345678901234567890123456789012
0---------1---------2--------3-*
I think it's just that you are using a wrong name (i.e. not for Windows), while it's Gabest's fault that he copies the fontname without checking the length.
Liisachan is offline   Reply With Quote
Old 28th December 2006, 14:28   #1202  |  Link
clsid
*****
 
Join Date: Feb 2005
Posts: 5,647
You can also try using the 8.3 filename. Every file in Windows is also accessable via a short filename.
__________________
MPC-HC 2.2.1
clsid is offline   Reply With Quote
Old 28th December 2006, 21:00   #1203  |  Link
Isochroma
Registered User
 
Join Date: Mar 2005
Posts: 468
Well, all other applications have no problem handling fonts with facenames >31 characters.

I found a solution to the problem: using TransType Pro, the fontname (and other metadata) may be changed as an option in the conversion process.

This process sucessfully worked around the problem, however, it is my opinion that the issue is with vsfilter, not the Windows in general, since no other applications crash on fonts with >31-char. fontnames.

Last edited by Isochroma; 29th December 2006 at 03:57.
Isochroma is offline   Reply With Quote
Old 29th December 2006, 01:11   #1204  |  Link
Liisachan
李姗倩 Lǐ Shān Qiàn
 
Liisachan's Avatar
 
Join Date: Nov 2002
Posts: 1,340
Your solution may be not proper. You can just use the right font name for Windows, which should be <= 31 char. What you need to do first is, to check the correct internal font name. Did you do that?
The fontname you are supposed to write in SSA/ASS's style is not necessarily equal to the name that is commonly known as the name of that font, nor file name (never. clisid .. A font file has a many names, like Postscript name or a name for Windows. You just need to use the name for Windows. If you upload the font file, I can check the correct font name within a few seconds, unless it's broken. Alternatively you can check it yourself by using the tool I mentioned.

Like we are repeating, if you copy longer string when the buffer length is 32, obviously it causes crashes; but just to preventing that wouldn't fix the problem. Gabest could copy the first 31 characters only, and there were no crash, but then the font mapper wouldn't recognize the font name either.

- The name font mapper needs to know is, NOT the first 31 characters, NOT the long name (postscript name?) you are trying to use, BUT the name for Windows. Its internal name.

- What you need to do is, simply to use the correct internal name. First check the correct internal name. Even if the font may be commonly knows as "ITC Franklin Gothic LT Book Condensed" it's not the correct internal name you can use in your SSA/ASS script. It's a general name, name for common people. An advanced typesetter needs to know how to check the correct internal font name, because that is the only name SSA/ASS will recognize. And I alreaady told you how.
Liisachan is offline   Reply With Quote
Old 29th December 2006, 03:51   #1205  |  Link
foxyshadis
Angel of Night
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
The obvious solution is to use comic sans and arial on all your subs, of course.



Here's the patch to fix the crash:
Code:
Index: filters/transform/vsfilter/DirectVobSub.cpp

===================================================================

--- filters/transform/vsfilter/DirectVobSub.cpp	(revision 611)

+++ filters/transform/vsfilter/DirectVobSub.cpp	(working copy)

@@ -231,9 +231,9 @@

 	if(lf)
 	{
 		if(lflen == sizeof(LOGFONTA))
-			strcpy(((LOGFONTA*)lf)->lfFaceName, CStringA(m_defStyle.fontName));
+			strncpy_s(((LOGFONTA*)lf)->lfFaceName, LF_FACESIZE, CStringA(m_defStyle.fontName), _TRUNCATE);
 		else if(lflen == sizeof(LOGFONTW))
-			wcscpy(((LOGFONTW*)lf)->lfFaceName, CStringW(m_defStyle.fontName));
+			wcsncpy_s(((LOGFONTW*)lf)->lfFaceName, LF_FACESIZE, CStringW(m_defStyle.fontName), _TRUNCATE);
 		else
 			return E_INVALIDARG;
 
Index: subtitles/STS.cpp

===================================================================

--- subtitles/STS.cpp	(revision 611)

+++ subtitles/STS.cpp	(working copy)

@@ -2957,7 +2957,7 @@

 LOGFONTA& operator <<= (LOGFONTA& lfa, STSStyle& s)
 {
 	lfa.lfCharSet = s.charSet;
-	strcpy_s(lfa.lfFaceName, CStringA(s.fontName));
+	strncpy_s(lfa.lfFaceName, LF_FACESIZE, CStringA(s.fontName), _TRUNCATE);
 	HDC hDC = GetDC(0);
 	lfa.lfHeight = -MulDiv((int)(s.fontSize+0.5), GetDeviceCaps(hDC, LOGPIXELSY), 72);
 	ReleaseDC(0, hDC);
@@ -2971,7 +2971,7 @@

 LOGFONTW& operator <<= (LOGFONTW& lfw, STSStyle& s)
 {
 	lfw.lfCharSet = s.charSet;
-	wcscpy_s(lfw.lfFaceName, CStringW(s.fontName));
+	wcsncpy_s(lfw.lfFaceName, LF_FACESIZE, CStringW(s.fontName), _TRUNCATE);
 	HDC hDC = GetDC(0);
 	lfw.lfHeight = -MulDiv((int)(s.fontSize+0.5), GetDeviceCaps(hDC, LOGPIXELSY), 72);
 	ReleaseDC(0, hDC);
The problem came down to Microsoft's new "secure" strcpy functions not actually working the way Microsoft tells everyone they should. So they got replaced with MS's reimplementation of strlcpy, instead.

Good news! GDI is smart enough to figure out the correct font, even if the name gets truncated. (Unless you have multiple fonts that start with the same 31 letters, of course.) It's quite possible that in the meantime, you can just chop everything after 31 letters off and it won't crash, if you don't want to bother finding the internal GDI name. Try it!

Last edited by foxyshadis; 29th December 2006 at 03:54.
foxyshadis is offline   Reply With Quote
Old 29th December 2006, 03:57   #1206  |  Link
Isochroma
Registered User
 
Join Date: Mar 2005
Posts: 468
@foxyshadis: wow you're fast! I'll try it ASAP when a new build comes out (sorry I'm not set up to do building from source code )
Isochroma is offline   Reply With Quote
Old 29th December 2006, 05:54   #1207  |  Link
Liisachan
李姗倩 Lǐ Shān Qiàn
 
Liisachan's Avatar
 
Join Date: Nov 2002
Posts: 1,340
Thanks for sending me the font as PM. This is what the font mapper on my win 2k recognizes:

Full Name=ITC Franklin Gothic LT Book Condensed: CharSet=0 (Western): lfFaceName=ITCFranklinGothic LT BookCn
Full Name=ITC Franklin Gothic LT Book Condensed: CharSet=161 (Greek): lfFaceName=ITCFranklinGothic LT BookCn

I think you can just use lfFaceName, without doing any hack.



Code:
Style: SomeStyle,ITCFranklinGothic LT BookCn,36,&H00ffffff,0,0,0,0,0,0,0,100,100,0,0.00,1,1,1,2,20,20,15,0
Dialogue: 0,0:00:01.00,0:00:06.00,SomeStyle,Someone,0000,0000,0000,,Some text goes here.  Is this what you want?
Some of info directly taken from the font file, not via win api:

Font Family name : ITCFranklinGothic LT BookCn
Postscript name : FranklinGothicLT-BookCnd
Unique font identifier : Linotype Library GmbH: ITC Franklin Gothic LT Book Condensed: 2002
Full font name : ITC Franklin Gothic LT Book Condensed

The windows font mapper happens to say CharSet=0 or 161, but actually the version of the OS/2 table is 0, not having CharSet info. In such a situation, I'd recommend encoding=1 (DEFAULT_CHARSET) instead of 0 (ANSI_CHARSET) even if the actual CharSet is 0.

Style: SomeStyle,ITCFranklinGothic LT BookCn,36,&H00ffffff,0,0,0,0,0,0,0,100,100,0,0.00,1,1,1,2,20,20,15,0
Style: SomeStyle,ITCFranklinGothic LT BookCn,36,&H00ffffff,0,0,0,0,0,0,0,100,100,0,0.00,1,1,1,2,20,20,15,1
Liisachan is offline   Reply With Quote
Old 29th December 2006, 05:57   #1208  |  Link
Isochroma
Registered User
 
Join Date: Mar 2005
Posts: 468
Thanks!
Isochroma is offline   Reply With Quote
Old 30th December 2006, 03:26   #1209  |  Link
MoFoQ
Registered User
 
Join Date: Oct 2001
Posts: 68
man this thread's huge....

if only there was a separate category/forum for MPC stuff...

found a bug in 6.4.9.0 in XP (SP2-Pro).
It seems to happen when I set the "change full screen resolution" setting and have the deinterlace shader on.
When it changes the mode with the shader enabled, MPC will crash.


Also, is there a command-line switch to enable specific shaders by default?
MoFoQ is offline   Reply With Quote
Old 22nd January 2007, 00:09   #1210  |  Link
Keepitsimple
Registered User
 
Join Date: Jan 2007
Posts: 57
Hi, Is there any way to set lanczos resizing within mpc? Its possible with ffdshow. But sometimes I want to use a different decoder than ffdshow but still resize with lanczos.
Keepitsimple is offline   Reply With Quote
Old 2nd February 2007, 12:57   #1211  |  Link
Goras
Registered User
 
Goras's Avatar
 
Join Date: Dec 2005
Posts: 5
What's the "VMR 9 mixer mode" option for? If I have that option set, mpc drops a lot of frames / second in some vids.
I'm using VMR-9, on a AMD64 X2 4200+, 7900gt

Could it be my video drivers?
Goras is offline   Reply With Quote
Old 2nd February 2007, 13:24   #1212  |  Link
foxyshadis
Angel of Night
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
Drivers tend to be the source of such a problem, but it's hard to say. All the option does is reduce cpu/memory usage on the system and the card by doing some things in-place (and in yuv mode if chosen), normally improving performance to sacrifice a few features, but apparently not in your case.
foxyshadis is offline   Reply With Quote
Old 2nd February 2007, 13:37   #1213  |  Link
Goras
Registered User
 
Goras's Avatar
 
Join Date: Dec 2005
Posts: 5
As I said, the system performance is more than enough, cpu is as high as 5% when playing those files.
Goras is offline   Reply With Quote
Old 3rd February 2007, 03:20   #1214  |  Link
Px
>>^^__^^<<
 
Px's Avatar
 
Join Date: Jun 2005
Posts: 222
Quote:
Originally Posted by Px View Post
Feature request - could you add ability to log displayed statistics (Ctrl+4) to external file?
*Bump*
Px is offline   Reply With Quote
Old 9th February 2007, 17:00   #1215  |  Link
aydc
Registered User
 
Join Date: Jul 2003
Posts: 43
Bug Report: When playing full screen, if user switches to another application using Alt+Tab, fullscreen status is lost.

This irritates me because sometimes I want to check something out in another program quickly and come back to MPC, but because of this bug I have to go fullscreen again manually everytime.
aydc is offline   Reply With Quote
Old 9th February 2007, 17:32   #1216  |  Link
Liisachan
李姗倩 Lǐ Shān Qiàn
 
Liisachan's Avatar
 
Join Date: Nov 2002
Posts: 1,340
An application in the full-screen mode once has to exit from the full-screen mode in order for another app to be foreground. So that behavior is inevitable, and I assume that yours is a feature request "When another app gets focus when MPC is in the full-screen mode, I'd like MPC automatically to re-enter into the full-screen mode when it regains the focus." I'm not sure if that is really a good idea, but I understand your needs as well.
Liisachan is offline   Reply With Quote
Old 11th February 2007, 16:08   #1217  |  Link
Clammerz
Registered User
 
Join Date: Aug 2005
Posts: 54
Not always.

When you change focus by clicking on a second (or third, etc) monitor sometimes MPC doesn't lose focus.

Also, there are many applications that do not exit full screen status when alt-tabbed. I am another who thinks this would be a neat idea.

Lastly, I didn't realise it when I posted a couple of days ago, but this seems to be a 'generic' MPC bug report thread?
If so, I hope it's not too much trouble for me to link to my 'problem' thread: http://forum.doom9.org/showthread.php?t=122032
Regarding the inbult MPEG splitter, and subtitle stream handling.

Thanks for your time.
Clammerz is offline   Reply With Quote
Old 11th February 2007, 19:23   #1218  |  Link
celtic_druid
Registered User
 
celtic_druid's Avatar
 
Join Date: Oct 2001
Location: Melbourne, Australia
Posts: 2,171
People should be aware that there is basically no one to implement all this stuff.
celtic_druid is offline   Reply With Quote
Old 2nd March 2007, 19:53   #1219  |  Link
clsid
*****
 
Join Date: Feb 2005
Posts: 5,647
The last change to MPC was 9 months ago. So it is possible there will never be a next version.
__________________
MPC-HC 2.2.1
clsid is offline   Reply With Quote
Old 2nd March 2007, 20:16   #1220  |  Link
_xxl
ffdshow user
 
_xxl's Avatar
 
Join Date: Oct 2005
Location: Romania
Posts: 818
Maybe a new mpc fork is needed.
Any volunteers?
_xxl is offline   Reply With Quote
Reply

Tags
media player classic


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:52.


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