I'm looking for a simple command to merge in a batch script. Something like this:

"ffprobe -loglevel error -select_streams s -show_entries stream=index -of csv=p=0 input.mkv"

but I need only default or forced subtitles id number (only number e.g 2 or 3).

There's no way to filter only default track? My batch script should automatically recognize the id of the default track to insert it in the mux with mkvmerge.

Any chance with another tool? like mediainfo or something else?