Skip to content

Commit

Permalink
added goal+exs to readme, out file+duration
Browse files Browse the repository at this point in the history
  • Loading branch information
dan144 committed Jun 22, 2018
1 parent a247b90 commit 617a499
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Uses Python3 and MoviePy
## Upcoming features

* Allowing multiple input files to one unified output file
* Option to create video with range of output FPS values and input frame sample rate
* Rounding on times given
* Code cleanup/refactoring

Expand All @@ -28,3 +29,7 @@ This script was used to produce the time lapse videos below:
[1 frame per 8s of source footage, 30fps output](https://youtu.be/ZCyjla6Yr08)

[1 frame per 16s of source footage, 30fps output](https://youtu.be/ITFrZJOJg6U)

[1 frame per 32s of source footage, 30fps output](https://youtu.be/Tq79p_1vb_8)

[1 frame per 64s of source footage, 30fps output](https://youtu.be/falzE-nRTfA)
11 changes: 7 additions & 4 deletions timelapse.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ def formatted_remaining(rem):
if not os.path.exists(clip_name):
print('Clip does not exit at given path: {}'.format(clip_name))
clip_name = ''
output_name = input('Output clip path and name: ')
if not output_name.endswith('.mp4'):
print('Output must be an mp4 file')
sys.exit(1)
output_name = ''
while output_name == '':
output_name = input('Output clip path and name: ')
if not output_name.endswith('.mp4'):
print('Output must be an mp4 file')
output_name = ''

# general settings
extract_f_per_x_s = int(input('Extract 1 frame per x second of input video: '))
Expand All @@ -35,6 +37,7 @@ def formatted_remaining(rem):
frame_count = int(clip.end) + 1
frame_count = int(frame_count / extract_f_per_x_s)
print("Extracting {} frames from {}".format(frame_count, clip_name))
print('{} will be {}'.format(output_name, formatted_remaining(frame_count / output_fps)))
frame_digits = len(str(frame_count))

# extract frames
Expand Down

0 comments on commit 617a499

Please sign in to comment.