Zork Grand Inquisitor GOG DVD version

Ask for help with ScummVM problems

Moderator: ScummVM Team

User avatar
KainXVIII
Posts: 81
Joined: Mon Feb 11, 2008 10:00 pm
Location: Russia

Re: Zork Grand Inquisitor GOG DVD version

Post by KainXVIII »

Gudadantza wrote: Tue May 21, 2019 8:47 pm
criezy wrote: Tue May 21, 2019 8:18 pm @KainXVIII and @Guadadantza: From the information you have given it appeared that the "additional snapshot" builds were lacking the liba52 support. I have contacted the person who is providing those, and he already added support for it (although you may need to wait for the next one as I am not sure today's build include it). If you have the opportunity to test, please let us know if high-resolution movies work now with those builds.

@Raziel I am not sure. The first thing to do would be to profile the code to see what part of the code takes time. If this is in the video and audio decoding provided by the MPEG2 and liba52 libraries, then there is probably not much we can do. If this is in the ScummVM code, then we could possibly find ways to optimise it.
I can confirm that the last additional snapshot build (21 may) seems to run fine the high res movies, only tested the first two movies and the intro though. The option from scummvm GUI turns on by defect the high res movies switch ingame
Same for me, working now!
mgiuca
Posts: 1
Joined: Sat Jun 22, 2019 11:58 am

Re: Zork Grand Inquisitor GOG DVD version

Post by mgiuca »

Adding a note that the 32-bit nightly build on Windows (https://buildbot.scummvm.org/builds.html) works fine for me, but the 64-bit version on Windows crashes on startup if you try to run ZGI with MPEG enabled. Not sure if it's just these libraries (libmpeg / liba52) don't work in 64-bit.

Frustratingly, I found this out via the following steps:
  • Downloaded the 64-bit nightly build and it crashed.
  • Spent 3 hours building ScummVM from source, most of that time trying to build liba52 which is an absolute PITA to build in MinGW. And it worked perfectly.
  • Started writing a post about how to build SVM from source with those libraries.
  • Decided to just check the 32-bit build and it worked. #FML.
Also, unfortunately it seems all the MPEG videos in ZGI are interlaced so they actually look quite awful in-game. If you play them in VLC, it automatically applies a deinterlace filter which looks quite nice. It would be great if ScummVM applied the same filter, but it looks like that's not part of libmpeg's capabilities (you would need ffmpeg or something). So, that could be out of the question?

Build instructions (ignore unless required)

Anyway, in case it is of interest to anybody here, these are the steps I used to build it myself using MinGW (needless to say, unless you need to modify the source, you are much better off just using the nightly build):
  • Install MinGW using mingw-get-setup.exe.
  • Download Precompiled Libraries for ScummVM and drop them into the top-level MINGW directory.
  • The above installs SDL 1.2 (which is still supported, but deprecated). Instead (optionally), get the SDL2 MingW development libraries, extract, and drop the contents of the i686-w64-mingw32 directory into the MinGW root dir.
  • Build liba52 (below).
  • Build ScummVM with Z-Vision, FreeType2, MPEG and A52 support (below).
To build liba52:

liba52 is not included in the Precompiled Libraries (even though configure says “yes”, it is lying and will fail during make).

To build liba52 (from MSYS):
  • Download a52dec-0.7.4.tar.gz from http://liba52.sourceforge.net/downloads.html. Since this site is insecure, for security, you need to check the hash of this file against a known checksum. Debian has it here: the sha256sum should match:

    Code: Select all

    a21d724ab3b3933330194353687df82c475b5dfb997513eef4c25de6c865ec33
  • ./configure --prefix=/path/to/mingw/
  • Edit include/config.h: comment out this line:

    Code: Select all

    #define inline __attribute__ ((__always_inline__))
    (I couldn’t be bothered figuring out how to edit the actual source config files to disable this, so we just edit a file generated by ./configure before building.)
  • make && make install
To build ScummVM:

Code: Select all

./configure --enable-release --enable-freetype2 --enable-mpeg2 --enable-a52 --disable-all-engines --enable-engine=zvision
make
(--enable-release is optional but makes it optimized; starting up videos is MUCH faster.)

(--disable-all-engines is optional but means you’re just building ZVision and not everything; especially good on Windows where the compile is ridiculously slow.)
User avatar
rootfather
ScummVM Lead
Posts: 182
Joined: Tue Mar 31, 2015 11:59 am
Location: Germany
Contact:

Re: Zork Grand Inquisitor GOG DVD version

Post by rootfather »

Frustratingly, I found this out via the following steps:

Downloaded the 64-bit nightly build and it crashed.
Yeah, I had issues with libmpeg2 in the past too, it's simply quite outdated currently.

Does the 64 bit version works if you build it by yourself with Mingw/MSYS2? Additionally, could you please check if the 64 bit version in https://scummvm-builds.serra.network/scummvm-latest.zip is affected too?
User avatar
KainXVIII
Posts: 81
Joined: Mon Feb 11, 2008 10:00 pm
Location: Russia

Re: Zork Grand Inquisitor GOG DVD version

Post by KainXVIII »

mgiuca wrote: Sun Jun 23, 2019 12:07 am Also, unfortunately it seems all the MPEG videos in ZGI are interlaced so they actually look quite awful in-game. If you play them in VLC, it automatically applies a deinterlace filter which looks quite nice. It would be great if ScummVM applied the same filter, but it looks like that's not part of libmpeg's capabilities (you would need ffmpeg or something). So, that could be out of the question?
Yeah, interlacing is very apparent :?
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3560
Joined: Mon Oct 31, 2005 7:39 am

Re: Zork Grand Inquisitor GOG DVD version

Post by eriktorbjorn »

KainXVIII wrote: Tue Jun 25, 2019 11:32 am Yeah, interlacing is very apparent :?
I noticed that when I was getting the audio and video to sync up acceptably (i.e this pull request), because I had to watch that intro movie more times than I care to remember. But I couldn't figure out what to do about it, so I ignored it.
User avatar
Uka
Posts: 32
Joined: Mon Sep 30, 2019 5:35 pm
Location: Kiev
Contact:

Re: Zork Grand Inquisitor GOG DVD version

Post by Uka »

It seems that the interlacing problem has not yet been solved. Is it possible to do anything with that at all?

I have to add that MPEG2 movies also have a somewhat quieter sound and wrong resolution: the original DVD version used to show MPEG2 movies at the original 720x480, while in ScummVM they are displayed at 800x600 - with black borders on the sides. Is there any way to get rid of those borders?
Image Image
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3560
Joined: Mon Oct 31, 2005 7:39 am

Re: Zork Grand Inquisitor GOG DVD version

Post by eriktorbjorn »

Uka wrote: Thu Oct 10, 2019 10:03 am It seems that the interlacing problem has not yet been solved. Is it possible to do anything with that at all?

I have to add that MPEG2 movies also have a somewhat quieter sound and wrong resolution: the original DVD version used to show MPEG2 movies at the original 720x480, while in ScummVM they are displayed at 800x600 - with black borders on the sides. Is there any way to get rid of those borders?
I gave up on trying to understand the audio/video decoding. Even with lots of help, it took hours of trial and error to get sound and audio to sync up at all. It would be great if someone who does understand it could iron out the kinks, but I don't know who.

For whatever reason the audio level was all over the place, so what I did was that I tried comparing the DVD and non-DVD cutscenes and hard-code how much to amplify the sound of each one. It was a trade-off between matching the non-DVD movie and avoiding excessive clipping. See getVobAmplification() in https://github.com/scummvm/scummvm/blob ... /video.cpp for details.
User avatar
Uka
Posts: 32
Joined: Mon Sep 30, 2019 5:35 pm
Location: Kiev
Contact:

Re: Zork Grand Inquisitor GOG DVD version

Post by Uka »

eriktorbjorn, thanks for the reply!
Unfortunately I am not a programmer at all and do not understand anything in that decoding either.

By 'getting sound and audio to sync up' you mean the alignment between AC3 sound and MPEG2 videos? I did not notice any discrepancy between them. Although I did notice some mismatch of subtitles with the sound in DVD videos, with subtitles disappearing too quickly.

However, that's a minor complain, alongside with all that quieter sound / interlacing / wrong resolution and black borders. Thank you very much for adding the MPEG2 support to ScummVM anyway: slightly mismatching subtitles is surely better than no subtitles :)
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3560
Joined: Mon Oct 31, 2005 7:39 am

Re: Zork Grand Inquisitor GOG DVD version

Post by eriktorbjorn »

Uka wrote: Fri Oct 11, 2019 3:45 am By 'getting sound and audio to sync up' you mean the alignment between AC3 sound and MPEG2 videos? I did not notice any discrepancy between them. Although I did notice some mismatch of subtitles with the sound in DVD videos, with subtitles disappearing too quickly.

However, that's a minor complain, alongside with all that quieter sound / interlacing / wrong resolution and black borders. Thank you very much for adding the MPEG2 support to ScummVM anyway: slightly mismatching subtitles is surely better than no subtitles :)
Video decoding and subtitles worked already by the time I started looking at it. What I did (with a lot of help from clone2727, before he left the project) was to get audio decoding working (using liba52). But as I recall it, audio always lagged noticeably behind the video. I don't know how many times I had to watch that "Propaganda on Parade" video, trying to understand the time stamp information in the audio and video streams.

I still don't know if the solution I came up with is the correct one - my memory of it is already fuzzy - but as you say, it seems to work reasonably well.
User avatar
KainXVIII
Posts: 81
Joined: Mon Feb 11, 2008 10:00 pm
Location: Russia

Re: Zork Grand Inquisitor GOG DVD version

Post by KainXVIII »

Another quirk with DVD version - no true 5.1 surround sound during MPEG videos playback, by true i mean that sound just comes from all speakers simultaneously and not from the necessary speakers (ie voices should come from center speaker).
PS - you play game *.vob files with video player all sounds fine and 5.1 surround system works as intended for DVD movie :mrgreen:
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3560
Joined: Mon Oct 31, 2005 7:39 am

Re: Zork Grand Inquisitor GOG DVD version

Post by eriktorbjorn »

KainXVIII wrote: Sun Jun 30, 2024 5:19 pm Another quirk with DVD version - no true 5.1 surround sound during MPEG videos playback
That's something I'll never be able to debug myself, since I don't have that many speakers hooked up to my computer. :)
User avatar
KainXVIII
Posts: 81
Joined: Mon Feb 11, 2008 10:00 pm
Location: Russia

Re: Zork Grand Inquisitor GOG DVD version

Post by KainXVIII »

eriktorbjorn wrote: Fri Jul 05, 2024 9:06 pm
KainXVIII wrote: Sun Jun 30, 2024 5:19 pm Another quirk with DVD version - no true 5.1 surround sound during MPEG videos playback
That's something I'll never be able to debug myself, since I don't have that many speakers hooked up to my computer. :)
Ah, too bad :oops:
Post Reply