[FFmpeg-user] Equivalent of "-f rawvideo" but for audio?

Carl Eugen Hoyos ceffmpeg at gmail.com
Mon Jul 1 23:50:06 EEST 2019


Am Mo., 1. Juli 2019 um 22:25 Uhr schrieb Dave Rice <dave at dericed.com>:
>
>
> > On Jun 25, 2019, at 7:22 PM, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
> >
> > Am Mi., 26. Juni 2019 um 00:11 Uhr schrieb Peter B. <pb at das-werkstatt.com>:
> >
> >> Is it possible somehow to transcode any source audio format type to its
> >> raw, uncompressed format that matches the source?
> >>
> >> I'm dealing with collections of mixed input format combinations, and am
> >> trying to find a way to bash-automate something.
> >>
> >>
> >> For video "-f rawvideo" seems to do the trick.
> >> But according to the "audio types" documentation [1] it seems I have to
> >> know define the (and therefore already know) the format.
> >>
> >> So, instead of specifying "-f s16le" or "-f s24le", is there something
> >> like "-f rawaudio"?
> >
> > Yes, there is a muxer that happily accepts audio and writes
> > it to a file (unchanged), it is the "rawvideo" muxer.
> > (Use -map)
> >
> > Not all audio formats are playable in rawvideo format
> > (just as not all video formats are)
>
> There’s still a mismatch here. With the framehash muxer, the video is
> converted to rawvideo,

Which may or may not be bit-exact, so using -vcodec copy is often useful.

> but with audio it is converted to a specific signed 16 bit audio format.

Only if you want it to.
(Yes, default encoders are usually defined but you don't have to use them,
just as with video in the rawvideo muxer)

> Thus lesser significant bits in video impact the framehash output but in
> audio, bit positions >16 don’t have any impact.

The same issue can exist with video.
(Apart from the fact that typically there is no "position >16 bit" for audio,
there are just coefficients, while it often exists for video)

> At the moment ffmpeg doesn’t appear to have an audio equivalent
> for the rawvideo format.

The rawvideo muxer accepts both audio and video without any
lmitation (apart from the usability of the output file which again is a
limitation for both audio and video).

Carl Eugen


More information about the ffmpeg-user mailing list