[FFmpeg-devel] [PATCH v7 2/3] libavformat: Add DFPWM raw format

Tomas Härdin tjoppen at acc.umu.se
Mon Mar 14 12:24:32 EET 2022


mån 2022-03-14 klockan 10:56 +0100 skrev Paul B Mahol:
> On Mon, Mar 14, 2022 at 10:47 AM Tomas Härdin <tjoppen at acc.umu.se>
> wrote:
> 
> > +static const AVOption dfpwm_options[] = {
> > +    { "sample_rate", "", offsetof(DFPWMAudioDemuxerContext,
> > sample_rate), AV_OPT_TYPE_INT, {.i64 = 48000}, 0, INT_MAX,
> > AV_OPT_FLAG_DECODING_PARAM },
> > +    { "channels",    "", offsetof(DFPWMAudioDemuxerContext,
> > channels),
> > AV_OPT_TYPE_INT, {.i64 = 1}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM
> > },
> > +    { NULL },
> > +};
> > 
> > I think you can set the input sample rate and channel count via the
> > FFmpeg CLI's -ar and -ac options and have them be carried in and
> > out of
> > here
> > 
> 
> I highly doubt that.

You can for other raw formats:

  ffplay -f s16le -ar 8k -ac 1 /dev/urandom

/Tomas



More information about the ffmpeg-devel mailing list