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

converter.py #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
8 changes: 1 addition & 7 deletions tdmstovideo/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,7 @@ def get_video_metadata(videotdms, metadatatdms):
if props['width'] > 0:
# Get size of video to be converted
videosize = os.path.getsize(videotdms)
tot = np.int(round(videosize/(props['width']*props['height']))) # tot number of frames
if tot != props['last']:
raise ValueError('Calculated number of frames doesnt match what is stored in the metadata: {} vs {}'.format(tot, props['last']))
else:
tot = 0

return props, tot
return props


def write_clip(data, savename, tot_frames, w, h, framerate, iscolor=False):
Expand Down