117
edits
Changes
no edit summary
== Installation Launching broadcast==
=== Installing ACE Stream on Debian/Ubuntu from repository Main terms=== *'''Source'Step 1''- a program that accepts broadcast' Add link on appropriate repository into <tt>/etc/apt/sources.list</tt> files HTTP-stream and provides playback of broadcast using ACE Stream software. Repository should be selected according to operating system. *'''Support node'Debian 6+:'' <tt><nowiki>deb http://repo.acestream.org/debian/ squeeze main</nowiki></tt> or <tt><nowiki>deb http://repo.acestream.org/debian/ sid main</nowiki></tt> Note: packages in sid repository are assembled with dependencies that correspond - a program allowing to official sidscale broadcast using additional server equipment and Internet-repositories of Debian.If you don't know, which repository to choose, use squeezechannels. ''Ubuntu 11.10:*'' <tt><nowiki>deb http://repo.acestream.org/ubuntu/ oneiric main</nowiki></tt> 'Client'Ubuntu 12.04:'' <tt><nowiki>deb http://repo.acestream- ACE Stream software, which is used to play broadcast.org/ubuntu/ precise main</nowiki></tt>
'''Ubuntu:''':* http://dl.acestream.org/ubuntu/acestream-engine_2.0.8-1oneiric6_amd64.deb* http://dl.acestream.org/ubuntu/acestream-engine_2.0.8-1oneiric6_i386.deb* http://dl.acestream.org/ubuntu/acestream-engine_2.0.8-1precise6_amd64.deb* http://dl.acestream.org/ubuntu/acestream-engine_2.0.8-1precise6_i386.deb <tt><nowiki>sudo wget * http://dl.acestream.org/ubuntu/acestream-O engine_2.0.8- 1quantal6_amd64.deb* http://repodl.acestream.org/keysubuntu/acestream-engine_2.0.8-1quantal6_i386.deb* http://dl.publicacestream.key | sudo aptorg/ubuntu/acestream-key add engine_2.0.8-<1raring6_amd64.deb* http://nowiki><dl.acestream.org/tt>ubuntu/acestream-engine_2.0.8-1raring6_i386.deb
'''Step 3Debian''':* http://dl.acestream.org/debian/acestream-engine_2.0.8-1sid5_amd64.deb* http://dl.acestream.org/debian/acestream-engine_2.0.8-1sid5_i386.deb* http://dl.acestream.org/debian/acestream-engine_2.0.8-1squeeze5_amd64.deb* http://dl.acestream.org/debian/acestream-engine_2.0.8-1squeeze5_i386.deb
=== Installing ACE Stream package on Ubuntu from deb-package acestreamengine command===You can install ACE Starting from version 2.1 Ace Stream on Ubuntu without using repository. To do this you need to download the installation package by one of links below and install it using Engine for Linux represents a package manager (for examplesingle executable file <tt>acestreamengine</tt>, which works in different modes, by double click depending on downloaded package)specified parameters.
===Common work scheme ===
The source accepts HTTP-stream to input (at this moment HTTP-streams with MPEG-TS encapsulation are supported) with original broadcast and creates a file with acelive extension after the launch. This file is a unique identifier of broadcast and it is used for connection and playback by clients.
===Syntax of acestreamengine--stream -source command===<tt>acestreamengine--stream-source</tt> command launches broadcast source.
''required parameters''
*<tt>--name NAME</tt> - broadcast name (this name is used when creating acelive and other service files)
*<tt>--source SOURCE</tt> - source (link to http-stream)
*<tt>--bitrate BITRATE</tt> - average bitrate of stream in bites bytes per second
''optional parameters''
*<tt>--cache-dir CACHE_DIR</tt> - directory for creating service files (broadcast cache and others)
*<tt>--publish-dir PUBLISH_DIR</tt> - directory, in which acelive-file will be created
*<tt>--piecesize PIECESIZE</tt> - piece size in bites bytes, power of two (if it's not specified, it's set automatically depending on bitrate)
*<tt>--duration DURATION</tt> - size of broadcast cache in format HH:MM:SS (by default, one hour: 01:00:00)
*<tt>--host HOST</tt> - set address of local tracker manually
*<tt>--provider-key PROVIDER_KEY</tt> - provider's key (only for commercial broadcasts)
*<tt>--maxclients MAXCLIENTS</tt> - maximum number of peers, on which data from the source are given simultaneously
*<tt>--showlog-piecesdebug DEBUG</tt> - show set the debug level (default is 0 - minimum log level)*<tt>--source-read-timeout SECONDS</tt> - timeout for reading data from the original source (in log numbers seconds). Default is 30.*<tt>--source-reconnect-interval SECONDS</tt> - interval is seconds, after which the engine will try to reconnect to the original source in case of pieces connection lost. Default is 5.*<tt>--pid-file-dir PATH</tt> - the directory where engine's pid file is created. Default is /tmp.*<tt>--provider-key</tt> - provider key (for an affiliate program)*<tt>--sid</tt> - content identificator for statistics(for an affiliate program)*<tt>--permanent</tt> - mark the broadcast as they are created24/7 (it's available all the time)*<tt>--date-start YYYY-MM-DD HH:mm:ss</tt> - set the data and time of the broadcast start (for the broadcasts which runs during a limited time)*<tt>--date-end YYYY-MM-DD HH:mm:ss</tt> - set the data and time of the broadcast end(for the broadcasts which runs during a limited time)*<tt>--premium</tt> - request a "premium" status for the broadcast*<tt>--upload-limit</tt> - limit upload speed (bytes/s, default is 0 - don't limit)*<tt>--max-connections</tt> - limit total number of connections (default is 1000)*<tt>--showmax-peers</tt> - periodically show in log list limit number of connected connections to other peers(default is 50)*<tt>--service-remote-access</tt> - enable remote statistics*<tt>--service-access-token</tt> - password for remote statistics access*<tt>--stats-report-interval</tt> - interval in seconds between internal statistics update (default is 60)*<tt>--debug DEBUGstats-report-peers</tt> - set debug levelupdate information about connected peers in the internal statistics (increases CPU load)
''additional''
*<tt>-h, --help</tt> - show commands' description
===Синтаксис команды Syntax of acestreamengine--stream-nodecommand===Команда <tt>acestreamengine--stream-node</tt> запускает узел поддержкиcommand launches support node.
''обязательные параметрыrequired parameters''*<tt>--url URL></tt> - ссылка на link to acelive файл трансляцииfile of broadcast
''необязательные параметрыoptional parameters''*<tt>--port PORT</tt> - порт port(по умолчанию by default: 8621)*<tt>--state-dir STATE_DIR</tt> - папка для временных файлов directory for temporary files (удаляется после остановки узла поддержкиit's deleted after support node installation)*<tt>--source-node SOURCE_NODE</tt> - адрес источника трансляции address of broadcast source (ip:port)*<tt>--support-node SUPPORT_NODE</tt> - добавить адрес другого узла поддержки add address of another support node (ip:port). Этот параметр может встречаться несколько разThis parameter may appear multiple times.*<tt>--allow-source-download</tt> - разрешить получение данных от источникаallow receiving data from the source*<tt>--allow-support-download</tt> - разрешить получение данных от других узлов поддержкиallow receiving data from other support nodes*<tt>--allow-peers-download</tt> - разрешить получение данных от обычных пировallow receiving data from ordinary peers*<tt>--max-incoming-connects MAX_INCOMING_CONNECTSconnections MAX_CONNECTIONS</tt> - маскимальное кол-во входящих соединений (от других пиров) limit number of total connections (по умолчанию default is 1000)*<tt>--max-outgoing-connects MAX_OUTGOING_CONNECTSpeers MAX_PEERS</tt> - маскимальное кол-во исходящих соединений limit number of connections to other peers (к другим пирам) (по умолчанию default is 50)*<tt>--max-upload-slots MAX_UPLOAD_SLOTS</tt> - максимальное количество пировmaximum number of peers, на которые одновременно отдаются данные с узла поддержки on which data from support node are given simultaneously (по умолчанию by default: 7)*<tt>--max-download-speed MAX_DOWNLOAD_SPEED</tt> - максимальная скорость загрузки maximum download speed (байтbyte/сs). По умолчанию By default: 0 (без ограниченийno restrictions).*<tt>--max-upload-speed MAX_UPLOAD_SPEED</tt> - максимальная скорость отдачи maximum upload speed (байсbyte/сs). По умолчанию By default: 0 (без ограниченийno restrictions).*<tt>--showlog-debug DEBUG</tt> - set the debug level (default is 0 - minimum log level)*<tt>--service-remote-piecesaccess</tt> - выводить в лог номера кусков по мере их загрузкиenable remote statistics*<tt>--showservice-peersaccess-token</tt> - периодически выводить в лог список подключенных пировpassword for remote statistics access*<tt>--stats-report-interval STATS_REPORT_INTERVAL</tt> - задать интервал в секундах для вывода в лог информации о скорости загрузки/отдачи. По умолчанию 0 interval in seconds between internal statistics update (не выводитьdefault is 60).*<tt>--debug DEBUGstats-report-peers</tt> - установить уровень отладкиupdate information about connected peers in the internal statistics (increases CPU load)
''дополнительноadditional''*<tt>-h, --help</tt> - показать описание командshow commands' description
===Встроенный трекерEmbedded tracker===Встроенный трекер - это трекер встроенный в источник трансляцииEmbedded tracker is a tracker embedded into broadcast source. Если он не отключен опцией If it's not disabled by <tt>--skip-internal-tracker</tt>option, то его адрес будет автоматически добавлен в its address will be added to acelive-файлfile automatically.
===Авторизованные узлыAuthorized nodes===Для тогоClient have to establish connection with at least two other nodes or an authorized node, чтобы клиент подключился к трансляции и начал просмотр, ему необходимо либо установить соединение минимум с двумя другими узлами, либо установить соединение с авторизованным узломto be connected to broadcast and start playback. Авторизованный узел - это узел, который был отмечен создателем трансляции как такойAuthorized node is a node, которому можно which was marked by broadcast's creator as a "доверятьtrustworthy". Как правило, это источник трансляции иUsually it's a broadcast source and/или узлы поддержкиor support nodes.
===ПримерыExamples===Для примеров предроложим наличие локальной сети с тремя серверамиFor examples let's assume that there is a local network with three servers:*192.168.1.1 - сервер для источникаserver for the source*192.168.1.2 - сервер для узла поддержкиserver for support node*192.168.1.3 - сервер для узла поддержкиserver for support node*192.168.1.100 - сервер, который отдает оригинальный поток трансляции server that gives original broadcast's stream (HTTP MPEG-TS) по адресу at <nowiki>http://192.168.1.100/stream</nowiki> (средний битрейт потока average bitrate of stream - 300 000 байтbyte/сs)
====Источник с встроенным трекеромSource with embedded tracker====Это наиболее простой способ запуск трансляции, не требующий запуска узлов поддержки и установки дополнительных трекеровThis is the easiest way to launch broadcast that does not require launching support nodes and installing additional trackers. Данный способ подходит для трансляций с небольшим количество пользователейThis method is suitable for broadcasts with a small number of users.
--name "test" \
--title "Тестовая трансляцияTest broadcast" \
--source "<nowiki>http://192.168.1.100/stream</nowiki>" \
--bitrate 300000 \
--publish-dir "/home/www/streams" \
--cache-dir "/tmp/streams" \
--add-authorized-peers \ > /tmp/test-source.log 2>&1</tt>
====Источник с внешним трекеромSource with external tracker====Если трансляция предполагает большое количество пользователейIf broadcast involves a large number of users, то желательно использовать внешний трекер и отключить встроенный it's better to use external tracker and disable embedded one (для снижения нагрузки на источникto reduce burden on the source).
--name "test" \
--title "Тестовая трансляцияTest broadcast" \
--source "<nowiki>http://192.168.1.100/stream</nowiki>" \
--bitrate 300000 \
--add-authorized-peers \
--skip-internal-tracker \
--tracker "udp://192.168.1.1:2710/announce" \</tt> <tt> --skip-internal-tracker</tmp/testtt> option disconnects embedded tracker, <tt>--source.log 2>&1tracker</tt>option connects external tracker.
--name "test" \
--title "Тестовая трансляцияTest broadcast" \
--source "<nowiki>http://192.168.1.100/stream</nowiki>" \
--bitrate 300000 \
--tracker "udp://192.168.1.1:2710/announce" \
--support-node "192.168.1.2:8621" \
--support-node "192.168.1.3:8621" \ > /tmp/test-source.log 2>&1</tt>
--url "<nowiki>http://192.168.1.1/streams/test.acelive</nowiki>" \
--state-dir "/tmp" \
--source-node "192.168.1.1:7764" \
--allow-source-download \ > /tmp/test-node.log 2>&1</tt>
--url "<nowiki>http://192.168.1.1/streams/test.acelive</nowiki>" \
--state-dir "/tmp" \
--allow-source-download \
--support-node "192.168.1.3:8621" \
--allow-support-download \ > /tmp/test-node.log 2>&1</tt>
--url "<nowiki>http://192.168.1.1/streams/test.acelive</nowiki>" \
--state-dir "/tmp" \
--allow-source-download \
--support-node "192.168.1.2:8621" \
--allow-support-download \ > /tmp/test-node.log 2>&1</tt>
====Приватный источник с двумя узлами поддержкиPrivate source with two support nodes====Иногда может возникнуть необходимость запретить клиентам напрямую обращаться к источнику трансляцииSometimes it may be necessary to prevent clients from direct access to broadcast source. НапримерFor example, источник может быть физически расположен на сервере в защищенной зоне без доступа из внешнего мираthe source may be located on server in protected area without access from the outer world. В этом случае трансляцию можно организовать по следующей схемеIn this case broadcast can be organized by the following scheme:*источник делается приватным the source is made private (получать от него данные смогут только узлы поддержкиonly support nodes, указанные явным образомspecified explicitly, can receive data from it)*узлы поддержки получают данные от источника и отдают клиентамsupport nodes receive data from the source and give to clients*клиенты получают данные от узлов поддержкиclients receive data from support nodes
--name "test" \
--title "Тестовая трансляцияTest broadcast" \
--source "<nowiki>http://192.168.1.100/stream</nowiki>" \
--bitrate 300000 \
--support-node "192.168.1.2:8621" \
--support-node "192.168.1.3:8621" \
--private-source \ > /tmp/test-source.log 2>&1</tt>
--url "<nowiki>http://192.168.1.1/streams/test.acelive</nowiki>" \
--state-dir "/tmp" \
--source-node "192.168.1.1:7764" \
--allow-source-download \</tt> ====Recent scripts and configuration examples==== > Python-based launch scripts with configuration examples and some brief explanation available via https:/tmp/test-nodegithub.log 2>&1<com/acestream/tt>streaming-utils