09-18-2024, 11:28 PM
(This post was last modified: 09-19-2024, 12:30 AM by ahenry3068.)
I've got the following code. The purpose is to create a Medium byterate Wave file WITHOUT METADATA. I'm writing an Audio Book app for the Commander X16 and I don't have the processor power to parse and ignore Meta Data in the Wave. Ignoring it creates clicks when the METADATA is treated as Audio. I can create the proper files in Audacity but ffmpeg refuses to leave out the encoder MetaData even with the -metadata -1 directive.
My solution for semi-automating the conversion is the following program which uses ffmpeg first to convert to raw_audio (no metadata) then use my code to tack on the WAV Header. My program kind of works, the files even play properly on the X16 where I'm ignoring a bunch of the WAV Header. But I'm missing something important as none of the big boy programs on Linux or Windows recognize my output as a Valid WAV. There are a couple fields in the RIFF/WAV Header I'm not filling in which I'm sure are the problem but I don't know what to put there.
My code is attached and any help is appreciated. Code is meant for Linux and hasn't been ported for Windows yet, ffmpeg must be installed.
Identified one problem. Header.FmtSpecific has to be set equal to 16. But that still doesn't solve all the problems.
PROBLEM FIXED. UPDATED CODE ATTACHED. THIS WORKS TO STRIP METADATA FROM ANY AUDIO FILE AND OUTPUT IT AS A MONO WAV (Easily modified to do Stereo if you desire)
My solution for semi-automating the conversion is the following program which uses ffmpeg first to convert to raw_audio (no metadata) then use my code to tack on the WAV Header. My program kind of works, the files even play properly on the X16 where I'm ignoring a bunch of the WAV Header. But I'm missing something important as none of the big boy programs on Linux or Windows recognize my output as a Valid WAV. There are a couple fields in the RIFF/WAV Header I'm not filling in which I'm sure are the problem but I don't know what to put there.
My code is attached and any help is appreciated. Code is meant for Linux and hasn't been ported for Windows yet, ffmpeg must be installed.
Identified one problem. Header.FmtSpecific has to be set equal to 16. But that still doesn't solve all the problems.
PROBLEM FIXED. UPDATED CODE ATTACHED. THIS WORKS TO STRIP METADATA FROM ANY AUDIO FILE AND OUTPUT IT AS A MONO WAV (Easily modified to do Stereo if you desire)