-
Notifications
You must be signed in to change notification settings - Fork 183
Building with an alternative libffmpeg #198
Comments
@zcbenz @felixrieseberg @RSATom any advice much appreciated! |
@dcposch, I can invite you to private slack room where you will find guys who did it already for well known torrent related project "which-name-better-not-call-in-public". |
@dcposch, could you send me your email? I'll send you invite. My email is rsatom@gmail.com. |
@feross, btw, I can invite you too, but don't sure if you'll like it. Guys there want get you there long time already... |
@RSATom, I found these patches, in case these are what you mean:
They're off of older versions of Chromium and FFmpeg than what we're using.
Haha, you don't have to censor the name, they're not Voldemort. Their project encourages piracy so I'd rather not work with them. Thanks for the invite though. |
@RSATom I don't think there's even one person that is still working with Voldemort in there now. |
I'm also pretty sure that no one is using a re-built Electron 0.37+ with extended ffmpeg support. Only the Butter guys are using NW.js with extended ffmpeg support if i'm not mistaken, but none do it with Electron atm. |
@dcposch, I've talked more about |
@dcposch To add support for more codecs in Electron, you basically need to do 2 things:
|
Isn't it easier to use the system installed ffmpeg? I do it in my Electron package for Arch Linux by compiling Chromium with a patch from Gentoo. Then you can configure your system ffmpeg as you like. |
@tensor5 if you just used the system installed @RSATom is butter going the route of using a modified |
@hadees the |
On other side |
Hey, has there been any progress on this? I am too trying to get more / most! codecs work in the video tag and as you know this is pretty hard. I have a lot of questions
|
For reference, I asked the maintainers to provide a "full" ffmpeg alongside the "normal" distribution here electron/electron#9534 |
Hey @RSATom long time no A few have compiled nw.js successfully with Have you investigated the usage of Web Chimera as an alternative? |
|
Yeah, I read that (that it's dying), very sad. In the WebChimera issues I found an alternative, but as I read in their issues, this library is also heavy on the CPU, so a "native" playback would still be much better. |
I found there are some work on building chromium from customized ffmpeg henrypp/chromium , so I extend it to libchromiumcontent. ---- update ----- |
@jchwei would you mind to send a PR to electron/libchromiumcontent ? It would be great to have a flag enabling whatever codecs we want from ffmpeg. |
hello, after yearsssssssssssss of nwjs i still can t find a better way for this problem than live transcoding thru http pipe / ffmpeg (if canPlay fail) i still can read any video with not that much cpu (and in 2018 shitty pc have i5 so lol) i ll try to make a basic project with this one day :p, currently i can play ['aiff','ra','mka','webm','aac','wma','mp4','flac','wav','mpeg','opus','avi','flv','wmv','mkv','ogg','mov','ogv']; and hevc/x265... dts ac3 etc etc |
@smolleyes did you manage to make the shuffling work as well ?(i.e. convert byte ranges used by the browser to time ranges used by ffmpeg) |
hi, dammnnn just added the dxva2 support to my ffmpeg command line and it s huge improvement ! now my nwjs app play youtube 4k videos like a breeze :D @themihai you mean seeking ? |
@jchwei is there a chance you can share your codec-enabled binaries? <3 |
hey @LukasBombach everything is in my github... streamstudio is my first project from years ago ... code is a real shit lol but still working, look at the js/ht5server.js (shame on me)... i started a small project from an electron / react boilerplate and i ll just add this system if possible (in clean es6)... when i ll have time |
@smolleyes yeah I mean seeking. |
@themihai i dont have any problems with seeking :), just use the -ss option of ffmpeg |
ok, so I would like to replace the
For building ffmpeg I used this flags in configure:
Do you guys know how to create the desired libffmpeg.so? |
@LukasBombach Here is the windows x64 release . |
If you want to do this the same way Electron does, see the GN build docs. Instead of building the See https://github.com/electron/electron/blob/77f73830e8fea5c5acbb745985732ceff5091fce/.circleci/config.yml#L284 for how we do this in CI. |
Since electron/electron#4530, Electron is using libffmpeg as a shared library (so/dylib/dll).
I'm trying to swap
libffmpeg.so
with one that supports a wider range of codecs, so that I can play back AC3 audio tracks from an Electron app.Currently, the build process for this looks pretty involved
As far as I can tell, you have to modify four separate codebases:
libchromiumcontent
from S3. You can specify your own download URL and a customLIBCHROMIUMCONTENT_COMMIT
libchromiumcontent
.libchromiumcontent
references the Chromium source tree athttps://chromium.googlesource.com/chromium/src.git
, as defined invendor/chromium/.gclient
. I guess you could replace this with your own fork of Chromium.chromium
. Chromium references ffmpeg by once again referring to a git repo, which looks like it's cloned intothird_party/ffmpeg
. You can replace that with your own fork of ffmpeg.ffmpeg
Finally, in your own fork of ffmpeg, you could add a newffmpeg_branding
value. The built-in values are Chrome, Chromium, ChromeOS, and ChromiumOS. I tried adding a fifth one I called CompleteCommonCodecs, which adds support for AC3.Questions
patches
folder here inlibchromiumcontent
?libchromiumcontent
at all, just swapping in a customlibffmpeg.so
into the finished Electron build?The text was updated successfully, but these errors were encountered: