duanyao / codecbox.js

video and audio codecs for javascript based on ffmpeg and asm.js
Other
28 stars 12 forks source link

Unable to build codecBox.js #10

Open JenishaDalin opened 4 years ago

JenishaDalin commented 4 years ago

Hi @duanyao

I had followed your methods to build project as follows.

  1. I have installed emscriptm package in linux

  2. And then i had cloned the project and run npm install

  3. Then i installed grunt npm module globally by using this command npm install grunt -g --save

  4. Then i run command grunt init --force(because it was exited last time when running same command without -- force)

  5. After running above command i got done message with some warning.

  6. Next i executed grunt build command but shows warning in between process and finally it throws error like this

`

Running "exec:configure-x264" (exec) task

Failed with: Error: spawn /bin/sh ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19) at onErrorNT (internal/child_process.js:456:16) at processTicksAndRejections (internal/process/task_queues.js:77:11) { errno: 'ENOENT', code: 'ENOENT', syscall: 'spawn /bin/sh', path: '/bin/sh', spawnargs: [Array], cmd: 'emconfigure ./configure --disable-thread --disable-asm --disable-opencl --host=i686-pc-linux-gnu --disable-cli --enable-shared --disable-gpl --prefix=/home/gokul/testingZone/codecbox.js/build/dist' } Warning: Task "exec:configure-x264" failed. Use --force to continue.

` How to fix the above errors. Kindly provide steps to overcome this issue.

duanyao commented 4 years ago

grunt init mainly clones source repos. If this step reports errors or warnings, some repos may not have been cloned properly. Check whether build/x264 dir exists and contains x264 source codes. If not, running grunt init --force again may help.

The error you saw is due to changed x264 repo url. Edit Gruntfile.js, change to 'git://git.videolan.org/x264.git' to 'https://code.videolan.org/videolan/x264.git'.

JenishaDalin commented 4 years ago

Hi @duanyao ,

Thanks for reply,

After the above given correction the command was executed successfully.Now grunt build-ffmpeg command completed without errors.but if i run grunt build-codecbox command was aborted due to warnings as shown below.

image

Kindly provide steps to overcome this issue.

duanyao commented 4 years ago

The error in grunt build-codecbox is due to emcc changes. I updated my codes to align with current emscripten, ffmpeg, etc., see c31de35d32cc9e3f01dd577b3c27df7f24e599ed.

JenishaDalin commented 4 years ago

The error in grunt build-codecbox is due to emcc changes. I updated my codes to align with current emscripten, ffmpeg, etc., see c31de35.

@duanyao Thanks Much ! I am able to produce codecbox.js without any errors, Further below Changes is what helped me to integrate my project Successfully

https://github.com/duanyao/codecbox.js/blob/c31de35d32cc9e3f01dd577b3c27df7f24e599ed/src/codecbox-decoder-worker.js#L12