comskip82_007 ReleaseSemaphore error on Windows 7

Here you can ask your questions on how to use Comskip for the detection of commercials. Also questions on how to remove commercials are welcome
nebulous999
Posts: 11
Joined: Sun Jun 09, 2019 9:49 pm

Re: comskip82_007 ReleaseSemaphore error on Windows 7

Post by nebulous999 »

Sorry for the delay.

OK, I pretty much followed the instructions you listed at:
https://github.com/erikkaashoek/Comskip
Here's what I did:
Install MSYS2 by following the instructions at https://msys2.github.io/
NOTE: The "msys2-i686-20190524.exe" version (Windows 7 64-bit)
Ran "MSYS2 MSYS" and followed the remaining instructions

Ran "MSYS2 MinGW 64-bit"

Got ffmpeg using:
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg

Downloaded and argtable from http://argtable.sourceforge.net/
Downloaded SDL2-2.0.10.tar.gz from https://www.libsdl.org/download-2.0.php

Added "export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig" to .bashrc

Ran "MSYS2 MinGW 64-bit" again
Ran:
$ tar xvfz argtable2-13.tar.gz argtable2-13/
$ tar xvfz SDL2-2.0.10.tar.gz
$ cd /argtable2-13
$ ./configure
$ make install
$ cd ../SDL2-2.0.10
$ ./configure
$ make install
$ cd ../ffmpeg
$ cd ffmpeg
$ ./configure
$ make --jobs=8
$ make install

Ran GitHub build instructions from https://github.com/erikkaashoek/Comskip
$ git clone git://github.com/erikkaashoek/Comskip
$ cd Comskip
$ ./autogen.sh
$ ./configure
$ make --jobs=8
My final comskip.exe file is 123 MB. The one from comskip81_090_donators.zip was only 14.7 MB!
The dependencies are also different.
My comskip.exe depends on:
  • * MSYS-2.0.DLL
    * BCRYPT.DLL
    * KERNEL32.DLL
    * OLE32.DLL
    * SECUR32.DLL
    * USER32.DLL
Your comskip.exe (0.81.090) depends on:
  • * ADVAPI32.DLL
    * COMDLG32.DLL
    * GDI32.DLL
    * KERNEL32.DLL
    * MSVCRT.DLL
    * OLE32.DLL
    * SECUR32.DLL
    * USER32.DLL
Also mine did not build comskipGUI.exe or ComskipINIEditor, but I don't really need those right now.
EDIT: It probably couldn't find SDL.
checking for sdl >= 1.2.0... no
But I'm clearly doing something wrong building comskip.exe here. Any ideas?
erik
Site Admin
Posts: 3368
Joined: Sun Aug 21, 2005 3:49 pm

Re: comskip82_007 ReleaseSemaphore error on Windows 7

Post by erik »

I'm using a reduced ffmpeg library, guess you are using all ffmpeg functionalities including all encoders?
nebulous999
Posts: 11
Joined: Sun Jun 09, 2019 9:49 pm

Re: comskip82_007 ReleaseSemaphore error on Windows 7

Post by nebulous999 »

I have no idea, I just built with default settings. Did you build ffmpeg yourself, or download windows binaries somewhere?

I think it's more likely ihat I need to build using MinGW, but without using MSYS2 at all. Is this maybe what you did?
erik
Site Admin
Posts: 3368
Joined: Sun Aug 21, 2005 3:49 pm

Re: comskip82_007 ReleaseSemaphore error on Windows 7

Post by erik »

I'm building ffmpeg myself with reduced content (no encoders) under mingW as static libraries
The build environment on windows is extremely unstable so I can not explain how to set it up, I'm just happy I succeeded.
Then I build comskip using this own build ffmpeg libraries
nebulous999
Posts: 11
Joined: Sun Jun 09, 2019 9:49 pm

Re: comskip82_007 ReleaseSemaphore error on Windows 7

Post by nebulous999 »

Hmm... any idea what command line options you used to buildffmpeg with the reduced content?

I'm trying this all again on a fresh PC, the Windows 7 DVR machine I'll be running comskip on.

Ok so I figured we need h.264 and mpeg2 decoding, so first I tried
$ ./configure --prefix=/usr/local --disable-all --enable-decoder=h264 --enable-decoder=mpeg2video
but I get the warning:
WARNING: Disabled h264_decoder because
WARNING: Disabled mpeg2video_decoder because
Strange... Ok then I tried:
./configure --prefix=/usr/local --disable-encoders
And this worked.

Next issue, I don't think the version of SDL2 I got (2.0.10) is compatible with Comskip. Which version of SDL2 did you use??

The ./configure script failed to find the SDL library, until I change "sdl >= 1.2.0" into "sdl2 >= 1.2.0" in that script.

Building with 2.0.10, I get a bunch of errors:
TV@DVR MINGW64 /c/comskip-src/Comskip
$ make
gcc -DPACKAGE_NAME=\"Comskip\" -DPACKAGE_TARNAME=\"comskip\" -DPACKAGE_VERSION=\"0.82.010\" -DPACKAGE_STRING=\"Comskip\ 0.82.010\" -DPACKAGE_BUGREPORT=\"https://github.com/erikkaashoek/Comskip/issues\" -DPACKAGE_URL=\"\" -DPACKAGE=\"comskip\" -DVERSION=\"0.82.010\" -DHAVE_LIBM=1 -DHAVE_LIBPTHREAD=1 -I. -Wall -I/mingw64/include -I/usr/local/include -Dmain=SDL_main -I/mingw64/include/SDL2 -DPROCESS_CC -DDONATOR -DHAVE_SDL -g -O2 -MT comskip_gui-video_out_sdl.o -MD -MP -MF .deps/comskip_gui-video_out_sdl.Tpo -c -o comskip_gui-video_out_sdl.o `test -f 'video_out_sdl.c' || echo './'`video_out_sdl.c
video_out_sdl.c: In function ‘sdl_setup’:
video_out_sdl.c:130:25: warning: implicit declaration of function ‘SDL_SetVideoMode’; did you mean ‘SDL_GetVideoDriver’? [-Wimplicit-function-declaration]
instance->surface = SDL_SetVideoMode (width, height, instance->bpp,
^~~~~~~~~~~~~~~~
SDL_GetVideoDriver
video_out_sdl.c:130:23: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
instance->surface = SDL_SetVideoMode (width, height, instance->bpp,
^
video_out_sdl.c:136:42: error: ‘SDL_SRCCOLORKEY’ undeclared (first use in this function); did you mean ‘SDL_SCANCODE_Y’?
instance->rgb = SDL_CreateRGBSurface(SDL_SRCCOLORKEY, width, height, 24, 0x0000FF, 0x00FF00, 0xFF0000, 0);
^~~~~~~~~~~~~~~
SDL_SCANCODE_Y
video_out_sdl.c:136:42: note: each undeclared identifier is reported only once for each function it appears in
video_out_sdl.c: In function ‘vo_sdl_open’:
video_out_sdl.c:149:11: error: unknown type name ‘SDL_VideoInfo’
const SDL_VideoInfo * vidInfo;
^~~~~~~~~~~~~
video_out_sdl.c:163:26: error: ‘SDL_HWSURFACE’ undeclared (first use in this function); did you mean ‘SDL_SWSURFACE’?
instance->sdlflags = SDL_HWSURFACE | SDL_ASYNCBLIT | SDL_HWACCEL;
^~~~~~~~~~~~~
SDL_SWSURFACE
video_out_sdl.c:163:42: error: ‘SDL_ASYNCBLIT’ undeclared (first use in this function); did you mean ‘SDL_ENABLE’?
instance->sdlflags = SDL_HWSURFACE | SDL_ASYNCBLIT | SDL_HWACCEL;
^~~~~~~~~~~~~
SDL_ENABLE
video_out_sdl.c:163:58: error: ‘SDL_HWACCEL’ undeclared (first use in this function); did you mean ‘SDL_RLEACCEL’?
instance->sdlflags = SDL_HWSURFACE | SDL_ASYNCBLIT | SDL_HWACCEL;
^~~~~~~~~~~
SDL_RLEACCEL
video_out_sdl.c:173:15: warning: implicit declaration of function ‘SDL_GetVideoInfo’; did you mean ‘SDL_GetPowerInfo’? [-Wimplicit-function-declaration]
vidInfo = SDL_GetVideoInfo ();
^~~~~~~~~~~~~~~~
SDL_GetPowerInfo
video_out_sdl.c:173:13: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
vidInfo = SDL_GetVideoInfo ();
^
video_out_sdl.c:174:10: warning: implicit declaration of function ‘SDL_ListModes’; did you mean ‘SDL_LockMutex’? [-Wimplicit-function-declaration]
if (!SDL_ListModes (vidInfo->vfmt, SDL_HWSURFACE | SDL_RESIZABLE)) {
^~~~~~~~~~~~~
SDL_LockMutex
video_out_sdl.c:174:32: error: request for member ‘vfmt’ in something not a structure or union
if (!SDL_ListModes (vidInfo->vfmt, SDL_HWSURFACE | SDL_RESIZABLE)) {
^~
video_out_sdl.c:174:56: error: ‘SDL_RESIZABLE’ undeclared (first use in this function); did you mean ‘SDL_DISABLE’?
if (!SDL_ListModes (vidInfo->vfmt, SDL_HWSURFACE | SDL_RESIZABLE)) {
^~~~~~~~~~~~~
SDL_DISABLE
video_out_sdl.c:176:30: error: request for member ‘vfmt’ in something not a structure or union
if (!SDL_ListModes (vidInfo->vfmt, SDL_RESIZABLE)) {
^~
video_out_sdl.c:181:28: error: request for member ‘vfmt’ in something not a structure or union
instance->bpp = vidInfo->vfmt->BitsPerPixel;
^~
video_out_sdl.c: In function ‘handle_event’:
video_out_sdl.c:236:7: error: unknown type name ‘SDL_keysym’; did you mean ‘SDL_Keysym’?
SDL_keysym ks = event.key.keysym;
^~~~~~~~~~
SDL_Keysym
video_out_sdl.c:236:23: error: incompatible types when initializing type ‘int’ using type ‘SDL_Keysym {aka struct SDL_Keysym}’
SDL_keysym ks = event.key.keysym;
^~~~~
video_out_sdl.c:238:17: error: request for member ‘sym’ in something not a structure or union
switch (ks.sym) {
^
video_out_sdl.c:268:17: error: request for member ‘mod’ in something not a structure or union
if (ks.mod & KMOD_SHIFT)
^
video_out_sdl.c:274:17: error: request for member ‘mod’ in something not a structure or union
if (ks.mod & KMOD_SHIFT)
^
video_out_sdl.c:286:17: error: request for member ‘mod’ in something not a structure or union
if (ks.mod & KMOD_RALT || ks.mod & KMOD_LALT) {
^
video_out_sdl.c:286:39: error: request for member ‘mod’ in something not a structure or union
if (ks.mod & KMOD_RALT || ks.mod & KMOD_LALT) {
^
video_out_sdl.c:293:17: error: request for member ‘mod’ in something not a structure or union
if (ks.mod & KMOD_RALT || ks.mod & KMOD_LALT) {
^
video_out_sdl.c:293:39: error: request for member ‘mod’ in something not a structure or union
if (ks.mod & KMOD_RALT || ks.mod & KMOD_LALT) {
^
video_out_sdl.c:300:17: error: request for member ‘sym’ in something not a structure or union
if (ks.sym >= SDLK_a && ks.sym <= SDLK_z) {
^
video_out_sdl.c:300:37: error: request for member ‘sym’ in something not a structure or union
if (ks.sym >= SDLK_a && ks.sym <= SDLK_z) {
^
video_out_sdl.c:301:21: error: request for member ‘sym’ in something not a structure or union
key = ks.sym - 32;
^
video_out_sdl.c:236:18: warning: variable ‘ks’ set but not used [-Wunused-but-set-variable]
SDL_keysym ks = event.key.keysym;
^~
video_out_sdl.c: In function ‘vo_init’:
video_out_sdl.c:322:3: warning: implicit declaration of function ‘SDL_WM_SetCaption’; did you mean ‘SDL_GetVersion’? [-Wimplicit-function-declaration]
SDL_WM_SetCaption(title, "comskip");
^~~~~~~~~~~~~~~~~
SDL_GetVersion
video_out_sdl.c:324:3: warning: implicit declaration of function ‘SDL_EnableKeyRepeat’; did you mean ‘SDL_enabled_assert’? [-Wimplicit-function-declaration]
SDL_EnableKeyRepeat(50, SDL_DEFAULT_REPEAT_INTERVAL);
^~~~~~~~~~~~~~~~~~~
SDL_enabled_assert
video_out_sdl.c:324:27: error: ‘SDL_DEFAULT_REPEAT_INTERVAL’ undeclared (first use in this function)
SDL_EnableKeyRepeat(50, SDL_DEFAULT_REPEAT_INTERVAL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
video_out_sdl.c: In function ‘vo_draw’:
video_out_sdl.c:342:3: warning: implicit declaration of function ‘SDL_Flip’; did you mean ‘SDL_Quit’? [-Wimplicit-function-declaration]
SDL_Flip(screen);
^~~~~~~~
SDL_Quit
make: *** [Makefile:807: comskip_gui-video_out_sdl.o] Error 1
Finally, a comskip.exe file was produced, but I can only run this inside the MINGW64 command prompt.
If I double-click comskip.exe in Explorer, I get a message saying "msys-2.0.dll is missing from your computer"

Can I get any more details on your build system configuration please? Also what SDL2 version?

Thanks,
Ryan
Post Reply