FFmpeg tips for FLAC and WAV
- covert flac to pcm with 24 bits resolution
ffmpeg -i a.flac -c:a pcm_s24le a.wav
- separate stereo wav to the left and right channel with 24 bits resolution
./ffmpeg -i 2L-45_stereo_01_FLAC_88k_24b.wav -c:a pcm_s24le -map_channel 0.0.0 2L-45_stereo_01_FLAC_88k_24b_left.wav -c:a pcm_s24le -map_channel 0.0.1 2L-45_stereo_01_FLAC_88k_24b_right.wav
- convert mono wav to mono flac
.\ffmpeg.exe -i .\2L-139_stereo_FLAC_88k_24b_01_Right.wav .\2L-139_stereo_FLAC_88k_24b_01_Right.flac
- generate FLAC waveform, stereo
ffmpeg -i .\2L-45_stereo_01_FLAC_88k_24b.flac -filter_complex "showwavespic=s=1920x720:split_channels=1" -frames:v 1 .\2L-45_stereo_01_FLAC_88k_24b.png
- generate FLAC waveform, mono
ffmpeg -i .\2L-139_stereo_FLAC_88k_24b_01_Right.flac -filter_complex "showwavespic=s=1920x360" -frames:v 1 .\2L-139_stereo_FLAC_88k_24b_01_Right.png
- FLAC spec format
- Online hex editor
- mediainfo on MacBook to obtain media information, using brew install mediainfo for installation.
updated on NOV 28, 2021
- ffmpeg builds spectrum picture for audio files, reference https:// ffmpeg.org/ffmpeg-filte rs.html#toc-showspectrumpic
ffmpeg -i inputfile.mp3 -lavfi showspectrumpic=s=800x400:mode=separate spectrogram.png
编辑于 2021-11-28 11:07