Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用 gomedia 疑问 #2

Closed
dryyun opened this issue Jul 17, 2022 · 2 comments
Closed

使用 gomedia 疑问 #2

dryyun opened this issue Jul 17, 2022 · 2 comments

Comments

@dryyun
Copy link

dryyun commented Jul 17, 2022

使用 gomedia 代替 ffmepg 进行 ts files 转换 mp4 的原因是什么?
有什么好处?性能更快,速度更快?
基于什么考虑?

@orestonce
Copy link
Owner

orestonce commented Jul 17, 2022

引入ffmpeg很麻烦, 原因列表:

  1. ffmpeg开源协议是 GPL的,具有传染性, 这个项目的主要逻辑就不能使用 MIT 开源了
  2. 如果使用cgo调用的形式引入ffmpeg
    • 最终二进制体积特别大
    • 编译mac/linux/路由器 版本的时候必然要依赖对应的跨平台编译器, 编译难度提升
  3. 如果使用内嵌 静态编译的ffmpeg二进制, 使用的时候释放到 临时目录再调用命令行
    • 最终二进制体积会更大, 可以看以前的v1.1版本 , 每个最终二进制都比现在大25MB左右
    • 没找到mipsle路由器版本的静态编译的ffmpeg
  4. 如果直接调用ffmpeg命令, 必定依赖于用户必须首先安装ffmpeg到操作系统, 难用

  • 这样引入MIT协议的gomedia解决ts转换成mp4好处就很明显了
  1. 跨平台编译容易
  2. 我的项目也可以使用MIT协议进行开源
  3. 最终二进制体积特别小, linux/mac 版本的命令行版本才 5-7MB, windows由于有静态编译进来的qt界面, 现在体积有26MB
  4. 用户无需预先安装ffmpeg, 降低用户的使用难度

@orestonce
Copy link
Owner

  • 对于ts转换为mp4的速度, 我并没有过多考虑, 只要不是很明显的性能差异, 能转出来就行

@dryyun dryyun closed this as completed Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants