Ticket #5247: count.diff
File count.diff, 4.2 KB (added by , 16 years ago) |
---|
-
mythburn.py
1750 1750 ############################################################# 1751 1751 # Pre-process a single video/recording file 1752 1752 1753 def preProcessFile(file, folder ):1753 def preProcessFile(file, folder, count): 1754 1754 """Pre-process a single video/recording file.""" 1755 1755 1756 write( "Pre-processing file '" + file.attributes["filename"].value + \ 1757 "' of type '"+ file.attributes["type"].value+"'") 1756 write( "Pre-processing %s %d: '%s'" % (file.attributes["type"].value, count, file.attributes["filename"].value)) 1758 1757 1759 1758 #As part of this routine we need to pre-process the video: 1760 1759 #1. check the file actually exists … … 4592 4591 # process a single file ready for burning using either 4593 4592 # mythtranscode/mythreplex or ProjectX as the cutter/demuxer 4594 4593 4595 def processFile(file, folder ):4594 def processFile(file, folder, count): 4596 4595 """Process a single video/recording file ready for burning.""" 4597 4596 4598 4597 if useprojectx: 4599 doProcessFileProjectX(file, folder )4598 doProcessFileProjectX(file, folder, count) 4600 4599 else: 4601 doProcessFile(file, folder )4600 doProcessFile(file, folder, count) 4602 4601 4603 4602 ############################################################# 4604 4603 # process a single file ready for burning using mythtranscode/mythreplex 4605 4604 # to cut and demux 4606 4605 4607 def doProcessFile(file, folder ):4606 def doProcessFile(file, folder, count): 4608 4607 """Process a single video/recording file ready for burning.""" 4609 4608 4610 4609 write( "*************************************************************") 4611 write( "Processing file " + file.attributes["filename"].value + " of type " + file.attributes["type"].value)4610 write( "Processing %s %d: '%s'" % (file.attributes["type"].value, count, file.attributes["filename"].value)) 4612 4611 write( "*************************************************************") 4613 4612 4614 4613 #As part of this routine we need to pre-process the video this MAY mean: … … 4808 4807 extractVideoFrame(os.path.join(folder, "stream.mv2"), titleImage, thumboffset) 4809 4808 4810 4809 write( "*************************************************************") 4811 write( "Finished processing file " +file.attributes["filename"].value)4810 write( "Finished processing '%s'" % file.attributes["filename"].value) 4812 4811 write( "*************************************************************") 4813 4812 4814 4813 … … 4820 4819 """Process a single video/recording file ready for burning.""" 4821 4820 4822 4821 write( "*************************************************************") 4823 write( "Processing file " + file.attributes["filename"].value + " of type " + file.attributes["type"].value)4822 write( "Processing %s %d: '%s'" % (file.attributes["type"].value, count, file.attributes["filename"].value)) 4824 4823 write( "*************************************************************") 4825 4824 4826 4825 #As part of this routine we need to pre-process the video this MAY mean: … … 4977 4976 extractVideoFrame(os.path.join(folder, "stream.mv2"), titleImage, thumboffset) 4978 4977 4979 4978 write( "*************************************************************") 4980 write( "Finished processing file " +file.attributes["filename"].value)4979 write( "Finished processing file '%s'" % file.attributes["filename"].value) 4981 4980 write( "*************************************************************") 4982 4981 4983 4982 ############################################################# … … 5109 5108 os.rmdir (folder) 5110 5109 os.makedirs(folder) 5111 5110 #Do the pre-process work 5112 preProcessFile(node,folder )5111 preProcessFile(node,folder,filecount) 5113 5112 5114 5113 if debug_secondrunthrough==False: 5115 5114 #Loop through all the files again but this time do more serious work! … … 5119 5118 folder=getItemTempPath(filecount) 5120 5119 5121 5120 #Process this file 5122 processFile(node,folder )5121 processFile(node,folder,filecount) 5123 5122 5124 5123 #We can only create the menus after the videos have been processed 5125 5124 #and the commercials cut out so we get the correct run time length