[FFmpeg-user] Convert audio to CSV

Danny Mitchell fishcustard at gmail.com
Fri Jul 5 18:29:13 EEST 2024


On Sun, 30 Jun 2024 at 15:38, Michael Koch <astroelectronic at t-online.de> wrote:
>
> Hi,
>
> is it possible to convert an audio waveform to a CSV list?
> I want to insert 2048 samples of a waveform into the C source code for a
> microcontroller.
>
> Michael
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


I know I'm late to this discussion, and there have been some good
suggestions, so I'll just add this comment. I'd go with octave's
(https://octave.org/) DSP tools and read the audio file into an octave
matrix; it can read wav and aiff files natively (and possibly mp3, but
I haven't used that.) You can then access any particular audio sample
or group of samples, and use octave's version of the C functions
printf or fprintf to write the selected samples to a csv (or any
other) file, in whatever format (int, float, etc) is suitable.


More information about the ffmpeg-user mailing list