8

FFmpeg 接口使用 - 播放器教程和示例代码

 3 years ago
source link: http://blog.danthought.com/programming/2020/12/26/ffmpeg-api-player-tutorial-examples/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
FFmpeg 接口使用

博客来自于但江的思考,关于编程、设计、商业和生活

FFmpeg 接口使用 - 播放器教程和示例代码

本文介绍学习 FFmpeg 接口使用的相关教程和示例代码,工程师掌握一门技术比较好的方式就是阅读代码和造个小轮子。

Editing Video

播放器教程

An FFmpeg and SDL Tutorial by Stephen Dranger, explains how to write a video player based on FFmpeg.

参照上面的教程编写了一个 视频播放器,是在 CLion 下建立的 C 工程,在 Mac 上已经编译和安装了 FFmpeg 和 SDL,在配置 CMake 的时候费了不少时间,工程中的音频播放有问题,需要进行从 fltp 到 s16 的采样格式转换,教程中的 Tutorial 06: Synching AudioTutorial 07: Seeking 也没有完成,不过还是有不少收获。

FFmpeg 从入门到精通 中介绍的示例代码总结如下:

libavformat

libavcodec

旧接口 < 3.1.3

新接口 > 3.1.3

libavfilter

Filter 的类型

  • Source Filter 没有输入端
  • Sink Filter 没有输出端
  • Filter 既有输入端又有输出端

过滤器使用的示例代码

如果你觉得以上思考对你有帮助,请订阅博客


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK