[Libav-user] [PATCH] New API usage example (reading, converting, encoding and muxing an audio file)

Paolo Prete p4olo_prete at yahoo.it
Mon Jun 6 18:38:55 EEST 2022


Hello,
>From what I see, the doc/examples files can be still improved. More precisely, their main() is often split into functions with short names that hide important (sometime essential) details of what they're doing and they worsen the readability, by forcing the user to jump from chunks to chunks of the code. See for example: muxing.c (and the open_audio/video(), write_audio/video_frame()...) In addition: they are hard to adapt to practical cases without doing big modifications.Please consider to review/push the example I provide with this email (as a patch for the dev branch, and as a separate file which can be compiled from 5.0 version): convert_encode_mux_audio.cIt is deliberately written in a more "procedural" way, it should be much easier to read and it covers all the basic steps (reading from file, converting, encoding, muxing) of a common and practical pipeline made with ffMPEG.
Hope it helps.
P

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20220606/19bfdb22/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Added-a-complete-example-with-clear-well-readable-an.patch
Type: text/x-patch
Size: 20475 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20220606/19bfdb22/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: convert_encode_mux_audio.c
Type: text/x-csrc
Size: 14474 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20220606/19bfdb22/attachment.c>


More information about the Libav-user mailing list