  
      def get_serializer(self):
          """ Set the serializer to be used for loading and
              saving alignments """
          if (not hasattr(self.args, "serializer")
                  or not self.args.serializer):
              if self.args.alignments_path:
                  ext = os.path.splitext(self.args.alignments_path)[-1]
              else:
                  ext = "json"
              serializer = Serializer.get_serializer_from_ext(ext)
          else:
              serializer = Serializer.get_serializer(self.args.serializer)
          print("Using {} serializer".format(serializer.ext))
          return serializer
  
 
</s> remove             serializer = Serializer.get_serializer(self.args.serializer)
        print("Using {} serializer".format(serializer.ext))
 </s> add             # If there is a full filename then this will be overriden
            # by filename extension
            serializer = "json" </s> remove     def get_serializer(self):
 </s> add     def set_serializer(self): </s> remove     def get_location(self):
        """ Return the path to alignments file """
        if self.args.alignments_path:
            alignfile = self.args.alignments_path
        else:
            alignfile = os.path.join(
                str(self.args.input_dir),
                "alignments.{}".format(self.serializer.ext))
        print("Alignments filepath: %s" % alignfile)
        return alignfile

 </s> add  </s> remove         self.serializer = self.get_serializer()
        self.location = self.get_location()
        self.have_alignments_file = os.path.exists(self.location)
        self.data = self.load()

    def frames_count(self):
        """ Return current frames count """
        return len(self.data)

    def faces_count(self):
        """ Return current faces count """
        return sum(len(faces) for faces in self.data.values())
 </s> add         self.is_extract = is_extract
        folder, filename = self.set_folder_filename()
        serializer = self.set_serializer()
        super().__init__(folder,
                         filename=filename,
                         serializer=serializer,
                         verbose=self.args.verbose)

    def set_folder_filename(self):
        """ Return the folder for the alignments file"""
        if self.args.alignments_path:
            folder, filename = os.path.split(str(self.args.alignments_path))
        else:
            folder = str(self.args.input_dir)
            filename = "alignments"
        return folder, filename </s> remove         return dst_fmt

    def set_destination_serializer(self):
        """ set the destination serializer """
        self.serializer = Serializer.get_serializer(self.dst_format)

    def load(self):
        """ Read the alignments data from the correct format """
        print("Loading alignments from {}".format(self.file))
        with open(self.file, self.serializer.roptions) as align:
            alignments = self.serializer.unmarshal(align.read())
        return alignments
 </s> add         self.serializer = self.get_serializer("", dst_fmt)
        filename = os.path.splitext(self.file)[0]
        self.file = "{}.{}".format(filename, self.serializer.ext)
        if hasattr(self.args, "serializer") and self.args.serializer:
            serializer = self.args.serializer
  
      def get_serializer(self):
          """ Set the serializer to be used for loading and
              saving alignments """
        if hasattr(self.args, "serializer") and self.args.serializer:
            serializer = self.args.serializer
        if hasattr(self.args, "serializer") and self.args.serializer:
            serializer = self.args.serializer
        if hasattr(self.args, "serializer") and self.args.serializer:
            serializer = self.args.serializer
        if hasattr(self.args, "serializer") and self.args.serializer:
            serializer = self.args.serializer
        if hasattr(self.args, "serializer") and self.args.serializer:
            serializer = self.args.serializer
        if hasattr(self.args, "serializer") and self.args.serializer:
            serializer = self.args.serializer
        if hasattr(self.args, "serializer") and self.args.serializer:
            serializer = self.args.serializer
          else:
              serializer = Serializer.get_serializer(self.args.serializer)
          print("Using {} serializer".format(serializer.ext))
          return serializer
  
keep keep keep keep replace replace replace replace replace replace replace keep keep keep keep keep
 Fix convert-adjust (#531)

* Add dimensions to alignments + refactor

* Add frame_dims + funcs to DetectFaces. Add alignments lib

* Convert Adjust working

* Refactor and tidy up 
scripts/fsmedia.py