AutoDJ - Werbespots und Jingles

Status
Für weitere Antworten geschlossen.

Mita

Benutzer
Gibt es eine Möglichkeit bei sc_trans Elemente wie z.B. Jingles, Werbespots alle 15 Minuten oder nach jedem 4. Song zu spielen? Aber trotzdem eine zufällige Abspielreihenfolge hat. Wenn ja, wie kann man so etwas verwirklichen?
 
AW: AutoDJ - Werbespot/Jinlges

Meine Admins sind am Verzweifeln und mit den Nerven am Ende....wie muss man die Einstellungen Vornehmen damit man das oben genannte Realisieren kann? Oder hat jemand eine Deutsch Anleitung (Oder überhaupt eine Anleitung) für Calendar.xml




;; VU Images
vuimagedirectory=D:\Programme\SHOUTcast-Auto-DJ\testui

;; ENCODER OPTIONS
encoder=mp3
bitrate=128000
samplerate=44100
channels=2
qualitet= 1

;;; NETWORK OPTIONS
outprotocol=1
serverip=192.168.1.2
serverport=8000
password=meinsm


;;;; LOGGING OPTIONS:
;where does the log file go
logfile=c:\sc_trans1.log
; 1 to do screen logging else 0
screenlog=1

;;;;;; METADATA CONTROL
; my stream name
streamtitle=keyfm
; url related to my stream
streamurl=http://www.demo.de/
; my genre
genre=Various
; other assorted stuff
;aim=myaimaddr
;irc=myirc
;icq=myicq
; register with yp
public=1

;;;; PLAYLIST CONTROL
calendarfile=D:\speicher\config\calendar.xml
; your playlist
playlistfile=D:\speicher\playliste\standard.txt

playlistfilename_1=jingels
playlistfilepath_1=D:\speicher\playliste\jigels.txt

; by default we shuffle the playlist. Lets turn that off
shuffle=1
; set our crossfade time to 2 seconds. zero means no xfade
xfade=4
; file must be at least 20 seconds or we don't crossfade
xfadethreshold=2
; drop folder for priority playlists
playlists=c:\sc_trans\playlists\
; where finished priority playlists get copied
archive=c:\sc_trans\playlists\archive\

;;; LIVE CAPTURE:
; don't capture
capture=0
; set capture parameters
;capturedevice=Sound Blaster
;captureinput=Line-In
;capturesamplerate=44100
;capturechannels=2

;;;; DJ SUPPORT:
; dj listen port
djport=9876
; dj password
djpassword=test
; idle time until auto-dump
autodumpsourcetime=30
; record dj broadcasts here
djbroadcasts=c:\sc_trans\recorded\


;; REPLAY GAIN CONTROL:
applyreplaygain=0
calculatereplaygain=0

;;; OTHER:
adminport=5555
adminuser=admin
adminpassword=goaway



<?xml version="1.0" encoding="UTF-8" ?>
<calendar starttime="00:00:00" />
<eventlist>
<event type="playlist">
<playlist loopatend="1" shuffle="1" priority="1" >jingels</playlist>
<calendar starttime="22:33:00" duration="22:39:0" repeat="" />
</event>
</eventlist>
 
AW: AutoDJ - Werbespots und Jingles

Hi,

ja ist möglich, vorraussetzung ist ein sc_trans version 2 ab drop 5 oder 6 glaube ich.

Die Version unterstützt scripte als Playlist, allerdings musst du eine Lizenz zum MP3 Streaming erwerben. Kostet 5,- US$.

Die vorgehensweise ist denkbar einfach.

1. Kopiere das php-script und nenne es random.php:
Code:
<?php

// hier den Pfad zu deinem Verzeichnis mit den Jingles angeben 
$path = '/home/stream/Music/Jingle/';

// ab hier nichts mehr ändern!!!!!
// =======================
$dir = @opendir($path);
$filelist = array();

while(($file = readdir($dir)) !== false)
{
	$cur_file = $path . $file;
	if (is_file($cur_file))
	{
		array_push($filelist, $cur_file);
	}
}
$rnd = array_rand($filelist, 1);

echo $filelist[$rnd];
?>

2. erstelle eine Playliste mit folgendem Eintrag und benenne sie jingle.lst:
Hier musst du den Pfad zu php und zu dem script von oben anpassen!
Code:
#!/usr/bin/php /home/stream/random.php

3. In der sc_trans.conf folgende Zeilen einfügen:
Hier den Pfad zur datei jingle.lst anpassen!
Code:
playlistfilename_0=jingles
playlistfilepath_0=/pfad/zur/jingle.lst

4. In der Calendar.xml folgende einträge einfügen:
Code:
<event type="playlist">
<playlist loopatend="0" shuffle="0" priority="2" >jingles</playlist>
<calendar starttime="00:00:00"  duration="00:05:00 timeoffset="00:00:00" repeat="128" />
</event>

<event type="playlist">
<playlist loopatend="0" shuffle="0" priority="2" >jingles</playlist>
<calendar starttime="00:00:00"  duration="00:05:00 timeoffset="00:30:00" repeat="128" />
</event>
Dies sollte dir zur halben und vollen Std. ein Jingle spielen
Du must jedoch bedenken, das der laufende Titel nicht unterbrochen wird. Wenn um 14:58:30 ein Song mit einer Länge von 4:10 Minuten gestartet wird, wird sc_trans den jingle erst um 15:02:40 Uhr spielen, da der laufende Track nicht abgebrochen wird, selbst wenn die Jingle Playlist eine höhere Priorität hat.
Die duration (Spieldauer) steht deshalb auf 5 Minuten, damit der jingle auch gespielt wird und die Playliste sauber beendet wird. Da das PHP-Script nur ein einzigen jingle an sc_trans übergibt wird die jingleplaylist nach dem abspielen des jingles beendet und die Standardplayliste fortgesetzt, auch wenn die 5 minuten spieldauer der Jingleplayliste noch nicht abgelaufen sind.


Hier noch eine kleine übersicht der Parameter in der calendar.xml:

starttime="hh:mm:ss" Zeit zu der das Event beginnen soll
startdate="JJJJ/MM/TT" Datum an dem das Event beginnen soll bsp: startdate="2011/02/28" für den 28.02.2011
enddate="JJJJ/MM/TT" Datum an dem das Event ausläuft
duration="hh:mm:ss" Dauer des events z.b. duration="02:00:00" für ein Event das 2 std. dauern soll
timeoffset="hh:mm:ss" wird im zusammenhang mit timeperiodic Events benutzt um den intervall anzugeben

repeat="xxx" zahl zwischen 1 und 255
1 = Sonntag
2 = Montag
4 = Dienstag
8 = Mitwoch
16 = Donnerstag
32 = Freitag
64 = Samstag
128 = Time Periodic

soll ein Event jeden Montag, Mitwoch und Freitag laufen wäre xxx
2 (Mo.) + 8 (Mi.) + 32(Fr.) = repeat="42"
soll es zusätzlich noch periodisch sein, also mehrfach an diesen tagen laufen dann wäre es
2(Mo.) + 8(Mi.) + 32(Fr.) + 128(TP) = repeat="170"

Hoffe das hilft dir.
Greetz
Mad
 
AW: AutoDJ - Werbespots und Jingles

Der Beitrag ist zwar schon etwas her aber es stimmt nicht ganz. Statt PHP würde ich die Bash benutzen da man dann nicht das Problem mit der php.ini open_basedir hat. Die PHP muss in dem Fall ja im Webspace liegen. Man kann sich z.B. eine random.sh ins Verzeichnis vom sc_trans packen mit folgenden Inhalt. Diese muss ausführbar für den User sein, der auch den sc_trans startet:

Code:
#!/bin/bash

find [B]<hier den Pfad zu den Jingles rein>[/B]  -name \*.mp3 |sort -R |tail -n 1 |while read file; do
echo $file
done

Die jingle.lst dazu sieht dann so aus:

Code:
#!/bin/bash [B]<Pfad zur random.sh>[/B]

Die calendar.xml stimmt so auch nicht, einige Syntax Fehler drin. Wenn alle 20 min ein Jingle laufen soll sieht das dann so aus:

Code:
<event type="playlist">
<playlist loopatend="0" shuffle="0" priority="2" >jingles</playlist>
<calendar starttime="01:00:00" duration="00:05:00" timeoffset="00:00:00" repeat="128" />
</event>
<event type="playlist">
<playlist loopatend="0" shuffle="0" priority="2" >jingles</playlist>
<calendar starttime="01:00:00" duration="00:05:00" timeoffset="00:20:00" repeat="128" />
</event>
<event type="playlist">
<playlist loopatend="0" shuffle="0" priority="2" >jingles</playlist>
<calendar starttime="01:00:00" duration="00:05:00" timeoffset="00:40:00" repeat="128" />
</event>

Ich hoffe damit geholfen zu haben

cu Pythy
 
AW: AutoDJ - Werbespots und Jingles

Aus den Konfigurationsdaten oben, würde ich mal sagen, es handelt sich hier um eine Windows Installation:
;; VU Images
vuimagedirectory=D:\Programme\SHOUTcast-Auto-DJ\testui
;;;; LOGGING OPTIONS:
;where does the log file go
logfile=c:\sc_trans1.log
; 1 to do screen logging else 0
screenlog=1
Daher dürfte das mit Bash nicht so ohne weiteres klappen. Allerdings versthe ich dann nicht, warum nicht eine vollwertige radio Automation zum Einsatz kommt, wenn man schon auf Windows arbeitet. Damit könnte man solche Rotationen erheblich schöner planen.
 
AW: AutoDJ - Werbespots und Jingles

Damit hast du allerdings Recht. Sowohl die Windows Installation als auch die vollwertige Radio-Automation. Mir sind nur die Fehler aufgefallen ;) Aber nun steht auch ein weg für die Linux Varriante drin, ist doch auch was :p

cu Pythy
 
AW: AutoDJ - Werbespots und Jingles

Der Beitrag ist zwar schon etwas her aber es stimmt nicht ganz. Statt PHP würde ich die Bash benutzen da man dann nicht das Problem mit der php.ini open_basedir hat. Die PHP muss in dem Fall ja im Webspace liegen. Man kann sich z.B. eine random.sh ins Verzeichnis vom sc_trans packen mit folgenden Inhalt. Diese muss ausführbar für den User sein, der auch den sc_trans startet:

Hi,

Wie kommst du denn darauf, das die php Datei im webverzeichnis liegen muss? Du kannst php scripte ganz normal in jedem Verzeichnis über die Shell auführen, genau wie normale shellscripts z.B. mit
Code:
php /path/to/phpsctipt.php
oder
Code:
/usr/bin/php /path/to/phpscript.php
Wird das Script dann noch unter dem User ausgeführt dem die Verzeichnisse gehören, gibt es auch keine Probleme mit openbasedir.

Wobei dieser ganze php safe mode Mist bringt eh mehr Probleme als es nutzt. Deshalb wurde die Entwicklung auch eingestellt und zumindest der savemode wird in künftigen php-Versionen nichtmehr integriert sein.

Ein Bashscript mag sicher eleganter sein da magst du rcht haben, aber php bietet dir weitaus mehr Möglichkeiten finde ich.

-MAD
 
AW: AutoDJ - Werbespots und Jingles

Also bei mir klappt dat mit dem Jingle spielen nich er ignoriert es einfach .

Meine sc_trans.conf :
; NOTE: for any relative paths specified are relative to
; sc_trans and not to where the conf file is being stored

; here we will setup where the log and other related files
; will be stored. make sure that these folders exist else
; sc_trans will throw an error and will close itself down.
logfile=logs/sc_trans.log

; we use the sc_trans_basic.conf configuration file as the
; base configuration to work from for enabling DJ support
include=sc_trans_basic.conf

; this is needed otherwise sc_trans will not allow DJ joins
; to be allowed to connect to the sc_trans instance.
calendarrewrite=0
calendarfile=calendar.xml

playlistfilename_1=jingles
playlistfilepath_1=playlists/jingles.lst

playlistfilename_2=main
playlistfilepath_2=playlists/playlist.lst

shuffle = 1
xfade=2
xfadethreshold=20

; for testing we will only setup a single encoder though it
; is easy to add in additional encoder configurations and
; we are using an aac plus encoder as the default due to
; the licensing requirements for mp3 encoding as detailed
; in sc_trans.txt - section 2.5).
encoder_1=mp3
channels_1=2
outprotocol_1=1
bitrate_1=128000
samplerate_1=44100
serverip_1=xxxxx
serverport_1=xxxx
password_1=xxxxx
unlockkeyname=xxxxx
unlockkeycode=xxxxxx

; here you would provide any information to fill in details
; provided to clients about the stream. it us upto you what
; is entered though do not do anything which will annoy, etc
streamtitle=xxxxxx
streamurl=http://www.xxxx
genre=Misc

inner sc_trans_basic.conf steht noch : playlistfile=playlists/main.lst

Vlt jemand nen Tipp wo mein Fehler liegt weil er spielt ja den AutoDj Ordner ab aber ignoriert halt die Jingles :(
 
AW: AutoDJ - Werbespots und Jingles

Hi,

ohne die calendar.xml und ein logfile von sc_trans werden wir dir wohl kaum helfen können. Beim posten des Logfiles bitte darauf achten das der jingle event mit drin ist. Wenn der Jingle z.b. jede halbe Stunde gespielt werden soll, bitte Logauszug von z.b. 10:00 - 10:10 oder von 10:30- 10:40 Uhr. Eventuell auch playlistdebug und calendardebug in der sc_trans.conf aktivieren.

-MAD
 
AW: AutoDJ - Werbespots und Jingles

Hi,

o.k. Dein Tipp mit Debug hat mir geholfen *gg* Hab solange dran gesessen dat ich daran garnich gedacht hatte. Es läuft nun vielen Dank für die Hilfe ;)

Daan
 
Status
Für weitere Antworten geschlossen.
Zurück
Oben