Table of Contents
Airtime
Instalación
Debian ? - Airtime 2.?
1. Descargar easy install e intentar
wget http://apt.sourcefabric.org/misc/airtime-easy-setup.deb
2. Instalar paquetes necesarios:
sudo aptitude install debconf-utils icecast2 postgresql python-virtualenv ecasound flac libcamomile-ocaml-data monit multitail odbc-postgresql php5-curl php5-pgsql pwgen rabbitmq-server zendframework
Descargar mp3gain:
https://packages.debian.org/wheezy/amd64/mp3gain/download
Instalarlo:
sudo dpkg -i /path/to/mp3gain_1.5.2-r2-2+deb7u1_amd64.deb
3. Configurar:
sudo dpkg -i airtime-easy-setup.deb sudo airtime-easy-setup
Ubuntu 14.04.3 - Airtime 2.5.1-1
1. Descargar easy install e intentar
wget http://apt.sourcefabric.org/misc/airtime-easy-setup.deb
2. Instalar paquetes necesarios:
sudo aptitude install debconf-utils icecast2 postgresql python-virtualenv ecasound flac libcamomile-ocaml-data monit multitail odbc-postgresql php5-curl php5-pgsql pwgen rabbitmq-server zend-framework libportaudio2 php5-gd php-pear unzip
3. Configurar:
sudo dpkg -i airtime-easy-setup.deb sudo airtime-easy-setup
Configuración
Asumo que airtime esta instalado en un servidor. En este ejemplo el servidor esta en la DMZ y tiene como nombre DNS “airtime.example.com”
1. Editar archivo de config:
sudo cp /etc/airtime/airtime.conf /etc/airtime/airtime.conf.old sudo vim /etc/airtime/airtime.conf
Y ajustar la variable:
base_url = airtime.example.com
2. Tras cambiar una configuracion, actualizar base de datos:
sudo airtime-update-db-settings
3. Editar el virtualhost:
sudo cp /etc/apache2/sites-available/airtime-vhost.conf /etc/apache2/sites-available/airtime-vhost.conf.old sudo vim /etc/apache2/sites-available/airtime-vhost.conf
Y dejarlo tal que asi:
<VirtualHost *:443> SSLEngine on SSLProtocol all -SSLv2 SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key Header always set Strict-Transport-Security "max-age=31536000" ServerName airtime.example.com ServerAdmin root@localhost DocumentRoot /usr/share/airtime/public DirectoryIndex index.php <Directory /usr/share/airtime/public> AllowOverride all Require all granted </Directory> </VirtualHost> <VirtualHost *:80> ServerName airtime.example.com ServerAdmin root@localhost DocumentRoot /usr/share/airtime/public DirectoryIndex index.php Redirect permanent /login https://airtime.example.com/login SetEnv APPLICATION_ENV "production" <Directory /usr/share/airtime/public> AllowOverride All Require all granted </Directory> </VirtualHost>
4. Recargar la config de apache:
sudo apachectl -k graceful
5. Ya se deberia poder entrar en:
http://airtime.example.com
ID3
Para asignar etiquetas:
sudo aptitude install id3v2
Asignar una etiqueta:
sudo id3v2 --TBPM "128" file.mp3
Varios
select * from cc_playlist where name='Love of Lesbian-1999';
id | name | state | currentlyaccessing | editedby | mtime | creator | description 17 | Love of Lesbian-1999 | ready | 0 | | | | (1 row)
select * from cc_files where artist_name='Love of Lesbian' and album_title='1999';
id | gunid | name | mime | ftype | directory | filepath | state | currentlyaccessing | editedby | mtime | md5 | track_title | artist_name | bit_rate | sample_rate | format | length | album_title | genre | comments | year | track_number | channels | url | bpm | rating | encoded_by | disc_number | mood | label | composer | encoder | checksum | lyrics | orchestra | conductor | lyricist | original_lyricist | radio_station_name | info_url | artist_url | audio_source_url | radio_station_url | buy_this_url | isrc_number | catalog_number | original_artist | copyright | report_datetime | report_location | report_organization | subject | contributor | language ------+----------------------------------+------+-----------+-----------+-----------+--------------------------------------------------------------------------------------+-------+--------------------+----------+-------+----------------------------------+--------------------------------------------------------+-----------------+----------+-------------+--------+-----------------+-------------+-------+----------+------+--------------+----------+-----+-----+--------+------------+-------------+------+-------+----------+---------+----------+--------+-----------+-----------+----------+-------------------+--------------------+----------+------------+------------------+-------------------+--------------+-------------+----------------+-----------------+-----------+-----------------+-----------------+---------------------+---------+-------------+---------- 83 | 27457686e740efe06dff0f9f634f53b9 | | audio/mp3 | audioclip | 1 | Love Of Lesbian/2009.1999/Love Of Lesbian - Incendios De Nieve.mp3 | empty | 0 | | | d34e2d218d8a8ba820e6dc61d0e91c9b | Love Of Lesbian - Incendios De Nieve | Love of Lesbian | 194577 | 44100 | | 00:05:58.269387 | 1999 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 105 | 00ded83c5e4b5df39c73088a394121bd | | audio/mp3 | audioclip | 1 | Love Of Lesbian/2009.1999/Love Of Lesbian - Algunas Plantas.mp3 | empty | 0 | | | fd15dcb4d2c30a774584d2fd615dc61b | Love Of Lesbian - Algunas Plantas | Love of Lesbian | 212706 | 44100 | | 00:04:06.099591 | 1999 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 207 | 67659cd5e11fff08a31b151a8b34cc66 | | audio/mp3 | audioclip | 1 | Love Of Lesbian/2009.1999/Love Of Lesbian - Miau.mp3 | empty | 0 | | | 0f7e5166eb5f32671ebd221b9917bb05 | Love Of Lesbian - Miau | Love of Lesbian | 217042 | 44100 | | 00:04:19.84 | 1999 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 633 | 243b8319e072e0312dbb037ec956b4e8 | | audio/mp3 | audioclip | 1 | Love Of Lesbian/2009.1999/Love Of Lesbian - Te Hiero Mucho (historia del amante).mp3 | empty | 0 | | | 8519aa61aff4b2e9a7ed66fb896301a8 | Love Of Lesbian - Te Hiero Mucho (historia del amante) | Love of Lesbian | 200683 | 44100 | | 00:04:23.862857 | 1999 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 246 | 480c81e215b9cfd8ac8e5cc5dfe2be74 | | audio/mp3 | audioclip | 1 | Love Of Lesbian/2009.1999/Love Of Lesbian - 1999.mp3 | empty | 0 | | | 028e57f8435b532df29e062189ff9e38 | Love Of Lesbian - 1999 | Love of Lesbian | 200468 | 44100 | | 00:05:05.371428 | 1999 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 269 | 98fbec65a3b09ee3091c1a267de98603 | | audio/mp3 | audioclip | 1 | Love Of Lesbian/2009.1999/Love Of Lesbian - La Mirada De La Gente Que Conspira.mp3 | empty | 0 | | | 34fff821ea7c76984080ddaa94b7720a | Love Of Lesbian - La Mirada De La Gente Que Conspira | Love of Lesbian | 203301 | 44100 | | 00:04:46.981224 | 1999 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 291 | a3a5bf65656df6610916d62961882629 | | audio/mp3 | audioclip | 1 | Love Of Lesbian/2009.1999/Love Of Lesbian - Octoplasta.mp3 | empty | 0 | | | 0bd88a925b4022a41f8bbd548ae9cc8f | Love Of Lesbian - Octoplasta | Love of Lesbian | 207132 | 44100 | | 00:03:46.011428 | 1999 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 898 | 2859e5a0f03b50f9dc008267b790339f | | audio/mp3 | audioclip | 1 | Love Of Lesbian/2009.1999/Love Of Lesbian - Cuando Diga Ya.mp3 | empty | 0 | | | a589042f04f456f79fd770d0df276593 | Love Of Lesbian - Cuando Diga Ya | Love of Lesbian | 205673 | 44100 | | 00:02:46.922448 | 1999 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1170 | 172d14e6ead70d0b10b3a15ae12dce3e | | audio/mp3 | audioclip | 1 | Love Of Lesbian/2009.1999/Love Of Lesbian - Voy A Romper Las Ventanas.mp3 | empty | 0 | | | 2a79a7c69f27daa446d93406fab2caf1 | Love Of Lesbian - Voy A Romper Las Ventanas | Love of Lesbian | 197424 | 44100 | | 00:06:28.466938 | 1999 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1052 | 2a98395cb5366077370631e59f6d4c4f | | audio/mp3 | audioclip | 1 | Love Of Lesbian/2009.1999/Love Of Lesbian - Alli Donde Soliamos Gritar.mp3 | empty | 0 | | | 3a0c31e76bd1e95c9f9403175922a969 | Love Of Lesbian - Alli Donde Soliamos Gritar | Love of Lesbian | 218658 | 44100 | | 00:05:37.475918 | 1999 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2202 | 74308419317ae11f5ef3b57cfc6f8a30 | | audio/mp3 | audioclip | 1 | Love Of Lesbian/2009.1999/Love Of Lesbian - Las Malas Lenguas.mp3 | empty | 0 | | | 1c3045b72224a199b6913391df94266a | Love Of Lesbian - Las Malas Lenguas | Love of Lesbian | 210732 | 44100 | | 00:03:33.34204 | 1999 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2099 | 3409e7ab6cdfd8cb37768d379e2afd6b | | audio/mp3 | audioclip | 1 | Love Of Lesbian/2009.1999/Love Of Lesbian - El Club De Fans De John Boy.mp3 | empty | 0 | | | e37ed2d250b64a5175fea147d57a1a36 | Love Of Lesbian - El Club De Fans De John Boy | Love of Lesbian | 217261 | 44100 | | 00:03:49.877551 | 1999 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1995 | 6c64fa299b9c98793dc0b04277b47ab6 | | audio/mp3 | audioclip | 1 | Love Of Lesbian/2009.1999/Love Of Lesbian - Cuestiones De Familia.mp3 | empty | 0 | | | d3aaa28bf56bb3d2756ace88a2ce6db3 | Love Of Lesbian - Cuestiones De Familia | Love of Lesbian | 194338 | 44100 | | 00:03:01.159183 | 1999 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2369 | 90b157c6c079bc49280a945ca84b85d4 | | audio/mp3 | audioclip | 1 | Love Of Lesbian/2009.1999/Love Of Lesbian - Segundo Asalto.mp3 | empty | 0 | | | 1bbfaf2a0a6c436e57de48234a6c0a34 | Love Of Lesbian - Segundo Asalto | Love of Lesbian | 220736 | 44100 | | 00:03:35.745306 | 1999 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (14 rows)
select * from cc_playlistcontents ;
id | playlist_id | file_id | position | cliplength | cuein | cueout | fadein | fadeout (0 rows)
insert into cc_playlistcontents (playlist_id,file_id,cliplength,cuein) values ('17','83','00:05:58.269387','00:05:58.269387')
insert into cc_playlistcontents (playlist_id,file_id,cliplength,cuein) select 17,id,length,length from cc_files where artist_name='Love of Lesbian' and album_title='1999';
select (select id from cc_playlist where name='Love of Lesbian-1999'),id,length,length from cc_files where artist_name='Love of Lesbian' and album_title='1999';
Errores
Archivos subidos no aparecen en library
cd /etc/php5/apache2/conf.d sudo ln -s /etc/php5/conf.d/airtime.ini . sudo apache2 restart
Now you will see a right path in the logs:
BEFORE:
2014-12-06T13:19:34+01:00 INFO (6): [StoredFile.php : uploadFile() : line 901] - /usr/share/airtime/application/models/StoredFile.php:uploadFile(): filename=p198foha3paeupmt1u6116tj1dfd4.mp3 to /plupload
AFTER:
2014-12-06T14:13:44+01:00 INFO (6): [StoredFile.php : copyFileToStor() : line 994] - copyFileToStor: moving file /tmp/plupload/p198froopf1hie109bblhrng9nn4.mp3
Icecast2
sudo aptitude install icecast2 /etc/icecast2/icecast.xml
Just the mountpoint:
<mount type="normal"> <mount-name>/broadcast01</mount-name> <password>secret</password> <max-listeners>10</max-listeners> <max-listener-duration>3600</max-listener-duration> <stream-name>Stream name</stream-name> <stream-description>My audio description</stream-description> <stream-url>http://some.place.com</stream-url> <genre>classical</genre> <bitrate>32</bitrate> <on-connect>/home/icecast/bin/source-start</on-connect> <on-disconnect>/home/icecast/bin/source-end</on-disconnect> </mount>
Darkice
/etc/darkice.cfg
[general] duration = 0 # duration of encoding, in seconds. # 0 means forever bufferSecs = 60 # size of internal slip buffer, in seconds # this section describes the audio input that will be streamed [input] device = default sampleRate = 22050 # sample rate in Hz. try 11025, 22050 or 44100 bitsPerSample = 16 # bits per sample. try 16 channel = 1 # channels. 1 = mono, 2 = stereo [icecast2-0] bitrateMode = cbr # average bit rate format = mp3 # format of the stream: ogg vorbis quality = 0 # encoding quality bitrate = 32 # bitrate of the stream sent to the server server = icecast.example.com port = 8000 mountPoint = broadcast01 password = secret localDumpFile = name = Name description = Description url = http://example.com genre = music # genre of the stream
Arrancar:
sudo darkice -v5 -c /etc/darkice.cfg
Errores
- DarkIce: AlsaDspSource.cpp:173: can't set channels [2]
La causa es que en el archivo de configuración se especifica que el dispositivo puede grabar en stereo:
channel = 2
Y el dispositivo solo soporta mono. Solución:
channel = 1