diff --git a/vhsdecode/hifi/HifiUi.py b/vhsdecode/hifi/HifiUi.py index 0bac7404d..061b0e904 100644 --- a/vhsdecode/hifi/HifiUi.py +++ b/vhsdecode/hifi/HifiUi.py @@ -52,7 +52,7 @@ def __init__(self): self.grc = False self.preview: bool = False self.preview_available: bool = True - self.audio_sample_rate: int = 44100 + self.audio_sample_rate: int = 48000 self.standard: str = "PAL" self.format: str = "VHS" self.audio_mode: str = "Stereo" @@ -82,7 +82,7 @@ def ui_parameters_to_decode_options(values: MainUIParameters): decode_options = { "input_rate": float(values.input_sample_rate) * 1e6, "standard": "p" if values.standard == "PAL" else "n", - "format": "vhs" if values.format == "VHS" else "h8", + "format": "vhs" if values.format == "VHS" else "8mm", "preview": values.preview, "original": False, "noise_reduction": values.noise_reduction, @@ -283,6 +283,8 @@ def __init__( self.input_samplerate_combo.addItems( [ "DdD (40.0)", + "Clockgen (10.0)" + "RTLSDR (8.0)" "cxadc (28.64)", "cxadc3 (35.8)", "10cxadc (14.32)", @@ -292,6 +294,8 @@ def __init__( ) self._input_combo_rates = [ 40.0, + 10.0, + 8.0, 28.64, 35.8, 14.32, diff --git a/vhsdecode/hifi/main.py b/vhsdecode/hifi/main.py index c944c644d..54bd64809 100644 --- a/vhsdecode/hifi/main.py +++ b/vhsdecode/hifi/main.py @@ -55,20 +55,24 @@ parser, _ = common_parser_cli( - "Extracts audio from raw VHS HiFi FM capture", + "Extracts audio from RAW HiFi FM RF captures", default_threads=round(cpu_count() / 2), ) parser.add_argument( - "--audio_rate", + "--ar", "--audio_rate", dest="rate", type=int, - default=44100, - help="Output sample rate in Hz (default 44100)", + default=48000, + help="Output sample rate in Hz (default 48000)", ) parser.add_argument( - "--bg", dest="BG", action="store_true", default=False, help="Do carrier bias guess" + "--bg", "--bias_guess", + dest="BG", + action="store_true", + default=False, + help="Do carrier bias guess" ) parser.add_argument( @@ -121,11 +125,11 @@ ) parser.add_argument( - "--h8", - dest="H8", + "--8mm", + dest="8mm", action="store_true", default=False, - help="Video8/Hi8, 8mm tape format", + help="Sony Video8/Hi8, 8mm tape formats", ) parser.add_argument( @@ -137,11 +141,11 @@ ) parser.add_argument( - "--ui", + "--ui", "--gui" dest="UI", action="store_true", default=False, - help="Opens hifi-ui", + help="Opens hifi-decode GUI graphical user interface", ) parser.add_argument( @@ -319,7 +323,7 @@ def close(self): # This part is what opens the file # The samplerate here could be anything -def as_soundfile(pathR, sample_rate=44100): +def as_soundfile(pathR, sample_rate=48000): path = pathR.lower() if ".raw" in path or ".s16" in path: return sf.SoundFile( @@ -768,13 +772,13 @@ def main() -> int: print("Initializing ...") - real_mode = "s" if not args.H8 else "mpx" + real_mode = "s" if not args.8mm else "mpx" real_mode = args.mode if args.mode in ["l", "r", "sum"] else real_mode decode_options = { "input_rate": sample_freq * 1e6, "standard": "p" if system == "PAL" else "n", - "format": "vhs" if not args.H8 else "h8", + "format": "vhs" if not args.8mm else "8mm", "preview": args.preview, "preview_available": SOUNDDEVICE_AVAILABLE, "original": args.original,