0

I want to extract the line Duration: 00:03:51.05, start: 0.025056, bitrate: 131 kb/s from output of ffprobe test.mp3.

ffprobe  test.mp3  |grep  Duration

All lines were output with my desired line, how to output my desired line only?

Cyrus
  • 84,225
  • 14
  • 89
  • 153

2 Answers2

0

Replace | by 2>&1 | to redirect stderr to stdout.

Cyrus
  • 84,225
  • 14
  • 89
  • 153
0

ffprobe test.mp3 2>&1 | awk -F'[ ,]' '/Duration/{print $4}'
00:03:51.05