Recherche avancée

Médias (1)

Mot : - Tags -/biomaping

Autres articles (69)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains 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 ;

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

Sur d’autres sites (10375)

  • How to limit duration of the video with Dropzonejs ?

    20 octobre 2017, par SNaRe

    I have a form which I upload videos and duration/length of the video is important.

    After I upload the file with PHP, I check the duration of the video file size with FFMpeg.

    I calculate duration in PHP and need to send value of the duration via PHP somehow. I think I have to append the duration to $result variable of Json.

    This is my html

       

           <code class="echappe-js">&lt;script src=<br />
           &quot;//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js&quot;&gt;&lt;/script&gt;

    &lt;script src=&quot;https://rawgit.com/enyo/dropzone/master/dist/dropzone.js&quot;&gt;&lt;/script&gt;

    &lt;script type=&quot;text/javascript&quot;&gt;<br />
    <br />
           Dropzone.options.myDropzone = {<br />
    <br />
           maxFiles: 1,<br />
           acceptedFiles: &quot;image/*,video/*&quot;,<br />
           maxfilesexceeded: function (file) {<br />
               this.removeAllFiles();<br />
               this.addFile(file);<br />
               $('#infomsg').hide();<br />
    <br />
           },<br />
    <br />
           init: function () {<br />
               $('#infomsg').hide();<br />
    <br />
               this.on(&quot;success&quot;, function (result) {<br />
    <br />
                   $('#infomsg').show();<br />
    <br />
    <br />
                   $(&quot;#boatAddForm&quot;).append($('&lt;input type=&quot;hidden&quot; ' +<br />
                       'name=&quot;files[]&quot; ' +<br />
                       'value=&quot;' + result.name + '&quot;&gt;'));<br />
    <br />
               });<br />
           }<br />
           };<br />
    <br />
    <br />
           &lt;/script&gt;

    This is the most minimal example of Dropzone. The upload in this
    example doesn’t work, because there is no actual server to handle
    the file upload.

    This is my PHP

    &lt;?php
    $ds          = DIRECTORY_SEPARATOR;

    $storeFolder = 'uploads';

    if (!empty($_FILES)) {

       $tempFile = $_FILES['file']['tmp_name'];

       $targetPath = dirname( __FILE__ ) . $ds. $storeFolder . $ds;

       $targetFile =  $targetPath. $_FILES['file']['name'];

       move_uploaded_file($tempFile,$targetFile);

    } else {
       $result  = array();

       $files = scandir($storeFolder);                 //1
       if ( false!==$files ) {
           foreach ( $files as $file ) {
               if ( '.'!=$file &amp;&amp; '..'!=$file) {       //2
                   $obj['name'] = $file;
                   $obj['size'] = filesize($storeFolder.$ds.$file);
                   $result[] = $obj;
               }
           }
       }

       header('Content-type: text/json');              //3
       header('Content-type: application/json');
       echo json_encode($result);
    }

    If I could check a custom json response right after

    Dropzone.options.myDropzone = {

    like other requirements for success, I won’t have to right if statements in success in order to check the validation.

    Basically I want to do it as I do like

    maxFiles: 1,

    without writing any conditions inside success

  • Introducing the Data Warehouse Connector feature

    30 janvier, par Matomo Core Team

    Matomo is built on a simple truth : your data belongs to you, and you should have complete control over it. That’s why we’re excited to launch our new Data Warehouse Connector feature for Matomo Cloud, giving you even more ways to work with your analytics data. 

    Until now, getting raw data from Matomo Cloud required APIs and custom scripts, or waiting for engineering help.  

    Our new Data Warehouse Connector feature removes those barriers. You can now access your raw, unaggregated data and schedule regular exports straight to your data warehouse. 

    The feature works with all major data warehouses including (but not limited to) : 

    • Google BigQuery 
    • Amazon Redshift 
    • Snowflake 
    • Azure Synapse Analytics 
    • Apache Hive 
    • Teradata 

    You can schedule exports, combine your Matomo data with other data sources in your data warehouse, and easily query data with SQL-like queries. 

    Direct raw data access for greater data portability 

    Waiting for engineering support can delay your work. Managing API connections and writing scripts can be time-consuming. This keeps you from focusing on what you do best—analysing data. 

    BigQuery create-table-menu

    With the Data Warehouse Connector feature, you get direct access to your raw Matomo data without the technical setup. So, you can spend more time analysing data and finding insights that matter. 

    Bringing your data together 

    Answering business questions often requires data from multiple sources. A single customer interaction might span your CRM, web analytics, sales systems, and more. Piecing this data together manually is time-consuming—what starts as a seemingly simple question from stakeholders can turn into hours of work collecting and comparing data across different tools. 

    This feature lets you combine your Matomo data with data from other business systems in your data warehouse. Instead of switching between tools or manually comparing spreadsheets, you can analyse all your data in one place to better understand how customers interact with your business. 

    Easy, custom analysis with SQL-like queries 

    Standard, pre-built reports often don’t address the specific, detailed questions that analysts need to answer.  

    When you use the Data Warehouse Connector feature, you can use SQL-like queries in your data warehouse to do detailed, customised analysis. This flexibility allows you to explore your data in depth and uncover specific insights that aren’t possible with pre-built reports. 

    Here is an example of how you might use SQL-like query to compare the behaviours of paying vs. non-paying users : 

    				
                                            <xmp>SELECT  

    custom_dimension_value AS user_type, -- Assuming 'user_type' is stored in a custom dimension

    COUNT(*) AS total_visits,  

    AVG(visit_total_time) AS avg_duration,

    SUM(conversion.revenue) AS total_spent  

    FROM  

    `your_project.your_dataset.matomo_log_visit` AS visit

    LEFT JOIN  

    `your_project.your_dataset.matomo_log_conversion` AS conversion  

    ON  

    visit.idvisit = conversion.idvisit  

    GROUP BY  

    custom_dimension_value; </xmp>
                                   

    This query helps you compare metrics such as the number of visits, average session duration, and total amount spent between paying and non-paying users. It provides a full view of behavioural differences between these groups. 

    Advanced data manipulation and visualisation 

    When you need to create detailed reports or dive deep into data analysis, working within the constraints of a fixed user interface (UI) can limit your ability to draw insights. 

    Exporting your Matomo data to a data warehouse like BigQuery provides greater flexibility for in-depth manipulation and advanced visualisations, enabling you to uncover deeper insights and tailor your reports more effectively. 

    Getting started 

    To set up data warehouse exports in your Matomo : 

    1. Go to System Admin (cog icon in the top right corner) 
    2. Select ‘Export’ from the left-hand menu 
    3. Choose ‘Data Warehouse Connector’ 

    You’ll find detailed instructions in our data warehouse exports guide 

    Please note, enabling this feature will cost an additional 10% of your current subscription. You can view the exact cost by following the steps above. 

    New to Matomo ? Start your 21-day free trial now (no credit card required), or request a demo. 

  • Convert Webrtc track stream to URL (RTSP/UDP/RTP/Http) in Video tag

    19 juillet 2020, par Zeeshan Younis

    I am new in WebRTC and i have done client/server connection, from client i choose WebCam and post stream to server using Track and on Server side i am getting that track and assign track stream to video source. Everything till now fine but problem is now i include AI(Artificial Intelligence) and now i want to convert my track stream to URL maybe UDP/RTSP/RTP etc. So AI will use that URL for object detection. I don't know how we can convert track stream to URL.&#xA;Although there is a couple of packages like https://ffmpeg.org/ and RTP to Webrtc etc, i am using Nodejs, Socket.io and Webrtc, below you can check my client and server side code for getting and posting stream, i am following thi github code https://github.com/Basscord/webrtc-video-broadcast.&#xA;Now my main concern is to make track as a URL for video tag, is it possible or not or please suggest, any help would be appreciated.

    &#xA;

    Server.js

    &#xA;

    This is nodejs server code&#xA;

    &#xD;&#xA;
    &#xD;&#xA;
    const express = require("express");&#xA;const app = express();&#xA;&#xA;let broadcaster;&#xA;const port = 4000;&#xA;&#xA;const http = require("http");&#xA;const server = http.createServer(app);&#xA;&#xA;const io = require("socket.io")(server);&#xA;app.use(express.static(__dirname &#x2B; "/public"));&#xA;&#xA;io.sockets.on("error", e => console.log(e));&#xA;io.sockets.on("connection", socket => {&#xA;  socket.on("broadcaster", () => {&#xA;    broadcaster = socket.id;&#xA;    socket.broadcast.emit("broadcaster");&#xA;  });&#xA;  socket.on("watcher", () => {&#xA;    socket.to(broadcaster).emit("watcher", socket.id);&#xA;  });&#xA;  socket.on("offer", (id, message) => {&#xA;    socket.to(id).emit("offer", socket.id, message);&#xA;  });&#xA;  socket.on("answer", (id, message) => {&#xA;    socket.to(id).emit("answer", socket.id, message);&#xA;  });&#xA;  socket.on("candidate", (id, message) => {&#xA;    socket.to(id).emit("candidate", socket.id, message);&#xA;  });&#xA;  socket.on("disconnect", () => {&#xA;    socket.to(broadcaster).emit("disconnectPeer", socket.id);&#xA;  });&#xA;});&#xA;server.listen(port, () => console.log(`Server is running on port ${port}`));

    &#xD;&#xA;

    &#xD;&#xA;

    &#xD;&#xA;&#xA;

    Broadcast.js&#xA;This is the code for emit stream(track)&#xA;

    &#xD;&#xA;
    &#xD;&#xA;
    const peerConnections = {};&#xA;const config = {&#xA;  iceServers: [&#xA;    {&#xA;      urls: ["stun:stun.l.google.com:19302"]&#xA;    }&#xA;  ]&#xA;};&#xA;&#xA;const socket = io.connect(window.location.origin);&#xA;&#xA;socket.on("answer", (id, description) => {&#xA;  peerConnections[id].setRemoteDescription(description);&#xA;});&#xA;&#xA;socket.on("watcher", id => {&#xA;  const peerConnection = new RTCPeerConnection(config);&#xA;  peerConnections[id] = peerConnection;&#xA;&#xA;  let stream = videoElement.srcObject;&#xA;  stream.getTracks().forEach(track => peerConnection.addTrack(track, stream));&#xA;&#xA;  peerConnection.onicecandidate = event => {&#xA;    if (event.candidate) {&#xA;      socket.emit("candidate", id, event.candidate);&#xA;    }&#xA;  };&#xA;&#xA;  peerConnection&#xA;    .createOffer()&#xA;    .then(sdp => peerConnection.setLocalDescription(sdp))&#xA;    .then(() => {&#xA;      socket.emit("offer", id, peerConnection.localDescription);&#xA;    });&#xA;});&#xA;&#xA;socket.on("candidate", (id, candidate) => {&#xA;  peerConnections[id].addIceCandidate(new RTCIceCandidate(candidate));&#xA;});&#xA;&#xA;socket.on("disconnectPeer", id => {&#xA;  peerConnections[id].close();&#xA;  delete peerConnections[id];&#xA;});&#xA;&#xA;window.onunload = window.onbeforeunload = () => {&#xA;  socket.close();&#xA;};&#xA;&#xA;// Get camera and microphone&#xA;const videoElement = document.querySelector("video");&#xA;const audioSelect = document.querySelector("select#audioSource");&#xA;const videoSelect = document.querySelector("select#videoSource");&#xA;&#xA;audioSelect.onchange = getStream;&#xA;videoSelect.onchange = getStream;&#xA;&#xA;getStream()&#xA;  .then(getDevices)&#xA;  .then(gotDevices);&#xA;&#xA;function getDevices() {&#xA;  return navigator.mediaDevices.enumerateDevices();&#xA;}&#xA;&#xA;function gotDevices(deviceInfos) {&#xA;  window.deviceInfos = deviceInfos;&#xA;  for (const deviceInfo of deviceInfos) {&#xA;    const option = document.createElement("option");&#xA;    option.value = deviceInfo.deviceId;&#xA;    if (deviceInfo.kind === "audioinput") {&#xA;      option.text = deviceInfo.label || `Microphone ${audioSelect.length &#x2B; 1}`;&#xA;      audioSelect.appendChild(option);&#xA;    } else if (deviceInfo.kind === "videoinput") {&#xA;      option.text = deviceInfo.label || `Camera ${videoSelect.length &#x2B; 1}`;&#xA;      videoSelect.appendChild(option);&#xA;    }&#xA;  }&#xA;}&#xA;&#xA;function getStream() {&#xA;  if (window.stream) {&#xA;    window.stream.getTracks().forEach(track => {&#xA;      track.stop();&#xA;    });&#xA;  }&#xA;  const audioSource = audioSelect.value;&#xA;  const videoSource = videoSelect.value;&#xA;  const constraints = {&#xA;    audio: { deviceId: audioSource ? { exact: audioSource } : undefined },&#xA;    video: { deviceId: videoSource ? { exact: videoSource } : undefined }&#xA;  };&#xA;  return navigator.mediaDevices&#xA;    .getUserMedia(constraints)&#xA;    .then(gotStream)&#xA;    .catch(handleError);&#xA;}&#xA;&#xA;function gotStream(stream) {&#xA;  window.stream = stream;&#xA;  audioSelect.selectedIndex = [...audioSelect.options].findIndex(&#xA;    option => option.text === stream.getAudioTracks()[0].label&#xA;  );&#xA;  videoSelect.selectedIndex = [...videoSelect.options].findIndex(&#xA;    option => option.text === stream.getVideoTracks()[0].label&#xA;  );&#xA;  videoElement.srcObject = stream;&#xA;  socket.emit("broadcaster");&#xA;}&#xA;&#xA;function handleError(error) {&#xA;  console.error("Error: ", error);&#xA;}

    &#xD;&#xA;

    &#xD;&#xA;

    &#xD;&#xA;&#xA;

    RemoteServer.js&#xA;This code is getting track and assign to video tag&#xA;

    &#xD;&#xA;
    &#xD;&#xA;
    let peerConnection;&#xA;const config = {&#xA;  iceServers: [&#xA;    {&#xA;      urls: ["stun:stun.l.google.com:19302"]&#xA;    }&#xA;  ]&#xA;};&#xA;&#xA;const socket = io.connect(window.location.origin);&#xA;const video = document.querySelector("video");&#xA;&#xA;socket.on("offer", (id, description) => {&#xA;  peerConnection = new RTCPeerConnection(config);&#xA;  peerConnection&#xA;    .setRemoteDescription(description)&#xA;    .then(() => peerConnection.createAnswer())&#xA;    .then(sdp => peerConnection.setLocalDescription(sdp))&#xA;    .then(() => {&#xA;      socket.emit("answer", id, peerConnection.localDescription);&#xA;    });&#xA;  peerConnection.ontrack = event => {&#xA;    video.srcObject = event.streams[0];&#xA;  };&#xA;  peerConnection.onicecandidate = event => {&#xA;    if (event.candidate) {&#xA;      socket.emit("candidate", id, event.candidate);&#xA;    }&#xA;  };&#xA;});&#xA;&#xA;socket.on("candidate", (id, candidate) => {&#xA;  peerConnection&#xA;    .addIceCandidate(new RTCIceCandidate(candidate))&#xA;    .catch(e => console.error(e));&#xA;});&#xA;&#xA;socket.on("connect", () => {&#xA;  socket.emit("watcher");&#xA;});&#xA;&#xA;socket.on("broadcaster", () => {&#xA;  socket.emit("watcher");&#xA;});&#xA;&#xA;socket.on("disconnectPeer", () => {&#xA;  peerConnection.close();&#xA;});&#xA;&#xA;window.onunload = window.onbeforeunload = () => {&#xA;  socket.close();&#xA;};

    &#xD;&#xA;

    &#xD;&#xA;

    &#xD;&#xA;&#xA;