For that you need know first the container content.
For instance:
ffmpeg -report -i "INPUT FILE" 2>report.txt
Then parse report.txt to obtain lines begining by " Stream", for instance:
Quote:
Stream #0:0(eng): Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Stream #0:1(spa): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s (default) (forced)
Stream #0:2(eng): Audio: eac3, 48000 Hz, 5.1(side), fltp, 640 kb/s
Stream #0:3(spa): Subtitle: ass (default) (forced)
Stream #0:4(spa): Subtitle: subrip
Stream #0:5(spa): Subtitle: subrip
Stream #0:6(eng): Subtitle: subrip
|
Then you can offer to the user recode audio tracks.
If the user select recode the EAC3 track to AC3 448 Kb/s you can use this command line:
ffmpeg -drc_scale 0 -i "INPUT FILE" -map
0:2 -acodec ac3 -ab 448k -center_mixlev 0.707 "OUTPUT.AC3"
EDIT: Of course all tracks can be recoded, filtered or copied and output the finish container, but there are many options.