-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Support more audio and video codecs #1389
Comments
@MathieuDebit Any ideas how they support the AC3 audio codec? Are they running |
@feross I'm not really sure as the codebase goes beyond my skills, but Butter is still using NW.js, and it seems that there is a way to enable prioritary codecs by compiling sources with FFMPEG:
|
@feross as you said here #350 (comment), I guess the best solution would be to build Electron with a custom FFmpeg, did you already explore this approach?
Sources: |
Yep, we did at one point in time but abandoned it because it complicated the build process too much and the legal situation was unclear. I think things have gotten better on both fronts, so happy to explore this in future versions of WD. If anyone else has the interest/skill to tackle this before then, go for it! |
So the idea is to replace the ffmpeg library in Electron with our own one. Thankfully projects like ffbinaries or ffmpeg-static allow us to get the latest binaries for all platforms. But I don't know how to tell Electron to use these binaries instead... 🚶 Also it could change the build process, will we need a CI or something like electron-builder? |
Sorry if all of this seems obvious for some of you, but as I'm still learning in that field, I prefer write everything down to be sure the most noob of us will be able to follow 😛 So here is two approaches I've found to support more codecs in Electron with FFmpeg:
I'm digging into the first solution, which is the cleanest, but surely the hardest path 🚣♀️ |
@MathieuDebit Thanks for sharing your progress. At one point, I believe the Electron team was producing builds of |
This comment has been minimized.
This comment has been minimized.
Hi @paxter, unfortunately I wasn't able to build Electron with a custom FFmpeg version, because custom builds of Electron and libchromiumcontent are not easy (at least for me 🤷♂️) and Electron team does not share their build process... |
Missing codec support can be a bit annoying because using an external player is a little shaky if the file is still downloading. Right now the error message looks like:
|
Shouldn't the player use external codecs installed on the OS? I get this error all the time. Also, shouldn't Webtorrent try to play the video with the default video player from that OS instead of always suggesting to use VLC? Many people don't use VLC and are then faced with installing a new video player. Would be simpler to have the video directly open in the default video player if a codec error is encountered. |
https://gist.github.com/wellington1993/fbc4af44951da0aeb499a02cac8a9f14 Audio #1 |
I fount that project: https://github.com/DanielHuisman/ac3.js/ The same info found in "Totem" player: AC-3 (ATSC A/52) maybe it will help, since we are talking about two projects with the same technology. |
Hello! Do we have any updates on this? Can we check this out https://github.com/Muril-o/electron-chromium-codecs I tried this but faced some issues while building it while also referring to the official build guide. Kindly share if anyone has updates on this? Also if HEVC has some legal concerns can't we just add AC3 since its patent is expired? |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? |
FYI Electron now supports HEVC playback when hardware decoder is available. see discussion mifi/lossless-cut#88 |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? |
What version of WebTorrent Desktop? (See the 'About WebTorrent' menu)
Version 0.20.0 (0.99.3)
What operating system and version?
Windows, MacOS and Linux
Support more codecs
I'd like to discuss about ways to support more audio and video codecs in Webtorrent Desktop. Considering the choosen technology (Electron/Javascript), there are different solutions available (FFMPEG.js, WebAssembly, plugins, etc), but I suppose the more relevant comes from Butter Project.
Butter Desktop currently supports native decoding for a lot of audio and video codecs (see supporting codecs). I tried to dive into the code, I'm not sure about it but they seem to use video.js with a set of addons and custom implementations.
In the end, Butter Desktop is an app built upon similar web technologies, but supports all the audio and video codecs needed.
What do you think about it? Do you think we could be helped by the current Butter Desktop codebase to support more codecs in Webtorrent Desktop?
Thanks a lot 🙏
The text was updated successfully, but these errors were encountered: