Skip to content

Commit

Permalink
Support experimental VVC decoder by adding -strict -2 in FFmpeg commands
Browse files Browse the repository at this point in the history
Signed-off-by: Wang Hangjie <[email protected]>
  • Loading branch information
Hangjie22Coder authored and uartie committed Aug 13, 2024
1 parent 6fffbf3 commit 5834544
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/ffmpeg/decoderbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class Decoder(PropertyHandler, BaseFormatMapper):
decoded = property(lambda s: s._decoded)
osdecoded = property(lambda s: filepath2os(s.decoded))
hwaccel = property(lambda s: s.props["hwaccel"])
strict = property(lambda s: s.ifprop("strict", "-strict {strict}"))

width = property(lambda s: s.props["width"])
height = property(lambda s: s.props["height"])
Expand Down Expand Up @@ -82,7 +83,7 @@ def decode(self):
self._statsfile = get_media().artifacts.reserve(mtype)

return call(
f"{exe2os('ffmpeg')} -v verbose {self.hwinit}"
f"{exe2os('ffmpeg')} -v verbose {self.strict} {self.hwinit}"
f" {self.ffdecoder} -r:v {fps} -i {self.ossource}"
f" -f rawvideo -pix_fmt {self.format} -s:v {self.width}x{self.height}"
f" -r:v {fps} {self.refseek} -i {self.osreference}"
Expand All @@ -91,7 +92,7 @@ def decode(self):
)

return call(
f"{exe2os('ffmpeg')} -v verbose {self.hwinit}"
f"{exe2os('ffmpeg')} -v verbose {self.strict} {self.hwinit}"
f" {self.ffdecoder} -i {self.ossource} -lavfi '{self.scale_range}'"
f" -c:v rawvideo -pix_fmt {self.format} -fps_mode passthrough"
f" -noautoscale -vframes {self.frames} -y {self.ffoutput}"
Expand Down

0 comments on commit 5834544

Please sign in to comment.