{ "info": { "author": "nmaekawa", "author_email": "nmaekawa@g.harvard.edu", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7" ], "description": "===============================\nepiclient\n===============================\n\nDCE client for `epipearl\n`_\n\nepiclient wraps `epipearl `_\nHTTP API and web ui calls. epiclient creates channels and recorders and\nconfigures them, as well as general configurations for an epiphan-pearl\ndevice. There is also configurations for the epiphan-pearl to work as an\n`Opencast Matterhorn `_ Capture Agent,\nand these require a custom firmware from DCE that includes `mhpearl\n`_\n\nThis software should be considered alpha, therefore likely to change/break in\nthe near future.\n\n\n\n*******************************************************\nInstall\n*******************************************************\n\n.. code-block:: bash\n\n pip install epiclient\n\n\n*******************************************************\nOverview\n*******************************************************\n\nTo configure an epiphan-pearl device to work as a Capture Agent, there are\ngeneral configs (like ntp server, touchscreen, permanent logs), and channels\nand recorders that need to be created and proper configured.\n\nepiclient has a CLI that goes through the configuration steps:\n\n* clear channels\n* set source deinterlacing\n* config ntp server\n* config touchscreen settings\n* enable permanent logs\n* create and config DCE standard channels\n* create and config DCE standard recorders\n* config mhpearl\n\nOther than the CLI, epiclient is a python module that wraps `epipearl\n`_\ncalls to an epiphan-pearl in a\nDCE-tailored way. Learn how you can use it by checking\nsection Testing_.\n\n\n\n*******************************************************\nepiclient CLI\n*******************************************************\n\nTo check how to use epiclient CLI, after Install_:\n\n.. code-block:: bash\n\n epiclient --help\n Usage: epiclient [OPTIONS] DEVICE_NAME\n\n Console script for epiclient\n\n Options:\n --step\n [validate|clear_channels|config_deinterlacing|create_channels|config_layout|config_encodings|config_recorder_channels|config_recorder_settings|config_live|config_general|config_mhpearl]\n when absent, execute all steps\n --verbose / --quiet\n --help Show this message and exit.\n\n\nThe CLI requires some environment variables to be defined in a file\nnamed ${HOME}/.epiclient.env.\n\nCheck an example in `epiclient/example.env`.\n\n.. code-block:: bash\n\n # edit example.env\n cat epiclient/example.env\n # ca status board url, user/pwd\n CA_STATS_URL=http://ca-status.dceapp.net/ca_stats/ca_stats.json\n CA_STATS_USER=user\n CA_STATS_PASSWD=password\n\n # user/pwd for the epiphan-pearl being configured\n EPIPEARL_USER=user\n EPIPEARL_PASSWD=password\n\n # digest user/pwd for opencast cluster epiphan-pearl points to\n MH_DIGEST_USER=user\n MH_DIGEST_PASSWD=password\n\n # akamai user/pwd (live streaming)\n RTMP_USER=user\n RTPM_PASSWD=password\n\n # s3 bucket that hosts ca json settings\n CA_SETTINGS_BUCKET=capture-agent-settings\n\n # set as ${HOME}/.epiclient.env\n cp epiclient/example.env ${HOME}/.epiclient.env\n\nThe CLI also needs AWS credentials configuration; check `aws configuration\n`_\n\nThe CLI takes a device name as input, for example, `dev-epiphan006`. Each\ndevice has a json config that follows a json-schema specified in\n``epiclient/json_schema/role_settings_schema.json``. An example of what a json\ninput look like can be found in ``tests/json/primary_sample_ca_settings.json``.\n\nThese json configs are pulled from s3, and the bucket name can be configured in\nthe .epiclient.env file as `CA_SETTINGS_BUCKET`.\n\n\n\nSteps\n=======================================================\n\nSome steps are required in specific order (e.g: ``config_recorder_channels``\nafter ``create_channels``), but in general the steps are independent.\n\nNote that, if you ``create_channels``, the channel IDs change and the json\ninput is updated in s3.\n\nAlso, when you ``create_channels``, it does not check if there is already a\nchannel with the same name. That's why there is a ``clear_channels`` command:\nmake sure no previous DCE channels exist and prevent creating many\nchannels with the same name. This is to guarantee the defaults are set or unset\nas expected.\n\nvalidate\n-------------------------------------------------------\n\nThis step always runs to check that the json input conforms to the json-schema\nspec'd in ``epiphan/json_schema/role_settings_schema.json``.\n\n\nclear_channels\n-------------------------------------------------------\n\nAs said, to make sure that there won't be channels or recorders with the same\nname, clear all channels first. This operation removes channels named after DCE\n(*dce_pr*, *dce_pn*, *dce_prpn*, *dce_live*, *dce_live_lowbr*).\n\nOnly ``create_channels`` step works after running this operation because all\nsubsequent steps assume the channels are created\n\n\nconfig_deinterlacing\n-------------------------------------------------------\n\nSource signals are usually set to be deinterlaced.\n\nThis step is independent.\n\n\ncreate_channels\n-------------------------------------------------------\n\nCreates the DCE channels and recorders, and names them as mentioned before \n*dce_pr*, *dce_pn*, *dce_prpn*, *dce_live*, *dce_live_lowbr*.\n\nAs mentioned, this step updates the s3 json config.\n\n\nconfig_layout\n-------------------------------------------------------\n\nConfigures the source layout for each channel. Note that the live channels\nhave the presenter and presentation combined, thus a different framesize than\npresenter-only or presentation-only.\n\nThis step depends on ``create_channels``.\n\n\nconfig_encodings\n-------------------------------------------------------\n\nBasic settings for encodings in each channel.\n\nThis step depends on ``create_channels``.\n\n\nconfig_recorder_channels\n-------------------------------------------------------\n\nThe recorder, *dce_prpn*, is the channel that is recorded as a media file and\nthen ingested into `Opencast Matterhorn `_.\nThis step configures which channels are to be combined and saved into file\n(*dce_pr* and *dce_pn*).\n\nThis step depends on ``create_channels``.\n\n\nconfig_recorder_settings\n-------------------------------------------------------\n\nConfigures the max size of recorded media files: per duration or file size.\n\nThis step depends on ``create_channels``.\n\n\nconfig_live\n-------------------------------------------------------\n\nSets the server to which live stream a channel.\n\nThis step depends on ``create_channels``.\n\n\nconfig_general\n-------------------------------------------------------\n\nHere, the ntp server, the touchscreen settings, and the permanent log are\nenabled.\n\nThis step is independent.\n\n\nconfig_mhpearl\n-------------------------------------------------------\n\nThis operation configures settings for\n`mhpearl `_.\n\nThis step is independent.\n\n\nommit --step option\n-------------------------------------------------------\n\nWhen the `--step` option is absent, all steps are run and you should have a\nconfigured capture agent at the end of the process. The CLI logs steps as they\nare done so you have an idea of what's going on.\n\n\nepiclient JSON Input\n=======================================================\n\nHere is an example of json input with comments for clarification. As mentioned,\nthese configs are stored in a s3 bucket.\n\n.. code-block:: json\n\n {\n # name of capture agent that identifies it; only alpha-num and\n # underscores allowed\n \"ca_name_id\": \"my_dev_epiphan\",\n\n # capture agent url for web ui; hostname preferred instead of IP\n \"ca_url\": \"http://epiphan.pearl.url\",\n\n # capture card id is specific to each device, if not present,\n # epiclient queries the device and saves this info generating a new json\n \"ca_capture_card_id\": \"D12345678\",\n\n # similar to capture card id; epiclient queries device if not present\n \"ca_serial_number\": \"ED123456\",\n\n # valid values 'primary' or 'secondary'\n # currently, 'experimental' devices are not automatically configurable\n \"role\": \"primary\",\n\n # opencast cluster name this capture agent must point to\n \"cluster_name_id\": \"cluster-name\",\n\n # if the opencast cluster is a dev, stage or prod cluster\n \"cluster_env\": \"dev\",\n\n # opencast admin node url, to pull scheduling from\n \"mh_admin_url\": \"http://cluster.dev.url.edu\",\n\n # firmware version, for now it's not mandatory\n \"firmware_version\": \"epiphan_firmware_version\",\n\n # mhpearl version, for now it's not mandatory\n \"mhpearl_version\": \"some_version\",\n\n # mhpearl settings file_search_range in secs\n \"mhpearl_file_search_range\": 58,\n\n # mhpearl settings update_frequency in secs\n \"mhpearl_update_frequency\": 123,\n\n # mhpearl settings, which ca_name pull scheduling of\n \"mh_ca_name\": \"my-dev-epiphan\",\n\n # classroom id; only alpha_num and underscores allowed\n \"location_name_id\": \"lab\",\n\n # presenter connector available in the classroom this device\n # is installed\n \"pr_vconnector\": \"sdi\",\n \"pr_vinput\": \"a\",\n\n # presentation connector available in the classroom this device\n # is installed\n \"pn_vconnector\": \"hdmi\",\n \"pn_vinput\": \"b\",\n\n # default for all epiphan-pearls is to have deinterlacing ON\n \"source_deinterlacing\": \"on\",\n\n \"date_and_time\": {\n # ntp server, ask sysops for correct value\n \"ntp_server\": \"0.nz.pool.ntp.org\",\n\n # timezone is usually 'US/Eastern'\n \"timezone\": \"US/Alaska\"\n },\n \"touchscreen\": {\n # after timeout, touchscreen turns off\n \"episcreen_timeout\": 579\n },\n \"maintenance\": {\n # default is to have permanent logs ON\n \"permanent_logs\": \"on\"\n },\n # these are common encoding settings for all channels\n \"channel_encodings\": {\n \"autoframesize\": \"\",\n \"codec\": \"h.264\",\n \"vprofile\": \"100\",\n \"vencpreset\": \"5\",\n \"vkeyframeinterval\": 1,\n \"fpslimit\": 30,\n \"audio\": \"on\",\n \"audiochannels\": \"1\",\n \"audiopreset\": \"libfaac;44100\"\n },\n \"channels\": {\n \"dce_pr\": {\n # this value, ``channel_id``, changes when creating a new\n # channel; epiclient will update this value and save it in a\n # new json file, backing up the previous json with a timestamp\n \"channel_id\": \"1\",\n \"encodings\": {\n \"framesize\": \"1280x720\",\n \"vbitrate\": 9000,\n \"audiobitrate\": 160\n }\n },\n \"dce_pn\": {\n \"channel_id\": \"2\",\n \"encodings\": {\n \"framesize\": \"1920x1080\",\n \"vbitrate\": 9000,\n \"audiobitrate\": 160\n }\n },\n \"dce_live\": {\n \"channel_id\": \"3\",\n \"encodings\": {\n \"framesize\": \"1920x1080\",\n \"vbitrate\": 4000,\n \"audiobitrate\": 96\n },\n\n # akamai streaming entry point\n # note that this differ for primary and secondary CAs\n \"rtmp_url\": \"rtmp://p.blobblob.i.streamingservice.org/EntryPoint\",\n \"stream_name\": \"my-dev-epiphan\"\n },\n \"dce_live_lowbr\": {\n \"channel_id\": \"4\",\n \"encodings\": {\n \"framesize\": \"960x270\",\n \"vbitrate\": 250,\n \"audiobitrate\": 64\n },\n\n # akamai streaming entry point\n # note that this differ for primary and secondary CAs\n # this value is the same as **dce_live**\n \"rtmp_url\": \"rtmp://p.blobblob.i.streamingservice.org/EntryPoint\",\n \"stream_name\": \"my-dev-epiphan\"\n }\n },\n \"recorders\": {\n \"dce_prpn\": {\n\n # this value, ``recorder_id``, changes when creating a new\n # recorder; epiclient will update this value and save it in a\n # new json file, backing up the previous json with a timestamp\n \"recorder_id\": \"1\",\n \"timelimit\": 360,\n \"sizelimit\": 64000000,\n \"output_format\": \"avi\"\n }\n }\n }\n\n\n\n\n\n*******************************************************\nTesting\n*******************************************************\n\nDuring development, epiclient tests were executed using\n`pytest `_\n\nTo run tests from a local clone:\n\n.. code-block:: bash\n\n pip install -r requirements_dev.txt\n py.test tests\n\n # to run live tests\n export EPI_URL=http//epiphan_pearl_address\n export EPI_USER=admin_user\n export EPI_PASSWD=password\n py.test tests --runlive\n\nLive tests will connect with the actual device at the given ``EPI_URL`` and\nchange its settings! You might have to tweak\n``tests/json/primary_sample_ca_settings.json`` for that to work.\n\n\n*******************************************************\nLicense\n*******************************************************\n\nepiclient is licensed under the `Apache License, Version 2.0\n`_.\n\n\n*******************************************************\nCopyright\n*******************************************************\n\n2016~2017 President and Fellows of Harvard College\n\n\n\n.. _epipearl: https://github.com/harvard-dce/epipearl\n.. _`Opencast Matterhorn`: http://opencast.org/matterhorn\n.. _mhpearl: https://bitbucket.org/hudcede/mhpearl\n.. _pytest: http://pytest.org/latest/\n.. _`Apache License, Version 2.0`: http://www.apache.org/licenses/LICENSE-2.0\n\n\n=======\nHistory\n=======\n\n\n0.1.3 (2016-08-03)\n------------------\n\n* clean_channels back to removing channel by name (instead of id)\n\n\n0.1.2 (2016-08-02)\n------------------\n\n* Fix static files into package\n\n\n0.1.1 (2016-08-02)\n------------------\n\n* Fix release version\n\n\n0.1.0 (2016-06-21)\n------------------\n\n* First release on PyPI.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/harvard-dce/epiclient", "keywords": "epiclient", "license": "Apache Software License 2.0", "maintainer": null, "maintainer_email": null, "name": "epiclient", "package_url": "https://pypi.org/project/epiclient/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/epiclient/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/harvard-dce/epiclient" }, "release_url": "https://pypi.org/project/epiclient/0.1.3/", "requires_dist": null, "requires_python": null, "summary": "dce client for epipearl", "version": "0.1.3" }, "last_serial": 2260871, "releases": { "0.1.0": [], "0.1.1": [ { "comment_text": "", "digests": { "md5": "ed9844ea9239c9c191c9c785ee90ce77", "sha256": "a6bfc2ee7b85dc357f8fb96028c99e621119fc9690f074d8421f315a7bfd5cb5" }, "downloads": -1, "filename": "epiclient-0.1.1.tar.gz", "has_sig": false, "md5_digest": "ed9844ea9239c9c191c9c785ee90ce77", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15866, "upload_time": "2016-08-02T18:22:36", "url": "https://files.pythonhosted.org/packages/ce/45/14ab468e13d4665454ba141f050f40822ada5cde8c69d05fe0981a72e4f3/epiclient-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "a4494045c29b5a2d203ab8a3b36b6b92", "sha256": "b512a1fbd4106e40835a36851c468a288f922c6453e2682a7c9746c4709c6a5f" }, "downloads": -1, "filename": "epiclient-0.1.2.tar.gz", "has_sig": false, "md5_digest": "a4494045c29b5a2d203ab8a3b36b6b92", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17547, "upload_time": "2016-08-02T18:31:55", "url": "https://files.pythonhosted.org/packages/9a/45/da679fd82ae8cd5f71115ea70557df2f43d4e718ff0d9123098b06b359aa/epiclient-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "b71e97c52a6af134ce774d012a337dca", "sha256": "36362fbeee5c8ff1c7d98c126a84459b5d6aec0bb72513fed06d71bddbd1b075" }, "downloads": -1, "filename": "epiclient-0.1.3.tar.gz", "has_sig": false, "md5_digest": "b71e97c52a6af134ce774d012a337dca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19696, "upload_time": "2016-08-03T22:24:18", "url": "https://files.pythonhosted.org/packages/71/09/60d820a31d9a66c17bfcb78f11218b3a1f60fdc5ef09d8f6c4fabee9ce26/epiclient-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b71e97c52a6af134ce774d012a337dca", "sha256": "36362fbeee5c8ff1c7d98c126a84459b5d6aec0bb72513fed06d71bddbd1b075" }, "downloads": -1, "filename": "epiclient-0.1.3.tar.gz", "has_sig": false, "md5_digest": "b71e97c52a6af134ce774d012a337dca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19696, "upload_time": "2016-08-03T22:24:18", "url": "https://files.pythonhosted.org/packages/71/09/60d820a31d9a66c17bfcb78f11218b3a1f60fdc5ef09d8f6c4fabee9ce26/epiclient-0.1.3.tar.gz" } ] }