Recherche avancée

Médias (91)

Autres articles (62)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

Sur d’autres sites (3129)

  • Live audio using ffmpeg, javascript and nodejs

    8 novembre 2017, par klaus

    I am new to this thing. Please don’t hang me for the poor grammar. I am trying to create a proof of concept application which I will later extend. It does the following : We have a html page which asks for permission to use the microphone. We capture the microphone input and send it via websocket to a node js app.

    JS (Client) :

    var bufferSize = 4096;
    var socket = new WebSocket(URL);
    var myPCMProcessingNode = context.createScriptProcessor(bufferSize, 1, 1);
    myPCMProcessingNode.onaudioprocess = function(e) {
     var input = e.inputBuffer.getChannelData(0);
     socket.send(convertFloat32ToInt16(input));
    }

    function convertFloat32ToInt16(buffer) {
     l = buffer.length;
     buf = new Int16Array(l);
     while (l--) {
       buf[l] = Math.min(1, buffer[l])*0x7FFF;
     }
     return buf.buffer;
    }

    navigator.mediaDevices.getUserMedia({audio:true, video:false})
                                   .then(function(stream){
                                     var microphone = context.createMediaStreamSource(stream);
                                     microphone.connect(myPCMProcessingNode);
                                     myPCMProcessingNode.connect(context.destination);
                                   })
                                   .catch(function(e){});

    In the server we take each incoming buffer, run it through ffmpeg, and send what comes out of the std out to another device using the node js ’http’ POST. The device has a speaker. We are basically trying to create a 1 way audio link from the browser to the device.

    Node JS (Server) :

    var WebSocketServer = require('websocket').server;
    var http = require('http');
    var children = require('child_process');

    wsServer.on('request', function(request) {
     var connection = request.accept(null, request.origin);
     connection.on('message', function(message) {
       if (message.type === 'utf8') { /*NOP*/ }
       else if (message.type === 'binary') {
         ffm.stdin.write(message.binaryData);
       }
     });
     connection.on('close', function(reasonCode, description) {});
     connection.on('error', function(error) {});
    });

    var ffm = children.spawn(
       './ffmpeg.exe'
      ,'-stdin -f s16le -ar 48k -ac 2 -i pipe:0 -acodec pcm_u8 -ar 48000 -f aiff pipe:1'.split(' ')
    );

    ffm.on('exit',function(code,signal){});

    ffm.stdout.on('data', (data) => {
     req.write(data);
    });

    var options = {
     host: 'xxx.xxx.xxx.xxx',
     port: xxxx,
     path: '/path/to/service/on/device',
     method: 'POST',
     headers: {
      'Content-Type': 'application/octet-stream',
      'Content-Length': 0,
      'Authorization' : 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
      'Transfer-Encoding' : 'chunked',
      'Connection': 'keep-alive'
     }
    };

    var req = http.request(options, function(res) {});

    The device supports only continuous POST and only a couple of formats (ulaw, aiff, wav)

    This solution doesn’t seem to work. In the device speaker we only hear something like white noise.

    Also, I think I may have a problem with the buffer I am sending to the ffmpeg std in -> Tried to dump whatever comes out of the websocket to a .wav file then play it with VLC -> it plays everything in the record very fast -> 10 seconds of recording played in about 1 second.

    I am new to audio processing and have searched for about 3 days now for solutions on how to improve this and found nothing.

    I would ask from the community for 2 things :

    1. Is something wrong with my approach ? What more can I do to make this work ? I will post more details if required.

    2. If what I am doing is reinventing the wheel then I would like to know what other software / 3rd party service (like amazon or whatever) can accomplish the same thing.

    Thank you.

  • Conversion of .dav [Ubuntu]

    3 juin 2018, par Dauas

    I’ve installed ffmpeg on a Ubuntu Linux Amazon EC2 Server and have a Lorex FLIR NVR directly FTP transferring .DAV files to it. In this system a Java program would then tell the EC2 to convert the .dav to but this is where the problems begin, FFMPEG fails to convert the .dav file and to my surprise there is no Codec for .dav (Though I see mention of it once having been supported). I reach out for a solution to this File Format problem, unfortunately the .dav files are a given as the NVR I have is incapable of transfering any other data type over the web, but what is the best way to convert a .dav file on a linux machine ? My Java program has full access to the Shell. It would also be incredibly helpful if anybody were to know how to get their hands on a .dav codec I could test with ffmpeg. I very much value all of your time helping me on this issue.

  • Using ffmpeg rtmp stream a static image and audio input [on hold]

    30 octobre 2017, par Chad

    Using a Raspberry Pi, stream audio in and use a static image as the video input thru ffmpeg over RTMP to a Cloud video provider (DaCast in this instance)

    So far, I’ve gone through many blog posts, Stack Overflow questions, and package documentation. I’ve found that most of the posts are no longer valid with the newer versions of ffmpeg. Or don’t quite line up with what I am trying to achieve.

    However, I have figured out the right settings to stream the Raspberry Pi Camera v2 with the audio in.

    ffmpeg \
      -f alsa -ac 1 -i plughw:1,0 \
      -f v4l2 -s 1920x1080 -r 30 -input_format h264 -i /dev/video0 \
      -vcodec copy -preset veryfast -r 15 -g 30 -b:v 64k -ar 44100 -threads 6 -b:a 96k -bufsize 3000k \
      -f flv rtmp ://streaming_server_url
    

    But can’t seem to get it right to replace the video input with a static image.

    I have tried removing the 3rd line and adding -loop 1 -i '/path/to/image.jpg'

    The logs look like :

    [alsa @ 0x55e4b980] Thread message queue blocking ; consider raising the thread_queue_size option (current value : 1024)
    [alsa @ 0x55e4b980] ALSA buffer xrun.  0kB time=00:00:00.00 bitrate=N/A speed=   0x
    [alsa @ 0x55e4b980] ALSA buffer xrun.130kB time=00:00:00.27 bitrate=3822.5kbits/s speed=0.0403x
    ...
    

    I have also tried looping a 4 second video, with similar outcomes.


    My Setup for context :

    • Raspberry Pi 3 Model B
    • USB Audio Device (Sabrent USB External Stereo Sound Adapter)
    • Ubuntu MATE 16.04.2 (Xenial)
    • ffmpeg version 3.2-2+rpi1 xenial1.7 (I can post what is configured with the build, if needed)