コード例 #1
0
 def on_ok(self, event):
     
     logname = 'Videomass_VideoCut.log'
     
     if self.ffmpeg_log == 'true':
         report = '-report'
     else:
         report = ''
         
     diction_command["cutstart"] = "%s:%s:%s" % (self.init_hour, self.init_minute, 
                                                 self.init_second
                                                 )
     diction_command["cutlengh"] = "%s:%s:%s" % (self.cut_hour, self.cut_minute, 
                                                 self.cut_second
                                                 )
     command = ("%s %s -i '%s' -loglevel %s -ss %s -t %s "
                 "-vcodec copy -acodec copy %s -y '%s'" % (self.ffmpeg_link,
                 report, self.text_open.GetValue(), self.loglevel_type, 
                 diction_command["cutstart"], diction_command["cutlengh"], 
                 self.threads, self.text_save.GetValue())
                 )
     formula = ("FORMULATIONS:\n\nConversion Mode:\nVideo Format:\
                 \nStart cutting:\nSequence Duration:\nImporting:\
                 \nExporting:"
                )
     dictions = ("\n\n%s\nvideo copy (%s)\n%s\n%s\n%s\n%s" % (
                 "Single File Export",diction_command["ext_input"], 
                 diction_command["cutstart"],diction_command["cutlengh"], 
                 diction_command["InputDir"],diction_command["OutputDir"])
                 )
     ending = Formula(self, formula, dictions)
     
     if ending.ShowModal() == wx.ID_OK:
         dial = proc_std(self, 'Videomass - Run single process', command,
                         self.path_log, logname, self.command_log,)
コード例 #2
0
 def on_ok(self, event):
     
     logname = 'Videomass_AudioGrab.log'
     
     if self.ffmpeg_log == 'true':
         report = '-report'
     else:
         report = ''
         
     if 'batch' in array:
         command = ("-loglevel %s -vn %s %s %s %s %s %s" % (
                         self.loglevel_batch,
                         diction_command["AudioCodec"], 
                         diction_command["AudioBitrate"], 
                         diction_command["AudioChannel"], 
                         diction_command["AudioRate"], 
                         self.threads, diction_command["testing"])
                         )
         valupdate = self.update_dict()
         ending = Formula(self, valupdate[0], valupdate[1])
         
         if ending.ShowModal() == wx.ID_OK:
             
             status = control_errors(self.text_open.GetValue(),
                                     diction_command["ext_input"],
                                     command, logname
                                     )
             if  status[0] == 'no_error':
         
                 proc_batch_thread(status[2], self.text_open.GetValue(), 
                                 diction_command["Audioext"], 
                                 self.text_save.GetValue(), command, 
                                 None, None, logname, self.ffmpeg_link
                                 )
                 dial = ProgressDialog(self, 'Videomass Batch Process', 
                                 status[1], diction_command["ext_input"],
                                 diction_command["Audioext"],
                                 self.text_save.GetValue(), self.path_log, 
                                 self.command_log, logname
                                     )
     else:
         command = ("%s %s -i '%s' -loglevel %s -vn %s %s %s %s "
                 "%s %s -y '%s'" % (self.ffmpeg_link, report, 
                     self.text_open.GetValue(), self.loglevel_type, 
                     diction_command["AudioCodec"], 
                     diction_command["AudioBitrate"], 
                     diction_command["AudioChannel"], 
                     diction_command["AudioRate"], 
                     self.threads, diction_command["testing"], 
                     self.text_save.GetValue())
                         )
         valupdate = self.update_dict()
         ending = Formula(self, valupdate[0], valupdate[1])
         
         if ending.ShowModal() == wx.ID_OK:
             dial = proc_std(self, 'Videomass - Run single process', 
                             command, self.path_log, logname, 
                             self.command_log
                             )
コード例 #3
0
    def on_ok(self, event):
        
        logname = 'Videomass_AudioAdd.log'
        
        if self.ffmpeg_log == 'true':
            report = '-report'
            
        else:
            report = ''

        if self.text_open.GetValue() == "": # inputdir vuoto
            wx.MessageBox("No files selected for conversion !","Warning", 
                          wx.OK | wx.ICON_EXCLAMATION, self)
            
        elif self.text_save.GetValue() == "": # outputdir vuoto
            wx.MessageBox("No name/path to save !", "Warning", wx.OK | 
                          wx.ICON_EXCLAMATION, self)
            
        elif self.text_import.GetValue() == "": # inputdir vuoto
            wx.MessageBox("No imported audio file !", "Warning", wx.OK | 
                             wx.ICON_EXCLAMATION, self)
            
        else:
            command = ("%s %s -i '%s' -i '%s' -loglevel %s -vcodec "
                    "copy %s %s %s %s %s -y '%s'" % (self.ffmpeg_link,
            report, self.text_import.GetValue(), self.text_open.GetValue(), 
            self.loglevel_type, diction_command["AudioCodec"], 
            diction_command["AudioBitrate"], diction_command["AudioChannel"], 
            diction_command["AudioRate"], self.threads, 
            self.text_save.GetValue())
                    )
            formula = (u"FORMULATIONS:\n\nConversion Mode:\
                       \nAudio format:\nAudio codec:\nAudio channel:\
                       \nAudio rate:\nAudio bit-rate:\nImported audio file:\
                       \nInput dir/file:\nOutput dir/file:")
            dictions = ("\n\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s" % (
                       "Single file only", diction_command["Audioext"], 
                       diction_command["AudioCodec"],
                       diction_command["AudioChannel"], 
                       diction_command["AudioRate"],
                       diction_command["AudioBitrate"],
                       diction_command['ImportFile'],
                       diction_command["InputDir"],
                       diction_command["OutputDir"]))
            
            ending = Formula(self, formula, dictions)
            
            if ending.ShowModal() == wx.ID_OK:
                dial = proc_std(self, 'Videomass - Run single process', command,
                                self.path_log, logname, self.command_log,
                                )
コード例 #4
0
    def on_ok(self, event):
        
        logname = 'Videomass_AudioGrabSequence.log'
        
        if self.ffmpeg_log == 'true':
            report = '-report'
        else:
            report = ''

        if self.text_open.GetValue() == "": # inputdir vuoto
            wx.MessageBox("No files selected for conversion !","Warning", 
                          wx.OK | wx.ICON_EXCLAMATION, self
                          )
        elif self.text_save.GetValue() == "": # outputdir vuoto
            wx.MessageBox("No path-name to be saved !", "Warning", wx.OK | 
                             wx.ICON_EXCLAMATION, self
                             )
        else:
            diction_command["cutstart"] = "%s:%s:%s" % (self.init_hour, self.init_minute, 
                                                    self.init_second
                                                    )
            diction_command["cutlengh"] = "%s:%s:%s" % (self.cut_hour, self.cut_minute, 
                                                    self.cut_second
                                                    )
            command = ("%s %s -i '%s' -ss %s -t %s -loglevel %s -vn "
                    "%s %s %s %s -y '%s'" % (self.ffmpeg_link, report, 
                    self.text_open.GetValue(), diction_command["cutstart"], 
                    diction_command["cutlengh"], self.loglevel_type, 
                    diction_command["AudioCodec"], diction_command["AudioBitrate"], 
                    diction_command["AudioChannel"], diction_command["AudioRate"], 
                    self.text_save.GetValue())
                            )
            formula = (u"FORMULATIONS:\n\nConversion Mode:\nStart cutting:\
                    \nduration sequence:\nOutput Audio Format:\nAudio codec:\
                    \nAudio channel:\nAudio rate:\nAudio bit-rate:\
                    \nInput Path:\nOutput Path:\nFile Extension Group:"
                    )
            dictions = ("\n\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s" % (
                    "Solo file singolo",diction_command["cutstart"], 
                    diction_command["cutlengh"],diction_command["Audioext"], 
                    diction_command["AudioCodec"],diction_command["AudioChannel"], 
                    diction_command["AudioRate"],diction_command["AudioBitrate"], 
                    diction_command["InputDir"],diction_command["OutputDir"], 
                    diction_command["ext_input"])
                         )
            ending = Formula(self,formula,dictions)
            
            if ending.ShowModal() == wx.ID_OK:
                dial = proc_std(self, 'Videomass - Run single process',command,
                                self.path_log,logname,self.command_log,)
コード例 #5
0
 def on_ok(self, event):
     logname = 'Videomass_VideoGrabFrame.log'
     
     if self.ffmpeg_log == 'true':
         report = '-report'
     else:
         report = ''
         
     diction_command["cutstart"] = "%s:%s:%s" % (self.init_hour, self.init_minute, 
                                                 self.init_second
                                                 )
     diction_command["cutlengh"] = "%s:%s:%s" % (self.cut_hour, self.cut_minute, 
                                                 self.cut_second
                                                 )
     diction_command["frame"] = self.combo_box.GetValue()
     fileout = "image%d.jpg"
     command = ("%s %s -i '%s' -loglevel %s -ss %s -t %s -r %s "
             "-an %s -y '%s/%s'" % (self.ffmpeg_link, report, 
                 self.text_open.GetValue(), self.loglevel_type, 
                 diction_command["cutstart"], diction_command["cutlengh"], 
                 self.combo_box.GetValue(), self.threads, 
                 self.text_save.GetValue(), fileout)
                  )
     formula = ("FORMULATIONS:\n\nConversion Mode:\
             \nStart cutting:\nSequence Duration:\nFrame\nInput dir/file:\
             \nOutput dir/file:"
                 )
     dictions = ("\n\n%s\n%s\n%s\n%s\n%s\n%s" % ("Single file", 
                 diction_command["cutstart"],diction_command["cutlengh"],
                 diction_command["frame"],diction_command["InputDir"],
                 diction_command["OutputDir"])
                 )
     ending = Formula(self,formula,dictions)
     
     if ending.ShowModal() == wx.ID_OK:
         dial = proc_std(self, 'Videomass - Run single process', command,
                         self.path_log, logname, self.command_log,
                         )
コード例 #6
0
 def on_ok(self, event):
     logname = 'Videomass_VideoRotate.log'
     
     if self.ffmpeg_log == 'true':
         report = '-report'
     else:
         report = ''
          
     if self.text_rotate.GetValue() == "": # text_rotate vuoto
         wx.MessageBox("You have not set any rotation point!", "Warning", 
                          wx.OK | wx.ICON_EXCLAMATION, self)
     else:
         command = ("%s %s -i '%s' -loglevel %s %s -metadata:s:v rotate=0 "
                    "-codec:a copy %s -y '%s'" % (
                    self.ffmpeg_link, report, self.text_open.GetValue(), 
                    self.loglevel_type, diction_command["orientation"], 
                    self.threads, self.text_save.GetValue())
                    )
         formula = (u"FORMULATIONS:\n\nConversion Mode:\
                    \nVideo:\nAudio:\nOrientation point:\
                    \nInput dir/file:\nOutput dir/file:"
                    )
         dictions = (u"\n\n%s\n%s\n%s\n%s\n%s\n%s" % ("Single file only", 
                      'Re-coding original format (%s)' % (
                      diction_command["ext_input"]),
                      'Source Audio Copy',
                      diction_command["str_orientation"],
                      diction_command["InputDir"],
                      diction_command["OutputDir"])
                     )
         ending = Formula(self,formula,dictions)
         
         if ending.ShowModal() == wx.ID_OK:
             dial = proc_std(self, 'Videomass - Run single process', command,
                             self.path_log, logname, self.command_log,
                             )
コード例 #7
0
    def on_ok(self, event):
        
        logname = 'Videomass_Normalizer.log'
        #overwrite = ""
        
        if self.ffmpeg_log == 'true':
            report = '-report'
        else:
            report = ''
            
        #if self.checkbox_overwrite.GetValue() is True:
                #overwrite = "-y"
        #else:

        if 'batch' in array:########### BATCH MODE ACTIVE
        
            #if self.text_path_open.GetValue() == self.text_path_save.GetValue():
                #wx.MessageBox("Warning, you're overwriting all the imported "
                                #"files. if you want to allow overwriting must "
                                #"first check the checkbox on, otherwise change "
                                #"the name or destination directory.", 'Warning', 
                                #wx.ICON_EXCLAMATION, self)
                #return
            
            if self.text_group_ext.GetValue() == "":
                wx.MessageBox("Please, write in the box 'Group' the extension "
                              "of the files to be processed.", 'Warning', 
                              wx.ICON_EXCLAMATION, self)
                return

            valupdate = self.update_dict()
            ending = Formula(self, valupdate[0], valupdate[1])
            
            if ending.ShowModal() == wx.ID_OK:
                log_command = "%s -i '%s' -loglevel error -af volume=%sdB %s '%s'" % (
                                            self.ffmpeg_link,
                                            self.text_path_open.GetValue(), 
                                            diction_command["Normalize"], 
                                            self.threads,
                                            self.text_path_save.GetValue(),
                                                        )
                status = control_errors(self.text_path_open.GetValue(),
                                            diction_command["ext_input"],
                                            log_command, logname,
                                        )
                if  status[0] == 'no_error':
                    proc_normalize_batch_thread(
                                    status[2], self.text_path_open.GetValue(), 
                                    self.threads, diction_command["ext_input"], 
                                    self.text_path_save.GetValue(), 
                                    diction_command["limited"],
                                    diction_command["Normalize"], logname,
                                    self.ffmpeg_link
                                    )
                    dial = ProgressDialog(self, 'Videomass Batch Process', 
                                        status[1], diction_command["ext_input"],
                                        diction_command["Audioext"],
                                        self.text_path_save.GetValue(),
                                        self.path_log, self.command_log,
                                        logname
                                            )
        else:  ########### STANDARD MODE
            inputfile = self.text_path_open.GetValue() 
            outputfile = diction_command["OutputDir"]
            limited = diction_command["limited"]
            normalize = diction_command["Normalize"]
            
            alias_vol = proc_volumedetect(inputfile, self.ffmpeg_link) # chiamo os_processing.proc_volumedetect
            raw_list = alias_vol[4] # list
            index_maxvol = alias_vol[0] # index int of raw_list
            maxvol = raw_list[index_maxvol + 1] # next item of index
            
            if float(maxvol) < limited: # if vol max is inferior at..
                result = float(maxvol) - float(normalize)
                result_str = str(result)
                command = ("%s %s -i '%s' -loglevel %s "
                        "-af volume=%sdB %s -y '%s'" % (self.ffmpeg_link, 
                        report, inputfile, self.loglevel_type, 
                        result_str[1:], self.threads, outputfile)
                        )
            valupdate = self.update_dict()
            ending = Formula(self, valupdate[0], valupdate[1])
            
            if ending.ShowModal() == wx.ID_OK:
                dial = proc_std(self, 'Videomass - Run single process', command,
                                self.path_log, logname, self.command_log,
                                )