Tecnativa / doodba

Base image for making the creation of customized Odoo environments a piece of cake
Apache License 2.0
423 stars 302 forks source link

[FIX] Temporal fix meanwhile odoo uses -intra option in ffmpeg. This … #599

Closed josep-tecnativa closed 6 months ago

josep-tecnativa commented 6 months ago

…option is not compatible with ffmpeg lasts versions. https://github.com/OCA/OCB/blob/52bec035f3afbe4e1cc9e51e062ed35eb830e04f/odoo/tests/common.py#L1360 @Tecnativa TT48083

pedrobaeza commented 6 months ago

Put the reference to Odoo code using that option.

ap-wtioit commented 6 months ago

It seems Odoo is also working on / proposed a fix for this: https://github.com/odoo/odoo/pull/153270

chienandalu commented 6 months ago

Thanks @ap-wtioit !

chienandalu commented 6 months ago

Once that Odoo PR is merged maybe we should add that test to the doodba CI

josep-tecnativa commented 6 months ago

Once that Odoo PR is merged maybe we should add that test to the doodba CI

Meanwhile, I'm working in this PR as a temportal patch. Now I'am facing some compatibility issues between 4.x ffmepg version and bookworm, so we can't merge this PR yet.

ap-wtioit commented 6 months ago

Meanwhile, I'm working in this PR as a temportal patch. Now I'am facing some compatibility issues between 4.x ffmepg version and bookworm, so we can't merge this PR yet.

Another fix, would be to add a script ffmpeg into the odoo users path that accepts the subprocess.run([ffmpeg_path, '-intra', '-f', 'concat','-safe', '0', '-i', concat_script_path, '-pix_fmt', 'yuv420p', outfile]) call and converts it to subprocess.run([ffmpeg_path, '-f', 'concat', '-safe', '0', '-i', concat_script_path, '-pix_fmt', 'yuv420p', '-g', '0', outfile], check=True).

E.g. (not tested):

#!/usr/bin/env bash
if [[ $1 == "-intra" ]] ; then
  # discard first argument -intra
  shift
fi
exec /usr/bin/ffmpeg "$@"

if you put this as ffmpeg into /home/odoo/.local/bin as ffmpeg it should remove the -intra parameter before executing the real ffmpeg. if we also need the added -g 0 i can help you with the wrapper (On monday).

pedrobaeza commented 6 months ago

Let's wait for the following days to have the Odoo PR merged, and if no response, then let's go to alternative solutions.

chienandalu commented 6 months ago

The fix is already merged in 16.0