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

Add a darwin-arm64 build? #15

Open
paulirish opened this issue Dec 31, 2023 · 5 comments
Open

Add a darwin-arm64 build? #15

paulirish opened this issue Dec 31, 2023 · 5 comments

Comments

@paulirish
Copy link

I tried installing this on my recentish macbookpro and the install error mentions a missing prebuild binary.

And FWIW the build fallback failed like so:

1306 error gyp info find Python using Python version 3.9.6 found at "/Applications/Xcode.app/Contents/Developer/usr/bin/python3"
1306 error gyp info spawn /Applications/Xcode.app/Contents/Developer/usr/bin/python3
1306 error gyp info spawn args [
1306 error gyp info spawn args '/Users/paulirish/homebrew/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
1306 error gyp info spawn args 'binding.gyp',
1306 error gyp info spawn args '-f',
1306 error gyp info spawn args 'make',
1306 error gyp info spawn args '-I',
1306 error gyp info spawn args '/Users/paulirish/code/temp/beamcoder/node_modules/@mmomtchev/ffmpeg/build/config.gypi',
1306 error gyp info spawn args '-I',
1306 error gyp info spawn args '/Users/paulirish/homebrew/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
1306 error gyp info spawn args '-I',
1306 error gyp info spawn args '/Users/paulirish/Library/Caches/node-gyp/21.2.0/include/node/common.gypi',
1306 error gyp info spawn args '-Dlibrary=shared_library',
1306 error gyp info spawn args '-Dvisibility=default',
1306 error gyp info spawn args '-Dnode_root_dir=/Users/paulirish/Library/Caches/node-gyp/21.2.0',
1306 error gyp info spawn args '-Dnode_gyp_dir=/Users/paulirish/homebrew/lib/node_modules/npm/node_modules/node-gyp',
1306 error gyp info spawn args '-Dnode_lib_file=/Users/paulirish/Library/Caches/node-gyp/21.2.0/<(target_arch)/node.lib',
1306 error gyp info spawn args '-Dmodule_root_dir=/Users/paulirish/code/temp/beamcoder/node_modules/@mmomtchev/ffmpeg',
1306 error gyp info spawn args '-Dnode_engine=v8',
1306 error gyp info spawn args '--depth=.',
1306 error gyp info spawn args '--no-parallel',
1306 error gyp info spawn args '--generator-output',
1306 error gyp info spawn args 'build',
1306 error gyp info spawn args '-Goutput_dir=.'
1306 error gyp info spawn args ]
1306 error gyp: deps/avcpp.gyp not found (cwd: /Users/paulirish/code/temp/beamcoder/node_modules/@mmomtchev/ffmpeg) while loading dependencies of binding.gyp while trying to load binding.gyp
1306 error gyp ERR! configure error 

No biggie if you don't want to deal with this. I'm just poking around trying to find an ffmpeg package that can consume a buffer and output multiple buffers...
Beamcoder looked kinda promising but failed install for similar reasons.. Regardless your API here does seem rather attractive. :)

@mmomtchev
Copy link
Owner

As you may have seen from my profile, I am currently unemployed because of an extortion involving the French police and the French judiciary as well as may ex-employers. I do not have access to a Macbook M1 and previously people close to the extortion have simultaneously posted such issues while I have been proposed a Macbook M1.

I am sorry to be blunt, but since this project has exactly 0 stars and it is still not even feature-complete, I will dare to ask you if you are close to this extortion or not?

@mmomtchev
Copy link
Owner

Just for the sake of the record, because I have been offered a Macbook M1 once again - I would like to state that I will accept it and I will port my software to it - but I will never accept any other conditions attached to it.

Just to make it clear once again.

@mateuszmazurek
Copy link

@mmomtchev bro, this package looks awesome, but I couldn't use it.... 😂

... until now.

@paulirish I've just compiled it for Apple Silicon; tomorrow, I'll try to use it, and if everything goes well, I can provide the darwin-arm64 binary so @mmomtchev can upload it.

@mateuszmazurek
Copy link

Looks like it works, but 5 out of 23 tests failed.

> @mmomtchev/ffmpeg@1.0.0 test
> npx mocha

ok 1 require as CJS
ok 2 produce a video from stills
ok 3 import as ES6
not ok 4 extract a still
  node: no decode delegate for this image format `JPEG' @ error/constitute.c/ReadImage/746
  Error: node: no decode delegate for this image format `JPEG' @ error/constitute.c/ReadImage/746
      at VideoDecoder.extract (test/extract.test.ts:46:29)
      at VideoDecoder.emit (node:events:514:28)
      at VideoDecoder.emit (node:domain:488:12)
      at addChunk (node:internal/streams/readable:376:12)
      at readableAddChunk (node:internal/streams/readable:349:9)
      at VideoDecoder.Readable.push (node:internal/streams/readable:286:10)
      at VideoDecoder.<anonymous> (src/lib/VideoDecoder.ts:58:14)
      at Generator.next (<anonymous>)
      at fulfilled (node_modules/tslib/tslib.es6.js:118:58)
ok 5 audio AudioSamples should be constructible from a Buffer
ok 6 Demuxer built-in I/O
ok 7 Demuxer from ReadStream
node: delegate library support not built-in 'none' (Freetype) @ warning/annotate.c/RenderFreetype/2112.
node: FailedToExecuteCommand `'gs' -sstdout=%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 '-sDEVICE=pngalpha' -dTextAlphaBits=4 -dGraphicsAlphaBits=4 '-r72x72' -g1200x48  '-sOutputFile=/var/folders/8r/f3vnqc390znfkkfgknjpcqc80000gn/T/magick-VAXaj_z2oyVcLgdJhHIgLdCzkyOLdV2B%d' '-f/var/folders/8r/f3vnqc390znfkkfgknjpcqc80000gn/T/magick-Vn2c4UsTEOcWSaKniMHFvorMR63BQIku' '-f/var/folders/8r/f3vnqc390znfkkfgknjpcqc80000gn/T/magick-qD4E8veUIpjSuBkYteEz5CUhiRku2226'' (32512) @ error/ghostscript-private.h/ExecuteGhostscriptCommand/74.
node: FailedToExecuteCommand `'gs' -sstdout=%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 '-sDEVICE=pngalpha' -dTextAlphaBits=4 -dGraphicsAlphaBits=4 '-r72x72' -g1200x48  '-sOutputFile=/var/folders/8r/f3vnqc390znfkkfgknjpcqc80000gn/T/magick-VAXaj_z2oyVcLgdJhHIgLdCzkyOLdV2B%d' '-f/var/folders/8r/f3vnqc390znfkkfgknjpcqc80000gn/T/magick-Vn2c4UsTEOcWSaKniMHFvorMR63BQIku' '-f/var/folders/8r/f3vnqc390znfkkfgknjpcqc80000gn/T/magick-qD4E8veUIpjSuBkYteEz5CUhiRku2226' -c showpage' (32512) @ error/ghostscript-private.h/ExecuteGhostscriptCommand/74.
not ok 8 filtering w/ overlay (ffmpeg filter overlay version)
  node: non-conforming drawing primitive definition `text' @ error/draw.c/RenderMVGContent/4520
  Error: node: non-conforming drawing primitive definition `text' @ error/draw.c/RenderMVGContent/4520
      at Context.<anonymous> (test/filtering.test.ts:39:15)
      at processImmediate (node:internal/timers:478:21)
not ok 9 filtering "after each" hook: delete temporary for "w/ overlay (ffmpeg filter overlay version)"
  ENOENT: no such file or directory, lstat '/Users/mateusz/dev/ffmpeg.compiled/test/filter-temp.mkv'
  Error: ENOENT: no such file or directory, lstat '/Users/mateusz/dev/ffmpeg.compiled/test/filter-temp.mkv'
ok 9 transcode generalized audio transcoding with with resampling
ok 10 transcode generalized video transcoding with changing the pixel format and resolution
ok 11 using ffmpeg built-in networking ffmpeg RTMP network streaming
ok 12 streaming transcoding to Matroska/H264
ok 13 streaming transcoding to mp4/H264
ok 14 streaming transcoding to WebM
[mp4 @ 0x118e1e260] muxer does not support non seekable output
ok 15 streaming error handling on creation
ok 16 streaming error handling while streaming
node: delegate library support not built-in 'none' (Freetype) @ warning/annotate.c/RenderFreetype/2112.
node: FailedToExecuteCommand `'gs' -sstdout=%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 '-sDEVICE=pngalpha' -dTextAlphaBits=4 -dGraphicsAlphaBits=4 '-r72x72' -g1200x48  '-sOutputFile=/var/folders/8r/f3vnqc390znfkkfgknjpcqc80000gn/T/magick-ksWOUWuE_G8vBl4cozld5-hyQxKRXm7P%d' '-f/var/folders/8r/f3vnqc390znfkkfgknjpcqc80000gn/T/magick-5Zr-vLts8_V0lsSOlaqB1jPBHb0BLuMI' '-f/var/folders/8r/f3vnqc390znfkkfgknjpcqc80000gn/T/magick-X4lqF2QHFNspX8ii2DpYy3Zr0I8msyhE'' (32512) @ error/ghostscript-private.h/ExecuteGhostscriptCommand/74.
node: FailedToExecuteCommand `'gs' -sstdout=%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 '-sDEVICE=pngalpha' -dTextAlphaBits=4 -dGraphicsAlphaBits=4 '-r72x72' -g1200x48  '-sOutputFile=/var/folders/8r/f3vnqc390znfkkfgknjpcqc80000gn/T/magick-ksWOUWuE_G8vBl4cozld5-hyQxKRXm7P%d' '-f/var/folders/8r/f3vnqc390znfkkfgknjpcqc80000gn/T/magick-5Zr-vLts8_V0lsSOlaqB1jPBHb0BLuMI' '-f/var/folders/8r/f3vnqc390znfkkfgknjpcqc80000gn/T/magick-X4lqF2QHFNspX8ii2DpYy3Zr0I8msyhE' -c showpage' (32512) @ error/ghostscript-private.h/ExecuteGhostscriptCommand/74.
not ok 17 streaming w/ overlay (ImageMagick overlay version)
  node: non-conforming drawing primitive definition `text' @ error/draw.c/RenderMVGContent/4520
  Error: node: non-conforming drawing primitive definition `text' @ error/draw.c/RenderMVGContent/4520
      at Demuxer.<anonymous> (test/streaming.test.ts:407:19)
      at Demuxer.emit (node:events:514:28)
      at Demuxer.emit (node:domain:488:12)
      at Demuxer.<anonymous> (src/lib/Demuxer.ts:110:12)
      at Generator.next (<anonymous>)
      at fulfilled (node_modules/tslib/tslib.es6.js:118:58)
not ok 18 streaming "after each" hook: delete temporary for "w/ overlay (ImageMagick overlay version)"
  ENOENT: no such file or directory, lstat '/Users/mateusz/dev/ffmpeg.compiled/test/streaming-temp.mkv'
  Error: ENOENT: no such file or directory, lstat '/Users/mateusz/dev/ffmpeg.compiled/test/streaming-temp.mkv'
ok 18 transcode audio / video multiplexing
ok 19 transcode only video
ok 20 transcode only audio
ok 21 video VideoFrame should be constructible from a Buffer
# tests 23
# pass 18
# fail 5
1..23

I had to compile magickwand.js for darwin-arm64 too before I run these tests.

@mmomtchev Do you want me to send you ffmpeg.node and magickwand.node binary files? Or maybe suggest something so I can make all tests pass?

@mmomtchev
Copy link
Owner

@mateuszmazurek there have been more than 20 instances of simultaneous issues and comments on those issues about adding support for Apple silicon to my projects - sometimes with comments and pull requests of various companies - including an offer of a physical devices simultaneous with instances of criminal behavior on the part of French state institutions

I would just like to repeat my position on this matter once again:

  • I am unable to support Apple silicon and/or provide prebuilt binaries without access to this environment, all prebuilt binaries are prebuilt using an automated and open-source build process that is a) trusted, b) reproducible and c) versioned and documented; should anyone be willing to sponsor an access to an Apple Silicon device, which amounts to about $5 per month, I will be willing to add this support
  • Should anyone actually intend to somehow provoke a change of my position when it comes to the criminal affair that has such a huge impact over my life during those years, then I would like to emphasize that I still do not understand how this could be accomplished by posting such issues and comments, and that I absolutely do not intend to change this position because of any comments, issues or proposals for a physical device

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