
Recherche avancée
Médias (2)
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
Autres articles (47)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (7037)
-
Shaka Player returns 4001 error - Node.js local web server playing MPEG-DASH
27 mai 2020, par salgarjiI've used Chrome inspection tool to access 'Console' and analyze what is happening. Complete error information :



D {severity: 2, category: 4, code: 4001, data: Array(1), handled: false}
category: 4
code: 4001
data: Array(1)
0: "http://localhost:8080/dash_segmentos/video.mpd"
length: 1
__proto__: Array(0)
handled: false
severity: 2
__proto__: Object




My
Server.js
file :


var http = require('http');
var fs = require('fs');

console.log(__dirname);

var path='dash_segmentos/video.mpd';
fs.access(path, fs.constants.R_OK | fs.constants.W_OK, (err) => {
 if (err) {
 console.log("%s doesn't exist", path);
 } else {
 console.log('can read/write %s', path);
 }
});

const PORT=8080; 

fs.readFile('./player.html', function (err, html) {

 if (err) throw err; 

 http.createServer(function(request, response) { 
 response.setHeader("Access-Control-Allow-Headers", "authorization, content-type");
 response.setHeader("Access-Control-Allow-Origin", "*");
 response.setHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
 response.writeHeader(200, {"Content-Type": "text/html"}); 
 response.write(html); 
 response.end();
 }).listen(PORT);
});




As you can see I've added CORS (I guess it's correct) and a console.log to see if it's in the proper location. Furthermore, I've verified that file is accessible with
fs.access
and it returnscan read/write dash_segmentos/video.mpd
For this reason, I'm sure I am in the correct path and referencing the right file.


The HTML code (
player.html
) provided toServer.js
:




 
 <code class="echappe-js"><script type="text/javascript"&#xA;src="https://cdnjs.cloudflare.com/ajax/libs/shaka-player/2.5.11/shaka-player.compiled.js"></script>

 
 

 



<script>&#xA;function initApp() { &#xA;shaka.polyfill.installAll(); &#xA;if (shaka.Player.isBrowserSupported()) { &#xA; initPlayer(); &#xA; } else { &#xA; console.error(&#x27;Browser not supported!&#x27;);&#xA; }}&#xA;&#xA;function initPlayer() { &#xA;var video = document.getElementById( &#x27;video&#x27; );&#xA;var player = new shaka.Player( video );&#xA; window.player = player; &#xA;player.addEventListener(&#x27;error&#x27;, onErrorEvent); &#xA;player.load(path).then(function (){&#xA; console.log(&#x27;Video loaded correctly&#x27;);&#xA; }).catch(onError);&#xA;&#xA;function onErrorEvent(event) {&#xA; onError(event.detail); &#xA; }&#xA;function onError(error) {&#xA; console.error(&#x27;Codigo de error: &#x27;, error.code, &#x27; en &#x27;, error);&#xA; }&#xA;}&#xA;</script>


<script>&#xA;var path=&#x27;dash_segmentos/video.mpd&#x27;;&#xA;//var path=&#x27;https://dash.akamaized.net/dash264/TestCases/2c/qualcomm/1/MultiResMPEG2.mpd&#x27;;&#xA;//the URL above is working! but it won&#x27;t read my local mpd&#xA;&#xA;document.addEventListener(&#x27;DOMContentLoaded&#x27;, initApp);&#xA;&#xA; </script>

 




I've tried changing the URL to an online resource and the player is properly working.



My fluent-ffmpeg command which generates the video is :



var ffmpeg = require('fluent-ffmpeg');

var grabacion = new ffmpeg();

grabacion.addInput('0')
.inputOptions(['-y -nostdin', '-f avfoundation', '-video_size 1280x720', '-framerate 30'])
.outputOptions(['-vcodec libx264', '-keyint_min 0', '-g 100', '-map 0:v', '-b:v 1000k', '-f dash',
 '-use_template 1', '-use_timeline 0', '-init_seg_name video0-$RepresentationID$-$Number$.mp4',
 '-media_seg_name video0-$RepresentationID$-$Number$.mp4','-single_file 0', '-remove_at_exit 0', '-window_size 20', '-seg_duration 4'])
.output('/path/to/files/dash_segmentos/video.mpd')
.run();




The mpd manifest file is :



<?xml version="1.0" encoding="utf-8"?>
<mpd xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" mediapresentationduration="PT26.7S" maxsegmentduration="PT4.0S" minbuffertime="PT13.2S">
 <programinformation>
 </programinformation>
 <servicedescription>
 </servicedescription>
 <period start="PT0.0S">
 <adaptationset contenttype="video" startwithsap="1" segmentalignment="true" bitstreamswitching="true" framerate="30000/1001" maxwidth="1280" maxheight="720" par="16:9">
 <representation mimetype="video/mp4" codecs="avc1.7a001f" bandwidth="1000000" width="1280" height="720" sar="1:1">
 <segmenttemplate timescale="1000000" duration="4000000" initialization="video0-$RepresentationID$-$Number$.mp4" media="video0-$RepresentationID$-$Number$.mp4" startnumber="1">
 </segmenttemplate>
 </representation>
 </adaptationset>
 </period>
</mpd>




Is something about ffmpeg ? Permissions ? Pixel format ? Encoding ? I've tried with other mpd file provided by my Raspberry Pi using video4linux (v4l) and it returns the same error !



I know that's a lot of code, but maybe you find it quicker than me. I guess it's a Shaka Player thing with the XML, but I can't explain how ffmpeg is wrongly creating XML code.



Thank you in advance !!


-
Anomalie #2327 : Voir le logo du site dans l’espace privé
25 octobre 2011, par tetue -Pourquoi pas, mais ce serait plutôt ’edition’, car il s’agit d’éditer (le descriptif, etc.) et non de publier le site. On peut essayer, mais ça n’est pas choquant que ça reste à sa place habituelle. C’est surtout l’entrée ’Plugins’ qu’il faut déplacer dans ce menu, pour marquer la séparation entre (...)
-
Evolution #3179 : Pouvoir désactiver l’héritage de logo entre les rubriques (via une constante)
5 mars 2014, par - EquipementUne solution consisterait à modifier, dans le fichier ecrire/public/quete.php, la fonction quete_logo, en remplaçant :
else if ($id_rubrique) $type = ’id_rubrique’ ; $id = $id_rubrique ; $id_rubrique = 0 ;
par :
else if (defined("_DESACTIVER_HERITAGE_LOGO_RUBRIQUE")) return ’’ ; else if ($id_rubrique) $type = ’id_rubrique’ ; $id = $id_rubrique ; $id_rubrique = 0 ;