diff --git a/oxtimelines/timeline.py b/oxtimelines/timeline.py index 21b6a4d..b4ef6de 100644 --- a/oxtimelines/timeline.py +++ b/oxtimelines/timeline.py @@ -662,12 +662,11 @@ class Timelines(): if self.render_antialias: self._save_full_tile('antialias') if self.cuts_path: - # remove cuts at max_cut_len - self.cuts = filter(lambda x: x not in self.no_cuts, self.cuts) + # remove cuts at first frame and last frame and all cuts at max_cut_len + self.cuts = filter(lambda x: x not in [0, self.frame_n] + self.no_cuts, self.cuts) with open(self.cuts_path, 'w') as f: - # remove 0 and frame_n from cuts # avoid float rounding artefacts - f.write('[' + ', '.join(map(lambda x: '%.2f' % (x / FPS), self.cuts[1:-1])) + ']') + f.write('[' + ', '.join(map(lambda x: '%.2f' % (x / FPS), self.cuts)) + ']') if self.render_audio: self._render_audio(self.volume) if not self.render_video: