-
Notifications
You must be signed in to change notification settings - Fork 234
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
Compile statically? #32
Comments
What system? Why do you want a static build? |
I'm building it to run inside AWS Lambda, so unfortunately can't install all of the required shared libraries inside their execution environment before running this. That's the build step I'm using at the moment, and am running into this error when executing inside Lambda:
For more context, to make sure I'm understanding the required process here. Lambda runs inside AWS Linux, so all I should need to do is just compile this library statically inside an AWS Linux Docker container and then send up the binary with my code where I should be able to execute it without issue. After reading through the Makefile, I think I see where you're linking the ffmpeg dependencies statically if you use a specific version (I'm using the version mentioned in the README). But I'm stuck when it comes to linking the rest of the dependencies statically. I tried adding
And here is the change I made to the makefile to result in the compile-time errors. |
Hmm.. finding the missing library can be quite cumbersome.. What about writing a little script which copies every shared library which untrunc needs to your deploy folder? That's what I did for the windows builds. You should probably filter ldd's output though, as libraries like I am curious.. why would someone need untrunc on aws lambda? Do you have tons of broken videos? Or plan some sort of service, where broken recordings need to automatically be recovered? I never used AWS lambda.. |
Thanks for the info! I'll try and modify that and see where I end up. I have a bunch of MP4 fragments (basically just chunks of a bigger MP4 file, split apart and uploaded to S3 individually), and the Lambda concatenates all of them together very simply, and then runs the final result through And mostly just using Lambda as opposed to a Docker container for pricing reasons. Much cheaper to run it this way since I only have to pay for the seconds that I use. |
That did the trick! I ended up having to go back to the original fork of the project - it worked for the particular videos I'm uploading, and the new fork throws errors about multiple frames in the same packet (looks like it's coming from AAC). For reference, here are the relevant lines on the Dockerfile:
I also modified the Dockerfile to do the building inside an Amazon Linux box instead of Ubuntu (so had to change the Then just modified my code to package that up with the Lambda, and used |
Great! The
It should output the following directly after the 'Multiple frames' message:
If you don't mind create a new issue, with the full output combined with FYI, the original untrunc loads the whole file into RAM, which can be quite a problem.. |
I start working on this again on Thursday of this week - I will get that output for you then and post it back here. |
apparently not. :) |
Are there any configuration preferences for the makefile to compile this statically?
The text was updated successfully, but these errors were encountered: