Bienvenido a los foros de FT81x Manía. Te invitamos a regístrate totalmente gratis. Disfruta de tu experiencia con un grandes amigos y Staff.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Thread Contributor: lightcalamarHOWTO Gameduino 3 playback .avi with sound

Better response on post HOWTO Gameduino 3 playback .avi with soundHello to all.
I experimented to put audio to the videos of the new Gameduino 3 shield review.
Now the videos have sound.

This be the test;

You have to modify the library simply with two lines.
Locate in GD2.h (line 1344);

and replace by;

Then you put new line add (after line 945):

#define OPT_SOUND            32
Restart IDE Arduino.

You need for example a video and an audio file, or transform yours. Use FFMPEG and SoX. Audio files must be mono 4/8 bit IMA ADPCM format or u-Lab, please follow documentation Programmer Guide FT81x Programmer Guide page 170.

I leave an example; examples files

Using SoX convert audio file format (example file .mp3);

sox -e ima-adpcm -r 8000 -b 8 myfile.mp3 audio.wav
Using FFMPEG, join sound with video;

ffmpeg -i fish.avi -i audio.wav -c:v copy -c:a copy fish_aud.avi
Connect Gameduino3 headphones output to an amplifier and play file ...
Enjoy! Angry

P.S. Please exuse my bad english in the video
Repository initial for library GD23STM32 and more ...
Dear Sir, I'm very impressed with the video quality and sound you managed to achieve with the FT81x display. I too am trying to use an FT813 5" module for visual and audio display. I can get most of the normal functionality working fine as described in the James Bowman manual for Gamduino2. However, I do not know how to organise the source code to get video and audio to run. I would be very grateful if you could share the source code required to run the video you show in this post. Please share if you can, it would really help. I'm controlling the FT813 using a Teensy 3.6 and transferring files from the Teensy's built in SD card using SDFAT (SdFatSdioEX) and single SPI communication speed. I downloaded your fish video from above so I have those files. Please help. Thanks.
Today, the new Gameduino3 library will only work with Arduino, ESP8266 and STM32L4 MCUs.
To be working the Ft81xmania Team to implement functions with SDFat and play videos and other functions of the new library.

Case of STM32Fx and Teensy 3.x operate different SD reader. In a short time we have this new functionality where these family of MCU's give support.

In my previous video, I perform test with Arduino model UNO r3. In next message mine to set an example working very well with ESP8266 also work very well. But you patience and soon we will run SDIO Teensy reader. Code used in video is this;
#include <EEPROM.h>
#include <SPI.h>
#include <GD2UE.h>

Dirsearch ds;

char *pickfile(char *ext)
 for (byte i = 0; ds.get(ext); i++) {
   int x = (i % 5) * 160;
   int y = (i / 5) * 68;
   GD.Tag(i + 1);
   GD.cmd_button(x, y, 150, 60, 27, OPT_FLAT,;

 do {
 } while (!GD.inputs.tag);

 for (byte i = 0; i <= (GD.inputs.tag - 1); i++)

void setup()

void loop()
 char *avi = pickfile("avi");

 GD.cmd_text(GD.w / 2, GD.h / 2 - 30, 31, OPT_CENTER, "playing");
 GD.cmd_text(GD.w / 2, GD.h / 2 + 30, 31, OPT_CENTER, avi);

 MoviePlayer mp;
Repository initial for library GD23STM32 and more ...

Forum Jump:

Users browsing this thread: 1 Guest(s)