ordigi/elodie/media/video.py

59 lines
1.5 KiB
Python
Raw Normal View History

"""
2016-01-08 23:49:06 +01:00
The video module contains the :class:`Video` class, which represents video
objects (AVI, MOV, etc.).
.. moduleauthor:: Jaisen Mathai <jaisen@jmathai.com>
"""
2015-10-02 09:20:27 +02:00
# load modules
2015-10-12 09:37:57 +02:00
from datetime import datetime
2015-10-02 09:20:27 +02:00
import os
import re
import time
2016-03-12 20:09:28 +01:00
from .media import Media
2015-10-02 09:20:27 +02:00
2015-10-07 08:47:51 +02:00
class Video(Media):
2016-01-08 23:49:06 +01:00
"""A video object.
:param str source: The fully qualified path to the video file.
"""
__name__ = 'Video'
2016-01-08 23:49:06 +01:00
#: Valid extensions for video files.
extensions = ('avi', 'm4v', 'mov', 'mp4', 'mpg', 'mpeg', '3gp', 'mts')
2015-10-02 09:20:27 +02:00
def __init__(self, source=None):
2015-10-07 08:47:51 +02:00
super(Video, self).__init__(source)
self.date_original = [
'EXIF:DateTimeOriginal',
2021-06-20 08:35:28 +02:00
'H264:DateTimeOriginal',
'QuickTime:ContentCreateDate'
]
self.date_created = [
'EXIF:CreateDate',
'QuickTime:CreationDate',
'QuickTime:CreateDate',
'QuickTime:CreationDate-und-US',
'QuickTime:MediaCreateDate'
]
self.date_modified = ['File:FileModifyDate']
self.title_key = 'XMP:DisplayName'
self.latitude_keys = [
'XMP:GPSLatitude',
2016-06-24 06:31:58 +02:00
# 'QuickTime:GPSLatitude',
'Composite:GPSLatitude'
]
self.longitude_keys = [
'XMP:GPSLongitude',
2016-06-24 06:31:58 +02:00
# 'QuickTime:GPSLongitude',
'Composite:GPSLongitude'
]
self.latitude_ref_key = 'EXIF:GPSLatitudeRef'
self.longitude_ref_key = 'EXIF:GPSLongitudeRef'
self.set_gps_ref = False