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

Bundling ffmpeg #3

Closed
zeke opened this issue Oct 31, 2016 · 6 comments
Closed

Bundling ffmpeg #3

zeke opened this issue Oct 31, 2016 · 6 comments

Comments

@zeke
Copy link

zeke commented Oct 31, 2016

I have no idea what I'm doing™, but I see that the team that built Kap was able to vendor ffmpeg in their app:

https://github.com/wulkano/kap/search?utf8=%E2%9C%93&q=ffmpeg

It would be pretty nice for users not to have to set this up.

@mifi
Copy link
Owner

mifi commented Nov 1, 2016

I'll look into it when i hvave the time

@zeke
Copy link
Author

zeke commented Nov 1, 2016

Cool. Supposedly there's a version of ffmpeg bundled with Electron itself, though the documentation on that is sparse. I hope to dig into this soon and produce some documentation around using it. If you get to it first, please let me know!

@mifi
Copy link
Owner

mifi commented Nov 3, 2016

The included ffmpeg version might not be recent enough and have all the features needed for muxing/demuxing/cutting etc. Also it's only the lib, not the ffmpeg CLI. So node native bindings are required, which complicates things.
It might also be possible to use something like node-ffi for calling the linked in ffmpeg libraries. However I'm afraid we'll have to rewrite alot of the logic that ffmpeg CLI already handles, and also risk crashing the whole node process if ffmpeg crashes.

https://github.com/node-ffi/node-ffi

http://qiita.com/kjunichi/items/8c1955c6bc2013b636a3

libavformatもnodeも64ビットな環境で動かしてみたら、
Segmentation fault: 11 😂

@mifi
Copy link
Owner

mifi commented Nov 5, 2016

ffmpeg is now bundled in as of 1.2.0.

@mifi mifi closed this as completed Nov 5, 2016
@zeke
Copy link
Author

zeke commented Nov 6, 2016

Nice! Any thoughts on the process you went through?

Did you follow the same technique the Kap team used?

I notice a bunch of different source hosts:

ffmpeg_linux_ia32=https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-32bit-static.tar.xz
ffmpeg_linux_x64=https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz
ffmpeg_darwin_x64=http://evermeet.cx/ffmpeg/ffmpeg-3.2.7z
ffmpeg_win32_ia32=https://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-3.1.5-win32-static.zip
ffmpeg_win32_x64=https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-3.1.5-win64-static.zip
ffprobe_darwin_x64=http://evermeet.cx/ffmpeg/ffprobe-3.2.7z

How did you compile this list?

@mifi
Copy link
Owner

mifi commented Nov 6, 2016

I used pretty much the same technique, yes.
So basically when building it just copies ffmpeg/ffplay (for the corresponding platform/arch) into the package output directory. Also exclude this dir from the asar-package or I don't think it would work.
I made this list from the official download links from www.ffmpeg.org

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