ffmpeg.wasm icon indicating copy to clipboard operation
ffmpeg.wasm copied to clipboard

Could you provide more detailed instructions on building in Docker?

Open Xikee2023 opened this issue 1 year ago • 3 comments

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!

Xikee2023 avatar Aug 02 '24 12:08 Xikee2023

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)

jz1 avatar Aug 07 '24 14:08 jz1

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

Xikee2023 avatar Aug 20 '24 12:08 Xikee2023

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

izogfif avatar Sep 23 '24 09:09 izogfif