Nice work, Dav! For a combination of audio and video, for the simplest work, a custom format would probably be the simplest - basically you can determine how long it takes to draw one frame according to the number of steps used (in your .DAG format). If you have the number of steps of one animation and the number of frames in the file (in the new type of binary file you specify the number of DAG files), you have the total video time. All you have to do is add information to the file about which frames belong together (for example, that the first animation has four frames (in the current state as if 4 .DAG files) and here you can insert a change of the soundtrack (up to this time). video and audio transition), for example by numbering. Subsequently, the binary file would describe the video, for example, as follows: (this is just a suggestion from my head)
Number of DAG files in the file - LONG - 4 bytes
Number of audio files - LONG - 4 bytes
Lengths of individual DAG files in seconds (repeated according to the number of DAG files in the file) - LONG - 4 bytes * number of DAG files
Binary sizes of individual DAG files - LONG - 4 bytes * number of DAG files
Offsets on which individual DAG files start - LONG - 4 bytes * number of DAG files
Offsets where music files start - LONG - 4 bytes * number of audio files
Playback description: (let's say we have 10 DAG files and 3 music files)
1 (plays the first DAG video), 1 (plays the first audio file), 5 (the effect number for the video when switching from one DAG file to another DAG file), 7 (the effect number for the sound when changing the audio), 2 (plays the second DAG video), 1 (plays the first audio file) .......