Ejemplo n.º 1
0
def process_file(source_path, image_directory):
    """Send a file to the movie data program.

    :param source_path: path to the file to process
    :param image_directory: directory to put screenshut files
    :returns: dictionary with metadata info
    """
    screenshot, fp = _make_screenshot_path(source_path, image_directory)
    result = run_media_metadata_extractor(source_path, screenshot)
    # we can close the file now, since MDP has written to it
    fp.close()
    return convert_mdp_result(source_path, screenshot, result)
Ejemplo n.º 2
0
 def handle_media_metadata_extractor_task(self, msg):
     filename = msg.filename
     thumbnail = msg.thumbnail
     return utils.run_media_metadata_extractor(filename, thumbnail)