leadtool ts文件 metadata 无法更新

使用leadtool 的demo 解析ts视频文件,在有的电脑上能更新metadata,有的不能,在咨询leadtool客服后,找到原因。

沟通过程如下:

All the test was based on the original example Mpeg2Transport.exe

And below was the filter grgh getted from the computer which can’t update metadata.

leadtool ts文件 metadata 无法更新

The splitter source which the program used was LAV Splitter Source which maybe some one installed before.

However ,the splitter source in the computer which can update metadata was like below.it exactly “LEAD MPEG2 Transport Demultiplexer”

leadtool ts文件 metadata 无法更新

 

 

That’s very curious that in the “OnCreate function ,the program have called SetMpeg2Splitter(ltmmFilter_MPEG2_Transport_Demux); ,but the result seems not what we expected.

But when I called HRESULT hr = m_player->GetPreferredFilter(ltmmPlay_PreferredFilter_MPEG2TransportDemultiplexer, &demux);” after set video source in the unable update metadata computer , it get an right value that extactly what we set in the beginning.

So , how can I process  this problem.

reply1:

The issue might be related to third-party codecs and filters installed on the problematic machines.
We need to see which filters are being used exactly at run time on your machine. To show the graph, you need to call the EditGraph() function after assigning the media stream to the player control's sourceFile property, and then show the registered graph using the MONOGRAM GraphStudio. You can get it from the following pages:
http://blog.monogram.sk/janos/2009/06/14/monogram-graphstudio-0320/
First, try to download the "32-bit graphstudio.exe (1148 KB)".
If this does not work, try to download "64-bit graphstudio64.exe (1918 KB)".
Note that after calling the EditGraph() method, a message should appear. This means the method worked correctly at your side. When this message appears, do NOT click 'OK' (keep it opened), and then follow these steps:
- Run graphstudio.exe
- Goto 'file' --> 'connect to remote graph'. A dialog will appear. Double click the item in the list. You should now see the graph.
If the graph did not appear for any reason, please follow the instructions in the following forum post:
https://www.leadtools.com/support/forum/posts/m23688-How-do-I-connect-to-a-Remote-Graph-with-GraphEdit-in-Vista-or-Windows-7

reply2:

The preferred demux is not working probably because the LAV filter is not inserted as a splitter (demux). It is inserted as a source filter, but it also works as a splitter.
This means you need your program to force the Microsoft source filter instead of LAV. There is a way to do that, which is to change the merit of the source filters. Either you increase the merit of the "File Source (Async.)" filter, or decrease the merit of the LAV filter.
To do that, you can try one of the following:
1. You can use our "DirectShow Filter List Utility" utility to find the "display name" of the Lav splitter, and then change (decrease) its merit value as mentioned in the following link:
https://www.leadtools.com/help/leadtools/v19/multimedia/api/iltmmfilterenum-put-merit.html

2. You can use our "DirectShow Filter List Utility" utility to find the "display name" of the "File Source (Async.)" filter, and then change (increase) its merit value as mentioned in the following link:
https://www.leadtools.com/help/leadtools/v19/multimedia/api/iltmmfilterenum-put-merit.html
Note that the display name of the "File Source (Async.)" filter is:
"@device:sw:{083863F1-70DE-11D0-BD40-00A0C911CE86}\{E436EBB5-524F-11CE-9F53-0020AF0BA770}"

You can use the DirectShow Filter List Utility as follows:
1. Run the DirectShow Filter List Utility from here:
\LEADTOOLS Multimedia 20\Bin\CDLLVC10\Win32\LTMMListFilters.exe
2. Expand the "DirectShow Filters" from the list, and then select the "File Source (Async.)" filter.
3. Copy the display name of the filter and use it with the code mentioned here:
https://www.leadtools.com/help/leadtools/v19/multimedia/api/iltmmfilterenum-put-merit.html

You can find more useful information about DirectShow Merits in the following forum post:
https://www.leadtools.com/support/forum/posts/m20317-DirectShow-Merits#post20317

 

无的处理:

在 代码中,主要是使用graphstudio 来查看工作流中是否 全部使用leadtool的com组件。过程如下

  1. run cmd  with administrator authority.
  2. find proppage.dll in “C:\Program Files (x86)\Windows Kits”, some computer in child folder of“8”,some in “10”,just use the newest one is ok.
  3. Run “regsvr32 “C:\Program Files (x86)\Windows Kits\10\bin\x86\proppage.dll””and “regsvr32 “C:\Program Files (x86)\Windows Kits\10\bin\x64\proppage.dll””
  4. Download “graphstudio32.exe”in http://blog.monogram.sk/janos/2009/06/14/monogram-graphstudio-0320/
  5. Add an code line hr1 = m_player->EditGraph(); in the function of HRESULT CMainFrame::OpenMediaFile(LPCTSTR pszFile, BOOL bUDPSource)” in project of MpegTransform. Or just use the tool I compiled out attached.
  6. Open an including metadata media file by MpegTransform.exe your compiled out or attached don’t close the dialog box popped-up and do not click “OK”.
  7. Goto 'file' --> 'connect to remote graph'. A dialog will appear. Double click the item in the list. You should now see the graph.

 

And you can findout which program cause the leadtool can’t parse the metadata.

(like below ,there was an LAV filter installed before in the unable update metadata computer , which you can uninstall the program in the “program uninstall” of windows)

After uninstall the program , leadtool will work fine.