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. |
|
|
Thread Tools | Search this Thread | Display Modes |
1st July 2014, 12:49 | #562 | Link | |
Registered User
Join Date: Jul 2013
Posts: 90
|
Quote:
Thank you for your reply. The file can be loaded without issues via Main->Open in VSFilter, that's why it drives me crazy this problem. The code used MPC-BE does not seems to work either, it even does not compile since it can not convert CString to LPCWSTR (projects does not run using unicode char set) at line (LPWSTR)(LPCWSTR)fname Anyway, I will search deep in the code to find out why.... |
|
1st July 2014, 17:38 | #563 | Link |
Broadband Junkie
Join Date: Oct 2005
Posts: 1,859
|
Potplayer EVR does not support XySubFilter, so you'd need to use madVR.
If you instead wanted to use xy-VSFilter (VSFilter.dll) with EVR in Potplayer, I believe you need to add it to Filter Control -> Global Filter Priority as Prefer, disable the PotPlayer built-in subtitle renderer, and disable the PotPlayer video post-processing filter. |
2nd July 2014, 07:53 | #564 | Link | |
Registered User
Join Date: Jul 2013
Posts: 90
|
Quote:
I tested an older version "xy-VSFilter 3.0.0.63 -=Stable Build=-" and it works just fine. I dont have time to debug the vsfilter to fix it, so I will stay temporarily with the older version. I am attaching the project as well as the filters used (LavFilters and VSFilter v 3.0.0.211) for debugging purposes. http://speedy.sh/PPJFD/DShow-Filters.zip ------------------------------------------------------------------------------------ Code:
//************************************************************************************************* // SubtitleTest.cpp : Defines the entry point for the console application. // //Copyright (c) George Papaioannou, Greece 2014 // // // DirectShow Example using VSFiler v 3.0.0.211 // // Problem : The application crashed silently when ascii encoded *.srt file is used for subtitles // Application works just fine when a unicode encoded *.srt file is used instead. //************************************************************************************************* #include "stdafx.h" #include <afx.h> #include <dshow.h> #include <D3d9.h> #include <initguid.h> #include <atlbase.h> #include <string> #include <assert.h> //********************* VobSub ****************************************************************** #include "../DShowFilters/Filters/Subtitles/xy_vsfilter/src/thirdparty/boost_1_47_0/boost/cstdint.hpp" #include "c:\Program Files\Microsoft SDKs\Windows\v7.0\Samples\multimedia\directshow\baseclasses\wxdebug.h" using namespace boost; #include "../DShowFilters/Filters/Subtitles/xy_vsfilter/src/subtitles/flyweight_base_types.h" #include "../DShowFilters/Filters/Subtitles/xy_vsfilter/src/filters/transform/vsfilter/IDirectVobSub.h" static const IID IID_IDirectVobSub = { 0xEBE1FB08, 0x3957, 0x47CA, { 0xAF, 0x13, 0x58, 0x27, 0xE5, 0x44, 0x2E, 0x56 } }; DEFINE_GUID(CLSID_VSFilter, 0x93A22E7A, 0x5091, 0x45EF, 0xBA, 0x61, 0x6D, 0xA2, 0x61, 0x56, 0xA5, 0xD0); //************************************************************************************************* //{EE30215D-164F-4A92-A4EB-9D4C13390F9F} DEFINE_GUID(CLSID_LAVSplitter, 0xEE30215D, 0x164F, 0x4A92, 0xA4, 0xEB, 0x9D, 0x4C, 0x13, 0x39, 0x0F, 0x9F); #pragma comment( lib, "strmiids.lib" ) #pragma comment( lib, "Strmbasd.lib" ) #pragma comment( lib, "Quartz.lib" ) #pragma comment( lib, "d3d9.lib" ) #pragma comment( lib, "d3dx9.lib" ) //************** Global Variables ********************** IGraphBuilder *pGraph = NULL; // Graph builder interface IMediaControl *pControl = NULL; // Media control interface IMediaEvent *pEvent = NULL; // Media event interface IBaseFilter *pVsFilter = NULL; IDirectVobSub *pDirectVobSub = NULL; IBaseFilter *pLavSplitter = NULL; int _tmain(int argc, _TCHAR* argv[]) { HRESULT hr; long evCode; // Initialize the COM library. hr = CoInitializeEx(NULL, COINIT_MULTITHREADED); if (FAILED(hr)) { goto EndApp; } // Create the Filter Graph Manager and query for interfaces. hr = CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER,IID_IGraphBuilder, (void **)&pGraph); if (FAILED(hr)) // FAILED is a macro that tests the return value { goto EndApp; } // Use IGraphBuilder::QueryInterface (inherited from IUnknown) // to get the IMediaControl interface. hr = pGraph->QueryInterface(IID_IMediaControl, (void **)&pControl); if (FAILED(hr)) { goto EndApp; } // And get the Media Event interface, too. hr = pGraph->QueryInterface(IID_IMediaEvent, (void **)&pEvent); if (FAILED(hr)) { goto EndApp; } hr = CoCreateInstance(CLSID_LAVSplitter, NULL, CLSCTX_INPROC_SERVER, IID_IBaseFilter, (void**) &pLavSplitter); if (SUCCEEDED(hr)) { hr = pGraph->AddFilter(pLavSplitter, L"LAV Splitter Source"); } else { goto EndApp; } hr = CoCreateInstance(CLSID_VSFilter, NULL, CLSCTX_INPROC_SERVER, IID_IBaseFilter, (void**) &pVsFilter); if (SUCCEEDED(hr)) { hr = pGraph->AddFilter(pVsFilter, L"VSFilter"); hr = pVsFilter->QueryInterface(IID_IDirectVobSub, (void **)&pDirectVobSub); } else { goto EndApp; } hr = pGraph->RenderFile(L"C:\\GOODVIDEO.AVI", NULL); hr = pDirectVobSub->put_FileName(L"C:\\subtitle_ascii.srt"); // <---- App crashes silently when using ascii encoded srt file !! if (SUCCEEDED(hr)) { // Run the graph. hr = pControl->Run(); if (SUCCEEDED(hr)) { // Wait for completion. pEvent->WaitForCompletion(INFINITE, &evCode); if (evCode != S_OK) { printf("Movie is stopped by the user !"); } // Note: Do not use INFINITE in a real application // because it can block indefinitely. } // And stop the filter graph. hr = pControl->Stop(); } EndApp: if (pLavSplitter) pLavSplitter->Release(); if (pDirectVobSub) pDirectVobSub->Release(); if (pVsFilter) pVsFilter->Release(); if (pControl) pControl->Release(); if (pEvent) pEvent->Release(); if (pGraph) pGraph->Release(); CoUninitialize(); return 0; } Last edited by sdancer75; 2nd July 2014 at 08:09. |
|
2nd July 2014, 11:36 | #565 | Link |
Registered User
Join Date: Jul 2013
Posts: 90
|
Option to hide tray icon
Ok another issue now...... It supposed it was fixed on Issue 92
https://code.google.com/p/xy-vsfilte...il?id=92&can=1 put_HideTrayIcon(TRUE) does not seem to hide the tray icon. It just marks the check box, but if you dont click "apply" or "ok" in page properties, it does nothing. I can not use "apply" under a c++ code, so how can I hide the tray icon immediately when I call put_HideTrayIcon(TRUE) ? Regards, |
2nd July 2014, 22:02 | #566 | Link |
Broadband Junkie
Join Date: Oct 2005
Posts: 1,859
|
sdancer75, could you also test these issues against a build from the vsfilter_rc xy-VSFilter branch, as well as MPC-HC VSFilter to see if it's also reproducible?
|
3rd July 2014, 07:29 | #567 | Link |
Broadband Junkie
Join Date: Oct 2005
Posts: 1,859
|
...well I can't actually seem to reproduce this with your SubtitleTest.zip sample project.
I did update the includes and project for VS2010 though. Removed the "#pragma comment (lib" lines. Added Linker -> Input -> Additional Dependencies, strmbaseR.lib; strmiids.lib; quartz.lib; d3d9.lib; d3dx9.lib Added library directories for Microsoft DirectX SDK (June 2010) and xy-VSFilter Baseclasses (strmbaseR.lib). Changed explicit wxdebug.h path to #include <wxdebug.h> Added include directory, \xy_vsfilter\src\filters\BaseClasses Changed the test files to "C:\\test\\test.mkv" & "C:\\test\\subtitle.srt" Removed "using namespace boost;" since it was causing a compiler error with sts.h from the master branch (3.0.0.211 + Boost 1.47). Here is the resulting VS2010 binary (both master & vsfilter_rc branches) of your test project + test files which seems to function without issue: https://www.mediafire.com/?0jkh6hyaz6eo20o Since you opened Issue #190 on our bug tracker, let's continue discussion there. |
3rd July 2014, 08:54 | #568 | Link | |
Registered User
Join Date: Jul 2013
Posts: 90
|
Quote:
|
|
3rd July 2014, 09:04 | #569 | Link | |
Registered User
Join Date: Jul 2013
Posts: 90
|
Quote:
I will try to recompile the code following your steps and I will let you know. Did you also checked the issue with the system tray icon ? |
|
3rd July 2014, 09:56 | #570 | Link | |
Registered User
Join Date: Jul 2013
Posts: 90
|
Quote:
Code:
>c:\gnosis_v2.00\dshowfilters\filters\subtitles\xy_vsfilter\src\subtitles\flyweight_base_types.h(116) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\gnosis_v2.00\dshowfilters\filters\subtitles\xy_vsfilter\src\subtitles\flyweight_base_types.h(116) : error C2143: syntax error : missing ';' before '*' 1>c:\gnosis_v2.00\dshowfilters\filters\subtitles\xy_vsfilter\src\subtitles\flyweight_base_types.h(116) : error C2065: 'tmp' : undeclared identifier 1>c:\gnosis_v2.00\dshowfilters\filters\subtitles\xy_vsfilter\src\subtitles\flyweight_base_types.h(116) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\gnosis_v2.00\dshowfilters\filters\subtitles\xy_vsfilter\src\subtitles\flyweight_base_types.h(116) : error C2061: syntax error : identifier 'int32_t' 1>c:\gnosis_v2.00\dshowfilters\filters\subtitles\xy_vsfilter\src\subtitles\flyweight_base_types.h(118) : error C2065: 'tmp' : undeclared identifier 1>c:\gnosis_v2.00\dshowfilters\filters\subtitles\xy_vsfilter\src\subtitles\flyweight_base_types.h(120) : error C2065: 'tmp' : undeclared identifier |
|
3rd July 2014, 09:56 | #571 | Link |
Broadband Junkie
Join Date: Oct 2005
Posts: 1,859
|
The api function called put_HideTrayIcon only exists in old depreciated versions of the IDirectVobSubXy.h api, so I wouldn't recommend using it. At some point before 3.0.0.211, IDirectVobSubXy.h and its related settings were completely refactored.
I did a quick test with pDirectVobSubXy->XySetBool(BOOL_HIDE_TRAY_ICON, true) using IDirectVobSubXy.h from the master branch, and it seems to function as expected. Here is another binary of your test project which uses IDirectVobSubXy.h to hide the tray icon, in addition to loading the subtitle file with IDirectVobSub.h as in the above linked build: https://www.mediafire.com/?hxc21433b3mayl7 Code:
#include "..\xy_vsfilter\src\filters\transform\vsfilter\IDirectVobSubXy.h" Code:
static const IID IID_IDirectVobSubXy = { 0x85E5D6F9, 0xBEFB, 0x4E01, { 0xB0, 0x47, 0x75, 0x83, 0x59, 0xCD, 0xF9, 0xAB } }; Code:
IDirectVobSubXy *pDirectVobSubXy = NULL; Code:
hr = pVsFilter->QueryInterface(IID_IDirectVobSubXy, (void **)&pDirectVobSubXy); Code:
using namespace DirectVobSubXyOptions; hr = pDirectVobSubXy->XySetBool(BOOL_HIDE_TRAY_ICON, true); hr = pGraph->RenderFile(L"C:\\test\\test.mkv", NULL); Maybe boost behaves differently with older Visual Studio? It seems like you were using VC9? One thing I did notice, was that using the vsfilter_rc branch (Boost 1.55.0), it would compile just fine with or without "using namespace boost;". I wouldn't worry much about it, just use whatever works. Last edited by cyberbeing; 3rd July 2014 at 10:03. |
3rd July 2014, 10:33 | #572 | Link | |
Registered User
Join Date: Jul 2013
Posts: 90
|
Quote:
if *.srt subtitles containts non-latin characters (and of course non standard ascii chars, ie greeks in my case) the app crashes. Replace your subtitles.srt with the one I am attaching in this post, and enjoy the result. The filter in this case should return an E_FAIL, FALSE or something to manage the error... Mysteriously, that is not happening when using the property pages. Last edited by sdancer75; 8th July 2014 at 08:16. |
|
3rd July 2014, 10:59 | #573 | Link |
Broadband Junkie
Join Date: Oct 2005
Posts: 1,859
|
Hmm, I wonder if that's really it. I did try it with a Cyrillic (Windows-1251) encoded subtitle before I initially uploaded the binary, and it seemed fine. Though I am running Windows with a US-English locale, which obviously will render non-English ASCII encoded subtitles as gibberish. Maybe your issue is only triggered when using a particular Windows locale? I guess I'll see once your subtitle.zip attachment is approved.
Edit: While awaiting your attachment approval, I tested a Greek (Windows-1252) encoded subtitle with matching Greek non-unicode Windows locale, and everything seemed fine (subtitles displayed in Greek, no crash). There must be something special about the subtitle file your are testing, like an invalid unicode character mixed in somewhere. Have you been testing with a font which natively supports the Greek codepage? Last edited by cyberbeing; 3rd July 2014 at 21:08. |
3rd July 2014, 12:09 | #574 | Link | |
Registered User
Join Date: Jul 2013
Posts: 90
|
Quote:
Now I am working with the latest version 3.0.0.211, with all issues solved. I can confirm that changing the country, local and regional settings to US egnlish ( now I see greek chars rendered as gibberish as you correctly described) , the problem still exists. So, I think its a windows related problem. I own an original OEM Windows7 64Bit Greek Home Premium version updated to SP1. Thank you for your time. Best Regards, |
|
9th July 2014, 17:26 | #576 | Link |
Registered User
Join Date: Jun 2014
Posts: 10
|
The srt pre-languages can't not work. Why? How?
I have set the pre-lang in the lav spiliter. I use mpc(1.7.6.30) + lavfiters(0.62) + vsfilter.dll(3.0.0.300 git 6c0c23a) -- Edit -- There were two file: How To Train Your Dragon.eng.srt and How To Train Your Dragon.srt What I wanted was it can auto load *.eng.srt. Last edited by ahaha2013; 9th July 2014 at 17:42. |
10th July 2014, 00:24 | #577 | Link |
Registered User
Join Date: Feb 2010
Posts: 364
|
If I'm not mistaken, LAV Splitter isn't the one loading the external srt files, so your configuration there is quite useless.
Maybe look at the "Player" page under MPC-HC's options. There you can try and set the subtitle auto loading to "eng abc" (without the quotes; with a space, not a comma). I'm writing "maybe" because I'm not sure if it affects the external VSFilter you're using. |
12th July 2014, 19:13 | #578 | Link |
Beyond Kawaii
Join Date: Feb 2008
Location: Russia
Posts: 724
|
Could you please make a subtitles overlay filter for VapourSynth?
__________________
...desu! |
|
|