diff --git a/vcsi/vcsi.py b/vcsi/m similarity index 99% rename from vcsi/vcsi.py rename to vcsi/m index c7967fc..4fd2cc9 100755 --- a/vcsi/vcsi.py +++ b/vcsi/m @@ -72,7 +72,7 @@ def __str__(self): # Defaults DEFAULT_METADATA_FONT = "/usr/share/fonts/TTF/DejaVuSans-Bold.ttf" DEFAULT_TIMESTAMP_FONT = "/usr/share/fonts/TTF/DejaVuSans.ttf" -FALLBACK_FONTS = ["/Library/Fonts/Arial Unicode.ttf"] +FALLBACK_FONTS = ["/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf", "/Library/Fonts/Arial Unicode.ttf"] # Replace defaults on Windows to support unicode/CJK and multiple fallbacks if os.name == 'nt': @@ -399,6 +399,11 @@ def parse_attributes(self): except KeyError: self.video_codec_long = None + try: + self.video_bit_rate = int(self.video_stream["bit_rate"]) + except KeyError: + self.video_bit_rate = None + try: self.sample_aspect_ratio = self.video_stream["sample_aspect_ratio"] except KeyError: @@ -466,6 +471,7 @@ def list_template_attributes(): table.append({"name": "video_codec", "description": "Video codec", "example": "h264"}) table.append({"name": "video_codec_long", "description": "Video codec (long name)", "example": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"}) + table.append({"name": "video_bit_rate", "description": "Video bitrate", "example": "4000"}) table.append({"name": "display_aspect_ratio", "description": "Display aspect ratio", "example": "16:9"}) table.append({"name": "sample_aspect_ratio", "description": "Sample aspect ratio", "example": "1:1"}) table.append({"name": "audio_codec", "description": "Audio codec", "example": "aac"}) @@ -728,7 +734,7 @@ def do_capture(ts_tuple, width, height, suffix, args): for i, timestamp_tuple in enumerate(timestamps): status = "Sampling... {}/{}".format(i + 1, args.num_samples) print(status, end="\r") - suffix = ".png" # arguably higher image quality + suffix = ".bmp" # lossless frame = do_capture(timestamp_tuple, desired_size[0], desired_size[1], suffix, args) blurs += [