Ticket #4539: mythburn-addffmpegparams.diff
File mythburn-addffmpegparams.diff, 2.3 KB (added by , 16 years ago) |
---|
-
mythburn.py
old new 2091 2091 parameters = profileNode.getElementsByTagName("parameter") 2092 2092 2093 2093 # default values - will be overriden by values from the profile 2094 outvideobitrate = 50002094 outvideobitrate = "5000k" 2095 2095 if videomode == "ntsc": 2096 2096 outvideores = "720x480" 2097 2097 else: … … 2101 2101 outaudiobitrate = 384 2102 2102 outaudiosamplerate = 48000 2103 2103 outaudiocodec = "ac3" 2104 deinterlace = 0 2105 croptop = 0 2106 cropright = 0 2107 cropbottom = 0 2108 cropleft = 0 2109 qmin = 5 2110 qmax = 31 2111 qdiff = 31 2104 2112 2105 2113 for param in parameters: 2106 2114 name = param.attributes["name"].value … … 2119 2127 outvideobitrate = value 2120 2128 if name == "-s": 2121 2129 outvideores = value 2130 if name == "-deinterlace": 2131 deinterlace = 1 2132 if name == "-croptop": 2133 croptop = value 2134 if name == "-cropright": 2135 cropright = value 2136 if name == "-cropbottom": 2137 cropbottom = value 2138 if name == "-cropleft": 2139 cropleft = value 2140 if name == "-qmin": 2141 qmin = value 2142 if name == "-qmax": 2143 qmax = value 2144 if name == "-qdiff": 2145 qdiff = value 2122 2146 2123 2147 if chanid != -1: 2124 2148 if (usecutlist == True): … … 2158 2182 command += "-f s16le -ar %s -ac %s -i %s " % (samplerate, channels, os.path.join(folder, "audout")) 2159 2183 command += "-f rawvideo -pix_fmt yuv420p -s %s -aspect %s -r %s " % (videores, aspectratio, fps) 2160 2184 command += "-i %s " % os.path.join(folder, "vidout") 2161 command += "-aspect %s -r %s -s %s -b %s " % (aspectratio, fps, outvideores, outvideobitrate) 2162 command += "-vcodec mpeg2video -qmin 5 " 2185 command += "-aspect %s -r %s " % (aspectratio, fps) 2186 if (deinterlace == 1): 2187 command += "-deinterlace " 2188 command += "-croptop %s -cropright %s -cropbottom %s -cropleft %s " % (croptop, cropright, cropbottom, cropleft) 2189 command += "-s %s -b %s -vcodec mpeg2video " % (outvideores, outvideobitrate) 2190 command += "-qmin %s -qmax %s -qdiff %s " % (qmin, qmax, qdiff) 2163 2191 command += "-ab %s -ar %s -acodec %s " % (outaudiobitrate, outaudiosamplerate, outaudiocodec) 2164 2192 command += "-f dvd %s" % quoteFilename(destvideofile) 2165 2193