media-autobuild_suite
media-autobuild_suite copied to clipboard
[Question] x264 bit depth options
When we first set the settings, it offers these options.
1 = Lib/binary with 8 and 10-bit
2 = No
3 = Lib/binary with only 10-bit
4 = Lib/binary with 8 and 10-bit, and libavformat and ffms2
5 = Shared lib/binary with 8 and 10-bit
6 = Same as 4 with video codecs only (can reduce size by ~3MB^)
7 = Lib/binary with only 8-bit
Most options offer a build that joins both bit depths, however, I want a build 8 bits only and the option that offers it does not include things like Lavf and ffms. How can I customize the compile using option 4 but only for 8 bits? I've been weeks trying to do x264 compile with all the components, but I can't do it and that's why I had to use MABS even though it always has errors and the options are not as expected.
that may require adding another option, perhaps that can be done in a bit
linking this branch so I remember which branch I was working on https://github.com/1480c1/media-autobuild_suite/tree/x264bit
Can we do bit ~~operations~~ comparisons in batch and bash? At some point we might need bit masks to cover all combinations :V
https://www.tutorialspoint.com/batch_script/batch_script_bitwise_operators.htm
somehow yes in batch
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_04
We can use the $(())
to do bitwise ops in bash
we have at least a signed long's worth of bits in bash, so 64-bits for flags
perhaps it might be a good idea to switch it over, the only issue I can see is it might conflict with previous options.
I was half joking. I wasn't going to force suite users to do math.
I was mainly thinking of doing something stupid like loading all of the options into something generic like --suite-option=%suite_option%
and read it using
options={1#*=}
opt1=$((options & 1))
opt2=$((options & 2))
opt3=$((options & 4))
etc instead of increasing our compileArgs
variable every single time we want to add a new feature or option. but that would interfere with specifying the individual args if they want to run the compile.sh directly.
Now that I think about it, how bad would it be to write an encoder in bash script?
That's sort of why I added jo
. It could be used to read options from a JSON when needed, instead of passing it to the script.
Or a source
able .sh.