The script below demuxes the video, normalizes the AAC then converts the audio to AC3 and remuxes as a .ts file. It also gives me a separate normalized AAC file. Instead of that, I have an MKV with AAC that I'd like to just normalize preferably without having to demux and remux. If not possible then demuxing and remuxing is fine. Can anyone help with a script please. Thanks

"X:\Portable Installations\MKV Toolnix\mkvextract.exe"  --ui-language en tracks %1 0:"video.h264" 1:"gain0.m4a"

"X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i "gain0.m4a" -vn -c:a copy -absf aac_adtstoasc "gain.m4a"

"X:\Portable Installations\AAC Gain 1.9\aacgain" -r -k -m 0 gain.m4a

"X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i gain.m4a -map 0:0 -vn -c:a copy "%~d1%~p1%~n1.aac" -map 0:0 -vn -c:a ac3 -b:a 192k "output.ac3"

SET tsmuxer="X:\Portable Installations\tsMuxeR_1.10.6\tsMuxeR.exe"
echo MUXOPT --no-pcr-on-video-pid --vbr  --vbv-len=500         > remux.meta       
echo V_MPEG4/ISO/AVC, "video.h264", insertSEI, contSPS        >> remux.meta   
echo A_AC3, "output.ac3"                                      >> remux.meta
%tsmuxer% remux.meta "%~d1%~p1%~n1.AC3.ts"
DEL /Q remux.meta

del gain.m4a
del gain0.m4a
del video.h264
del output.ac3

"X:\Daves Folder\Sounds\VideoRedo Completed Sound Short.WAV"