Here's another idea: combine the two previous ones.
Include options in dosbox.conf for recording. Here are some proposed default values.
# frame_rate - number of frames per second to record to the video file
# digital_compression_method - can be none (uncompressed audio), realtime (codec compresses audio in realtime, CPU intensive), endfile (compression performed when recording of current file completes), or exit (compression is performed after quitting DOSBox)
# digital_compression_codec - name of audio compression DLL to use. Configure the codec itself in compress.ini. DLL file must be in the DOSBox directory to make use of it.
[recording]
frame_rate=70
digital_compression_method=none
digital_compression_codec=
Of course, these example settings are for a Windows machine. I'm pretty sure the devs can work out some cross-platform method of specifying these values. Setting digital_compression_method=endfile would likely cause slowdowns at the end of each file's recording as the audio gets compressed, and digital_compression_method=exit would result in lots of drive activity when DOSBox is shut down. If digital_compression_method=exit and DOSBox crashes without the opportunity for a proper shutdown, the audio in the recorded files would be left uncompressed.