Package: dvbctrl
dvbctrlModule to control a localdvbstreamer.  On Arch you can install dvbstreamer from
theAUR.startingfromdvbctrl.dvbstreamerimportDVBStreameradapter=0dvbs=DVBStreamer(adapter)running=dvbs.start()ifnotrunning:raiseException(f"Failed to start dvbstreamer on adapter{adapter}")stoppingfromdvbctrl.dvbstreamerimportDVBStreameradapter=0dvbs=DVBStreamer(adapter)...ifdvbs.isRunning():dvbs.stop()commandsfromdvbctrl.commandsimportDVBCommandkwargs={"adapter":0,"host":"127.0.0.1""pass":"dvbctrl""user":"dvbctrl"}dvbc=DVBCommand(**kwargs)# services (channels)chans=dvbc.lsservices()recorderA simple interface to dvbctrl to easily record to files from channels.  Utilises the primary service filter only.from dvbctrl.recorder import Recorder

# initialise the recorder
r = Recorder("BBC TWO", "/tmp/bbc_two.ts", adapter=0)

# start the recorder, this checks that the file is growing
r.start()

...

# stop the recording
r.stop()You can periodically check that the recording file is still growing by using the check function, passing in the last file size.
This returns a tuple containing a True/False flag and the current size.  If the flag is False (i.e. the file isn't growing or is
not there) then the lastsize argument is returned.isok, currentsize = r.check(12345)dvbctrl recorder commandstuneToChannel()Tunes the dvbstreamer to a channel will wait up to 5 seconds for dvbstreamer to stabilise. Returns True if
tuned or False otherwiseisTuned()returns True if tuned, False otherwisewaitTuned()waits for up to 5 seconds for the streamer to tune returns True if tuned successfully, False otherwisedvbctrl commandsselectSelect a new service to stream.setmrlSet the MRL of the primary service filter.getmrlGet the primary service filter MRL.addsfAdd a service filter.rmsfRemove a service filter.lssfsList all service filters.setsfSet the service to be filtered by a service filter.getsfGet the service to stream to a secondary service output.setsfmrlSet the service filter's MRL.getsfmrlGet the service filter's MRL.setsfavsonlyEnable/disable streaming of Audio/Video/Subtitles only.getsfavsonlyGet whether Audio/Video/Subtitles only streaming is enabled.lsservicesList all services or for a specific multiplex.lsmuxesList multiplexes.lspidsList the PIDs for a specified service.currentPrint out the service currently being streamed.serviceinfoDisplay information about a service.muxinfoDisplay information about a mux.statsDisplay the stats for the PAT,PMT and service PID filters.festatusDisplays the status of the tuner.scanScan the specified multiplex(es) for services.cancelscanCancel the any scan that is in progress.lslcnList the logical channel numbers to services.findlcnFind the service for a logical channel number.selectlcnSelect the service from a logical channel number.lsmfsList current filters.dvbctrl commands not yet implementedfeparamsGet current frontend parameters. (NOT IMPLEMENTED)lspropsList available properties. (NOT IMPLEMENTED)getpropGet the value of a property. (NOT IMPLEMENTED)setpropSet the value of a property. (NOT IMPLEMENTED)propinfoDisplay information about a property. (NOT IMPLEMENTED)dumptsrDump information from the TSReader (NOT IMPLEMENTED)lslnbsList known LNBs (NOT IMPLEMENTED)epgdataRegister to receive EPG data in XML format. (NOT IMPLEMENTED)dateDisplay the last date/time received. (NOT IMPLEMENTED)enabledsmccEnable DSM-CC data download for the specified service filter. (NOT IMPLEMENTED)disabledsmccDisable DSM-CC data download for the specified service filter. (NOT IMPLEMENTED)dsmccinfoDisplay DSM-CC info for the specified service filter. (NOT IMPLEMENTED)epgcaprestartStarts or restarts the capturing of EPG content. (NOT IMPLEMENTED)epgcapstartStarts the capturing of EPG content. (NOT IMPLEMENTED)epgcapstopStops the capturing of EPG content. (NOT IMPLEMENTED)nowDisplay the current program on the specified service. (NOT IMPLEMENTED)nextDisplay the next program on the specified service. (NOT IMPLEMENTED)addlistenerAdd a destination to send event notification to. (NOT IMPLEMENTED)rmlistenerRemove a destination to send event notification to. (NOT IMPLEMENTED)lslistenersList all registered event listener (NOT IMPLEMENTED)addlisteneventAdd an internal event to monitor. (NOT IMPLEMENTED)rmlisteneventRemove an internal event to monitor (NOT IMPLEMENTED)lslisteneventsList all registered event listener (NOT IMPLEMENTED)addmfAdd a new destination for manually filtered PIDs. (NOT IMPLEMENTED)rmmfRemove a destination for manually filtered PIDs. (NOT IMPLEMENTED)setmfmrlSet the filter's MRL. (NOT IMPLEMENTED)addmfpidAdds a PID to a filter. (NOT IMPLEMENTED)rmmfpidRemoves a PID from a filter. (NOT IMPLEMENTED)lsmfpidsList PIDs for filter. (NOT IMPLEMENTED)addoutputAdd a new output. (NOT IMPLEMENTED)rmoutputRemove an output. (NOT IMPLEMENTED)enablesicapEnable the capture of PSI/SI data. (NOT IMPLEMENTED)disablesicapDisable the capture of PSI/SI data. (NOT IMPLEMENTED)lspluginsList loaded plugins. (NOT IMPLEMENTED)plugininfoDisplay the information about a plugin. (NOT IMPLEMENTED)whoDisplay current control connections. (NOT IMPLEMENTED)authLogin to control dvbstreamer. (NOT IMPLEMENTED)logoutClose the current control connection. (NOT IMPLEMENTED)quitExit the program. (NOT IMPLEMENTED)helpDisplay the list of commands or help on a specific command. (NOT IMPLEMENTED)