MythTV  0.26-pre
Classes | Namespaces | Functions | Variables
mythburn.py File Reference

Go to the source code of this file.

Classes

class  mythburn.FontDef
 class to hold a font definition More...

Namespaces

namespace  mythburn

Functions

def mythburn.simple_fix_rtl
def mythburn.write
def mythburn.fatalError
 Display an error message and exit.
def mythburn.nonfatalError
def mythburn.quoteString
 Return the input string with single quotes escaped.
def mythburn.getTempPath
 Directory where all temporary files will be created.
def mythburn.getCPUCount
 Try to work out how many cpus we have available.
def mythburn.getEncodingProfilePath
 Get the directory where all encoder profile files are located.
def mythburn.doesFileExist
 Returns true/false if a given file or path exists.
def mythburn.quoteCmdArg
 Escape quotes in a command line argument.
def mythburn.getText
 Returns the text contents from a given XML element.
def mythburn.getThemeFile
 Try to find a theme file.
def mythburn.getFontPathName
 Returns the path where we can find our fonts.
def mythburn.getItemTempPath
 Creates a file path where the temp files for a video file can be created.
def mythburn.validateTheme
 Returns True if the theme.xml file can be found for the given theme.
def mythburn.isResolutionOkayForDVD
 Returns True if the given resolution is a DVD compliant one.
def mythburn.deleteAllFilesInFolder
 Removes all the files from a directory.
def mythburn.deleteEverythingInFolder
 Romoves all the objects from a directory.
def mythburn.checkCancelFlag
 Check to see if the user has cancelled the DVD creation process.
def mythburn.runCommand
 Runs an external command checking to see if the user has cancelled the DVD creation process.
def mythburn.secondsToFrames
 Convert a time in seconds to a frame number.
def mythburn.encodeMenu
 Creates a short mpeg file from a jpeg image and an ac3 sound track.
def mythburn.findEncodingProfile
 Return an xml node from a re-encoding profile xml file for a given profile name.
def mythburn.getThemeConfigurationXML
 Load the theme.xml file for a DVD theme.
def mythburn.getLengthOfVideo
 Gets the duration of a video file from its stream info file.
def mythburn.getAudioParams
 Gets the audio sample rate and number of channels of a video file from its stream info file.
def mythburn.getVideoParams
 Gets the video resolution, frames per second and aspect ratio of a video file from its stream info file.
def mythburn.getAspectRatioOfVideo
 Gets the aspect ratio of a video file from its stream info file.
def mythburn.calcSyncOffset
 Calculates the sync offset between the video and first audio stream.
def mythburn.getFormatedLengthOfVideo
 Gets the length of a video file and returns it as a string.
def mythburn.frameToTime
 Convert a frame number to a time string.
def mythburn.createVideoChapters
 Creates a set of chapter points evenly spread thoughout a file Optionally grabs the thumbnails from the file.
def mythburn.createVideoChaptersFixedLength
 Creates some fixed length chapter marks.
def mythburn.getDefaultParametersFromMythTVDB
 Reads a load of settings from DB.
def mythburn.saveSetting
 Save a setting to the settings table in the DB.
def mythburn.clearArchiveItems
 Remove all archive items from the archiveitems DB table.
def mythburn.getOptions
 Load the options from the options node passed in the job file.
def mythburn.expandItemText
 Substitutes some text from a theme file with the required values.
def mythburn.getScaledAttribute
 Scale a theme position/size depending on the current video mode.
def mythburn.intelliDraw
 Splits some text into lines so it will fit into a given container.
def mythburn.paintBackground
 Paints a background rectangle onto an image.
def mythburn.paintButton
 Paints a button onto an image.
def mythburn.paintText
 Paint some theme text on to an image.
def mythburn.paintImage
 Paint an image on the background image.
def mythburn.checkBoundaryBox
 Check if boundary box need adjusting.
def mythburn.loadFonts
 Load the font defintions from a DVD theme file.
def mythburn.getFileInformation
 Creates an info xml file from details in the job file or from the DB.
def mythburn.WriteXMLToFile
 Write an xml file to disc.
def mythburn.preProcessFile
 Pre-process a single video/recording file.
def mythburn.encodeAudio
 Re-encodes an audio stream to ac3.
def mythburn.multiplexMPEGStream
 Recombines a video and one or two audio streams back together adding in the NAV packets required to create a DVD.
def mythburn.getStreamInformation
 Creates a stream xml file for a video file.
def mythburn.getVideoSize
 Gets the video width and height from a file's stream xml file.
def mythburn.runMythtranscode
 Run a file though the lossless encoder optionally removing commercials.
def mythburn.generateProjectXCutlist
 Create a projectX cut list for a recording.
def mythburn.runProjectX
 Use Project-X to cut commercials and/or demux an mpeg2 file.
def mythburn.ts2pts
 convert time stamp to pts
def mythburn.checkSubtitles
 check the given spumux.xml file for consistancy
def mythburn.extractVideoFrame
 Grabs a sequence of consecutive frames from a file.
def mythburn.extractVideoFrames
 Grabs a list of single frames from a file.
def mythburn.encodeVideoToMPEG2
 Re-encodes a file to mpeg2.
def mythburn.encodeNuvToMPEG2
 Re-encodes a nuv file to mpeg2 optionally removing commercials.
def mythburn.runDVDAuthor
 Runs DVDAuthor to create a DVD file structure.
def mythburn.CreateDVDISO
 Creates an ISO image from the contents of a directory.
def mythburn.BurnDVDISO
 Burns the contents of a directory to create a DVD.
def mythburn.deMultiplexMPEG2File
 Splits a file into the separate audio and video streams using mythreplex.
def mythburn.runM2VRequantiser
 Run M2VRequantiser.
def mythburn.calculateFileSizes
 Calculates the total size of all the video, audio and menu files.
def mythburn.total_mv2_brl
 returns total size of bitrate-limited m2v files
def mythburn.performMPEG2Shrink
 Uses requantiser if available to shrink the video streams so they will fit on a DVD.
def mythburn.createDVDAuthorXML
 Creates the DVDAuthor xml file used to create a standard DVD with menus.
def mythburn.createDVDAuthorXMLNoMainMenu
 Creates the DVDAuthor xml file used to create a DVD with no main menu.
def mythburn.createDVDAuthorXMLNoMenus
 Creates the DVDAuthor xml file used to create an Autoplay DVD.
def mythburn.createEmptyPreviewFolder
 Creates the directory to hold the preview images for an animated menu.
def mythburn.generateVideoPreview
 Generates the thumbnail images used to create animated menus.
def mythburn.drawThemeItem
 Draws text and graphics onto a dvd menu.
def mythburn.createMenu
 creates the main menu for a DVD
def mythburn.createChapterMenu
 creates a chapter menu for a file on a DVD
def mythburn.createDetailsPage
 creates the details page for a file on a DVD
def mythburn.isMediaAVIFile
 checks if a file is an avi file
def mythburn.processAudio
 checks to see if an audio stream need to be converted to ac3
def mythburn.selectStreams
def mythburn.selectSubtitleStream
def mythburn.selectAspectRatio
 gets the video aspect ratio from the stream info xml file
def mythburn.getVideoCodec
 gets video stream codec from the stream info xml file
def mythburn.getFileType
 gets file container type from the stream info xml file
def mythburn.getStreamList
 get the list of required stream ids for a file
def mythburn.isFileOkayForDVD
 check if file is DVD compliant
def mythburn.processFile
 process a single file ready for burning using either mythtranscode/mythreplex or ProjectX as the cutter/demuxer
def mythburn.doProcessFile
 process a single file ready for burning using mythtranscode/mythreplex to cut and demux
def mythburn.doProcessFileProjectX
 process a single file ready for burning using projectX to cut and demux
def mythburn.copyRemote
 copy files on remote filesystems to the local filesystem
def mythburn.processJob
 processes one job
def mythburn.usage
 show usage
def mythburn.main
 The main starting point for mythburn.py.

Variables

string mythburn::VERSION = "0.1.20120304-1"
 mythburn.debug_keeptempfiles = False
 mythburn.debug_secondrunthrough = False
 You can use this debug flag when testing out new themes pick some small recordings, run them through as normal with debug_keeptempfiles = True (see above) set this variable to True and then re-run the scripts the temp.
string mythburn.defaultEncodingProfile = "SP"
 mythburn.useSyncOffset = True
 mythburn.addCutlistChapters = False
 mythburn.encodetoac3 = True
int mythburn.DVD_SL = 0
int mythburn.DVD_DL = 1
int mythburn.DVD_RW = 2
int mythburn.FILE = 3
tuple mythburn.dvdPAL = (720,576)
tuple mythburn.dvdNTSC = (720,480)
tuple mythburn.dvdPALdpi = (75,80)
tuple mythburn.dvdNTSCdpi = (81,72)
string mythburn.dvdPALHalfD1 = "352x576"
string mythburn.dvdNTSCHalfD1 = "352x480"
string mythburn.dvdPALD1 = "%sx%s"
string mythburn.dvdNTSCD1 = "%sx%s"
tuple mythburn.dvdrsize = (4482,8106)
int mythburn.frameratePAL = 25
float mythburn.framerateNTSC = 29.97
float mythburn.aspectRatioThreshold = 1.4
string mythburn.temppath = ""
string mythburn.logpath = ""
string mythburn.scriptpath = ""
string mythburn.sharepath = ""
string mythburn.videopath = ""
string mythburn.defaultsettings = ""
string mythburn.videomode = ""
string mythburn.gallerypath = ""
string mythburn.musicpath = ""
string mythburn.dateformat = ""
string mythburn.timeformat = ""
string mythburn.dbVersion = ""
string mythburn.preferredlang1 = ""
string mythburn.preferredlang2 = ""
 mythburn.useFIFO = True
 mythburn.alwaysRunMythtranscode = False
 mythburn.copyremoteFiles = False
int mythburn.thumboffset = 10
 mythburn.usebookmark = True
 mythburn.clearArchiveTable = True
int mythburn.nicelevel = 17
int mythburn.drivespeed = 0
string mythburn.mainmenuAspectRatio = "16:9"
string mythburn.chaptermenuAspectRatio = "Video"
int mythburn.chapterLength = 5
string mythburn.jobfile = "mydata.xml"
string mythburn.progresslog = ""
tuple mythburn.progressfile = open("/dev/null", 'w')
string mythburn.dvddrivepath = "/dev/dvd"
 mythburn.docreateiso = False
 mythburn.doburn = True
 mythburn.erasedvdrw = False
 mythburn.mediatype = DVD_SL
string mythburn.savefilename = ''
string mythburn.installPrefix = ""
 mythburn.jobDOM = None
 mythburn.themeDOM = None
string mythburn.themeName = ''
dictionary mythburn.themeFonts = {}
int mythburn.cpuCount = 1
tuple mythburn.DB = MythTV.MythDB()
tuple mythburn.MVID = MythTV.MythVideo(db=DB)
tuple mythburn.configHostname = DB.gethostname()
 mythburn.fix_rtl = simple_fix_rtl
int mythburn.VIDEO_INDEX = 0
 chooses which streams from a file to include on the DVD
int mythburn.VIDEO_CODEC = 1
int mythburn.VIDEO_ID = 2
int mythburn.AUDIO_INDEX = 0
int mythburn.AUDIO_CODEC = 1
int mythburn.AUDIO_ID = 2
int mythburn.AUDIO_LANG = 3
int mythburn.SUBTITLE_INDEX = 0
 chooses which subtitle stream from a file to include on the DVD
int mythburn.SUBTITLE_CODEC = 1
int mythburn.SUBTITLE_ID = 2
int mythburn.SUBTITLE_LANG = 3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends