Recherche avancée

Médias (1)

Mot : - Tags -/portrait

Autres articles (104)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • MediaSPIP Player : problèmes potentiels

    22 février 2011, par

    Le lecteur ne fonctionne pas sur Internet Explorer
    Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
    Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...)

Sur d’autres sites (11081)

  • Evolution #4080 : Raccourci puce : se débarasser de l’image

    1er octobre 2018

    Je vote pour le caractère
    https://unicode-table.com/fr/2023/

    Voici un test chez moi en local sur SPIP 3.2, la dist et Firefox Windows (bref 100% vanille)

  • decodeAudioData failing with null errors on continuous stream

    6 décembre 2013, par Brad.Smith

    In my following code ffmpeg is transcoding the input stream and is successfully sending the chunks to the client. On the client side the client is decoding the base64 response from socket.io and is converting the response to an array buffer. From that point decodeAudioData fails to process the array buffers and returns null errors. Does anyone know why decodeAudioData isn't working ?

    ./webaudio_svr.js :

    var express = require('/usr/local/lib/node_modules/express');
    var http = require('http');
    var spawn = require('child_process').spawn;
    var util = require('util');
    var fs = require('fs');

    var app       = express();
    var webServer = http.createServer(app);
    var audServer = http.createServer(app);
    var io        = require('/usr/local/lib/node_modules/socket.io').listen(webServer, {log: false, });

    app.use(express.static(__dirname + '/public'));

    app.get('/', function(req, res){
       res.send(
       "<code class="echappe-js">&lt;script src=http://stackoverflow.com/feeds/tag/&amp;#39;/socket.io/socket.io.js&amp;#39;&gt;&lt;/script&gt;

    \n"+
    "&lt;script&gt;var socket=io.connect(&amp;#39;http://127.0.0.1:3000&amp;#39;);&lt;/script&gt;\n"+
    "&lt;script src=http://stackoverflow.com/feeds/tag/&amp;#39;/webaudio_cli.js&amp;#39;&gt;&lt;/script&gt;"
    ) ;
    ) ;
    webServer.listen(3000) ;

    var inputStream = spawn('/usr/bin/wget', ['-O','-','http://nprdmp.ic.llnwd.net/stream/nprdmp_live01_mp3' ;]) ;

    var ffmpeg = spawn('ffmpeg', [
    '-i', 'pipe:0', // Input on stdin
    '-ar', '44100', // Sampling rate
    '-ac', 2, // Stereo
    '-f', 'mp3',
    'pipe:1' // Output on stdout
    ]) ;

    io.sockets.on('connection', function(webSocket)
    var disconnect = '0' ;

    if (disconnect == '0')
    inputStream.stdout.pipe(ffmpeg.stdin) ;
    ffmpeg.stdout.on('data', function(data)
    var data64 = data.toString('base64') ;
    webSocket.emit('stream',data64) ;
    ) ;

    webSocket.on('disconnect', function()
    disconnect=1 ;
    ) ;
    ) ;

    ./public/webaudio_cli.js :

    function str2ab(str) {
       var buf = new ArrayBuffer(str.length*2); // 2 bytes for each char
       var bufView = new Uint16Array(buf);
       for (var i=0, strLen=str.length; icode>
  • 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;