How do you use Ffmpeg to give unique title/track names (%02d) using -metadata when spliting a .mp3 file?

(ffmpeg version 6.0-essentials_build-www.gyan.dev)

I’ve successfully split a .mp3 file & given it unique names using “XX_%02d.mp3” in the following command: XX_01, XX_02 etc.

How do I perform similar for the file’s title or track? -metadata track=”YY_%02d” gives the file the literal track name of YY%02d. How can I get the -metadata command to accept the numerical coding?

ffmpeg -i "input.mp3" -c copy -segment_time 500 -f segment -segment_start_number 1 -metadata title="YY_%02d" -metadata track="YY%02d" "XX_%02d.mp3"

Read more here: Source link