title: ffmpeg clip audio interval with starting and end time
body: <p>I am trying to clip an MP3 between two starting points, like starting at 10 seconds and ending at 16 seconds (time interval of 6 seconds).</p>
  
  <p>I am using this command:</p>
  
  <p><code>ffmpeg -ss 10 -i input.mp3 -t 6 output.mp3</code></p>
  
  <p>The resulting <code>output.mp3</code> contains the 6 seconds that I specified followed by 8 or 9 seconds of empty audio. Is there something wrong with my command?</p>
  
  <p>Edit:</p>
  
  <p><code>ffmpeg -ss 10 -t 6 -i input.mp3 output.mp3</code> says <code>-t is not an input option, keeping it for the next output; consider fixing your command line.</code> and gives me a file that's got 8 seconds of audio starting from 10s and then some 9 or 10 seconds of silence.</p>
  
  <p><code>ffmpeg -ss 10 -to 16 -i input.mp3 output.mp3</code> produces a file that is twice the length of the original - basically the same audio file repeated again.\</p>
  
  <p>Testing the output:</p>
  
  <p>I used Quicktime and it has silent audio at the end. The description of the output file in finder says like 14 seconds. When I use VLC, it plays for the correct 6 seconds and stops, even though its duration in the file browser in VLC says 14. My MPlayer doesn't work properly. I also did the preview audio in Finder, and it plays the 6 seconds properly and then stops. But the round seeker bar of the MP3 didn't reach the end. And it also says 14 seconds instead of 6.</p>
  
  <p>My goal is to stream this 6 second file through a REST API to the front end. I want the user to be able to download this file properly. Ideally it won't have inconsistent metadata (14 seconds instead of 6).</p>