ffmpegwasm / ffmpeg.wasm

FFmpeg for browser, powered by WebAssembly
https://ffmpegwasm.netlify.app
MIT License
14.07k stars 820 forks source link

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

Open Xikee2023 opened 1 month ago

Xikee2023 commented 1 month ago

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 commented 1 month ago

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 commented 3 weeks ago

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