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

Could you provide more detailed instructions on building in Docker? #771

Open
Xikee2023 opened this issue Aug 2, 2024 · 3 comments
Open

Comments

@Xikee2023
Copy link

This is a great library. Although its video encoding conversion functionality is not yet suitable for production use (it's too slow), it is excellent for video packaging and unpackaging if encoding conversion is not needed. In my use case, I only need to package MP4, so I need to rebuild a smaller wasm file. However, I encountered issues building through Docker (I am not familiar with Docker). I read this documentation: https://ffmpegwasm.netlify.app/docs/contribution/core, and my understanding is to set up the environment through Docker and then enter Docker to run "make dev."

Below are my build steps and the issues I encountered. Could you guys give me some suggestions for my work?

  1. System Environment: Windows 11, Docker version: 26.1.4, Command-line tool: Windows PowerShell.
  2. Using Windows PowerShell, run git clone https://github.com/ffmpegwasm/ffmpeg.wasm.git.
  3. After cloning, navigate to the ffmpeg.wasm directory using the command line.
  4. Build the Docker image with this command: docker build -t ffmpeg.wasm .
  5. The problem arises here: After the Docker image is successfully built, how do I enter the Docker environment to run the "make dev" command? Here is a screenshot after I completed building the Docker image:
    QQ截图20240802200608

I tried docker run -it --entrypoint sh ffmpeg.wasm and docker run ffmpeg.wasm, but neither allowed me to enter the Docker environment smoothly. Are there any mistakes in my steps? Please provide suggestions, and thank you!

@jz1
Copy link

jz1 commented Aug 7, 2024

Mayby not the answer you looking for.
But i couldn't manage to get it working on windows docker also and gave up on that.

In the end i compiled with docker using ubuntu, (using Hyper-V to quickly deploy a VM of ubuntu LTS, just make sure you do Ubuntu 20.04 not 22.04 that one has some problems with xrdp)

@Xikee2023
Copy link
Author

Mayby not the answer you looking for. But i couldn't manage to get it working on windows docker also and gave up on that.

In the end i compiled with docker using ubuntu, (using Hyper-V to quickly deploy a VM of ubuntu LTS, just make sure you do Ubuntu 20.04 not 22.04 that one has some problems with xrdp)

According to your suggestion, I successfully compiled the wasm file to about 1MB, thank you brother! I also thank the awesome Jerome Wu for providing this library

@izogfif
Copy link

izogfif commented Sep 23, 2024

It's possible to build it on Windows:

  • Install Git for Windows. It comes with Git Bash.
  • Install make for Windows.
  • Start Git Bash.
  • Run make prd

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

3 participants