mirror of
https://github.com/KrisKennaway/ii-vision.git
synced 2024-12-09 16:49:19 +00:00
Print input frame rate, and default to every_n_video_frames=2 which
gives better quality without compromising frame rate too much.
This commit is contained in:
parent
eebbccf711
commit
f37d07914d
@ -19,7 +19,7 @@ parser.add_argument(
|
||||
help='Override auto-detected multiplier for audio normalization.'
|
||||
)
|
||||
parser.add_argument(
|
||||
'--every_n_video_frames', type=int, default=1,
|
||||
'--every_n_video_frames', type=int, default=2,
|
||||
help='Allows skipping frames of input video to lower effective output '
|
||||
'frame rate, which may give better quality for some videos.'
|
||||
)
|
||||
@ -31,6 +31,8 @@ def main(args):
|
||||
every_n_video_frames=args.every_n_video_frames,
|
||||
audio_normalization=args.audio_normalization)
|
||||
|
||||
print("Input frame rate = %f" % m.video.input_frame_rate)
|
||||
|
||||
max_bytes_out = 1024. * 1024 * args.max_output_mb
|
||||
|
||||
if args.output:
|
||||
|
@ -35,11 +35,11 @@ class Video:
|
||||
# TODO: possible to compute time offset for each frame instead?
|
||||
data = skvideo.io.ffprobe(self.filename)['video']
|
||||
rate_data = data['@r_frame_rate'].split("/") # e.g. 12000/1001
|
||||
self._input_frame_rate = float(
|
||||
self.input_frame_rate = float(
|
||||
rate_data[0]) / float(rate_data[1]) # type: float
|
||||
|
||||
self.cycles_per_frame = (
|
||||
self.CLOCK_SPEED / self._input_frame_rate) # type: float
|
||||
self.CLOCK_SPEED / self.input_frame_rate) # type: float
|
||||
self.frame_number = 0 # type: int
|
||||
|
||||
# Initialize empty screen
|
||||
|
Loading…
Reference in New Issue
Block a user