serverlesspub / sox-aws-lambda-binary

Precompiled SOX binary for AWS Lambda
11 stars 1 forks source link

Doesn't work with AMI Linux 2 lambdas #2

Open mgaffigan opened 4 years ago

mgaffigan commented 4 years ago

When running using an AMI Linux 2 template (Node 10.x, for example), I receive the error:

Error: Command failed: sox /tmp/file.wav /tmp/file.mp3 sox: error while loading shared libraries: libgomp.so.1: cannot open shared object file: No such file or directory

mgaffigan commented 4 years ago

sox-layer-node10.zip does work as a layer. Compiled using amzn2-ami-hvm-2.0.20190313-x86_64-gp2 (ami-0de53d8956e8dcf80) and included libgomp.so.1.

rmtuckerphx commented 4 years ago

@mgaffigan Thanks for the inclusion of the zip.

I ran into the same libgomp.so.1 error, so I used the sox-layer-node10.zip file. Now I am getting this error when I run:

ERROR /opt/bin/sox WARN mp3-util: MAD lost sync /opt/bin/sox FAIL formats: can't open input file `/tmp/14e6e0ea5645cd83c040382b38186f92.mp3':

My code writes 3 files from s3 to temp files and then concats them together into an output mp3 file.

The info for the specified input file is: Audio container MPEG Audio codec(s) MPEG 2 Layer 3 Tool (encoder) LAME 3.99.5 Codec profile CBR Tag header type(s) ID3v2.4 Duration 121.9 seconds Bit-rate 40 kbps Sample-rate 16 hz Lossless? FALSE Number of channels 1

Any ideas on why I am getting the error?

rmtuckerphx commented 4 years ago

I figure it out. I had a bug in writing the file contents to the temp files so when SOX tried to use the input files, it failed.

Thanks again for the node10 zip. It works great!