Encode After Record with ShareX Actions

I was thinking if there is a way to record with ShareX, then let it automatically encode the video in AV1 targeting a certain bitrate. This way one can record a preview video in 1 step without having to manually encode it.

ShareX had an “action” feature which allows execution of CLI commands right after capture: Actions - ShareX

The webpage suggests -i "$input" -c:v libsvtav1 -crf 35 -c:a libopus -b:a 128k -y "$output" which works well, but only if the output extension is .mkv. This site doesn’t allow mkv upload so I need the output to be in mp4 container.

I tried multiple setup to no good results. It seems like ffmpeg simply isn’t doing the task. I’m not sure if it’s due to the file extension name.

Also been wondering if there’s any logs to ffmpeg that I can inspect to debug the issue.