Click here to Skip to main content
15,891,889 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi There

I want to encode audio using FFMPEG, but the problem is the nb_samples of the AVFrame is 22050 but the frame_size of the encoder is 1152. So how can I use avcodec_encode_audio2 function with this. Does anyone have an example of a way to do this?

Thanks in advance.
Posted
Updated 7-Jun-18 9:34am
Comments
KarstenK 24-Jun-14 2:06am    
the question is a special ffmpeg issue. Try there

1 solution

You need to use a buffer, like a FIFO. See here:
FFmpeg/transcode_aac.c at master · FFmpeg/FFmpeg · GitHub[^]
 
Share this answer
 
Comments
Dave Kreskowiak 7-Jun-18 16:35pm    
FOUR YEAR OLD question. The question should have been directed to a FFMPEG forum.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900