[FFmpeg-devel] [PATCH] WAV file length (writing to stdout)

Michel Bardiaux mbardiaux
Tue Oct 16 17:49:24 CEST 2007


Cyril B. a ?crit :
> Hi,
> 
> As reported recently on this mailing list [1], ffmpeg sets 0 as file length
> in the WAV header if output is streamed (for instance, when outputting to
> stdout). Nero AAC encoder does not accept such streams ('could not parse
> WAV file' error).
> 
> The WAV file specs [2] say the file length (ChunkSize) must be 36 + data
> length. The included patch writes 36 instead of 0, which satisfies Nero
> encoder.
> 
> I tested with MPlayer, VLC and Xine and they work fine (as before) when
> reading a streamed WAV. The patch has no effect with non-streamed WAV
> outputs as the file length is overwritten in the trailer anyway.
> 
> To reproduce the tests:
>   * ffmpeg -i input.mp3 -f wav > output.wav

Surely not. *Never* re-type the command line, always use copy/paste.

>   * check that mplayer/vlc/xine/nero/... can read output.wav
> 
> [1] http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2007-August/034155.html
> [2] http://ccrma.stanford.edu/courses/422/projects/WaveFormat/

Have you run 'make test'? Maybe some test results changed due to the patch.

-- 
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/




More information about the ffmpeg-devel mailing list