Note à propos de la mise en place d'une radio/video web simple

Aller->

Audio

L'applet est ici: http://www.javazoom.net/applets/jlguiapplet/jlguiapplet.html

Le résultat: http://recitmst.qc.ca/rubrique.php3?id_rubrique=12

On peut modifier un thème (http://www1.1001skins.com/) en dézippant les fichiers .wsz et en modifiant les images du thème.



Pour permettre d'accéder au fichier .m3u (créé dynamiquement) on doit mettre un fichier htaccess sur notre serveur qui renomme le .m3u en php3. Voici le contenu de ce fichier:

Options +FollowSymlinks
RewriteEngine On
RewriteRule radiomst.m3u radiomst.php3


Créer le squelette pour la liste m3u (fichier html):

<?php header("Content-type: text/plain"); ?>
<? echo "#"; ?>EXTM3U<BOUCLE_rub(RUBRIQUES){id_rubrique=12}><BOUCLE1(ARTICLES){branche}{par date}{inverse}{tout}><BOUCLE_documents_joints1(DOCUMENTS){id_article}{doublons}>
<? echo "#"; ?>EXTINF:0,#TITRE [(#DESCRIPTIF|sinon{"sur Radio MST"})]
#URL_SITE_SPIP/#URL_DOCUMENT</BOUCLE_documents_joints1></BOUCLE1></BOUCLE_rub>



Voici le code pour l'intégrer dans une page SPIPI:

				<div style="float: right;">
				<!-- jlGui Applet : Begin copy/paste -->
				<SCRIPT LANGUAGE="JavaScript"><!--
				var _info = navigator.userAgent;
				var _ns = false;
				var _ns6 = false;
				var _ie = (_info.indexOf("MSIE") > 0 && _info.indexOf("Win") > 0 && _info.indexOf("Windows 3.1") < 0);
				if (_info.indexOf("Opera") > 0) _ie = false;
				//--></SCRIPT>
				<COMMENT>
				<SCRIPT LANGUAGE="JavaScript1.1"><!--
				var _ns = (navigator.appName.indexOf("Netscape") >= 0 && ((_info.indexOf("Win") > 0 && _info.indexOf("Win16") < 0 && java.lang.System.getProperty("os.version").indexOf("3.5") < 0) || (_info.indexOf("Sun") > 0) || (_info.indexOf("Linux") > 0) || (_info.indexOf("AIX") > 0) || (_info.indexOf("OS/2") > 0) || (_info.indexOf("IRIX") > 0)));
				var _ns6 = ((_ns == true) && (_info.indexOf("Mozilla/5") >= 0));
				//--></SCRIPT>
				</COMMENT>
				<SCRIPT LANGUAGE="JavaScript"><!--
				if (_ie == true) document.writeln('<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH = "275" HEIGHT = "348" NAME = "player" codebase="http://java.sun.com/update/1.4.2/jinstall-1_4-windows-i586.cab#Version=1,4,0,0"><NOEMBED><XMP>');
				else if (_ns == true && _ns6 == false) document.writeln('<EMBED \
				type="application/x-java-applet;version=1.4" \
				CODE = "javazoom.jlgui.player.amp.PlayerApplet" \
				JAVA_CODEBASE = "./" \
				ARCHIVE = "player/lib/jlguiapplet2.3.2.jar,player/lib/jlgui2.3.2-light.jar,player/lib/tritonus_share.jar, player/lib/basicplayer2.3.jar,player/lib/mp3spi1.9.2.jar, player/lib/jl1.0.jar,player/lib/vorbisspi1.0.1.jar, player/lib/jorbis-0.0.13.jar, player/lib/jogg-0.0.7.jar, player/lib/commons-logging-api.jar" \
				NAME = "player" \
				WIDTH = "275" \
				HEIGHT = "348" \
				scriptable ="true" \
				skin ="player/skins/mst2.wsz" \
				start ="no" \
				song ="http://recitmst.qc.ca/radiomst.m3u" \
				init ="player/jlgui.ini" \
				location ="none" \
				useragent ="winampMPEG/2.7" \
				scriptable=true \
				pluginspage="http://java.sun.com/products/plugin/index.html#download"><NOEMBED><XMP>');
				//--></SCRIPT>
				<APPLET CODE = "javazoom.jlgui.player.amp.PlayerApplet" JAVA_CODEBASE = "./" ARCHIVE = "player/lib/jlguiapplet2.3.2.jar,player/lib/jlgui2.3.2-light.jar, player/lib/tritonus_share.jar, player/lib/basicplayer2.3.jar, player/lib/mp3spi1.9.2.jar, player/lib/jl1.0.jar, player/lib/vorbisspi1.0.1.jar, player/lib/jorbis-0.0.13.jar, player/lib/jogg-0.0.7.jar, player/lib/commons-logging-api.jar" WIDTH = "275" HEIGHT = "348" NAME = "player"></XMP>
				<PARAM NAME = CODE VALUE = "javazoom.jlgui.player.amp.PlayerApplet" >
				<PARAM NAME = CODEBASE VALUE = "./" >
				<PARAM NAME = ARCHIVE VALUE = "player/lib/jlguiapplet2.3.2.jar, player/lib/jlgui2.3.2-light.jar, player/lib/tritonus_share.jar, player/lib/basicplayer2.3.jar, player/lib/mp3spi1.9.2.jar, player/lib/jl1.0.jar,player/lib/vorbisspi1.0.1.jar, player/lib/jorbis-0.0.13.jar, player/lib/jogg-0.0.7.jar, player/lib/commons-logging-api.jar" >
				<PARAM NAME = NAME VALUE = "player" >
				<PARAM NAME="type" VALUE="application/x-java-applet;version=1.4">
				<PARAM NAME="scriptable" VALUE="true">
				<PARAM NAME = "skin" VALUE ="player/skins/mst2.wsz">
				<PARAM NAME = "start" VALUE ="no">
				<PARAM NAME = "song" VALUE ="http://recitmst.qc.ca/radiomst.m3u">
				<PARAM NAME = "init" VALUE ="player/jlgui.ini">
				<PARAM NAME = "location" VALUE ="none">
				<PARAM NAME = "useragent" VALUE ="winampMPEG/2.7">
				</APPLET>
				</NOEMBED>
				</EMBED>
				</OBJECT>
				<!-- jlGui Applet : End copy/paste -->
				</div>

=============================================================
Fichier podcast.html (pour le podcast):

<?php echo '<'.'?xml version="1.0" encoding="#CHARSET"?'.'>'; ?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">

<channel>
	<title>Radio MST</title>
	<link>#URL_SITE_SPIP/</link>
	<description><BOUCLE_motcle_soustitre(MOTS){titre="Sous_titre_site"}>[(#TEXTE|texte_backend)]</BOUCLE_motcle_soustitre><BOUCLE_descript(ARTICLES){id_article=1}>[(#TEXTE|couper{100}|texte_backend)]</BOUCLE_descript><//B_motcle_soustitre></description>
	<language>#LANG</language>

	<image>
		<title>[(#NOM_SITE_SPIP|texte_backend)]</title>
		<url>#URL_SITE_SPIP/logo.png</url>
		<link>#URL_SITE_SPIP/</link>
		<description>[(#NOM_SITE_SPIP|texte_backend)]</description>
	</image>


<BOUCLE_rub(RUBRIQUES){id_rubrique}>
	
	 <BOUCLE1(ARTICLES){branche}{par date}{inverse}{0,10}>
       <item>
           <title>[(#TITRE|texte_backend)]</title>
           <link>#URL_SITE_SPIP/#URL_ARTICLE</link>
           <dc:date>[(#DATE|w3cdate)]</dc:date>
           <description>[(#LOGO_ARTICLE|left||entites_html)][(#INTRODUCTION|texte_backend)]
           </description>
           <dc:creator>(<BOUCLE_aut1(AUTEURS){id_article}{", "}>[(#NOM|texte_backend)]</BOUCLE_aut1>)
           </dc:creator>
       </item>
           <BOUCLE_documents_joints1(DOCUMENTS){id_article}{doublons}>
<item>
[<title>(#TITRE)</title>]
[<description>(#DESCRIPTIF|sinon{"fichier Podcast joint"})</description>]
<enclosure url="#URL_SITE_SPIP/#URL_DOCUMENT" length="#TAILLE" type="audio-x/mpeg"  />
</item>
</BOUCLE_documents_joints1>
   </BOUCLE1>
   
   <BOUCLE2(ARTICLES){branche}{par date}{inverse}{0,8}{unique}>
       <item>
           <title>[(#TITRE|texte_backend)]</title>
           <link>#URL_SITE_SPIP/#URL_ARTICLE</link>
           <dc:date>[(#DATE|w3cdate)]</dc:date>
           <description>[(#LOGO_ARTICLE|left||entites_html)][(#INTRODUCTION|texte_backend)]
           </description>
           <dc:creator>(<BOUCLE_aut2(AUTEURS){id_article}{", "}>[(#NOM|texte_backend)]</BOUCLE_aut2>)
           </dc:creator>
       </item>
           <BOUCLE_documents_joints2(DOCUMENTS){id_article}{doublons}>
<item>
[<title>(#TITRE)</title>]
[<description>(#DESCRIPTIF|sinon{"fichier Podcast joint"})</description>]
<enclosure url="#URL_SITE_SPIP/#URL_DOCUMENT" length="#TAILLE" type="audio-x/mpeg"  />
</item>
</BOUCLE_documents_joints2>
   </BOUCLE2>


<BOUCLE3(ARTICLES){branche}{par date}{age<5}{unique}>
       <item>
           <title>[(#TITRE|texte_backend)]</title>
           <link>#URL_SITE_SPIP/#URL_ARTICLE</link>
           <dc:date>[(#DATE|w3cdate)]</dc:date>
           <description>[(#LOGO_ARTICLE|left||entites_html)][(#INTRODUCTION|texte_backend)]
           </description>
           <dc:creator>(<BOUCLE_aut3(AUTEURS){id_article}{", "}>[(#NOM|texte_backend)]</BOUCLE_aut3>)
           </dc:creator>
       </item>
           <BOUCLE_documents_joints3(DOCUMENTS){id_article}{doublons}>
<item>
[<title>(#TITRE)</title>]
[<description>(#DESCRIPTIF|sinon{"fichier Podcast joint"})</description>]
<enclosure url="#URL_SITE_SPIP/#URL_DOCUMENT" length="#TAILLE" type="audio-x/mpeg"  />
</item>
</BOUCLE_documents_joints3>
   </BOUCLE3>
</BOUCLE_rub>

	
<//B_rub>

</channel>

</rss>



 

Vidéo:

Pour insérer un fichier flv dans un article spip: http://www.netdeveloppeur.com/article_print.php3?id_article=63
http://fr.wikipedia.org/wiki/Utilisateur:Sbrunner/Pense_b%C3%AAte

Ligne de commande ffmpeg:
  • ffmpeg -i pubCDP2006.avi -ab 40 -ar 44100 -b 60 -r 15 -s 160x120 -f flv pubCDP2006-100.flv
  • ffmpeg -i pubCDP2006.avi -ab 56 -ar 44100 -b 200 -r 15 -s 320x240 -f flv pubCDP2006-256.flv
  • ffmpeg -i pubCDP2006.avi -ab 96 -ar 44100 -b 400 -r 15 -s 320x240 -f flv pubCDP2006-496.flv
  • ffmpeg -i pubCDP2006.avi -ab 56 -b 500 -r 15 -s 320x240 -f flv pubCDP2006.flv
  • ffmpeg -i pubCDP2006.avi -ab 56 -b 200 -r 15 -s 320x240 -f flv pubCDP2006s.flv
Il n'y a pas de commentaire sur cette page. [Afficher commentaires/formulaire]
 
IMP :: RSS :: HTML :: TXT :: Clone :: Historique :: Propriétaire : PierreLachance