5

The idea is to split a video into n segments and process them separated and when the process is done to merge the segments into a full video.

I tried using the following approach:

```

// spliting
ffmpeg -i video.mp4 -c:v copy -c:a copy -ss 0 -t 10 video_0_10.mp4
ffmpeg -i video.mp4 -c:v copy -c:a copy -ss 10 -t 20 video_10_20.mp4

vim video_list.txt (with all files)

// joining (merging them)
ffmpeg -f concat -safe 0 -i video_list.txt -c:v copy -c:a copy new_video.mp4

```

But when I tried to play the new_video.mp4 it didn't play (using VLC) smooth, it froze seemly at the moment of the joining.

What's the best way to split a bigger video into several smaller, work on them and after joining the smaller into a new?

Leandro Moreira
  • 377
  • 3
  • 16
  • 1
    Use the segment muxer, like [here](https://stackoverflow.com/a/41297944/5726027). – Gyan Jun 16 '17 at 05:09

1 Answers1

3

Thanks to @Mulvya the answer is to use, properly, the segmenter muxer:

wget http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_60fps_normal.mp4
ffmpeg -fflags +genpts -i bbb_sunflower_1080p_60fps_normal.mp4 -map 0 -c copy -f segment -segment_format mp4 -segment_time 30 -segment_list video.ffcat -reset_timestamps 1 -v error chunk-%03d.mp4
ffmpeg -y -v error -i video.ffcat -map 0 -c copy output.mp4
Leandro Moreira
  • 377
  • 3
  • 16