[Libav-user] Writing Audio AVPacket without resampling

sebastian.wichmann at karlsruhe-it-solutions.com sebastian.wichmann at karlsruhe-it-solutions.com
Mon Mar 30 11:22:48 EEST 2020

I'm sorry for the late response.

> > The command looks like this:
> > ffmpeg -f gdigrab -framerate 30 -i desktop -f dshow -i audio="Mikrofon 
> > (Realtek High Definition Audio)" test.mp4

> This command is (very often!) reading a frame from memory, converting its colour space,
> encoding the frame on the cpu and writing the encoded frame to disk.
At the moment this part is working more or less like a charm. So I'm not worrying at the moment.

> The tiny (tiny, tiny) bit of work for resampling s16 to fltp and encoding it into aac is ridiculous in comparison.
> If you want to spare the time for resampling (and audioencoding) you can use pcm_s16be as encoder,
> this makes the output file bigger and puts a little more pressure on I/O.
> It might not be easy to measure the difference though;-)
Another big problem is that this part isn't working at all. I mean that I'm not able to write any audio in an empty mp4 file. But this isn't part of this question.
So I think I will open another one for this problem.

> Unrelated: You are using yuv444p as colour space for your h264 encoding, this colour space cannot be played back
> unless your player is FFmpeg-based.
Thanks for this information!

Sebastian Wichmann

More information about the Libav-user mailing list