Closed benoit74 closed 7 months ago
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: https://github.com/openzim/python-scraperlib/blob/453afc03fbffd073188913a9c49871c1736a582b/src/zimscraperlib/video/encoding.py#L22-L26
reencode
_build_ffmpeg_args
-threads
ffmpeg_args
This causes issues like https://github.com/openzim/kolibri/issues/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.
3.4.0
3.3.1
WDYT?
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 passedffmpeg_args
: https://github.com/openzim/python-scraperlib/blob/453afc03fbffd073188913a9c49871c1736a582b/src/zimscraperlib/video/encoding.py#L22-L26This causes issues like https://github.com/openzim/kolibri/issues/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 a3.3.1
patch I think.WDYT?