| | 29 | == libavcodec == |
| | 30 | |
| | 31 | Determining the right values to pass to AVCodecContext: |
| | 32 | |
| | 33 | One user [https://lists.ffmpeg.org/pipermail/ffmpeg-user/2012-June/007410.html shared] this advice for determining all the correct values: |
| | 34 | |
| | 35 | [An] approach to figuring this out is: |
| | 36 | |
| | 37 | 1. come up with the ffmpeg app command line which does what you want |
| | 38 | |
| | 39 | 2. use the gdb debugger to execute the ffmpeg_g app, put a breakpoint on avcodec_encode_audio2() (or whichever method you need), and see what values the ffmpeg app uses for AVPacket and for the (audio or otherwise) related fields in AVCodecContext. |
| | 40 | |