          folder, filename = os.path.split(alignments_file)
          if filename.lower() == "dfl":
              folder = None
              filename = "dfl"
              logger.info("Using extracted pngs for alignments")
          elif not os.path.isfile(alignments_file):
              logger.error("ERROR: alignments file not found at: '%s'", alignments_file)
              exit(0)
          if folder:
              logger.verbose("Alignments file exists at '%s'", alignments_file)
 
</s> remove     def set_dfl(self, destination_format):
        """ Set the alignments for dfl alignments """
        logger.debug("Alignments are DFL format")
        self.file = "dfl"
        self.set_destination_format(destination_format)

    def set_destination_format(self, destination_format):
        """ Standardize the destination format to the correct extension """
        extensions = {".json": "json",
                      ".p": "pickle",
                      ".yml": "yaml",
                      ".yaml": "yaml"}
        dst_fmt = None
        file_ext = os.path.splitext(self.file)[1].lower()
        logger.debug("File extension: '%s'", file_ext)

        if destination_format is not None:
            dst_fmt = destination_format
        elif self.file == "dfl":
            dst_fmt = "json"
        elif file_ext in extensions.keys():
            dst_fmt = extensions[file_ext]
        else:
            logger.error("'%s' is not a supported serializer. Exiting", file_ext)
            exit(0)

        logger.verbose("Destination format set to '%s'", dst_fmt)

        self.serializer = self.get_serializer("", dst_fmt)
        filename = os.path.splitext(self.file)[0]
        self.file = "{}.{}".format(filename, self.serializer.file_extension)
        logger.debug("Destination file: '%s'", self.file)

 </s> add  </s> remove             raise ValueError("Error: Alignments file not found at "
                             "{}".format(self.file))
 </s> add             raise FaceswapError("Error: Alignments file not found at "
                                "{}".format(self.file)) </s> remove             logger.debug("File extension set from filename: '%s'", extension)
            location = os.path.join(str(folder), filename)
        else:
            location = os.path.join(str(folder),
                                    "{}.{}".format(filename,
                                                   self.serializer.file_extension))
 </s> add             # Reformat legacy alignments file
            filename = self.update_file_format(folder, filename)
            logger.debug("Updated legacy alignments. New filename: '%s'", filename)
        elif not extension:
            filename = "{}.{}".format(filename, self.serializer.file_extension) </s> remove     def __init__(self, alignments_file, destination_format):
        logger.debug("Initializing %s: (alignments file: '%s', destination_format: '%s')",
                     self.__class__.__name__, alignments_file, destination_format)
 </s> add     def __init__(self, alignments_file):
        logger.debug("Initializing %s: (alignments file: '%s')",
                     self.__class__.__name__, alignments_file) </s> remove             self.set_dfl(destination_format)
 </s> add             self.file = filename
            logger.info("Using extracted DFL faces for alignments")
          folder, filename = os.path.split(alignments_file)
          if filename.lower() == "dfl":
              folder = None
              filename = "dfl"
            logger.info("Using extracted DFL faces for alignments")
          elif not os.path.isfile(alignments_file):
              logger.error("ERROR: alignments file not found at: '%s'", alignments_file)
              exit(0)
          if folder:
              logger.verbose("Alignments file exists at '%s'", alignments_file)
keep keep keep keep replace keep keep keep keep keep
 Legacy alignments update

- Remove legacy update hashes
- Remove legacy job from alignment-tools
- Remove legacy landmark rotation
- Add rotate face method to plugins/extract/detect
- Update travis test for new alignments extension
- Alignments format to .fsa
- Remove serializer option from alignments-tool
- Auto update legacy format alignment files to new format 
tools/lib_alignments/media.py