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

Feature Request: Option to output to folder instead of compressed archive #438

Closed
NicholasFlamy opened this issue Dec 27, 2024 · 4 comments · Fixed by 5hojib/FFmpeg-Builds#1 or MartinEesmaa/FFmpeg-Builds#36

Comments

@NicholasFlamy
Copy link

So in this block of code, it creates a compressed archive (zip on Windows and xz tar for Linux) for the output:

FFmpeg-Builds/build.sh

Lines 61 to 67 in 93aace0

if [[ "${TARGET}" == win* ]]; then
OUTPUT_FNAME="${BUILD_NAME}.zip"
docker run --rm -i $TTY_ARG "${UIDARGS[@]}" -v "${ARTIFACTS_PATH}":/out -v "${PWD}/${BUILD_NAME}":"/${BUILD_NAME}" -w / "$IMAGE" zip -9 -r "/out/${OUTPUT_FNAME}" "$BUILD_NAME"
else
OUTPUT_FNAME="${BUILD_NAME}.tar.xz"
docker run --rm -i $TTY_ARG "${UIDARGS[@]}" -v "${ARTIFACTS_PATH}":/out -v "${PWD}/${BUILD_NAME}":"/${BUILD_NAME}" -w / "$IMAGE" tar cJf "/out/${OUTPUT_FNAME}" "$BUILD_NAME"
fi

Since I'm trying to make my setup on my server reproducible, the best option for me would be to fork and make the one change and then pull from my fork, but this requires me to update my fork.

If you would be open to having an option (either an env, a command line flag, or addin etc.) I would be happy to implement it and PR it. This way, there's no need for me to maintain a fork, and if someone else finds it useful, they will benefit.

Also, I'm the same guy who made #426. (If you want me to close that one because it's not planned, I will do that, just lmk!)

@BtbN
Copy link
Owner

BtbN commented Dec 27, 2024

It kinda already does that, so you can achieve is by just hitting Ctrl+C at the right time, basically when it starts generating the archive.
Stuff would then still sit in the ffbuild subdir.
Adding an option for the script to bail early should be easy enough.

@NicholasFlamy
Copy link
Author

It kinda already does that, so you can achieve is by just hitting Ctrl+C at the right time, basically when it starts generating the archive. Stuff would then still sit in the ffbuild subdir.

Yep, I saw that, just that Ctrl+C isn't the greatest for an automated cronjob 😜.

Adding an option for the script to bail early should be easy enough.

What would be your prefered way to add an option though?

@BtbN BtbN closed this as completed in 7abce16 Dec 27, 2024
@BtbN
Copy link
Owner

BtbN commented Dec 27, 2024

Just provide FFBUILD_OUTPUT_DIR as environment variable to the build script, and what normally ends up in the archive gets written there.

@NicholasFlamy
Copy link
Author

Dude, you're amazing! Didn't think you would do that so quick. Will test!

5hojib added a commit to 5hojib/FFmpeg-Builds that referenced this issue Dec 28, 2024
Closes BtbN#438

## Summary by Sourcery

New Features:
- Added an option to output the build artifacts to a directory instead of an archive.

Co-authored-by: BtbN <[email protected]>
hwangsihu pushed a commit to hwangsihu/FFmpeg-Builds that referenced this issue Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants