Conversion WAV -> FLAC and FLAC -> WAV shortens file
Posted: 18 Jul 2023 22:00
Hello,
I have recently reinstalled VLC media player and have discovered a problem (which may be a more serious bug).
As both WAV and FLAC are lossless codecs which store their data as PCM, the conversion from WAV to FLAC to WAV should produce an identical file (except for metadata).
However when I convert a WAV file with VLC into FLAC and then back into a WAV file, its file size decreases.
This is consistent across multiple iterations.
In fact I have set up a script with which I converted a 10sec WAV file repeatedly into FLAC and then back into WAV.
And indeed after 200 iterations the original 10sec audio file had been reduced to 0KB in size.
I would like to know whether this problem happens for other people too (which would likely make it a bug) or whether I did something wrong.
Here are my current specs:
VLC media player 3.0.18 Vetinari
Windows 10 Pro 22H2
The script which I used to convert WAV -> FLAC -> WAV ran these two commands repeatedly:
(if you need other specs or more information, please let me know)
I have recently reinstalled VLC media player and have discovered a problem (which may be a more serious bug).
As both WAV and FLAC are lossless codecs which store their data as PCM, the conversion from WAV to FLAC to WAV should produce an identical file (except for metadata).
However when I convert a WAV file with VLC into FLAC and then back into a WAV file, its file size decreases.
This is consistent across multiple iterations.
In fact I have set up a script with which I converted a 10sec WAV file repeatedly into FLAC and then back into WAV.
And indeed after 200 iterations the original 10sec audio file had been reduced to 0KB in size.
I would like to know whether this problem happens for other people too (which would likely make it a bug) or whether I did something wrong.
Here are my current specs:
VLC media player 3.0.18 Vetinari
Windows 10 Pro 22H2
The script which I used to convert WAV -> FLAC -> WAV ran these two commands repeatedly:
Code: Select all
vlc -I dummy wav.wav ":sout=#transcode{acodec=flac}:std{dst=flac.flac,mux=raw,access=file}" vlc://quit
vlc -I dummy flac.flac ":sout=#transcode{acodec=s16l}:std{access=file,mux=wav,dst='wav.wav'}" vlc://quit