Open main menu

Ace Stream Wiki β

Changes

Streaming/en

1,115 bytes added, 15:49, 17 October 2021
Transition from versions 2.0.х to version 2.1 and higher
== Installation Launching broadcast==
=== Installing ACE Stream on Debian/Ubuntu from repository Main terms=== *'''Step 1Source''' Add link on appropriate repository into <tt>/etc/apt/sources.list</tt> file. Repository should be selected according to operating system. '- a program that accepts broadcast'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 to official sids HTTP-repositories stream and provides playback of Debianbroadcast using ACE Stream software.If you don*'t know, which repository to choose, use squeeze. ''Ubuntu 11.10:Support node'' <tt><nowiki>deb http://repo.acestream.org/ubuntu/ oneiric main</nowiki></tt> ''Ubuntu 12- a program allowing to scale broadcast using additional server equipment and Internet-channels.04:'' <tt><nowiki>deb http://repo.acestream.org/ubuntu/ precise main</nowiki></tt> *''Ubuntu 12.10:'Client' <tt><nowiki>deb http://repo.acestream.org/ubuntu/ quantal main</nowiki></tt> '''Step 2''' Installing public key. To do this you have - ACE Stream software, which is used to run the following command: ''Debian:'' <tt><nowiki>wget -O - http://repoplay broadcast.acestream.org/keys/acestream.public.key | apt-key add -</nowiki></tt> ''Ubuntu:'' <tt><nowiki>sudo wget -O - http://repo.acestream.org/keys/acestream.public.key | sudo apt-key add -</nowiki></tt>
===Transition from versions 2.0.х to version 2.1 and higher===From September, 10, 2013, upgraded version of the engine (2.1.6) for Ubuntu, Debian and CentOS is available.Before using a new version for production, we recommend to test it on one or several broadcasts, if possible.If you face any problems, please, write to the forum (https://forum.acestream.media/latest) or email 'support@acestream.net''Step 3'''.
Installing <span style="color: #900;">ATTENTION!</span> In the right package. For example, nearest future support for engine installation you have to install acestream-engine packageolder versions will be stopped.
''Debian'' <ttspan style="color: #009;">apt-get updateIMPORTANT!</ttspan> <tt>apt-get install acestream-All broadcasts created via new version of Ace Stream (2.1 and higher) are not suppported by client software of old versions (2.0.х and lower). If you attempt to watch a new broadcast using the old engine</tt>, an error "Cannot load transport file" will appear.
''Ubuntu''====Changes in launch parameters==== <tt>sudo apt-get update</tt> <tt>sudo apt-get install acestream-engine</tt>Some parameters of the launch of sources and support nodes from the command line have been changed, therefore the launch with the old command line will not work.
The following packages Main changes:* one executable file is used <tt>acestreamengine</tt>; different launch modes (a source, support node) are available in the repository for Ubuntuset by options:*'''acestream* instead of <tt>acestreamengine-stream</tt> you should launch <tt>acestreamengine --engine''' stream- enginesource</tt>*'''acestream* instead of <tt>acestreamengine-mozillanode</tt> you should launch <tt>acestreamengine -plugin''' - plugstream-in for browsernode</tt>*'''acestream* instead of <tt>acestreamengine-client-console</tt> you should launch <tt>acestreamengine -player''' - desktop playerclient-console</tt>*'''acestream* instead of <tt>acestreamengine-client-gtk</tt> you should launch <tt>acestreamengine -player-data''' client- set of common libraries for gtk</tt>* log system is changed. In old versions the player engine output all debug information into STDERR and plug-redirecting the output was required to write logs into a file. In a new version it is possible to define in*'''acestreamoptions, where to write logs -full''' - full packageinto STDOUT, into STDERR, including into a file or syslog. Rotation of logs by their size is supported for files. You can read description of all of the aboveoptions in [[#acestreamengine command|acestreamengine command]]
For Debian only the engine (===Transition from versions 2.1.х to version 3.0.x and higher===See main article about Ace Stream v.3 - https://wiki.acestream-engine) is available.media/AceStream_3.0/en
=== 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.
Package for 32-bit versions Work mode is set by one of Ubuntuthe following parameters: * <tt>http:--client-console</tt> - launch engine in a client mode from console (without a graphic interface)* <tt>--client-wx</dl.torrentstream.orgtt> - launch engine in a client mode with a graphic interface WX* <tt>--client-gtk</productstt> - launch engine in a client mode with a graphic interface GTK* <tt>--stream-source</acestreamtt> - launch a source of broadcast* <tt>-full-stream-node</ubuntutt> - launch a support node* <tt>--create-transport</i368tt> - create a transport file from existing content (VOD)* <tt>--create-transport-multi</latesttt> - create a multi-stream transport file* <tt>--version</tt>- show engine version
Package for 64-bit versions of Ubuntu: <tt>http://dlEach work mode has their own required and not required parameters, described in appropriate sections.torrentstream.org/products/acestream-full/ubuntu/amd64/latest</tt>
Supported versions Also all work modes have common parameters that manage the output of Ubuntu: 11.10, 12.04, 12debug information.10* <tt>--log-stdout</tt> - deduce information in STDOUTThis intallation package is an analog of * <tt>acestream-full-log-stderr</tt> package from repository. It includes the engine, player and plug-deduce information in for browsers.STDERR* <tt>--log-file PATH</tt> - deduce information in a specified file==Launching broadcast==* <tt>--log-max-size SIZE</tt> - maximum file size (bytes) ===Main terms===* <tt>--log-backup-count COUNT</tt> - how many backup logs have to be stored (backup log file is created when a limit, specified by a parameter --log-max-size, is reached)*'''Source''' <tt>--log-file- program that accepts HTTPbuffer SIZE</tt> -stream enable buffering of broadcast and provides broadcast viewing output into the file (using ACE Stream software.buffer of specified size in bytes)*'''Support node''' <tt>--log-syslog HOST</tt> - deduce information in syslog- program allowing to scale broadcast using additional server equipment and Internetat the specified address* <tt>--log-syslog-port PORT</tt> -channels.syslog-server port*'''Client''' <tt>--log-syslog-facility FACILITY</tt> - ACE Stream software, which is used to play broadcast.facility* <tt>--log-syslog-buffer SIZE</tt> - enable buffering of output into syslog (using buffer of specified size in bytes)
===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>--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 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-node command===<tt>acestreamengine--stream-node</tt> command launches support node.
''required parameters''
*<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> - maximum limit number of incoming total connections (from other peers) (by default: is 1000)*<tt>--max-outgoing-connects MAX_OUTGOING_CONNECTSpeers MAX_PEERS</tt> - maximum limit number of outgoing connections (to other peers) (by 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-piecesdebug DEBUG</tt> -show in set the debug level (default is 0 - minimum log numbers of pieces as they are createdlevel)*<tt>--service-remote-access</tt> - enable remote statistics*<tt>--showservice-peersaccess-token</tt> - periodically show in log list of connected peers password for remote statistics access*<tt>--stats-report-interval STATS_REPORT_INTERVAL</tt> - set interval in seconds to show in log information about download/upload speep. By between internal statistics update (default: 0 (do not showis 60).*<tt>--debug DEBUGstats-report-peers</tt> - set debug levelupdate information about connected peers in the internal statistics (increases CPU load)
''additional''
We launch the source on server 192.168.1.1:
<tt>acestreamengine--stream -source \
--name "test" \
--title "Test broadcast" \
--publish-dir "/home/www/streams" \
--cache-dir "/tmp/streams" \
--add-authorized-peers \ > /tmp/test-source.log 2>&1</tt>
The last line is used to write logs into file /tmp/test-source.log. By default <tt>acestreamengine--stream-source</tt> shows outputs all debug information in console in STDERRthe STDOUT.
<tt>--add-authorized-peers</tt> option adds the list of authorized nodes to acelive-file (in this case, it's the source: 192.168.1.1).
In this example we assume that XBT Tracker is installed and launched on server 192.168.1.1.
Now broadcast's launch will look like:
<tt>acestreamengine--stream -source \
--name "test" \
--title "Test broadcast" \
--add-authorized-peers \
--skip-internal-tracker \
--tracker "udp://192.168.1.1:2710/announce" \ > /tmp/test-source.log 2>&1</tt>
<tt>--skip-internal-tracker</tt> option disconnects embedded tracker, <tt>--tracker</tt> option connects external tracker.
====Источник с двумя узлами поддержкиSource with two support nodes====В случаеIf there is not enough upstream bandwidth for normal work of broadcast on the source, если на источнике не хватает пропускной способности исходящего канала для нормальной работы трансляции, можно использовать узлы поддержкиsupport nodes can be used. Чаще всего узел поддержки представляет собой узел, который принимает данные от источника и отдает клиентам Support node is often a node that receives data from the source and gives to clients (хотя узел поддержки также может принимать данные от других узлов поддержки и даже от клиентовthough support node can also receive data from other support nodes and even clients, в зависимости от его настроекdepending on its settings). Узел поддержки имеет смысл ставить на отдельном сервере с хорошей шириной исходящего каналаIt makes sense to install support node on a separate server with a good width of output channel.
Для максимально эффективной работы схемы с узлами поддержки источнику необходимо сообщить адреса этих узлов с помощью опции To make a scheme with support nodes work with maximum efficiency, addresses of these nodes must be given to the sourceusing <tt>--support-node</tt>option:  <tt>acestreamengine--stream -source \
--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>
Запускаем узлы поддержки на серверах Launch support nodes on servers 192.168.1.2 и and 192.168.1.3 (команды для запуска одинаковыеcommands are the same): <tt>acestreamengine--stream-node \
--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>
Опция Option <tt>--source-node</tt> задает адрес источникаsets source address.
Опция Option <tt>--allow-source-download</tt> разрешает узлу поддержки скачивать данные с источника allows support node to download data from the source (скачивание с других узлов поддержки и клиентов в данном случае запрещеноdownloading from other support nodes and clients in this case is forbidden).
Если необходимо разрешить узлам поддержки скачивать данные с других узлов поддержкиTo allow support nodes to download data from other suppport nodes, то следует задать список других узлов опцией you should set a list of other nodes using <tt>--support-node</tt> и разрешить скачивание опцией option and allow downloading using <tt>--allow-support-download</tt>option.
На сервере On server 192.168.1.2 это будет выглядеть такit will look like: <tt>acestreamengine--stream-node \
--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>
На сервере On server 192.168.1.3: <tt>acestreamengine--stream-node \
--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
Для того, чтобы сделать источник приватнымTo make the source private, следует указать опцию option <tt>--private-source</tt>must be specified: <tt>acestreamengine--stream -source \
--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>
Следует обратить внимание на то, что в данной конфигурации адрес трекера изменен на Notice that in this configuration tracker's address is changed to <tt>udp://192.168.1.2:2710/announce</tt>. Это сделано для поддержки старых версий клиентовIt was made to support old versions of clients, которые не обрабатывают список авторизованных пиров which do not process a list of authorized peers (подробнее здесь more details here [[#Авторизованные узлыAuthorized peers|Авторизованные узлыAuthorized peers]]). Узлы поддержки на серверах Launch support nodes on servers 192.168.1.2 и and 192.168.1.3 запускаем как обычноas usual: <tt>acestreamengine--stream-node \
--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