Video playback no sound

Started by chip, Fri 27/06/2025 14:56:14

Previous topic - Next topic

chip

Hello,

I try to play a ogv video, but ingame it has no sound, in windows media player playback with sound is working, but ingame its only playing video without sound

Is this a known error or am I doing something wrong?

Is it possible to play the video somehow not blocking and not fullscreen in a room, like if you are in a cinema and can walk around while the movie is playing?


 

eri0o

QuoteIs it possible to play the video somehow not blocking and not fullscreen in a room

This is supported in AGS 4! I don't have yet the proper docs to point to you how it works since we are working on the documentation still, but I believe there is a topic on the forums that describes the VideoPlayer struct API - it's reasonably simple and has a graphic property you can pass to things that take a sprite slot.

About the specific video without sound, any possibility of sharing the file and the code you are using for playing it?

Crimson Wizard

#2
Please post the exact command that you use to play the video. There are options that disable video's sound, could be you have that by mistake?
https://adventuregamestudio.github.io/ags-manual/Multimedia.html#playvideo


About non-blocking videos, as @eri0o said, that works only in AGS 4. This is a version in development, but if you're interested to try, here's the forum thread with links and list of changes:
https://www.adventuregamestudio.co.uk/forums/ags-engine-editor-releases/ags-4-0-early-alpha-for-public-test/

Here's the forum thread that discussed non-blocking videos in particular, with a number of very simple code examples:
https://www.adventuregamestudio.co.uk/forums/engine-development/feature-request-videos-non-blocking-playback-with-guis/msg636661328/#msg636661328


chip

Thanks guys,
I've already tried all the flags for the code to play the video, but nothing helped; the sound was always muted (unhearable in game).

I wasn't familiar with AGS4. Can I update my AGS3 project to it, and is it stable?




Crimson Wizard

Quote from: chip on Yesterday at 11:08:15I've already tried all the flags for the code to play the video, but nothing helped; the sound was always muted (unhearable in game).

What about other sounds, do they play in your game at all?
If they do, then could you upload your video file to some file hosting to let us test it out?

Quote from: chip on Yesterday at 11:08:15I wasn't familiar with AGS4. Can I update my AGS3 project to it, and is it stable?

You may, but there are number of serious changes, so I recommend doing a project backup before upgrading.
It's relatively stable, it's still in active development, but we fix the mistakes as they are reported.

chip

Cannot share the video file, its a private movie, other sounds are working in game.

Made a quick test to open a project-copy in AGS4, but it was not working at all, I had to comment out all WalkableArea related codes (remove and restore, because it was undefined token?)

Then it showed a problem with this code in CustomDialogGui script:

Code: ags
info.HasAlphaChannel = true; 

CustomDialogGui.asc(400): Error (line 400): '.HasAlphaChannel' is not a public member of 'DialogOptionsRenderingInfo'. Are you sure you spelt it correctly (remember, capital letters are important)?

Crimson Wizard

Quote from: chip on Yesterday at 11:55:13Cannot share the video file, its a private movie, other sounds are working in game.

Did you make this file yourself in a video rendering software, or took a ready file from somewhere else?

Can you look into its properties and tell what are the audio properties: codec, format, etc?

If you made it yourself, you could perhaps make another one which does not contain private material, but has similar issue?


Quote from: chip on Yesterday at 11:55:13Made a quick test to open a project-copy in AGS4, but it was not working at all

Upgrading to AGS4 may require to:
- Set Script Compatibility level to 3.6.* in the general settings.
- Replace or remove certain deprecated commands. For example, HasAlphaChannel property is deprecated and should be removed completely.
This may take some time to figure out depending on a project.

chip

It only shows stereo, 48.0000 khz, codec or format is not even mentioned, cant give more infos about the video, because it was years ago somehow reencoded to an ogv file for the purpose of using it in this game. Playing the sound file seperate beside this (muted) video was my try for a work-around, but it was desync after some time afair.

Regarding the upgrade test:
Setting script compatibility to 3.6. seem to fixed alot and it let me enter the game, but the mouse-hover-over-hotspot-texts were all black. The dialogtexts when characters speak are fine, but the Dialog texts in the dialogoptions-box are invisible. Do you know how to fix that too?



Crimson Wizard

Quote from: chip on Yesterday at 15:13:22It only shows stereo, 48.0000 khz, codec or format is not even mentioned, cant give more infos about the video, because it was years ago somehow reencoded to an ogv file for the purpose of using it in this game. Playing the sound file seperate beside this (muted) video was my try for a work-around, but it was desync after some time afair.

You could maybe try the MediaInfo software:
https://mediaarea.net/en/MediaInfo

Or perhaps the person who reencoded it could tell which settings did they use?


Quote from: chip on Yesterday at 15:13:22Regarding the upgrade test:
Setting script compatibility to 3.6. seem to fixed alot and it let me enter the game, but the mouse-hover-over-hotspot-texts were all black. The dialogtexts when characters speak are fine, but the Dialog texts in the dialogoptions-box are invisible. Do you know how to fix that too?

In AGS 4 we changed how the colors are set in script. Previously they were encoded as 16-bit numbers, but now they are 32-bit numbers (ARGB), and using old numbers result in transparent colors (with alpha = 0).

AGS is supposed to convert the colors set in the Editor (on the GUI and Character properties), but if ones are set in the script, then the only way to fix this is to go around scripts, find where they are assigned, and either convert number by hand (you can use Color Finder panel for the help in converting, its in the Colours node in the Project Explorer), or use Game.GetColorFromRGB() function.

SMF spam blocked by CleanTalk