Skip to content

Commit

Permalink
Add enums for processing compressed videos from MPE rigs
Browse files Browse the repository at this point in the history
  • Loading branch information
bjhardcastle committed Dec 14, 2024
1 parent a7d7c16 commit fb4daa9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/aind_behavior_video_transformation/transform_videos.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,15 @@ class FfmpegOutputArgs(Enum):
'-metadata author="Allen Institute for Neural Dyamics" '
"-movflags +faststart+write_colr"
)
GAMMA_ENCODING_FIX_INPUT_COLOR_NO_COMPRESSION = (
"-vf "
'"setparams=color_primaries=bt709:color_trc=linear:colorspace=bt709,'
"scale=out_color_matrix=bt709:out_range=full:sws_dither=none,"
"format=yuv420p10le,colorspace=ispace=bt709:all=bt709:dither=none,"
'scale=out_range=tv:sws_dither=none,format=yuv420p" -c:v copy '
'-metadata author="Allen Institute for Neural Dynamics" '
"-movflags +faststart+write_colr"
)
NO_GAMMA_ENCODING = (
"-vf "
'"scale=out_range=tv:sws_dither=none,format=yuv420p" -c:v libx264 '
Expand All @@ -99,6 +108,10 @@ class FfmpegArgSet(Enum):
FfmpegInputArgs.NONE,
FfmpegOutputArgs.GAMMA_ENCODING_FIX_INPUT_COLOR,
)
GAMMA_ENCODING_FIX_COLORSPACE_NO_COMPRESSION = (
FfmpegInputArgs.NONE,
FfmpegOutputArgs.GAMMA_ENCODING_FIX_INPUT_COLOR_NO_COMPRESSION,
)
NO_GAMMA_ENCODING = (
FfmpegInputArgs.NONE,
FfmpegOutputArgs.NO_GAMMA_ENCODING,
Expand Down

0 comments on commit fb4daa9

Please sign in to comment.