I tried adding a feature request for it over 2 years ago, please upvote it if you find it important or appealing:
Regarding the problem I found a way to fix corrupt videos created by CameraX inside the app, but it was a bit hacky.
It was done by adding
untrunc as a ".so" file, and also somehow have a sample video that is not corrupt which have been recorded with the same video/audio-specs that the corrupt video also used.
I simply tried this with a predefined and already created sample video file, however in a real life scenario I have been going through ideas of how to get a sample for each video, and my current best idea is to just record a sample for a couple of seconds as an "initialize camera" step when camera-screen is opened.
As i said it's a bit hacky, and a feature in CameraX that could help us solve corrupt video-files in a better way would be the best.
Thanks,
Tobias