How to packet encoded AAC data to flv file with ff

2019-08-12 03:39发布

问题:

I have captured the Audio data from Android Microphone and encoded them by MediaCodec.

My question is:

How to packet encoded AAC data to flv with ffmpeg ?

回答1:

If you only want to packet audio into flv :

ffmpeg -i input.aac -c copy out.flv

If you have a video track to go with :

ffmpeg -i input.mp4 -i input.aac -c copy out.flv