tictacsync 0.3a4__py3-none-any.whl → 0.4a0__py3-none-any.whl

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.

@@ -77,6 +77,7 @@ class Device:
77
77
  name: str
78
78
  dev_type: str # CAM or REC
79
79
  n_chan: int
80
+ ttc: int
80
81
  tracks: Tracks
81
82
  def __hash__(self):
82
83
  return self.UID
@@ -115,7 +116,7 @@ def media_at_path(input_structure, p):
115
116
  logger.debug('for file %s dev_UID established %s'%(p.name, dev_UID))
116
117
  return Media(p,
117
118
  Device(UID=dev_UID, folder=p.parent, name=dev_name, dev_type=dt,
118
- n_chan=n, tracks=None))
119
+ n_chan=n, ttc=None, tracks=None))
119
120
 
120
121
  def get_device_ffprobe_UID(file):
121
122
  """
@@ -342,32 +343,22 @@ class Scanner:
342
343
  ntracks += len(tracks.others)
343
344
  ntracks += 1 # for ttc track
344
345
  logger.debug(' n chan: %i n tracks file: %i'%(nchan, ntracks))
345
- # if ntracks != nchan:
346
- # print('\nError parsing %s content'%tracks_file)
347
- # print('incoherent number of tracks, %i vs %i quitting\n'%
348
- # (nchan, ntracks))
349
- # sys.exit(1)
346
+ if ntracks != nchan:
347
+ print('\nError parsing %s content'%tracks_file)
348
+ print('incoherent number of tracks, %i vs %i quitting\n'%
349
+ (nchan, ntracks))
350
+ sys.exit(1)
350
351
  err_msg = tracks.error_msg
351
352
  if err_msg != None:
352
353
  print('Error, quitting: in file %s, %s'%(tracks_file, err_msg))
353
354
  raise Exception
354
355
  else:
356
+ logger.debug('tracks object%s'%tracks)
355
357
  return tracks
356
358
  else:
357
359
  logger.debug('no tracks.txt file found')
358
360
  return None
359
361
 
360
- # def _use_folder_as_device_name(self):
361
- # """
362
- # For each media in self.found_media_files replace existing Device.name by
363
- # folder name.
364
-
365
- # Returns nothing
366
- # """
367
- # for m in self.found_media_files:
368
- # m.device.name = m.path.parent.name
369
- # logger.debug(self.found_media_files)
370
-
371
362
  def _check_folders_have_same_device(self):
372
363
  """
373
364
  Since input_structure == 'folder_is_device,
tictacsync/entry.py CHANGED
@@ -126,10 +126,10 @@ def main():
126
126
  # logger.add(sys.stdout, filter="__main__")
127
127
  # logger.add(sys.stdout, filter="device_scanner")
128
128
  # logger.add(sys.stdout, filter="yaltc") _extract_sound_to_merge
129
- # logger.add(sys.stdout, filter=lambda r: r["function"] == "scan_media_and_build_devices_UID")
130
- # logger.add(sys.stdout, filter=lambda r: r["function"] == "_sox_multi2mono")
131
- # logger.add(sys.stdout, filter=lambda r: r["function"] == "_get_mix")
132
- # logger.add(sys.stdout, filter=lambda r: r["function"] == "_sox_mix")
129
+ # logger.add(sys.stdout, filter=lambda r: r["function"] == "_get_tracks_from_file")
130
+ # logger.add(sys.stdout, filter=lambda r: r["function"] == "_get_device_mix")
131
+ # logger.add(sys.stdout, filter=lambda r: r["function"] == "_sox_mono2stereo")
132
+ # logger.add(sys.stdout, filter=lambda r: r["function"] == "_sox_mix_files")
133
133
  top_dir = args.directory[0]
134
134
  if os.path.isfile(top_dir):
135
135
  file = top_dir
@@ -234,7 +234,7 @@ def main():
234
234
  print('\nNothing to sync, exiting.\n')
235
235
  sys.exit(1)
236
236
  matcher = timeline.Matcher(recordings_with_time)
237
- matcher.scan_audio_for_each_ref_rec()
237
+ matcher.scan_audio_for_each_videoclip()
238
238
  if not matcher.video_mergers:
239
239
  if not args.terse:
240
240
  print('\nNothing to sync, bye.\n')
@@ -263,11 +263,11 @@ def main():
263
263
  print('\nWrote output in folder [gold1]%s[/gold1]'%(
264
264
  a_stitcher.synced_clip_dir))
265
265
  for stitcher in matcher.video_mergers:
266
- print('[gold1]%s[/gold1]'%stitcher.ref_recording.AVpath.name, end='')
266
+ print('[gold1]%s[/gold1]'%stitcher.videoclip.AVpath.name, end='')
267
267
  for audio in stitcher.get_matched_audio_recs():
268
268
  print(' + [gold1]%s[/gold1]'%audio.AVpath.name, end='')
269
- new_file = stitcher.ref_recording.final_synced_file.parts
270
- print(' became [gold1]%s[/gold1]'%stitcher.ref_recording.final_synced_file.name)
269
+ new_file = stitcher.videoclip.final_synced_file.parts
270
+ print(' became [gold1]%s[/gold1]'%stitcher.videoclip.final_synced_file.name)
271
271
  # matcher._build_otio_tracks_for_cam()
272
272
  matcher.shrink_gaps_between_takes()
273
273
  sys.exit(0)