Skip to content

Commit

Permalink
fix problem with last frame
Browse files Browse the repository at this point in the history
  • Loading branch information
yurygoru committed Nov 1, 2019
1 parent dc42963 commit 3e14f11
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cvat/apps/engine/media_extractors.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,13 @@ def save_image(self, k, dest_path):
def save_as_chunks(self, chunk_size, task, progress_callback=None):
if not self._source_path:
raise Exception('No data to compress')

for i in range(math.ceil(len(self._source_path) / chunk_size)):
start_frame = i * chunk_size
input_images = os.path.join(self._tmp_dir, self._imagename_pattern)
input_options = '-f image2 -framerate 25 -start_number {}'.format(start_frame)
output_chunk = task.get_chunk_path(i)
self.prepare_dirs(output_chunk)
output_options = '-vframes {} -codec:v mpeg1video -q:v 0'.format(chunk_size)
output_options = '-vframes {} -f mpegts -c:a none -codec:v mpeg1video -bf 0 -b:v 800k'.format(chunk_size)

ff = FFmpeg(
inputs = {input_images: input_options},
Expand Down

0 comments on commit 3e14f11

Please sign in to comment.