Skip to content

Do not modify the ffmpeg_args in reencode function #144

@benoit74

Description

@benoit74

Since 3.3.0, the reencode function (or more exactly the private _build_ffmpeg_args function) is auto-magically adding the -threads argument to the passed ffmpeg_args:

if threads:
if "-threads" in ffmpeg_args:
raise AttributeError("Cannot set the number of threads, already set")
else:
ffmpeg_args += ["-threads", str(threads)]

This causes issues like openzim/kolibri#89 where since we are retrying to encode the video multiple times, the same dictionary is modified twice.

I think that reencode function should not modify the passed dictionary but its own copy.

I add this to the 3.4.0 for now, but clearly deserve a 3.3.1 patch I think.

WDYT?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions