tictacsync 0.5a0__tar.gz → 0.7a0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of tictacsync might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tictacsync
3
- Version: 0.5a0
3
+ Version: 0.7a0
4
4
  Summary: command for syncing audio video recordings
5
5
  Home-page: https://tictacsync.org/
6
6
  Author: Raymond Lutz
@@ -5,7 +5,7 @@ with open("README.md", "rb") as f:
5
5
  long_descr = f.read().decode("utf-8")
6
6
 
7
7
  long_description = 'CLI for syncing audio video \
8
- files containing an audio YaLTC sync track.'
8
+ files containing an audio TicTacCode sync track.'
9
9
 
10
10
  setup(
11
11
  name = "tictacsync",
@@ -31,7 +31,7 @@ setup(
31
31
  'multi2polywav = tictacsync.multi2polywav:main',
32
32
  ]
33
33
  },
34
- version = '0.5a',
34
+ version = '0.7a',
35
35
  description = "command for syncing audio video recordings",
36
36
  long_description_content_type='text/markdown',
37
37
  long_description = long_descr,
@@ -72,8 +72,9 @@ def process_files(medias):
72
72
  def process_single(file, args):
73
73
  # argument is a single file
74
74
  m = device_scanner.media_at_path(None, Path(file))
75
- a_rec = yaltc.Recording(m)
76
- time = a_rec.get_start_time(plots=args.plotting)
75
+ a_rec = yaltc.Recording(m, do_plots=args.plotting)
76
+ time = a_rec.get_start_time()
77
+ # time = a_rec.get_start_time(plots=args.plotting)
77
78
  if time != None:
78
79
  frac_time = int(time.microsecond / 1e2)
79
80
  d = '%s.%s'%(time.strftime("%Y-%m-%d %H:%M:%S"),frac_time)
@@ -124,10 +125,9 @@ def main():
124
125
  if args.verbose_output:
125
126
  logger.add(sys.stderr, level="DEBUG")
126
127
  # logger.add(sys.stdout, filter="__main__")
127
- # logger.add(sys.stdout, filter="device_scanner")
128
- # logger.add(sys.stdout, filter="yaltc") _extract_sound_to_merge
129
- # logger.add(sys.stdout, filter=lambda r: r["function"] == "media_at_path")
130
- # logger.add(sys.stdout, filter=lambda r: r["function"] == "scan_media_and_build_devices_UID")
128
+ # logger.add(sys.stdout, filter="yaltc")
129
+ # logger.add(sys.stdout, filter=lambda r: r["function"] == "_read_sound_find_TicTacCode")
130
+ # logger.add(sys.stdout, filter=lambda r: r["function"] == "_detect_sync_pulse_position")
131
131
  # logger.add(sys.stdout, filter=lambda r: r["function"] == "_get_device_mix")
132
132
  # logger.add(sys.stdout, filter=lambda r: r["function"] == "_sox_mix_files")
133
133
  top_dir = args.directory[0]
@@ -195,7 +195,7 @@ def main():
195
195
  # table.add_column("Device\n", justify="center", style='gold1')
196
196
  table.add_column("UTC times\nstart:end", justify="center", style='gold1')
197
197
  table.add_column("Clock drift\n(ppm)", justify="right", style='gold1')
198
- table.add_column("SN ratio\n(dB)", justify="center", style='gold1')
198
+ # table.add_column("SN ratio\n(dB)", justify="center", style='gold1')
199
199
  table.add_column("Date\n", justify="center", style='gold1')
200
200
  rec_WO_time = [
201
201
  rec.AVpath.name
@@ -218,7 +218,7 @@ def main():
218
218
  times_range,
219
219
  # '%.6f'%(r.true_samplerate/1e3),
220
220
  '%2i'%(r.get_samplerate_drift()),
221
- '%.0f'%r.decoder.SN_ratio,
221
+ # '%.0f'%r.decoder.SN_ratio,
222
222
  date
223
223
  )
224
224
  console = Console()
@@ -1111,6 +1111,7 @@ class Matcher:
1111
1111
  videoclip))
1112
1112
  audio_stitch = AudioStitcherVideoMerger(videoclip)
1113
1113
  for audio in audio_recs:
1114
+ logger.debug('checking %s'%audio)
1114
1115
  if self._does_overlap(videoclip, audio):
1115
1116
  audio_stitch.add_matched_audio(audio)
1116
1117
  logger.debug('recording %s overlaps,'%(audio))
@@ -1125,9 +1126,14 @@ class Matcher:
1125
1126
 
1126
1127
  def _does_overlap(self, videoclip, audio_rec):
1127
1128
  A1, A2 = audio_rec.get_start_time(), audio_rec.get_end_time()
1129
+ logger.debug('audio str stp: %s %s'%(A1,A2))
1128
1130
  R1, R2 = videoclip.get_start_time(), videoclip.get_end_time()
1129
- no_overlap = (A2 < R1) or (A1 > R2)
1130
- return not no_overlap
1131
+ logger.debug('video str stp: %s %s'%(R1,R2))
1132
+ case1 = A1 < R1 < A2
1133
+ case2 = A1 < R2 < A2
1134
+ case3 = R1 < A1 < R2
1135
+ case4 = R1 < A2 < R2
1136
+ return case1 or case2 or case3 or case4
1131
1137
 
1132
1138
  def shrink_gaps_between_takes(self, with_gap=CLUSTER_GAP):
1133
1139
  """