[Libav-user] modified muxing.c demo - want to encode lossless .mp4

Paul B Mahol onemda at gmail.com
Wed Jan 20 13:39:57 CET 2016

On 1/20/16, Stephane Poirier <stephane.poirier at oifii.org> wrote:
> Hi All,
> I am new to ffmpeg library and modified muxing.c demo (written by
> Fabrice Bellard) so I gather audio from a file using libsndfile and
> create frames (based on audio) in AV_PIX_FMT_RGB24 format. It currently
> encode the stream pix format with AV_PIX_FMT_YUV420P.
> Here's my code:
> http://www.oifii.org/ns-org/nsd/ar/cp/audio_spi/spiffmpegmuxingspectrum_qt2016/spiffmpegmuxingspectrum_qt2016.c

Why are you not using av_fft for FFT and libavformat for processing sound files?

By the way ffmpeg can already encode losslessly audio spectrum.

> My question is: How can I encode lossless .mp4? Do I have to change the
> stream pix format to AV_PIX_FMT_RGB24? Do I have to install a codec that
> support that pix format?

Using lossless video encoder which support RGB24.
For .mp4 I think only lossless mode from h264 codec is possible.

More information about the Libav-user mailing list