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 > Capturing and Editing Video > New and alternative a/v containers

Reply
 
Thread Tools Search this Thread Display Modes
Old 16th September 2010, 20:02   #801  |  Link
Zenitram
Registered User
 
Join Date: Aug 2002
Location: France, Paris
Posts: 672
Quote:
Originally Posted by Sharktooth View Post
edit: the mediainfo builds on SF are dated 2010-09-15. do they contain the fix?
It does, but I just released a specific archive 20100916 with the latest version of the x64 DLL.

Note: do not edit a post for adding a question, I receive no alert with edits.
__________________
Want to know all about your media files? http://mediaarea.net/MediaInfo
Zenitram is offline   Reply With Quote
Old 16th September 2010, 20:05   #802  |  Link
Sharktooth
Mr. Sandman
 
Sharktooth's Avatar
 
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
ok and ok
Sharktooth is offline   Reply With Quote
Old 16th September 2010, 21:08   #803  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by Sharktooth View Post
the x64 version lib doesnt work on all machines, or at least it crashes on some PCs.
Any details? I just made a plain "x64" build with MSVC 9.0 and "Enable enhanced instruction set" set to "Not set"

[EDIT]

Does anybody know if the "Generate intrinsic functions (/Oi)" option does effect CPU compatibility?

If I look at the MSDN documentation, I see no indication of that:
http://msdn.microsoft.com/en-us/libr...(v=VS.90).aspx
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 16th September 2010 at 21:22.
LoRd_MuldeR is offline   Reply With Quote
Old 17th September 2010, 01:10   #804  |  Link
Sharktooth
Mr. Sandman
 
Sharktooth's Avatar
 
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
the problem is described here: http://forum.doom9.org/showthread.ph...78#post1442978
Sharktooth is offline   Reply With Quote
Old 13th October 2010, 15:47   #805  |  Link
Russian-Israelian
Registered User
 
Join Date: Oct 2010
Posts: 1
Zenitram - You'll be very kind if one day you put some simple ID3 tag editing in to MediaInfo for mp3/wma/ogg/mpa and for some of video containers. Thats not only my wish, but as well as many others. Atak_Snajpera says its possible...
Russian-Israelian is offline   Reply With Quote
Old 13th October 2010, 15:50   #806  |  Link
Zenitram
Registered User
 
Join Date: Aug 2002
Location: France, Paris
Posts: 672
Quote:
Originally Posted by Russian-Israelian View Post
Zenitram - You'll be very kind if one day you put some simple ID3 tag editing in to MediaInfo for mp3/wma/ogg/mpa and for some of video containers.
This is on a very far ToDo list.

Quote:
Originally Posted by Russian-Israelian View Post
Thats not only my wish, but as well as many others. Atak_Snajpera says its possible...
All is possible, the only question is if you have enought time to implement it or enough money to pay someone to do it...
Currently, I have more than enough to do with reading, and a business model, and I have no business model for writing, so not a priority for me.
__________________
Want to know all about your media files? http://mediaarea.net/MediaInfo
Zenitram is offline   Reply With Quote
Old 13th October 2010, 15:55   #807  |  Link
Kurtnoise
Swallowed in the Sea
 
Kurtnoise's Avatar
 
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
@Jérôme : why are you removing PS/HE AAC detection from the aac parsing ?
Kurtnoise is offline   Reply With Quote
Old 13th October 2010, 16:01   #808  |  Link
Zenitram
Registered User
 
Join Date: Aug 2002
Location: France, Paris
Posts: 672
Quote:
Originally Posted by Kurtnoise View Post
@Jérôme : why are you removing PS/HE AAC detection from the aac parsing ?
Too many false-positives / complains about it, this was not a good idea with all cell phones today: lot of files are at 24 KHz and/or mono, without SBR and/or PS now, e.g. no possibility to differenciate real 24 KHz / mono from HE-AACv2 without explicit information.
So now I display SBR and PS only if the header has an explicit information in the AudioSpecificConfig. Implicit SBR/PS will be detected when I implement a more complete raw AAC parser (I have a sponsor for this, but he continues to postpone the feature, he wants other features before this one)
__________________
Want to know all about your media files? http://mediaarea.net/MediaInfo
Zenitram is offline   Reply With Quote
Old 14th October 2010, 10:45   #809  |  Link
Kurtnoise
Swallowed in the Sea
 
Kurtnoise's Avatar
 
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
How much do you need to rewrite the aac parser ?

well...I understand but this breaks several current tools that uses this info.
Kurtnoise is offline   Reply With Quote
Old 14th October 2010, 10:50   #810  |  Link
Zenitram
Registered User
 
Join Date: Aug 2002
Location: France, Paris
Posts: 672
Quote:
Originally Posted by Kurtnoise View Post
How much do you need to rewrite the aac parser ?
Thousands of $ ;-)
But already sponsored, just a problem of time.

Quote:
Originally Posted by Kurtnoise View Post
well...I understand but this breaks several current tools that uses this info.
Theses tools would be broken in all cases with wrong info for other files without PS/SBR. I understand this is a problem, but I remove it from the official version for correcting otehr problems from other software. I could add it again but deactivated by defaut (you set a #define), and you know this may be wrong for some other files.
__________________
Want to know all about your media files? http://mediaarea.net/MediaInfo
Zenitram is offline   Reply With Quote
Old 16th October 2010, 19:50   #811  |  Link
war59312
war59312.com
 
Join Date: Feb 2007
Location: USA
Posts: 37
Anyone have any vb code to parse the fps of a given file using mediainfo ?

Update: OK making progress..

Quote:
Private Function GetFPS(ByVal s As String, ByVal mkvfile As String) As String
Dim orig As String = s
Dim t As String

t = "Frame rate"
s = syncedString

s = s.Substring(s.IndexOf(t) + t.Length)
s = s.Substring(s.IndexOf(": ") + 2)
s = s.Substring(0, s.IndexOf(vbNewLine))

Dim fps As Double = ExtractNumbers(s)

'Return s.Contains(t)

Return fps

End Function
Quote:
Shared Function ExtractNumbers(ByVal expr As String) As String
Return String.Join(Nothing, System.Text.RegularExpressions.Regex.Split(expr, "[^\d]"))
End Function
Got that at http://dotnetslackers.com/Regex/re-3...om_string.aspx .

So for example if I run that on a video that has a 23.976fps I get back 23976.

BTW the original string would be "23.976 fps" before ExtractNumbers does its thing.

So yeah all I am trying to do is loose the fps. I'm newbie so learning by trying.

So now just to have the decimal back in the right place? Any ideas?

Update 2:

Easy fix.. Thinking too much.

fps = s.Replace(" fps", "") That gets rid of the fps. Problem solved. Whooo!!!

New build of XenonMKV coming soon.

Last edited by war59312; 17th October 2010 at 22:01.
war59312 is offline   Reply With Quote
Old 16th October 2010, 19:58   #812  |  Link
Zenitram
Registered User
 
Join Date: Aug 2002
Location: France, Paris
Posts: 672
Quote:
Originally Posted by war59312 View Post
Anyone have any vb code to parse the fps of a given file using mediainfo ?
http://mediainfo.svn.sourceforge.net...cs?view=markup

+ MI.Get(StreamKind.Video, 0, "FrameRate"); //For the first video stream of the file
__________________
Want to know all about your media files? http://mediaarea.net/MediaInfo
Zenitram is offline   Reply With Quote
Old 5th November 2010, 01:59   #813  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Zenitram,

I'm currently re-writing LameXP from the scratch, based on the Qt Framwork. And this time proper Unicode support has high priority for me

Unfortunately I noticed that an unpatched MediaInfo CLI doesn't output Unicode characters to STDOUT properly. And a quick look at the code turned out why that is:

Code:
inline void STRINGOUT(ZenLib::Ztring Text)
{
    #ifdef __WINDOWS__
        Text.FindAndReplace(_T("\r\n"), _T("\n"), 0, ZenLib::Ztring_Recursive); //MediaInfoLib handle differences between platforms, but cout too!
    #endif //__WINDOWS__
    std::cout<<Text.To_Local().c_str()<<std::endl;
}
I think To_Local() will convert the Unicode string to a single-byte encoding using the user's active Codepage, which means all chars not in that Codepage will simply show up as "?" chars

The good news is that this is easy to fix by using the UTF-8 multi-byte encoding instead:

Code:
std::cout<<Text.To_UTF8().c_str()<<std::endl;
I think others may face the same problem. So what do you think about committing the above change or at least add a CLI switch for UTF-8 output?

__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 5th November 2010 at 02:01.
LoRd_MuldeR is offline   Reply With Quote
Old 20th November 2010, 01:30   #814  |  Link
gergev
Registered User
 
Join Date: Nov 2010
Posts: 1
Originally Posted by Lawk
by default, "Enable context menu" is not ticked, but it's still in the context menu. Ticking and unticking makes no difference. Whats up with that?

Do you use an official version (from mediainfo.sourceforge.net)? Which version? Which OS?
I tested it again, and if the box is unchecked, there is nothing in the explorer.

I have the same problem. I'm using Windows 7 home premium 64-bit. I downloaded the K-Lite codec pac 6.3.0 full, because I got no sound using gom player for video and saw a thread to d/l the pac.

Problem solved, but it added 'features' I did not want. This K-lite pac included Mediainfo 0.7.34.

During installation I was careful to opt-out of any shell integration additions if they were given, but they were installed anyway. I prefer a short list when I right click a file because 99% of the time have no need to use the many apps listed. I certainly don't need Media Info when right clicking on a txt file.

I was able to ferret out the shell installed for MPH Media Player and delete the keys with a search, but for "Media Info" there is no registry key, and for "MediaInfo" I couldn't find a reference to shell integration.

So I get the same issue as op, - ticking and unticking makes no difference.

Navigating to K-lite > Tools > MediaInfo.exe "the program can't start because mediainfo.dll is missing from your computer"

I went to sourgeforge and downloaded 0.7.36 and installed the 64-bit. Checking and unchecking explorer extension in preferences of the application also doesn't get rid of it.

I wanted to post this last week but the forum makes you wait FIVE DAYS to post anything after joining!
gergev is offline   Reply With Quote
Old 20th November 2010, 02:24   #815  |  Link
clsid
*****
 
Join Date: Feb 2005
Posts: 5,643
Look here:
HKCR\*\shell\MediaInfo
__________________
MPC-HC 2.1.7.2
clsid is offline   Reply With Quote
Old 23rd November 2010, 02:35   #816  |  Link
Zenitram
Registered User
 
Join Date: Aug 2002
Location: France, Paris
Posts: 672
Quote:
Originally Posted by LoRd_MuldeR View Post
I'm currently re-writing LameXP from the scratch, based on the Qt Framwork.
I do same

Quote:
Originally Posted by LoRd_MuldeR View Post
I think To_Local() will convert the Unicode string to a single-byte encoding using the user's active Codepage, which means all chars not in that Codepage will simply show up as "?" chars
To_Local() should convert to UTF-8 if locale settings were correctly set...

Quote:
Originally Posted by LoRd_MuldeR View Post
The good news is that this is easy to fix by using the UTF-8 multi-byte encoding instead
Hum... Seems it does not work.
Tested with Example.ogg (in the SVN in MediaInfo/Release):

Reference:
ARABIC : ئابةتثجحخدذرزسشصضطظعغـف
HEBREW : אבגדהוזחטיךכלםמןנסעףפץצְֱ
COMBINERS : ˆˇˉ˘˙˚˛˜̣̀́̃̉
CYRILLIC : ЁЂЃЄЅІЇЈЉЊЋЌЎЏ
ENGLISH : abcdefghaijklmnopqrstuvwxyz
FRENCH : aàäâåáãæÅÆ cçÇ eéèëê uùüû
GREEK : αβγδεζηθικλμνξοπρςστυφχψω
LATIN : ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņ

Current version:
ARABIC : ???????????????????????
HEBREW : ?????????????????????????
COMBINERS : ^?¯??°?~`´~??
CYRILLIC : ??????????????
ENGLISH : abcdefghaijklmnopqrstuvwxyz
FRENCH : aàäâåáãæÅÆ cçÇ eéèëê uùüû
GREEK : aß?de??????µ???p??st?f???
LATIN : AaAaAaCcCcCcCcDdÐdEeEeEeEeEeGgGgGgGgHhHhIiIiI
iIiIi??JjKk?LlLlLl??LlNnNn

With UTF-8 forced:
ARABIC : ئابةتثجØ*خدذرزسشصضطظعغÙ?Ù
?
HEBREW : ×?×'×'×"×"××-×-×~×T×s×>×o×?×z×Y×*סעףפץצ
Ö°Ö±
COMBINERS : Ë+Ë+Ë%Ë~ËTËsË>ËoÌ?Ì?̃Ì%Ì£
CYRILLIC : Ð?Ð'ЃÐ"Ð.Ð+Ð+Ð^Ð%ÐSÐ<ÐOÐZÐ?
ENGLISH : abcdefghaijklmnopqrstuvwxyz
FRENCH : aÃ*äâåáãæÃ.Ã+ cçÃ+ eéèëê uùüû
GREEK : αβγδεζηθικλμνξοÏ?Ï?Ï'σÏ"Ï.Ï+Ï
+Ï^Ï%
LATIN : Ä?Ä?Ä'ăÄ"Ä.Ä+Ä+Ä^Ä%ÄSÄ<ÄOÄ?ÄZÄ?Ä?Ä'Ä'Ä"Ä"ÄÄ-
Ä-Ä~ÄTÄsÄ>ÄoÄ?ÄzÄYÄ*ġĢģĤĥĦħĨĩĪīĬÄ*ĮįİıIJijĴĵĶķĸĹĺĻļĽľ
Ä¿Å?Å?Å'ŃÅ"Å.Å+


Forcing to UTF-8 is worse. Tested on Windows 7 French.
But maybe the Qt wrapper you use accept UTF-8 as input, so this is OK (for example, if I redirect the output to a file, this is UTF-8). But Command line does not accept UTF8... So I can not put your code "as is", I will try to see if I can add an option for UTF-8 output.
__________________
Want to know all about your media files? http://mediaarea.net/MediaInfo
Zenitram is offline   Reply With Quote
Old 23rd November 2010, 02:38   #817  |  Link
Zenitram
Registered User
 
Join Date: Aug 2002
Location: France, Paris
Posts: 672
Quote:
Originally Posted by gergev View Post
I downloaded the K-Lite codec pac 6.3.0 full, because I got no sound using gom player for video and saw a thread to d/l the pac.

Problem solved, but it added 'features' I did not want. This K-lite pac included Mediainfo 0.7.34.
Acutally, it does *not* include official MediaInfo.
It include somebody else "MediaInfo Lite". This is not a product from me.

Due to lot of complains about MediaInfo in K-Lite pack + Official MediaInfo install, I remove the contect menu from K-Lite during installation of MediaInfo since version 0.7.36.
__________________
Want to know all about your media files? http://mediaarea.net/MediaInfo
Zenitram is offline   Reply With Quote
Old 23rd November 2010, 20:34   #818  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by Zenitram View Post
I do same
Huh?

Quote:
Originally Posted by Zenitram View Post
To_Local() should convert to UTF-8 if locale settings were correctly set...
I don't think so.

Inside ZenLib the To_Local() function calls WideCharToMultiByte() with "CP_ACP" selected, which "...instructs the API to use the currently set default Windows ANSI codepage".

Also the MSDN doc of WideCharToMultiByte() clearly states: "The new character string is not necessarily from a multibyte character set."

And indeed, if that target Codepage doesn't support the Unicode character contained in the original wchar_t (UTF-16) string, it is simply replaced by a "?" char

For example on a German system the default Codepage is "Windows-1252 (Western European)", which doesn't support any Russian or Arabic or Chinese or Japanese characters.

Since the default Codepage can differ from system to system (depending on what the user has configured), it's extremely unreliable to use this method...

Quote:
Originally Posted by Zenitram View Post
Hum... Seems it does not work.
Tested with Example.ogg (in the SVN in MediaInfo/Release):

Forcing to UTF-8 is worse. Tested on Windows 7 French.
But maybe the Qt wrapper you use accept UTF-8 as input, so this is OK (for example, if I redirect the output to a file, this is UTF-8). But Command line does not accept UTF8... So I can not put your code "as is", I will try to see if I can add an option for UTF-8 output.
IMO, forcing UTF-8 is safe. That's because UTF-8, in contrast to all those region specific Codepages, is a form of real multi-byte encoding.

Thus UTF-8 is able to preserve the complete Unicode space. So when converting from wchar_t (UTF-16) to UTF-8, absoloutely no information get's lost.

Of course the result only looks correctly, if the application, who receives the UTF8-encoded data, is treating the character stream as UTF-8.

The Windows console, by default, does not do this! You have to enforce it by calling "chcp 65001". This can also be done with SetConsoleOutputCP(CP_UTF8).

If a custom application is reading the 'stdout' from MediaInfo, then it's of course up to the programmer to handle the character stream properly!

But with UTF-8 encoded data the program at least has a chance to handle the input correctly

A stream that was converted to the "local" CP already might contain unrecoverable "?" chars, so there is no way for the programmer to retain the original string.

Here is a good article on the topic that I found quite helpful:
http://www.codeproject.com/KB/cpp/un...le_output.aspx

(Strange enough, using wprintf() with a wchar_t* does not work, as it converts to the local Codepage again and thus will fail on characters that aren't support by the user's default Codepage. The normal printf() works, but only by converting the wchar_t* to an UTF8-encoded char* first and only when setting the Console's CP to UTF-8 and only when a suitable Console Font, such as "Lucidia Console" is selected)
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 24th November 2010 at 00:29. Reason: Correction!
LoRd_MuldeR is offline   Reply With Quote
Old 23rd November 2010, 23:12   #819  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Okay, after some more testing, it seems even printf() sometimes screws up the UTF-8 string

So I think it's more safe to use a "raw" WriteFile(), which also avoids your FindAndReplace(). There is a special WriteConsole() function, but it fails on File redirection.

Thus after all I would suggest this code:
Code:
inline void STRINGOUT(ZenLib::Ztring Text)
{
    #ifdef __WINDOWS__
        DWORD CharsWritten;
        std::string Buffer = Text.To_UTF8();
        SetConsoleOutputCP(CP_UTF8);
        WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), Buffer.c_str(), Buffer.length(), &CharsWritten, NULL);
    #else
        std::cout<<Text.To_Local().c_str()<<std::endl;
    #endif //__WINDOWS__
}

Seems to work fine for me. For both, Console output and File redirection



(Just make sure you use the "Lucidia Console" font. The "Raster Fonts" Font doesn't work with Unicode! Some Asian chars don't even show up with "Lucida Console" though)
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 24th November 2010 at 00:23.
LoRd_MuldeR is offline   Reply With Quote
Old 24th November 2010, 00:33   #820  |  Link
Zenitram
Registered User
 
Join Date: Aug 2002
Location: France, Paris
Posts: 672
Quote:
Originally Posted by LoRd_MuldeR View Post
Huh?
I am revamping my GUI with Qt too.

Quote:
Originally Posted by LoRd_MuldeR View Post
Inside ZenLib the To_Local() function calls WideCharToMultiByte() with "CP_ACP" selected, which "...instructs the API to use the currently set default Windows ANSI codepage".
I was doing what seems the best for the output.


Quote:
Originally Posted by LoRd_MuldeR View Post
Since the default Codepage can differ from system to system (depending on what the user has configured), it's extremely unreliable to use this method...
this was the most reliable method I had to display non-US characters (I am French, I have theses codepage issues too ;-) )


Quote:
Originally Posted by LoRd_MuldeR View Post
IMO, forcing UTF-8 is safe. That's because UTF-8, in contrast to all those region specific Codepages, is a form of real multi-byte encoding.
I agree... Only if I can display data on the command line! I actually output UtF-8 on Linux and Mac, the problem was only Windows...
And the proposed solutions were not good.


Quote:
Originally Posted by LoRd_MuldeR View Post
Okay, after some more testing, it seems even printf() sometimes screws up the UTF-8 string
I tested some solutions, and I was having the same conclusion .

Quote:
Originally Posted by LoRd_MuldeR View Post
So I think it's more safe to use a "raw" WriteFile(), which also avoids your FindAndReplace(). There also is WriteConsole(), but it fails on File redirection.

Thus after all I would suggest this code:
(...)
Seems to work fine for me. For both, Console output and File redirection
I confirm, works well, except if the default font is set, but this is the output with the less errors (if I copy/paste the CLI output, I have all characters!).

So I use thie method.
__________________
Want to know all about your media files? http://mediaarea.net/MediaInfo
Zenitram is offline   Reply With Quote
Reply

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 06:44.


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