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

Can't fix/skip the ffmpeg codec problem #11822

Closed
ouliuquan opened this issue Nov 2, 2022 · 6 comments
Closed

Can't fix/skip the ffmpeg codec problem #11822

ouliuquan opened this issue Nov 2, 2022 · 6 comments
Labels
electron issues related to the electron target ffmpeg issues related to ffmpeg

Comments

@ouliuquan
Copy link

Bug Description:

I try to use the THEIA_ELECTRON_SKIP_REPLACE_FFMPEG=1 yarn to avoid download/replace ffmpeg module, but it doesn't work.
Can we set the ffmpeg option default to false/0? This real confused newcomer.

Steps to Reproduce:

  1. git clone https://github.com/eclipse-theia/theia-blueprint.git
  2. THEIA_ELECTRON_SKIP_REPLACE_FFMPEG=1 yarn

Error log:

theia-blueprint: ✔ Rebuild Complete
theia-blueprint: $ theia build
theia-blueprint: Found cached ffmpeg library.
theia-blueprint: Successfully replaced "/home/user/theia-blueprint/node_modules/electron/dist/libffmpeg.so".
theia-blueprint: "/home/user/theia-blueprint/node_modules/electron/dist/libffmpeg.so" does not contain proprietary codecs (16 found).
theia-blueprint: Failed to resolve module: @types/yargs
theia-blueprint: Failed to resolve module: msgpackr
theia-blueprint: Failed to resolve module: socket.io
theia-blueprint: Failed to resolve module: luxon
theia-blueprint: Failed to resolve module: filenamify
theia-blueprint: assets by status 237 KiB [cached] 2 assets

Additional Information

  • Operating System:Debian 11 (Google Cloud Code)
  • Theia Version:1.30/1.31
@vince-fugnitto vince-fugnitto added electron issues related to the electron target ffmpeg issues related to ffmpeg labels Nov 2, 2022
@vince-fugnitto
Copy link
Member

@ouliuquan I don't believe that THEIA_ELECTRON_SKIP_REPLACE_FFMPEG is being used anywhere anymore.

Can we set the ffmpeg option default to false/0? This real confused newcomer.

The replace and check should happen by default since we do not want to include proprietary codecs (something the Eclipse Foundation also requires of the project), but we should likely bring back the option to skip if needed. I can't remember why we decided on removing the functionality when we upgraded Electron (#9936).

cc @paul-marechal

@ouliuquan
Copy link
Author

@vince-fugnitto Thanks for that, I am studying this framework, hope we can make theia better. And if we do replace codec, we can do it better without error, or just skip the check.

@vince-fugnitto
Copy link
Member

@vince-fugnitto Thanks for that, I am studying this framework, hope we can make theia better. And if we do replace codec, we can do it better without error, or just skip the check.

@ouliuquan by the way, there does not seem to be errors in your output, least of which from the replace and check of ffmpeg:

heia-blueprint: Found cached ffmpeg library.
theia-blueprint: Successfully replaced "/home/user/theia-blueprint/node_modules/electron/dist/libffmpeg.so".
theia-blueprint: "/home/user/theia-blueprint/node_modules/electron/dist/libffmpeg.so" does not contain proprietary codecs (16 found).

We can see from the output that the replacement worked (used cached version likely since you already did the replacement earlier), and that the check passes as no proprietary codecs are found.

If you are referring to these warnings, they do not affect the build and are unrelated to ffmpeg:

theia-blueprint: Failed to resolve module: @types/yargs
theia-blueprint: Failed to resolve module: msgpackr
theia-blueprint: Failed to resolve module: socket.io
theia-blueprint: Failed to resolve module: luxon

As you can tell the build is still successful which would otherwise not be possible if they were actual errors.

@ouliuquan
Copy link
Author

@vince-fugnitto I know that had been replaced.
Also if someone don't want to replace this ffmpeg codec, there is no way to do. All THEIA_ELECTRON_SKIP_REPLACE_FFMPEG=1 doesn't work right now. Is there any way to fix this?

@vince-fugnitto
Copy link
Member

All THEIA_ELECTRON_SKIP_REPLACE_FFMPEG=1 doesn't work right now. Is there any way to fix this?

@ouliuquan I don't know any strong reasons to skip replacing the proprietary codecs for legal reasons, but I assume the flag would need to be re-added, or you can customize how the electron is prepared by inspiring yourself from application-package-manager.ts.

@ouliuquan
Copy link
Author

@vince-fugnitto Thanks for your advise, I know how to do what I want now. By removing the code will skip ffmpeg codec check:

        const ffmpeg = await import('@theia/ffmpeg');
        await ffmpeg.replaceFfmpeg();
        await ffmpeg.checkFfmpeg();

This issue will be closed soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
electron issues related to the electron target ffmpeg issues related to ffmpeg
Projects
None yet
Development

No branches or pull requests

2 participants