user11977: I'm trying to cut a video (a debate on TV) with FFmpeg without re-encoding, and I need to cut between 2 sentences a guy pronounce. I think the precise moment is between two keyframes, because whatever the timestamp I try to cut at, I always get too much sound (and video) or too few. Here is my ffmpeg command line :
ffmpeg -i video.mp4 -ss 0:0:0.9 -vcodec copy -acodec copy videoB.mp4 -y

I'm aware that the position of the -ss option in the command line matters: here, it is supposed to give me all the accuracy FFmpeg can offer. I know I'm probably trying to cut my video neither on a I-frame, nor on P- or B-frames.
So is there a way to get the closest (P- or B-) frame, doing some calculations with the preceding I-frame to generate a new I-frame, then start the video with this brand new I-frame and no sound, until the correct timestamp is reached. Then the video could go on normally.
I really don't want to bother me with re-encoding (which is an use of FFmpeg I don't master on command line). I'm using FFmpeg version 2.5.8-0ubuntu0.15.04.1.
Thanks.

user12511: No
There is no way to precisely cut a video with FFmpeg if you need to cut outside an I-frame without re-encoding.
You could try software that can handle "smart rendering", but I am not aware of any such software for Linux. On Windows, you could use "TMPGEnc MPEG Smart Renderer" or SolveigMM Video Splitter. The latter has serious performance issues. I highly recommend TMPGEnc, but it is not free.

11977: <p>I'm trying to cut a video (a debate on TV) with FFmpeg without re-encoding, and I need to cut between 2 sentences a guy pronounce. I think the precise moment is between two keyframes, because whatever the timestamp I try to cut at, I always get too much sound (and video) or too few. Here is my ffmpeg command line :</p>

<pre><code>ffmpeg -i video.mp4 -ss 0:0:0.9 -vcodec copy -acodec copy videoB.mp4 -y
</code></pre>

<p>I'm aware that the position of the <code>-ss</code> option in the command line matters: here, it is supposed to give me all the accuracy FFmpeg can offer. I know I'm probably trying to cut my video neither on a I-frame, nor on P- or B-frames.</p>

<p>So is there a way to get the closest (P- or B-) frame, doing some calculations with the preceding I-frame to generate a new I-frame, then start the video with this brand new I-frame and no sound, until the correct timestamp is reached. Then the video could go on normally.</p>

<p>I really don't want to bother me with re-encoding (which is an use of FFmpeg I don't master on command line). I'm using FFmpeg version 2.5.8-0ubuntu0.15.04.1.</p>

<p>Thanks.</p>
 12511: <h2>No</h2>
<p>There is no way to precisely cut a video with FFmpeg if you need to cut outside an I-frame without re-encoding.</p>
<p>You could try software that can handle &quot;smart rendering&quot;, but I am not aware of any such software for Linux. On Windows, you could use &quot;TMPGEnc MPEG Smart Renderer&quot; or SolveigMM Video Splitter. The latter has serious performance issues. I highly recommend TMPGEnc, but it is not free.</p>
