Transcode Commodore 64 SID Audio Using FFmpeg
This article provides a straightforward guide on how to transcode vintage Commodore 64 SID (Sound Interface Device) audio files into modern formats like MP3, WAV, or FLAC using FFmpeg. You will learn how to verify your FFmpeg installation’s compatibility, execute basic conversion commands, select specific subsongs within a SID file, and control the duration of the output file.
Prerequisites: Check for Game Music Emulator (GME) Support
FFmpeg decodes Commodore 64 .sid files using the
libgme (Game Music Emulator) library. Before starting, you
must ensure your FFmpeg build is compiled with this library enabled.
Run the following command in your terminal to verify support:
ffmpeg -demuxers | grep gmeIf the output lists gme (Game Music Emulator demuxer),
your version of FFmpeg is ready. If not, you will need to install a
build of FFmpeg that includes --enable-libgme.
Basic Conversion
To convert a SID file to a standard stereo MP3 file using the default settings, run the following command:
ffmpeg -i input.sid output.mp3This command automatically decodes the first track (subsong) of the SID file and encodes it into an MP3 file.
Selecting a Specific Subsong
Commodore 64 SID files often contain multiple tracks or “subsongs”
(for example, different level tunes or sound effects) within a single
file. You can target a specific track using the
-track_index option.
To extract the second track (index 1, as the index is
zero-based):
ffmpeg -track_index 1 -i input.sid output.wavSetting a Specific Duration
Because chiptune formats like SID play in an infinite loop, FFmpeg
relies on internal library defaults to decide when to stop recording
(often defaulting to 3 minutes). You can manually set the exact duration
of your exported audio using the -t parameter.
To transcode 2 minutes and 30 seconds of a specific SID track to FLAC:
ffmpeg -track_index 0 -i input.sid -t 00:02:30 output.flacAdjusting Audio Quality
To ensure the best sound reproduction from the synthesized chip audio, you can increase the audio bitrate or sample rate during transcoding. The following command exports the SID file to a high-quality, 320 kbps MP3:
ffmpeg -i input.sid -b:a 320k output.mp3