On 2014-04-24 12:33:43 +0200, Niels Möller wrote:
> Janne Grunau <[email protected]> writes:
> 
> > the raw audio muxer have separate names for the sample formats.
> >
> > -f f32le $FILE at the end of the command will output little endian float
> > samples.
> 
> Nice, -f s24le seems to work too. But if I also want a proper .au (or
> .wav) header, I'll have to add that myself (e.g, using sox should work,
> I guess)?

for wav or au you have to override the audio codec to pcm_f32le,
i.e. -i $INFILE -c:a pcm_f32le OUT.wav

See avconv -codecs | grep ' pcm_' for all sample format specific codecs.
 
> > Or you could add an upsample to 96kHz filter, avconv should be smart 
> > enough not to use it when the sampling rate changes to 96kHz.
> 
> Is that -filter 'aformat=sample_rates=96000' ? Gives me an interesting
> error, though...

yes, works here as expected with a random non dts / non-96kHz sample

>   $ ./avconv -i Master\ Audio\ 5.0\ 96khz.dts -y -filter 
>   'aformat=sample_rates=96000' out.wav
>   avconv version v10_alpha2-146-g274f5c9, Copyright (c) 2000-2014 the Libav 
> developers
>     built on Apr 24 2014 10:16:35 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu9)
>   [dca @ 0x23aa0c0] DCA XLL: number of xll samples (1024) != number of core 
> samples (512)
>     resampling required.
>   [dts @ 0x2399080] max_analyze_duration reached
>   [dts @ 0x2399080] Estimating duration from bitrate, this may be inaccurate
>   Input #0, dts, from '/data/nisse/libav-dev-shared/Master Audio 5.0 
> 96khz.dts':
>     Duration: 00:00:27.30, start: 0.000000, bitrate: 1535 kb/s
>       Stream #0.0: Audio: dca (DTS-HD MA), 48000 Hz, 5.0, fltp, 1536 kb/s
>   Output #0, wav, to 'out.wav':
>     Metadata:
>       ISFT            : Lavf55.12.0
>       Stream #0.0: Audio: pcm_s16le, 96000 Hz, 5.0, s16, 7680 kb/s
>   Stream mapping:
>     Stream #0:0 -> #0:0 (dca -> pcm_s16le)
>   Press ctrl-c to stop encoding
>   [dca @ 0x23aa0c0] DCA XLL: number of xll samples (1024) != number of core 
> samples (512)
>     resampling required.
>   Input stream #0:0 frame changed from rate:48000 fmt:fltp ch:5 chl:5.0 to 
> rate:96000 fmt:fltp ch:5 chl:5.0
>   *** Error in `./avconv': corrupted double-linked list: 0x00000000023ad2e0 
> ***
>   ^C

interesting, can you check if that happens with -ar 96000 too? a run with 
'-v verbose' might be interesting too. I guess the audio filter can't handle
changes and avconv doesn't reconfigures it on sample rate changes

> BTW, what would it take to enable wav output in other sample formats,
> configured via -sample_fmt or -filter aformat=sample_fmts=...? I notice
> that ff_codec_wav_tags (definied in libavformat/riff.c) includes a tag
> for, e.g, AV_CODEC_ID_PCM_S24LE, but I don't understand how it fits
> together.

see above

Janne
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to