{"id":24399958,"url":"https://github.com/dirtbagxon/redbutton","last_synced_at":"2026-04-24T22:32:23.205Z","repository":{"id":113118848,"uuid":"240722089","full_name":"DirtBagXon/redbutton","owner":"DirtBagXon","description":"MHEG RedButton - SDL 1.2 updates on http://redbutton.sourceforge.net","archived":false,"fork":false,"pushed_at":"2020-02-15T14:09:57.000Z","size":821,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-28T20:07:17.482Z","etag":null,"topics":["dvb-s","dvb-t","linux","mheg","redbutton"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DirtBagXon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-15T14:01:15.000Z","updated_at":"2022-09-24T17:43:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"d51ed33d-41d9-461c-9389-075b1315bea0","html_url":"https://github.com/DirtBagXon/redbutton","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DirtBagXon/redbutton","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DirtBagXon%2Fredbutton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DirtBagXon%2Fredbutton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DirtBagXon%2Fredbutton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DirtBagXon%2Fredbutton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DirtBagXon","download_url":"https://codeload.github.com/DirtBagXon/redbutton/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DirtBagXon%2Fredbutton/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32243236,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dvb-s","dvb-t","linux","mheg","redbutton"],"created_at":"2025-01-19T23:55:49.430Z","updated_at":"2026-04-24T22:32:23.199Z","avatar_url":"https://github.com/DirtBagXon.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"RedButton MHEG Engine\n=====================\n\n\nThe RedButton service may be discontinued in the near future due to BBC cutbacks.\n\nThis code may serve as an archive, and to allow investigation into the MHEG digital interactive television \\\nservice via compilers and decompilers.\n\nhttps://en.wikipedia.org/wiki/BBC_Red_Button\n\nBelow is taken from: http://redbutton.sourceforge.net/\n\nI appears development has been discontinued by its original author: Simon Kilvington\n\nRedButton allows you to use the interactive MHEG applications broadcast with DVB digital TV services. MHEG replaces the text only services available with analogue TV.\nRedButton consists of two parts. The first, rb-download, allows MHEG data to be downloaded from a DVB service. The second, rb-browser, allows the downloaded MHEG applications to be displayed. Both rb-download and rb-browser can be run on the same host, or rb-download can be run on a host with a DVB card and rb-browser can be run on a remote frontend without a DVB card.\n\nThe rb-author package contains tools for working with MHEG applications. If you want to write your own MHEG applications, you can use the mhegc compiler to generate the ASN1 format files rb-browser expects. If you want to see how other peoples applications work, you can use the mhegd tool to convert ASN1 format files into the text form.\n\nThe source is released under the GPL and can be downloaded here.\n\nJust un-tar them and type 'make'.\n\n\n**rb-download**\n\nUsage:\n\n    rb-download [-v] [-a \u003cadapter\u003e] [-b \u003cbase_dir\u003e] [-t \u003ctimeout\u003e] [-l \u003clisten_addr\u003e] [-f \u003cchannels_file\u003e] [-c \u003ccarousel_id\u003e] [\u003cservice_id\u003e]\n\nDownload the DVB Object Carousel for the given channel onto the local hard disc.\nIf no directory is given with -b, files will be stored under the current directory. Note that \u003cbase_dir\u003e must already exist and be writeable.\n\nThe default timeout is 10 seconds. If no DSM-CC data is found after this time, it is assumed none is being broadcast.\n\nThe DVB devices used will be:\n\n    /dev/dvb/adapter0/frontend0\n    /dev/dvb/adapter0/demux0\n    /dev/dvb/adapter0/dvr0\n\nuse the -a option to change the adapter number (eg \"-a 1\" will use `/dev/dvb/adapter1/frontend0` etc).\\\nrb-download needs a \"channels.conf\" file which gives tuning parameters for service_id's. A `channels.conf` file can be generated by the \"scan\" utility in the dvb-apps package at www.linuxtv.org. For example:\n\n    scan ./uk-Malvern \u003e ~/.tzap/channels.conf\n\nIf not specified with -f, rb-download will search for (in the case of DVB-T cards):\n\n    ~/.tzap/channels.conf\n    /etc/channels.conf\n\n\nFor DVB-S cards it will look in `~/.szap/`, for DVB-C cards it will look in `~/.czap/` and for ATSC cards it will look in the `~/.azap/` directory.\n\nrb-download listens on the network for commands from a remote rb-browser. The default IP to listen on is 0.0.0.0 (ie all interfaces), the default TCP port is 10101. The -l option changes the default IP and port. `\u003clisten_addr\u003e` should be given in the form \"host:port\", where host defaults to 0.0.0.0 and port defaults to 10101. Eg, to listen on a different port, do \"-l 8080\", to only listen on the loop back, do \"-l 127.0.0.1\" or on a different port too, do \"-l 127.0.0.1:8080\".\n\nThe `\u003ccarousel_id\u003e` will normally be read from the PMT, but you can use the -c option to explicitly choose a carousel.\n\n-v is verbose/debug mode. Use -vv for even more mind-numbing tedium.\n\nIf no` \u003cservice_id\u003e` is given, a list of possible channels (and their `\u003cservice_id\u003e`) is printed. These will be the channels available on the MUX your DVB card is currently tuned to. Use dvbtune or equivalent to tune your card. eg:\n\n    dvbtune -f 722166667 \u0026\u0026 rb-download\n\nThe file structure stored under `\u003cbase_dir\u003e` will be:\n\n    ./services/\u003cservice_id\u003e\n\nthis is a symlink to the root of the carousel for the given service.\nThe actual carousel files and directories are stored under:\n\n    ./carousels/\u003cPID\u003e/\u003cCID\u003e/\n\nwhere \u003cPID\u003e is the PID the carousel was downloaded from and \u003cCID\u003e is the Carousel ID.\n\n    ./cache/\n\nTemporary cache of DVB tables to stop us having to wait for them to be retransmitted everytime we need them.\nJust leave it running and any updated files will be downloaded as they are broadcast.\n\n*Notes*\n\nI've compiled and run it under `Gentoo` and `Mandr{ake,iva}` Linux on x86, but it should work on any (big- or little-endian) Linux distro.\nIt only implements a subset of the whole DSM-CC specs. However, it is enough to download everything that is currently being broadcast on the 'Freeview' DVB-T channels in the UK.\n\nOnce the data is downloaded, you can use rb-browser (see below) to view it.\n\n**rb-browser**\n\nUsage:\n\n    rb-browser [-v] [-f] [-d] [-o \u003cvideo_output_method\u003e] [-k \u003ckeymap_config_file\u003e] [-t \u003ctimeout\u003e] [-n \u003cnetwork_id\u003e] [-r] [\u003cservice_gateway\u003e]\n\nDisplay the MHEG apps downloaded with rb-download.\nThe -r option means use a remote backend (rb-download running on another host). If -r is specified, then \u003cservice_gateway\u003e should be the host[:port] that rb-download is running on.\n\nThe default backend is \"-r 127.0.0.1\" ie rb-download running on the same machine as rb-browser.\n\nEg, on a single host, do this:\n\n    rb-download 4165 \u0026\n    rb-browser\n\nTo run the frontend on a different host, do this on the backend:\n\n    rb-download 4165 \u0026\n\nand run this on the frontend:\n\n    rb-browser -r 10.0.0.1\n\nwhere 10.0.0.1 is the IP or hostname of the backend.\n\nIf -r is not specified, rb-download is running on the same machine and `\u003cservice_gateway\u003e` should be an entry in the services directory. This is really only useful for debugging, or running MHEG apps you have written yourself.\n\nEg, to run an MHEG app you have previously downloaded and saved, do this:\n\n    rb-browser path/to/saved/services/4165\n\nAlthough this will not give you any video or audio as this is streamed from rb-download. Retuning will also probably not work unless you've also saved the services directory for the channel you want to retune to.\nFor local backends, -n allows you to specify a Network ID that will be used to resolve `rec://svc/def`. By default, the Network ID is left blank in `rec://svc/def`. If you don't know what this means, you can probably just ignore the -n flag!\n\nIt will display the app in a window, use -f for full screen mode.\n\nThe -d flag disables all audio and video output.\n\nUse -o to choose a video output method if the default is not supported/too slow on your graphics card. 'rb-browser -o' will give a list of available video output methods.\n\nThe -v flag enables verbose/debug mode.\n\nThe -t flag determines how long (in seconds) it will poll for missing files before passing an error to the MHEG application. The default is 10 seconds.\n\nUse the -k option to load a keymap (keymap config files can be generated with the rb-keymap command). The default keys to navigate around the apps are:\n\n    Key\tFunction\n    Cursor Keys\tUp/Down/Left/Right\n    0 - 9\t0 - 9\n    r\tRed\n    g\tGreen\n    b\tBlue\n    y\tYellow\n    Return\tOK/Select\n    Escape\tCancel\n    t\tText\n    e\tEPG (NZ Profile only)\n\n*Notes*\n\nYou will need the \"expat\" XML parsing library and the xsltproc XML stylesheet processor that comes with \"libxslt\" to compile it. On Gentoo, you can just:\nemerge expat libxslt\nIf the compile fails with errors about missing .c files, expat is not installed. If the compile fails with errors about function names ending in \"_dup\" being missing, libxslt is not installed.\nTo run it you need an X server that supports the Xrender extension and you need to have libpng, freetype2 and ffmpeg installed.\n\nIt does not implement the whole MHEG spec. However, it seems to be enough to view everything that is currently being broadcast on the 'Freeview' channels in the UK. If it comes across something that is not yet implemented it will print out a message on the console. Let us know if you find anything it can't do.\n\nIt does not currently use any acceleration that your graphics card may provide so it'll drop video frames in full screen mode unless you have a very fast processor (or your full screen X resolution is set to 720x576 pixels).\n\nIt will display apps that conform to the UK MHEG Profile (available from www.dtg.org.uk). Thanks to some patches and info from Steve at OpenMedia in NZ, it should also be able to download apps conforming to the NZ MHEG spec and display them.\n\nWhen it starts you will probably need to press 'r' (for BBC) or 't' (for ITV/C4) to activate any MHEG app that may be waiting for you to do something.\n\nThe default font for the UK MHEG Profile is Tiresias Screenfont which was developed with the RNIB to be readable on TV screens. You can download this font as part of the DigiTV iTuner package from Nebula Electronics. Extract the file called tt7268m_802.ttf and add it to your X Windows fonts. The easiest way is to install DigiTV iTuner on a Windows box and then copy the `C:\\Windows\\Fonts\\tt7268m_802.ttf` file onto your Linux box. To install new X fonts in KDE, open the Control Centre application, go to the System Administration section and select Font Installer.\n\nAlternatively, if you know someone in Australia, ABC is currently broadcasting `Tiresias.pfr` as part of their TV guide application. You can download it with rb-download. The Australian applications are MHP, not MHEG, so you should probably look at www.openmhp.org for something to display them.\n\nIf the Tiresias Screenfont is not available, rb-browser first tries to use the FreeSans font instead. If this is also not available, rb-browser uses whatever scalable font Xft returns for \"sans\". Note that these fonts will have different metrics and so may not fit into the spaces in the MHEG apps designed for Tiresias.\n\n**mhegc**\n\nUsage:\n\n     mhegc [-vv] [-o \u003coutput_file\u003e] [\u003cinput_file\u003e]\n\nWill convert the `\u003cinput_file\u003e` (or stdin if no filename is given) from the MHEG text form into the ASN1 form. The DER encoded ASN1 object will be stored in the given output file (or in a file named \"a\" if no -o option is given).\nThe -v flag enables debug mode and will print details about the ASN1 object it creates. Use -vv for even more info.\n\nThe redbutton-author package contains a \"Hello World\" example from http://www.digvid.info/mheg5/hello_world.php. To compile the Hello World example, do this:\n\n    mhegc -o helloworld/startup helloworld/startup.txt\n    mhegc -o helloworld/hello.mhg helloworld/hello.mhg.txt\n\nThen to run it:\n\n    rb-browser helloworld/\n\n\n**mhegd**\n\nUsage:\n\n    mhegd [-vv] [-o \u003coutput_file\u003e] \u003cinput_file\u003e\n\nWill convert the `\u003cinput_file\u003e` from the ASN1 form to the MHEG text format. The text will be written to the given output file (or to stdout if no -o option is given).\nThe -v flag enables debug mode and will print details about the ASN1 object as it is decoded. Use -vv for even more info.\n\n\n![redbutton](https://raw.githubusercontent.com/DirtBagXon/redbutton/master/images/redbutton.png)\n![redbutton](https://raw.githubusercontent.com/DirtBagXon/redbutton/master/images/redbutton2.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirtbagxon%2Fredbutton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdirtbagxon%2Fredbutton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirtbagxon%2Fredbutton/lists"}