0

Any idea how to remove duplicate video&audio frames blocks (several seconds repeating video sequences having same timestamps and frames ~ corrupt file) from TS file with ffmpeg?

I tried:

1) decimate filter:

ffmpeg -i input.mp4 -vf mpdecimate,setpts=N/FRAME_RATE/TB out.mp4
  • does reencoding
  • does not remove several seconds repeated frames block

2) playing with synchronisation options

ffmpeg -vsync vfr -frame_drop_threshold 1500 -i in.ts -vcodec copy -acodec copy -y out.ts
  • there is no help with frame_drop_threshold attribude, no sample usage found on internet
  • does not reencode input
  • does not remove several seconds repeated frames block

Seems ffmpeg helps:

  • just with sequence of same frames
  • not with repeating frames sequences in the stream
  • not with removing (dropping) frames with repeated timestamps
  • Does the video decode fine - any playback corruption? – Gyan Jan 11 '18 at 16:17
  • There is no issue in vlc player, I just need to remove repeating sequences (lasting several seconds). – Radoslav Kastiel Jan 12 '18 at 12:30
  • Then my suggestion is to segment the movie at keyframes. Delete neighbouring segments of equal bytesize or frame count and rejoin the remainder. See the [segment](https://ffmpeg.org/ffmpeg-formats.html#segment_002c-stream_005fsegment_002c-ssegment) muxer for segmenting and [concat](https://ffmpeg.org/ffmpeg-formats.html#concat-1) demuxer for joining. – Gyan Jan 12 '18 at 13:47

0 Answers0