Author Topic: Does AGS plays MP4 files? Or compressed video files?/Displaying isolated Images  (Read 2089 times)

Hi,

It's been a while since I last posted here. From the threads I read here, I still don't understand if AGS reads MP4 files. I tried it and there is an error. I know it plays AVI, etc, but AVI files are huge, so I was wondering if there is a ways of compressing those video files.

Also, I was wondering if it is possible, in a sort of a cut scene, to display frames/images, or screenshots/backgrounds, and scale them, if need it? I am trying to do zoom outs/Ins. Or Displaying some frames, before the rooms appear on screen, e.g. Different animated frames of a room before the sun rises (from night to day) - after the sun rises, the actions take place...

Thanks :)
« Last Edit: 03 Jan 2020, 09:21 by Filipe »

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on one or more games that won an AGS Award!
    •  
    • Cassiebsg worked on one or more games that was nominated for an AGS Award!
To play MP4 files you need to have the codec installed. Which means playing MP4 files depends on the users machine.
My suggestion is to encode your video to ogv, since AGS reads and does not rely on any outside codec to play these.

As for your other question. Yes, it is possible.
You'll need to use DynamicSprites for that though. Check it out in the manual, and don't be afraid, they don't bite and they're a lot of fun to use.  (nod)
There are those who believe that life here began out there...

Also, I was wondering if it is possible, in a sort of a cut scene, to display frames/images, or screenshots/backgrounds, and scale them, if need it? I am trying to do zoom outs/Ins. Or Displaying some frames, before the rooms appear on screen, e.g. Different animated frames of a room before the sun rises (from night to day) - after the sun rises, the actions take place...

Hmm, depends on what exactly are you trying to do, but it's worth mentioning that AGS 3.5.0 supports full room zoom using Viewport/Camera script functions.
https://github.com/adventuregamestudio/ags-manual/wiki/UpgradeTo35#new-viewportcamera-system
https://github.com/adventuregamestudio/ags-manual/wiki/Camera
https://github.com/adventuregamestudio/ags-manual/wiki/Viewport
« Last Edit: 03 Jan 2020, 14:25 by Crimson Wizard »

Thanks...

Windows media player reads my MP4 file, but still, AGS is giving me that error. My problem is with file size of the videos. I thing OGV does not compress the file, right? Is it the same size of the AVI file? Because AVI are huge...

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on one or more games that won an AGS Award!
    •  
    • Cassiebsg worked on one or more games that was nominated for an AGS Award!
ogv uses compression as well.

OGG Theora Video is what you want.
Uncompressed AVIs are huge, yes. Saying AVI is huge however is not correct. AVI can be compressed with codecs like divx, xvid... which produce a compressed avi file. But again, for the player of your game to be able to see these videos they would need to have the corresponding codec installed.

Convert your MP4 to OGV, play around with the compression, until you're satisfied that the quality-file size is right for your needs.  ;)
There are those who believe that life here began out there...

Thanks :)

Do you know of any free converter?

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on one or more games that won an AGS Award!
    •  
    • Cassiebsg worked on one or more games that was nominated for an AGS Award!
I can't recommend any, since I normally just encode my videos as Ogg/ogv. but Google provides several options:
https://www.google.com/search?q=convert+mp4+to+ogg+video+fre

Otherwise check a reputable (or one you trust) tech site that might have some recommendations for the best one to use.
There are those who believe that life here began out there...

I would suggest to use ffmpeg, but if you want a GUI then you could try HandBrake.

Hi, thanks...

Is it safe? the Handbreak, I mean... I'm trying to find a converter that I can install on my computer, and I'm completely lost with all the posts...

Cannot find the ffmpeg2theora.exe... don't know where is the exe, and the Handbreak is asking me for the NET Framework 4.8 ... :(

Fail at Floaty Rog' now!  still having to deal with what games are going through

Ok, but where is the EXE file?!?!? I cannot start it..

Also, I try the one with gui (the Handbreak), but I don't know how to use it... what should I chose??! I cannot find the OGV extension?!?!? What am I doing wrong?!??

By the way, has anyone tried this? The VLC converter?

https://forums.rpgmakerweb.com/index.php?threads/what-to-use-to-convert-video-files-to-ogv.71975/

I'v tryed it, the qulity is very bad..

Can anyone explain me how to work with ffmpeg2theora, please :( Thanks :)
« Last Edit: 07 Jan 2020, 14:28 by Filipe »

Sorry, I should've checked that the link actually works  :P

Found a working link: https://www.videohelp.com/download/ffmpeg2theora-0.30.exe
Here's how to use it: http://v2v.cc/~j/ffmpeg2theora/examples.html (it's a commandline program, there's no GUI)
Fail at Floaty Rog' now!  still having to deal with what games are going through

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on one or more games that won an AGS Award!
    •  
    • Cassiebsg worked on one or more games that was nominated for an AGS Award!
About VLC, what bitrate did you set encoding to? Make sure it's high enough. Experiment with it.

Edit:
Try something in the range of 6000 to 9000

Also it takes long time to encode, so if your video is long, you don't need to let it encode fully. Just encode like 30secs, then hit stop and see if quality is good enough, if not, just increase the bitrate until you happy with it. Once you happy encode the full video.  :)
« Last Edit: 07 Jan 2020, 18:39 by Cassiebsg »
There are those who believe that life here began out there...

I don't like the quality... I try 24000, but ir crashed (maybe I'm doing something wrong) :( LOL Also, in VLC what do you choose? I don't find OGV, only OGG or Theora Vorbis  ... should I change the extension afterwards to OGV?

Tell me, does ffmpeg2theora offers better quality? Does it converts from Mp4 files, or only AVI?

Thanks :)

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on one or more games that won an AGS Award!
    •  
    • Cassiebsg worked on one or more games that was nominated for an AGS Award!
ffmpg2 should be able to convert from mp4 to ogg/ogv. But I haven't tried it. I know it's one of the choices in Blender to encode it's movies.

You can choose either Theora Vorbis or Theora Flac, I tried a video with 6000 and looked okay. 9000 looked good. 24000 is probably too much.  (roll)
You just rename the ogg to ogv. The container is OGG, but we tend to call it OGV when there's video. OGV is in reality another codec, not by Theora.
There are those who believe that life here began out there...

ffmpg2 should be able to convert from mp4 to ogg/ogv. But I haven't tried it. I know it's one of the choices in Blender to encode it's movies.

You can choose either Theora Vorbis or Theora Flac, I tried a video with 6000 and looked okay. 9000 looked good. 24000 is probably too much.  (roll)
You just rename the ogg to ogv. The container is OGG, but we tend to call it OGV when there's video. OGV is in reality another codec, not by Theora.

I converted with VLC... The quality is great, but then, AGS is giving me this error: Unable to load Theora video... do you know why? It is in the Compiled folder. The AVI file reads ok... Please help :(

Wait, ok I put in the project's folder, but now it froze in the first frame. It is a 1080p movie with 50fps though... but I'm just testing... could it be this?
« Last Edit: 07 Jan 2020, 20:43 by Filipe »

Is your game's resolution 1080p?

No, it is 800 X 600. But I was just testing... I convert my video to 800X600 and 12fps. Now it works :) By the way, should one put a type of racio resolution of 16:9? I mean, what resolution do you advise me? If the game is to be played on a tablet, or smart phone... 1066 X 600, perhaps? is this 16:9  format? Thanks :)
« Last Edit: 07 Jan 2020, 21:22 by Filipe »

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on one or more games that won an AGS Award!
    •  
    • Cassiebsg worked on one or more games that was nominated for an AGS Award!
if you want to know if it's 16:9 you just divide 16 by 9 = 1,777778
Now you divide your 1066 by 600 = 1,77(6) which then I would say, yes. It's 16:9. Though you might want to go with a resolution that can be scaled up.

you can use this table to see which values are recommended here: https://pacoup.com/2011/06/12/list-of-true-169-resolutions/

And these days the norm is going 16:9 or 16:10.
I always use 16:9 myself.

No idea about best tablet/smart phone res.
There are those who believe that life here began out there...

if you want to know if it's 16:9 you just divide 16 by 9 = 1,777778
Now you divide your 1066 by 600 = 1,77(6) which then I would say, yes. It's 16:9. Though you might want to go with a resolution that can be scaled up.

you can use this table to see which values are recommended here: https://pacoup.com/2011/06/12/list-of-true-169-resolutions/

And these days the norm is going 16:9 or 16:10.
I always use 16:9 myself.

No idea about best tablet/smart phone res.

Thanks :) What do you think about 800X600? Now that I start doing on 800X600, to convert it to 16:9, Should I use: 1024 X 576, or 896   504? What resolution do you use?
« Last Edit: 07 Jan 2020, 21:45 by Filipe »