> On 21 Jun 2016, at 5:28 PM, 桃源老師 <xanadu6...@dream.jp> wrote: > > Hello, > > I have some videos which downloaded from internet. > Those video have approximately 30 second advertisement (ad) on start. > > I can remove this ad using the following ffmpeg command: > > $ ffmpeg -ss 00:00:30.666 -i INPUT.mp4 -ss 0 -c: copy OUTPUT.mp4 > > But here, I have one question. > > The cut point "00:00:30.666" is not keyframe. The nearest keyframe is > "00:00:25.058" or "00:00:33.400". > And If I cut the video on keyframe, the ad remain or run over the video > contents. > > I have learned from the net that the video should be edit on unit of keyframe > or > can not be edit on unit of keyframe. This is my poor knowledge about video > editing. > > But as above, ffmpeg seems allows to cut video not on keyframe. The > resulting video > playbacks fine with ffplay and VLC except QuickTime Player have approx. 2 > seconds > black screen on start. > > So, I'd like to confirm my way to remove ad is correct or not. i.e. cutting > video not on > keyframe is correct or not. > And if my way is not correct, please teach me the correct way…
If black screen on start with QuickTime Player is a problem you could consider a re-encode of the video track plus an audio copy instead of copying both the video and audio tracks e.g. ffmpeg -ss 00:00:30.666 -i INPUT.mp4 -ss 0 -q:v 28 -c:a copy OUTPUT.mp4 Cheers, Shaun _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".