The metadata parameter:
ffmpeg -i "in.wav" -acodec libmp3lame -aq 0 -metadata track="X/Y" -id3v2_version 3 -write_id3v1 1 "out.mp3"
Where X is the number of the track, out of Y total tracks.
‘-metadata[:metadata_specifier] key=value (output,per-metadata)’
Set a metadata key/value pair.
An optional metadata_specifier may be given to set metadata on streams or chapters. See -map_metadata documentation for details.
This option overrides metadata set with -map_metadata. It is also possible to delete metadata by using an empty value.
For example, for setting the title in the output file:
ffmpeg -i in.avi -metadata title="my title" out.flv
To set the language of the first audio stream:
ffmpeg -i INPUT -metadata:s:a:1 language=eng OUTPUT