User Tools

Site Tools


informatica:linux:radio

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
informatica:linux:radio [2011/11/07 16:59] 213.229.132.19informatica:linux:radio [2018/05/12 15:43] (current) – [Darkice] javi
Line 1: Line 1:
 ====== Airtime ====== ====== Airtime ======
 +
 +http://sourcefabric.booktype.pro/airtime-25-for-broadcasters/
 +
 +===== Instalación =====
 +
 +==== Debian ? - Airtime 2.? ====
 +
 +1. Descargar easy install e intentar
 +
 +<code>
 +wget http://apt.sourcefabric.org/misc/airtime-easy-setup.deb
 +</code>
 +
 +2. Instalar paquetes necesarios:
 +
 +<code>
 +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
 +</code>
 +
 +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:
 +
 +<code>
 +sudo dpkg -i airtime-easy-setup.deb
 +sudo airtime-easy-setup
 +</code>
 +
 +==== Ubuntu 14.04.3 - Airtime 2.5.1-1 ====
 +
 +1. Descargar easy install e intentar
 +
 +<code>
 +wget http://apt.sourcefabric.org/misc/airtime-easy-setup.deb
 +</code>
 +
 +2. Instalar paquetes necesarios:
 +
 +<code>
 +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
 +</code>
 +
 +3. Configurar:
 +
 +<code>
 +sudo dpkg -i airtime-easy-setup.deb
 +sudo airtime-easy-setup
 +</code>
 +
 +===== 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:
 +
 +<code>
 +sudo cp /etc/airtime/airtime.conf /etc/airtime/airtime.conf.old
 +sudo vim /etc/airtime/airtime.conf
 +</code>
 +
 +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:
 +
 +<code>
 +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 
 +</code>
 +
 +Y dejarlo tal que asi:
 +
 +<code>
 +<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>
 +</code>
 +
 +4. Recargar la config de apache:
 +
 +  sudo apachectl -k graceful
 +
 +5. Ya se deberia poder entrar en:
 +
 +  http://airtime.example.com
 +===== ID3 =====
 +
 +[[http://en.wikipedia.org/wiki/ID3#ID3v2_frame_specification_.28Version_2.3.29|Listado de etiquetas ID3]]
 +
 +Para asignar etiquetas:
 +
 +  sudo aptitude install id3v2
 +  
 +Asignar una etiqueta:
 +
 +  sudo id3v2 --TBPM "128" file.mp3
 +
 +===== Varios =====
 +
  
  
Line 25: Line 167:
   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        |                |      |              |          |                |            |                  |                |                  |        |                              |                                      |          |            |                  |                                |                            |                                                                                                      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        |                |      |              |          |                |            |                  |                |                  |        |                              |                                      |          |            |                  |                                |                            |                                                                                                      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)+  (14 rows)
  
  
 select * from cc_playlistcontents ; select * from cc_playlistcontents ;
- id | playlist_id | file_id | position | cliplength | cuein | cueout | fadein | fadeout  +  id | playlist_id | file_id | position | cliplength | cuein | cueout | fadein | fadeout  
-----+-------------+---------+----------+------------+-------+--------+--------+--------- +  (0 rows)
-(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) values ('17','83','00:05:58.269387','00:05:58.269387')
Line 39: Line 180:
  
 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'; 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 ====
 +
 +<code>
 +cd /etc/php5/apache2/conf.d
 +sudo ln -s /etc/php5/conf.d/airtime.ini .
 +sudo apache2 restart
 +</code>
 +
 +
 +Now you will see a right path in the logs:
 +
 +BEFORE:
 +
 +<code>
 +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
 +</code>
 +
 +AFTER:
 +
 +<code>
 +2014-12-06T14:13:44+01:00 INFO (6): [StoredFile.php : copyFileToStor() : line 994] - copyFileToStor: moving file /tmp/plupload/p198froopf1hie109bblhrng9nn4.mp3
 +</code>
 +
 +====== Icecast2 ======
 +
 +  sudo aptitude install icecast2
 +  
 +  /etc/icecast2/icecast.xml
 +  
 +Just the mountpoint:
 +
 +<code>
 +        <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>
 +</code>
 +
 +====== Darkice ======
 +
 +  /etc/darkice.cfg
 +  
 +<code>
 +[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
 +</code>
 +
 +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
 +
informatica/linux/radio.1320685159.txt.gz · Last modified: 2015/04/13 20:19 (external edit)