FFmpeg in Batch FOR Loop for MP3 Duration

Solution 1:

ffmpeg console output is for informational purposes only and shouldn't be parsed with scripting. Use ffprobe instead:

ffprobe -loglevel error -select_streams a -show_entries stream=duration -sexagesimal -of default=noprint_wrappers=1:nokey=1 "%%i" | TEE.BAT -a MP3Duration.txt

Also see FFprobe Documentation and FFmpeg Wiki: FFprobe Tips.