Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add style guidelines #68

Merged
merged 2 commits into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
},
"python.formatting.provider": "none"
}
377 changes: 243 additions & 134 deletions AV/Audio/audio_processor/audio_processor/audio_processor_mainfunc.py

Large diffs are not rendered by default.

144 changes: 124 additions & 20 deletions AV/Audio/audio_processor/audio_processor/audio_processor_parameters.py
Original file line number Diff line number Diff line change
@@ -1,32 +1,136 @@
#!/usr/bin/env python3

'''
"""
Argument parser for in-house AJA v210/mov to ffv1/mkv script
'''
"""

import argparse
import sys

parser = argparse.ArgumentParser()

parser.add_argument('--input', '-i', action='store', dest='input_path', type=str, help='full path to input folder')
parser.add_argument('--output', '-o', action='store', dest='output_path', type=str, help='full path to output csv file for QC results. If not specified this will default to creating a file in the input directory')
parser.add_argument('--load_inventory', '-l', required=False, nargs='*', action='store', dest='source_inventory', help='Use to specify a CSV inventory. If not specified the script will look in the base folder of the input for CSV inventories. If no inventories are found the script will leave some fields blank.')
parser.add_argument('--sox', action='store', dest='sox_path', default='sox', type=str, help='For setting a custom sox path')
parser.add_argument('--bwfmetaedit', action='store', dest='metaedit_path', default='bwfmetaedit', type=str, help='For setting a custom BWF Metaedit path')
parser.add_argument('--ffmpeg', action='store', dest='ffmpeg_path', default='ffmpeg', type=str, help='For setting a custom ffmpeg path')
parser.add_argument('--ffprobe', action='store', dest='ffprobe_path', default='ffprobe', type=str, help='For setting a custom ffprobe path')
parser.add_argument('--mediaconch', action='store', dest='mediaconch_path', default='mediaconch', type=str, help='For setting a custom mediaconch path')
#parser.add_argument('--verbose', required=False, action='store_true', help='view ffmpeg output when transcoding')
parser.add_argument('--transcode', '-t', required=False, action='store_true', dest='transcode', help='Transcode access files')
parser.add_argument('--write_metadata', '-m', required=False, action='store_true', dest='write_bwf_metadata', help='Write Broadcast WAVE metadata to Preservation file')
#parser.add_argument('--reset_timereference', '-r', required=False, action='store_true', dest='reset_timereference', help='Reset the time reference of a BWF file to 00:00:00.000')
parser.add_argument('--write_json', '-j', required=False, action='store_true', dest='write_json', help='Write metadata to json file')
#parser.add_argument('--skipac', required=False, action='store_true', dest='skip_ac', help='skip access copy transcoding')
parser.add_argument('--spectrogram', '-s', required=False, action='store_true', dest='spectrogram', help='generate spectrograms')
parser.add_argument('--p_policy', required=False, action='store', dest='input_policy', help='Mediaconch policy for preservation files')
parser.add_argument('--a_policy', required=False, action='store', dest='output_policy', help='Mediaconch policy for access files')
parser.add_argument('--all', '-a', required=False, action='store_true', dest='all', help='This is equivalent to using -t -m -j -s')
parser.add_argument(
"--input",
"-i",
action="store",
dest="input_path",
type=str,
help="full path to input folder",
)
parser.add_argument(
"--output",
"-o",
action="store",
dest="output_path",
type=str,
help="full path to output csv file for QC results. If not specified this will default to creating a file in the input directory",
)
parser.add_argument(
"--load_inventory",
"-l",
required=False,
nargs="*",
action="store",
dest="source_inventory",
help="Use to specify a CSV inventory. If not specified the script will look in the base folder of the input for CSV inventories. If no inventories are found the script will leave some fields blank.",
)
parser.add_argument(
"--sox",
action="store",
dest="sox_path",
default="sox",
type=str,
help="For setting a custom sox path",
)
parser.add_argument(
"--bwfmetaedit",
action="store",
dest="metaedit_path",
default="bwfmetaedit",
type=str,
help="For setting a custom BWF Metaedit path",
)
parser.add_argument(
"--ffmpeg",
action="store",
dest="ffmpeg_path",
default="ffmpeg",
type=str,
help="For setting a custom ffmpeg path",
)
parser.add_argument(
"--ffprobe",
action="store",
dest="ffprobe_path",
default="ffprobe",
type=str,
help="For setting a custom ffprobe path",
)
parser.add_argument(
"--mediaconch",
action="store",
dest="mediaconch_path",
default="mediaconch",
type=str,
help="For setting a custom mediaconch path",
)
# parser.add_argument('--verbose', required=False, action='store_true', help='view ffmpeg output when transcoding')
parser.add_argument(
"--transcode",
"-t",
required=False,
action="store_true",
dest="transcode",
help="Transcode access files",
)
parser.add_argument(
"--write_metadata",
"-m",
required=False,
action="store_true",
dest="write_bwf_metadata",
help="Write Broadcast WAVE metadata to Preservation file",
)
# parser.add_argument('--reset_timereference', '-r', required=False, action='store_true', dest='reset_timereference', help='Reset the time reference of a BWF file to 00:00:00.000')
parser.add_argument(
"--write_json",
"-j",
required=False,
action="store_true",
dest="write_json",
help="Write metadata to json file",
)
# parser.add_argument('--skipac', required=False, action='store_true', dest='skip_ac', help='skip access copy transcoding')
parser.add_argument(
"--spectrogram",
"-s",
required=False,
action="store_true",
dest="spectrogram",
help="generate spectrograms",
)
parser.add_argument(
"--p_policy",
required=False,
action="store",
dest="input_policy",
help="Mediaconch policy for preservation files",
)
parser.add_argument(
"--a_policy",
required=False,
action="store",
dest="output_policy",
help="Mediaconch policy for access files",
)
parser.add_argument(
"--all",
"-a",
required=False,
action="store_true",
dest="all",
help="This is equivalent to using -t -m -j -s",
)

args = parser.parse_args()

Expand Down
Loading