Skip to content

Commit

Permalink
makes mezzanine file list an argument to run-all.py script
Browse files Browse the repository at this point in the history
  • Loading branch information
nlsdvl committed Oct 25, 2024
1 parent 9f13fae commit 6f98609
Show file tree
Hide file tree
Showing 14 changed files with 443 additions and 239 deletions.
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*_Log_*.txt
output/
content_files/
!**/*.csv
*venv/
.vscode
**/*.numbers
**/*.DS_Store
.ignore/
**/*.log
16 changes: 10 additions & 6 deletions encode_dash.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class HEVCCHD1:
m_frame_rate = 60
# FIXME: The HDR metadata should not be hardcoded here.
# these are specific to the source sequence used for CHD1 (SOL)
m_x265_opts = "hdr-opt=1:repeat-headers=1:colorprim=bt2020:transfer=smpte2084:colormatrix=bt2020nc:master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,1):max-cll=992,361"
m_x265_opts = ""

class HEVCCUD1:
m_profile = "main"
Expand Down Expand Up @@ -317,7 +317,7 @@ class Representation:
m_vui_timing = None
m_segment_duration = None
m_num_b_frames = None
m_x265_opts = None
m_enc_opts = None

def __init__(self, representation_config):
config = representation_config.split(",")
Expand Down Expand Up @@ -465,6 +465,8 @@ def __init__(self, representation_config):
self.m_vui_timing = value
elif name == "sd":
self.m_segment_duration = value
elif name == "enc_opts":
self.m_enc_opts = value
else:
print("Unknown configuration option for representation: " + name + " , it will be ignored.")

Expand Down Expand Up @@ -530,8 +532,9 @@ def form_command(self, index):
command += "::x264-params=\""
elif self.m_codec == VideoCodecOptions.HEVC.value:
command += "::x265-params=\""
if self.m_x265_opts:
command += self.m_x265_opts + ":"

if self.m_enc_opts:
command += self.m_enc_opts + ":"

command += "level=" + self.m_level + ":" \
"no-open-gop=1" + ":" \
Expand All @@ -543,8 +546,8 @@ def form_command(self, index):
"vbv-bufsize=" + str(int(self.m_bitrate) * 3) + ":" \
"vbv-maxrate=" + str(int(int(self.m_bitrate) * 3 / 2))

#if self.m_aspect_ratio_x is not None and self.m_aspect_ratio_y is not None:
# command += ":sar=" + self.m_aspect_ratio_x + "\\:" + self.m_aspect_ratio_y
if self.m_aspect_ratio_x and self.m_aspect_ratio_y:
command += ":sar=" + self.m_aspect_ratio_x + "\\:" + self.m_aspect_ratio_y

command += "\":" #closing codec-specific parameters

Expand Down Expand Up @@ -655,6 +658,7 @@ def parse_args(args):
title_notice = arg
elif opt in ("-pf", "--profile"):
wave_media_profile = arg

# print(representations)
return [gpac_path, output_file, representations, dashing, outDir, copyright_notice, source_notice, title_notice, wave_media_profile, dry_run]

Expand Down
30 changes: 0 additions & 30 deletions profiles/avc.csv

This file was deleted.

2 changes: 2 additions & 0 deletions profiles/caac.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Stream ID;mezzanine radius;pic timing;VUI timing;sample entry;CMAF frag dur;init constraints;frag_type;resolution;framerate;bitrate;duration;wave_profile;cmaf_profile
audio;A1_480x270;FALSE;FALSE;avc1;2;regular;duration;480x270;0.25;128;60;cmf2;caac
29 changes: 29 additions & 0 deletions profiles/cfhd.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Stream ID;mezzanine radius;pic timing;VUI timing;sample entry;CMAF frag dur;init constraints;frag_type;resolution;framerate;bitrate;duration;cmaf_profile;wave_profile
1;L1_1920x1080;TRUE;FALSE;avc1;2;regular;duration;1920x1080;0.5;5100;30;cmf2;cfhd
2;L1_1920x1080;FALSE;TRUE;avc3;5;single;pframes;1920x1080;0.5;5000;30;cmf2;cfhd
3;L1_1920x1080;TRUE;FALSE;avc1+3;2;regular;every_frame;1920x1080;0.5;4900;30;cmf2;cfhd
10;L1_1920x1080;FALSE;FALSE;avc1;2;regular;duration;1920x1080;0.5;4800;30;cmf2;cfhd
11;L1_1920x1080;TRUE;TRUE;avc1;2;regular;duration;1920x1080;0.5;4100;30;cmf2;cfhd
12;L1_1920x1080;TRUE;FALSE;avc3;2;regular;duration;1920x1080;0.5;4200;30;cmf2;cfhd
13;L1_1920x1080;TRUE;FALSE;avc1+3;2;regular;duration;1920x1080;0.5;4300;30;cmf2;cfhd
14;L1_1920x1080;TRUE;FALSE;avc1;5;regular;duration;1920x1080;0.5;4400;30;cmf2;cfhd
15;L1_1920x1080;TRUE;FALSE;avc1;2;single;duration;1920x1080;0.5;4500;30;cmf2;cfhd
16;L1_1920x1080;TRUE;FALSE;avc1;2;regular;pframes;1920x1080;0.5;4600;30;cmf2;cfhd
17;L1_1920x1080;TRUE;FALSE;avc1;2;regular;every_frame;1920x1080;0.5;4700;30;cmf2;cfhd
19;L1_1920x1080;TRUE;FALSE;avc1;2;regular;duration;1920x1080;0.5;5100;60;cmf2;cfhd
20;L2_1920x1080;TRUE;FALSE;avc1;2;regular;duration;1920x1080;1;6000;60;cmf2;chdf
21;K1_1600x900;TRUE;FALSE;avc1;2;regular;duration;1600x900;0.5;3000;60;cmf2;cfhd
22;J1_1280x720;TRUE;FALSE;avc1;2;regular;duration;1280x720;0.5;2000;60;cmf2;cfhd
23;J1_1280x720;TRUE;FALSE;avc1;2;regular;duration;1280x720;1;3000;60;cmf2;cfhd
24;I1_1024x576;TRUE;FALSE;avc1;2;regular;duration;1024x576;0.5;1200;60;cmf2;cfhd
25;I2_1024x576;TRUE;FALSE;avc1;2;regular;duration;1024x576;0.5;1500;60;cmf2;cfhd
26;H1_960x540;TRUE;FALSE;avc1;2;regular;duration;960x540;0.5;1100;60;cmf2;cfhd
27;G1_852x480;TRUE;FALSE;avc1;2;regular;duration;852x480;0.5;1000;60;cmf2;cfhd
28;F1_768x432;TRUE;FALSE;avc1;2;regular;duration;768x432;0.5;900;60;cmf2;cfhd
29;E1_720x404;TRUE;FALSE;avc1;2;regular;duration;720x404;0.5;800;60;cmf2;cfhd
30;D1_704x396;TRUE;FALSE;avc1;2;regular;duration;704x396;0.5;700;60;cmf2;cfhd
31;C1_640x360;TRUE;FALSE;avc1;2;regular;duration;640x360;0.5;600;60;cmf2;cfhd
32;B1_512x288;TRUE;FALSE;avc1;2;regular;duration;512x288;0.5;450;60;cmf2;cfhd
33;A1_480x270;TRUE;FALSE;avc1;2;regular;duration;480x270;0.5;400;60;cmf2;cfhd
34;A1_480x270;TRUE;FALSE;avc1;2;regular;duration;480x270;0.25;300;60;cmf2;cfhd
LD;LD1_1920x1080;TRUE;FALSE;avc1;2;regular;duration;1920x1080;0.5;5100;7200;cmf2;cfhd
7 changes: 7 additions & 0 deletions profiles/chd1.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Stream ID;mezzanine radius;pic timing;VUI timing;sample entry;CMAF frag dur;init constraints;frag_type;resolution;framerate;bitrate;duration;cmaf_profile;wave_profile;cenc
61;O1_3840x2160;FALSE;TRUE;hvc1;2;regular;duration;3840x2160;1;15000;30;cmfc;chd1;TRUE
62;O1_3840x2160;TRUE;FALSE;hev1;2;regular;pframes;3840x2160;1;15000;30;cmf2;chd1;FALSE
70;O1_3840x2160;FALSE;TRUE;hvc1;2;regular;duration;3840x2160;1;15000;60;cmfc;chd1;FALSE
71;O1_3840x2160;FALSE;TRUE;hvc1;2;regular;duration;3840x2160;0.5;15000;60;cmfc;chd1;FALSE
72;M1_2560x1440;FALSE;TRUE;hvc1;2;regular;duration;2560x1440;0.5;10000;60;cmfc;chd1;FALSE
73;L1_1920x1080;FALSE;TRUE;hvc1;2;regular;duration;1920x1080;0.5;3500;60;cmfc;chd1;FALSE
12 changes: 12 additions & 0 deletions profiles/chh1.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Stream ID;mezzanine radius;pic timing;VUI timing;sample entry;CMAF frag dur;init constraints;frag_type;resolution;framerate;bitrate;duration;cmaf_profile;wave_profile;cenc;sar;Skip
1;L1_1920x1080;FALSE;TRUE;hvc1;2;regular;duration;1920x1080;1;3500;30;cmfc;chh1;TRUE;;
2;L1_1920x1080;TRUE;FALSE;hev1;2;regular;pframes;1920x1080;1;3600;30;cmf2;chh1;FALSE;;
3;L1_1920x1080;TRUE;TRUE;hvc1;2;regular;duration;1920x1080;1;3300;30;cmfc;chh1;FALSE;;
4;L1_1920x1080;FALSE;FALSE;hvc1;2;regular;duration;1920x1080;1;3200;30;cmfc;chh1;FALSE;;
5;L1_1920x1080;FALSE;TRUE;hev1;2;regular;duration;1920x1080;1;3100;30;cmfc;chh1;FALSE;;
6;L1_1920x1080;FALSE;TRUE;hvc1;2;regular;pframes;1920x1080;1;3800;30;cmfc;chh1;FALSE;;
7;L1_1920x1080;FALSE;TRUE;hvc1;2;regular;duration;1920x1080;1;3700;30;cmf2;chh1;FALSE;;
10;L1_1920x1080;FALSE;TRUE;hvc1;2;regular;duration;1920x1080;1;3400;60;cmfc;chh1;FALSE;;
11;L2_1920x1080;FALSE;TRUE;hvc1;2;regular;duration;1920x1080;0.5;3500;60;cmfc;chh1;FALSE;;
12;J1_1280x720;FALSE;TRUE;hvc1;2;regular;duration;1280x720;0.5;2000;60;cmfc;chh1;FALSE;;
non_square_par;L2_1920x1080;FALSE;TRUE;hvc1;2;regular;duration;1440x1080;1;2800;60;cmfc;chh1;FALSE;4/3;
4 changes: 4 additions & 0 deletions profiles/chh1_splice_ad.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Stream ID;mezzanine radius;pic timing;VUI timing;sample entry;CMAF frag dur;init constraints;frag_type;resolution;framerate;bitrate;duration;cmaf_profile;wave_profile;cenc
splice_ad;AD-B1_1920x1080;FALSE;TRUE;hvc1;2;regular;duration;1920x1080;1;3500;5.76;cmfc;chh1;TRUE
splice_ad;AD-B1_1920x1080;FALSE;TRUE;hvc1;2;regular;duration;1920x1080;1;3500;21.255;cmfc;chh1;TRUE
splice_ad;AD-B1_1920x1080;FALSE;TRUE;hvc1;2;regular;duration;1920x1080;1;3500;6.4;cmfc;chh1;TRUE
2 changes: 2 additions & 0 deletions profiles/chh1_splice_main.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Stream ID;mezzanine radius;pic timing;VUI timing;sample entry;CMAF frag dur;init constraints;frag_type;resolution;framerate;bitrate;duration;cmaf_profile;wave_profile;cenc
splice_main;B1_1920x1080;FALSE;TRUE;hvc1;2;regular;duration;1920x1080;1;3500;10;cmfc;chh1;TRUE
12 changes: 0 additions & 12 deletions profiles/hevc.csv

This file was deleted.

Loading

0 comments on commit 6f98609

Please sign in to comment.