I'm submitting a patch for several items:
1. Workaround for standard template chapter listing where key/value separator is not the first colon by skipping all colons and digits at the beginning of line before starting to look for separator.
2. Workaround for inability to specify chapter listing in MediaInfo custom templates by copying the chapters from standard template.
3. Adding matroska to the ignore list of the exif formats.
Thanks!
Anonymous
This is for MediaInfo plugin
Can you provide output examples without/with patch for 1-2?
For the first item:
Oringinal: In this case the hours are treated as key and the rest of the line as value
New: The timestamp is kept together and the rest of the line becomes value
For the second item: MediaInfo has no way of specifiying the chapter list in a custom template - you could output a few of other values but nto the list. There's a bug that has been open since beginning of 2020
(https://sourceforge.net/p/mediainfo/discussion/297610/thread/9182ad3d06/).
In my workaround I append the menu section from standard output to the custom template output and the section will go through the same logic as in the first item and will look as above.
Last edit: apsen 2024-01-17
3.15.16
С варнингами на кодировку стоит возится?
Я думаю, что можно в текстовм редакторе перекодировать в UTF-8 и варнинги должны уйти. Только нужно ли сейчас это делать или дождаться патча пункта 2) ?
Чего дожидаться? Весь патч уже применён.
utf8(common) да, не закоммитил, пропустил.
Фаровские файлы (plugin.hpp) уже давно в utf8, реликт в вашей сборке ваша заслуга.
Ага, всё, у себя проверю.
P.S.
Личное - ещё бы нужные микросхемы пришли - с 13 декабря из Домодедово в Москву едут (~ 23 км по дороге:)) а то какие-то персонажи трубу оборвали "Продадим по 3500 - 5700 руб за штуку. Всё равно только у нас купите!" а там цена 57 руб за десяток с доставкой из Китая.:)
&+][+{}&]+){}]+{
Turns out the MediaInfo configuration is a global singleton so the template settings need to be explicitly set to blank at the beginning to reset the settings from the previous call.
Like this:
Last edit: apsen 2024-01-18
I am personally not using teplate settings at all.
So please try to explain what exactly problem you are going to fix in your patches.
Last edit: Vladimir Surguchev 2024-01-18
My fix for the missing chapters was to pull the data twice. First time pull it with no template and extract chapter information from the returned value and second time pull it with a template.
Turns out that the MediaInfo's settings persist across invocations. The option method is an object method and not a class one so I did not realize that when you create a new object it will inherit template setting from the previously created object. Since the templated output lacks chapter information the second and the subsequent invocations of the plug-in will not show chapter information.
The fix is to explicitly reset the template back to blank at the beginning of the call.
Thanks!
PS I've only started using templates yesterday in an attempt to show more precise values for the duration of the videos and once on it I have tried to make the display more compact and that's when I have discovered the chapters issue in MediaInfo. And since there is not much hope for MediaInfo to fix it any time soon I have created this workaround. While at it I have also figured out how to correct issue with the chapters display and how to remove exif data for matroska videos.
PPS If you would like to have a template for testing I could attach mine or there are some available on the internet.
Last edit: apsen 2024-01-18
Fine. I'll apply your second patch this evening.
Several templates for testing are a good idea for the future.
I don't have enough time for mediaInfo yet.
I'll rely on your own tests and reviews from other users.
3.15.17
Found a case where the latest menu workaround still does not work - multiple chapter lists.
Currently the plugin detects chapters by looking for
\r\nMenu\r\n
but it becomes/\r\nMenu #\d+\r\n/
when there are multiple chapter lists.Locally, I have fixed that by changing to
\r\nMenu
and that works for me but in theory it could break unless the whole line is parsed.Check my last commit. If ok it will be next version.
Last edit: Vladimir Surguchev 2024-02-11
Yep! It works.