tictacsync 0.3a2__tar.gz → 0.3a3__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.3a2
3
+ Version: 0.3a3
4
4
  Summary: command for syncing audio video recordings
5
5
  Home-page: https://tictacsync.org/
6
6
  Author: Raymond Lutz
@@ -31,7 +31,7 @@ setup(
31
31
  'multi2polywav = tictacsync.multi2polywav:main',
32
32
  ]
33
33
  },
34
- version = '0.3a2',
34
+ version = '0.3a3',
35
35
  description = "command for syncing audio video recordings",
36
36
  long_description_content_type='text/markdown',
37
37
  long_description = long_descr,
@@ -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"] == "build_audio_and_write_video")
129
+ logger.add(sys.stdout, filter=lambda r: r["function"] == "build_audio_and_write_video")
130
130
  # logger.add(sys.stdout, filter=lambda r: r["function"] == "_get_audio_devices")
131
- # logger.add(sys.stdout, filter=lambda r: r["function"] == "_get_mix")
132
- # logger.add(sys.stdout, filter=lambda r: r["function"] == "_sox_mix")
131
+ logger.add(sys.stdout, filter=lambda r: r["function"] == "_get_mix")
132
+ logger.add(sys.stdout, filter=lambda r: r["function"] == "_sox_mix")
133
133
  top_dir = args.directory[0]
134
134
  if os.path.isfile(top_dir):
135
135
  file = top_dir
@@ -581,34 +581,37 @@ class AudioStitcherVideoMerger:
581
581
  tracks. If not, mix all the tracks with sox.
582
582
 
583
583
  """
584
- if device.tracks != None:
585
- mix_tracks = device.tracks.mix
586
- if len(mix_tracks) > 0:
587
- logger.debug('%s has mix %s'%(device.name, mix_tracks))
588
- logger.debug('device %s'%device)
589
- if 'ttc' in device.tracks.rawtrx:
590
- sox_TTC_chan = device.tracks.rawtrx.index('ttc')
591
- elif 'tc' in device.tracks.rawtrx:
592
- sox_TTC_chan = device.tracks.rawtrx.index('tc')
593
- else:
594
- print('Error: no tc or ttc tag in track.txt')
595
- sys.exit(1)
596
- sox_TTC_chan += 1 # sox NZBIDX
597
- logger.debug('TTC chan %i'%sox_TTC_chan)
598
- # redo indexing since tracks.txt numbers refere to complete
599
- # files and here audio file had TTC and muted channels
600
- # removed.
601
- shift = 0
602
- if mix_tracks[0] > sox_TTC_chan:
603
- shift += 1
604
- for unused_tr in device.tracks.unused:
605
- if mix_tracks[0] > unused_tr:
606
- shift += 1
607
- mix_tracks = [t-shift for t in mix_tracks]
608
- logger.debug('new mix_tracks: %s'%mix_tracks)
609
- return _sox_keep(multichan_tmpfl, mix_tracks)
610
- else: # no tracks declaration, mix programmatically
584
+ if device.tracks is None:
585
+ logger.debug('no tracks.txt, mixing all')
586
+ return _sox_mix(_split_channels(multichan_tmpfl))
587
+ mix_tracks = device.tracks.mix
588
+ if mix_tracks == []:
589
+ logger.debug('tracks.txt present but no mix trx, mixing all')
611
590
  return _sox_mix(_split_channels(multichan_tmpfl))
591
+ logger.debug('%s has mix %s'%(device.name, mix_tracks))
592
+ logger.debug('device %s'%device)
593
+ if 'ttc' in device.tracks.rawtrx:
594
+ sox_TTC_chan = device.tracks.rawtrx.index('ttc')
595
+ elif 'tc' in device.tracks.rawtrx:
596
+ sox_TTC_chan = device.tracks.rawtrx.index('tc')
597
+ else:
598
+ print('Error: no tc or ttc tag in track.txt')
599
+ sys.exit(1)
600
+ sox_TTC_chan += 1 # sox NZBIDX
601
+ logger.debug('TTC chan %i'%sox_TTC_chan)
602
+ # redo indexing since tracks.txt numbers refere to complete
603
+ # files and here audio file had TTC and muted channels
604
+ # removed.
605
+ shift = 0
606
+ if mix_tracks[0] > sox_TTC_chan:
607
+ shift += 1
608
+ for unused_tr in device.tracks.unused:
609
+ if mix_tracks[0] > unused_tr:
610
+ shift += 1
611
+ mix_tracks = [t-shift for t in mix_tracks]
612
+ logger.debug('new mix_tracks: %s'%mix_tracks)
613
+ return _sox_keep(multichan_tmpfl, mix_tracks)
614
+
612
615
 
613
616
  def build_audio_and_write_video(self, top_dir, output_dir,
614
617
  write_multicam_structure,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tictacsync
3
- Version: 0.3a2
3
+ Version: 0.3a3
4
4
  Summary: command for syncing audio video recordings
5
5
  Home-page: https://tictacsync.org/
6
6
  Author: Raymond Lutz
File without changes
File without changes
File without changes