Hi,
I wasn't able to set audio sample format using av_opt_set functions. It
seems it is not available in libavcodec/options_table.h.
As an example I used encode_audio.c
---
av_opt_set_int (c, "ab", 64000, 0);
av_opt_set_int (c, "ac", av_get_channel_layout_nb_channels
(c->channel_layout), 0);
av_opt_set_int (c, "ar", select_sample_rate (codec), 0);
av_opt_set_int (c, "channel_layout", AV_CH_LAYOUT_STEREO, 0);
#if 0
// error: Specified sample format -1 is invalid or not supported
av_opt_set_sample_fmt (c, "sample_fmt", AV_SAMPLE_FMT_S16, 0);
#else
// no error
c->sample_fmt = AV_SAMPLE_FMT_S16;
#endif
---
Is it possible to set sample format using av_opt_set* functions?
_______________________________________________
Libav-user mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/libav-user
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".