user19852: The following command is producing a video of the exact length of the -to parameter:
ffmpeg -ss 00:06:26 -i fftestinput.mp4 -to 00:06:38 -r 29.97 fftestoutput.mp4

Again, the final product is a very nice video of length 6:38.

user1871: Yes, it does. -to looks at the timestamps. And input ss resets them to zero from the seek point. Either use -ss as output option (after -i) or calculate and use duration -t. The former will slow operation, as it performs a slow seek (decode and discard till inpoint).

19852: <p>The following command is producing a video of the exact length of the -to parameter:</p>

<pre><code>ffmpeg -ss 00:06:26 -i fftestinput.mp4 -to 00:06:38 -r 29.97 fftestoutput.mp4
</code></pre>

<p>Again, the final product is a very nice video of length 6:38.</p>
 1871: <p>Yes, it does. <code>-to</code> looks at the timestamps. And input <code>ss</code> resets them to zero from the seek point. Either use <code>-ss</code> as output option (after <code>-i</code>) or calculate and use duration <code>-t</code>. The former will slow operation, as it performs a slow seek (decode and discard till inpoint).</p>
