Controls a local dvbstreamer
Project description
dvbctrl
Module to control a local dvbstreamer. On Arch you can install dvbstreamer from the AUR.
starting
from dvbctrl.dvbstreamer import DVBStreamer
adapter = 0
dvbs = DVBStreamer(adapter)
running = dvbs.start()
if not running:
raise Exception(f"Failed to start dvbstreamer on adapter {adapter}")
stopping
from dvbctrl.dvbstreamer import DVBStreamer
adapter = 0
dvbs = DVBStreamer(adapter)
...
if dvbs.isRunning():
dvbs.stop()
commands
from dvbctrl.commands import DVBCommand
kwargs = {
"adapter": 0,
"host": "127.0.0.1"
"pass": "dvbctrl"
"user": "dvbctrl"
}
dvbc = DVBCommand(**kwargs)
# services (channels)
chans = dvbc.lsservices()
recorder
A 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 commands
tuneToChannel()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 otherwise
dvbctrl commands
selectSelect 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 implemented
feparamsGet 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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dvbctrl-0.3.9.tar.gz.
File metadata
- Download URL: dvbctrl-0.3.9.tar.gz
- Upload date:
- Size: 23.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.7 Linux/5.15.74-3-MANJARO
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
041bd3152f5bd99ed9680f5062058f9c32168c446c8a7beb94507b4863d35cfa
|
|
| MD5 |
0b04c6c2659e680a271ae287afc8a9f0
|
|
| BLAKE2b-256 |
b195a39926518f7bd75f5afcc39889c3f9b1128211d1bba67c75ec27546292ae
|
File details
Details for the file dvbctrl-0.3.9-py3-none-any.whl.
File metadata
- Download URL: dvbctrl-0.3.9-py3-none-any.whl
- Upload date:
- Size: 35.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.7 Linux/5.15.74-3-MANJARO
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ab8185d23807c3350c4bb4783649749dabd823b01b3292893759c23bc95e602
|
|
| MD5 |
698e7e03a9adf52ff5b42261e872b2d7
|
|
| BLAKE2b-256 |
45df852bfe99d6950a44cc023892aa91ad205a14fe36690a963b36ae7a2d5f8f
|