VideoHelp Forum




+ Reply to Thread
Results 1 to 5 of 5
  1. Hi
    I need to removed the first 5 seconds of each video in a folder.
    For doing this I'm using ffmpeg and this command poweshell command to do the loop

    Code:
    Get-ChildItem -Filter *.mp4 | ForEach -Process {ffmpeg -ss 00:00:05 -i $_ -c:v copy -c:a copy ($_.BaseName + '_TAG.mp4')}
    I tried to do this tonight for a folder of 950 videos.
    Right now I'm checking the results. I'm noticing that some videos do have the ending result as I want but other doesn't, the first 5 seconds are not trim out. But by comparing the lenght of the video, I could see that 5 seconds are indeed missing in the output file. I have no idea how this is possible and the logic behind.
    Why some videos seems to correctly trim the first 5 seconds, while other doesn't but still trim 5 seconds in the video?
    Quote Quote  
  2. Copy mode can only cut on key frames. ffmpeg will cut at the keyframe just before the requested start time. With long GOP codecs that may be the very first frame of the video. The output video will then be flagged to skip the first 5 seconds at playback.
    Quote Quote  
  3. So I need to re-encode the whole video without use the copy mode?
    Quote Quote  
  4. In theory you can reencode only the cut GOP. In practice it can get complicated.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!