Recherche avancée

Médias (2)

Mot : - Tags -/rotation

Autres articles (111)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • (Dés)Activation de fonctionnalités (plugins)

    18 février 2011, par

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

Sur d’autres sites (10770)

  • ffmpeg throws error while converting wav to flac

    24 août 2017, par user3815252

    I am working on a research project and it requires me to first record audios from browser (using getuserMedia) and save them in a wav format. My code looks like this :

    navigator.mediaDevices.getUserMedia({ audio: true }).then(stream => {
           const chunks = [];
           const recorder = new MediaRecorder(stream);
           recorder.ondataavailable = e => {
               chunks.push(e.data);
               if (recorder.state == 'inactive') {
                   $scope.blob = new Blob(chunks, { type: 'audio/wav' });
                   $scope.file = new File([$scope.blob], "myFile.wav", {type: 'audio/wav', lastModified: Date.now()});

                   $scope.blobUrl = URL.createObjectURL($scope.blob);
                   createAudioElement($scope.blobUrl);
               }
           };
           recorder.start(1000);
           $scope.stop = function() {
               recorder.stop();    
           };

       }).catch(console.error);

    After saving $scope.file on filesystem, I convert it to flac format using ffmpeg utility ([https://www.ffmpeg.org/).

    Now my problem is the ffmpeg tool sometimes gives me error saying that this file cannot be recognized as wav file. The exact output of ffmpeg tool is :

     ffmpeg-user: Wav to Flac conversion: Invalid data found when processing input

     ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers
     built with Apple LLVM version 7.0.2 (clang-700.1.81)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/3.3.3 --enable-shared
     --enable-pthreads --enable-gpl --enable-version3
     --enable-hardcoded-tables
     --enable-avresample --cc=clang --host-cflags= --host-ldflags=
     --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl

     --disable-lzma --enable-vda
     libavutil      55. 58.100 / 55. 58.100
     libavcodec     57. 89.100 / 57. 89.100
     libavformat    57. 71.100 / 57. 71.100
     libavdevice    57.  6.100 / 57.  6.100
     libavfilter     6. 82.100 /  6. 82.100
     libavresample   3.  5.  0 /  3.  5.  0
     libswscale      4.  6.100 /  4.  6.100
     libswresample   2.  7.100 /  2.  7.100
     libpostproc    54.  5.100 / 54.  5.100

    Does anyone know why am I getting this error ?

  • Merging multiple videos in a template/layout with Python FFMPEG ?

    14 janvier 2021, par J. M. Arnold

    I'm currently trying to edit videos with the Python library of FFMPEG. I'm working with multiple file formats, precisely .mp4, .png and text inputs (.txt). The goal is to embed the different video files within a "layout" - for demonstration purposes I tried to design an example picture :

    


    Example

    


    The output is supposed to be a 1920x1080 .mp4 file with the following Elements :

    


      

    • Element 3 is the video itself (due to it being a mobile phone screen recording, it's about the size displayed there)
    • 


    • Element 1 and 2 are the "boarders", i.e. static pictures (?)
    • 


    • Element 4 represents a regularly changing text - input through the python script (probably be read from a .txt file)
    • 


    • Element 5 portrays a .png, .svg or alike ; in general a "picture" in the broad sense.
    • 


    


    What I'm trying to achieve is to create a sort of template file in which I "just" need to input the different .mp4 and .png files, as well as the text and in the end I'll receive a .mp4 file whereas my Python script functions as the navigator sending the data packages to FFMPEG to process the video itself.

    


    I dug into the FFMPEG library as well as the python-specific repository and wasn't able to find such an option. There were lots of articles explaining the usage of "channel layouts" (though these don't seem to fit my need).

    


    In case anyone wants to try on the same versions :

    


      

    • python --version :
Python 3.7.3
    • 


    • pip show ffmpeg : Version : 1.4 (it's the most recent ; on an off-topic note : It's not obligatory to use FFMPEG, I'd prefer using this library though if it doesn't offer the functionality I'm looking for, I'd highly appreciate if someone suggested something else)
    • 


    


  • Converting a binary stream to an mpegts stream

    22 décembre 2018, par John Kim

    I’m trying to create a livestream web app using NodeJS. The code I currently have emits a raw binary stream from the webcam on the client using socket IO and the node server receives this raw data. Using fluent-ffmpeg, I want to encode this binary stream into mpegts and send it to an RTMP server in real time, without creating any intermediary files. Could I somehow convert the binary stream into a webm stream and pipe that stream into an mpegts encoder in one ffmpeg command ?

    My relevant frontend client code :

    navigator.mediaDevices.getUserMedia(constraints).then(function(stream) {
       socket.emit('config_rtmpDestination',url);
       socket.emit('start','start');
       mediaRecorder = new MediaRecorder(stream);
       mediaRecorder.start(2000);

       mediaRecorder.onstop = function(e) {
           stream.stop();
       }

       mediaRecorder.ondataavailable = function(e) {
         socket.emit("binarystream",e.data);
       }
    }).catch(function(err) {
       console.log('The following error occured: ' + err);
       show_output('Local getUserMedia ERROR:'+err);
    });

    Relevant NodeJS server code :

    socket.on('binarystream',function(m){
       feedStream(m);
    });

    socket.on('start',function(m){
       ...
       var ops=[
           '-vcodec', socket._vcodec,'-i','-',
           '-c:v', 'libx264', '-preset', 'veryfast', '-tune', 'zerolatency',
           '-an', '-bufsize', '1000',
           '-f', 'mpegts', socket._rtmpDestination
       ];
       ffmpeg_process=spawn('ffmpeg', ops);
       feedStream=function(data){
           ffmpeg_process.stdin.write(data);
       }
       ...
    }

    The above code of course doesn’t work, I get these errors on ffmpeg :

    Error while decoding stream #0:1: Invalid data found when processing input
    [NULL @ 000001b15e67bd80] Invalid sync code 61f192.
    [libvpx @ 000001b15e6c5000] Failed to decode frame: Bitstream not supported by this decoder

    because I’m trying to convert raw binary data into mpegts.