Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
implemented function for h264 inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
iLLiCiTiT committed May 7, 2021
1 parent 378d434 commit 159ac20
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion openpype/scripts/otio_burnin.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,31 @@ def _prores_codec_args(ffprobe_data):
return output


def _h264_codec_args(ffprobe_data):
output = []

output.extend(["-codec:v", "h264"])

pix_fmt = ffprobe_data.get("pix_fmt")
if pix_fmt:
output.extend(["-pix_fmt", pix_fmt])

output.extend(["-intra"])
output.extend(["-g", "1"])

return output


def get_codec_args(ffprobe_data):
codec_name = ffprobe_data.get("codec_name")
# Handle prores
# Codec "prores"
if codec_name == "prores":
return _prores_codec_args(ffprobe_data)

# Codec "h264"
if codec_name == "h264":
return _h264_codec_args(ffprobe_data)

output = []
if codec_name:
output.extend(["-codec:v", codec_name])
Expand Down

0 comments on commit 159ac20

Please sign in to comment.