Recherche avancée

Médias (91)

Autres articles (11)

  • MediaSPIP Init et Diogène : types de publications de MediaSPIP

    11 novembre 2010, par

    À l’installation d’un site MediaSPIP, le plugin MediaSPIP Init réalise certaines opérations dont la principale consiste à créer quatre rubriques principales dans le site et de créer cinq templates de formulaire pour Diogène.
    Ces quatre rubriques principales (aussi appelées secteurs) sont : Medias ; Sites ; Editos ; Actualités ;
    Pour chacune de ces rubriques est créé un template de formulaire spécifique éponyme. Pour la rubrique "Medias" un second template "catégorie" est créé permettant d’ajouter (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

Sur d’autres sites (515)

  • How exactly do I extract and merge a audio file using @ffmpeg/ffmpeg

    5 octobre 2022, par jeff.gogooma

    I have a lot of issues about audio transfer to server and frontend.

    


    I am building a solution that is extracting and merging a file received from frontend.

    


    I am using local ffmpeg file with node.js child_process package.

    


    My Env :

    


    framework : nest.js

    


    runtime : node.js

    


    lang : typescript

    


    here is console.log(file : Express.Multer.File).
I am storing to S3 bucket these files. So I am not using multer's memory, disk storage.

    


    // console.log(file);
 {
  fieldname: 'file',
  originalname: 'input1.mp3',
  encoding: '7bit',
  mimetype: 'audio/mpeg'
}


    


    import cp from "child_process";

type Section = { from: number, to: number };

const files: Array = [];

export const setupAudioFileSection = async (file: Express.Multer.File, section: Section) => {
  try {
    const file1 = await cp.exec(`ffmpeg -i ${file} -y -ss 0 -t ${section.from}`);
    const file2 = await cp.exec(`ffmpeg -i ${file} -y -ss ${section.from} -t ${section.to}`);
    const file3 = await cp.exec(`ffmpeg -i ${file} -y -ss ${section.to}`);
    files.push(file1);
    files.push(file3);

    return file2;
  } catch (error) {
    console.log(error);
    throw new Error('setupAudioFileSection error');
  }


    


    But, My Local ffmpeg is printing the error. because of [object Object]. I think local ffmpeg is not recognized the audio file received from client. So, I am resolving this issue by writing a file to disk or memory directly. but I am confusing this solution whether is right or not.

    


    error Error: Command failed: ffmpeg -i [object Object] -y -ss 10 -t 20 -f mp3 ./TestOutput
ffmpeg version 5.1.1 Copyright (c) 2000-2022 the FFmpeg developers
  built with Apple clang version 13.1.6 (clang-1316.0.21.2.5)
  configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/5.1.1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-neon
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100

[object: No such file or directory



    


    How can I write file on my server and read ? if that can be, I can resolve [object Object] of ffmpeg issue maybe. Please some answer or advise my issue. Thank you !

    


  • When I use Fluent-Ffmpeg to access Ffmpeg, there are two different threads but I dont want it

    25 mars 2019, par Ahmet Hakan Billur

    I try to broadcast with rtsp live stream from IP camera on web app that is improved with node.js-jsmpeg([a link]https://www.npmjs.com/package/fluent-ffmpeg !), web socket, html5(canvas).Everything ok that live streaming works but missing frame and high CPU usaged by streaming on web app and I try to reduce so I can intervene ffmpeg with fluent-ffmpeg but when I monitor CPU usaged I can see there 2 different threads following as and look at screenshot of CPU ;
    enter image description here

    ffmpeg -rtsp_trasport tcp -i rtsp ://10.6.0.225 -f mpeg1video - is worked by jsmpeg and canvas/html5
    index.html

       

       
       
       
       

       <div><canvas width="640" height="360"></canvas></div>
       div><canvas width="640" height="360"></canvas>  
       <code class="echappe-js">&lt;script type=&quot;text/javascript&quot; src='http://stackoverflow.com/feeds/tag/jsLib/jsmpeg.js'&gt;&lt;/script&gt;

    &lt;script type=&quot;text/javascript&quot; src='http://stackoverflow.com/feeds/tag/jsLib/ffmpegUtil.js'&gt;&lt;/script&gt;

    &lt;script type=&quot;text/javascript&quot;&gt;<br />
         var canvas = document.getElementById('videoCanvas');<br />
         var ws = new WebSocket(&quot;ws://10.6.0.206:9999&quot;)<br />
         var player = new jsmpeg(ws, {canvas:canvas, autoplay:true,audio:false,loop: true});<br />
       &lt;/script&gt;

    other one /usr/bin/ffmpeg -i rtsp ://10.6.0.225 -y out.ts is work by following piece of code in app.js

    Stream = require('node-rtsp-stream');
    stream = new Stream({
       name: 'name',
       streamUrl: 'rtsp://10.6.0.225',
       wsPort: 9999
    });

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

    proc
    .addInput('rtsp://10.6.0.225')
    .on('start', function(ffmpegCommand) {
       /// log something maybe
       console.log('start-->'+ffmpegCommand)
    })
    .on('progress', function(data) {
       /// do stuff with progress data if you want
       console.log('progress-->'+data)
    })
    .on('end', function() {
       /// encoding is complete, so callback or move on at this point
       console.log('end-->')
    })
    .on('error', function(error) {
       /// error handling
       console.log('error-->'+error)

    })
    .output('out.ts')
    .run();

    and then I don’t want to get two different ffmpeg command threads in there.
    Does anyone have an idea ?
    Thanks in advice.

  • Data lost in ffmpeg in overlay / steganography using ffmpeg

    3 août 2020, par g Kishore

    Goal : Embedding some textual information into a video(steganography) using LSB encoding. And retrieving the embedded text.

    &#xA;

    Procedure followed :

    &#xA;

      &#xA;
    1. Extracted one frame from video :&#xA;ffmpeg -i -vf "select=eq(n,34)" -vframes 1 out.bmp
    2. &#xA;

    3. LSB encoding of text into out.bmp using C-code :&#xA;NOTE : Decoding of embedded text from out.bmp is working fine[c-code]
    4. &#xA;

    5. Insert out.bmp back into original video :&#xA;ffmpeg -i -i out.bmp -filter_complex "[0:v][1:v]overlay=enable='between(n,0,0)'[out]" -acodec copy -map&#xA;"[out]" -map 0:1 output.mp4
    6. &#xA;

    7. Extracted frames from encoded video "output.mp4" :&#xA;ffmpeg -i output.mp4 frames%d.bmp&#xA;NOTE : Replaced image is present in extracted frames
    8. &#xA;

    9. Decoding the text from frames0.bmp, frames1.bmp, frames2.bmp using C-Code&#xA;NOTE : not able to decode the text. I tried comparing image data of out.bmp & frames0.bmp, frames1.bmp, frames2.bmp. Lots of changes are there.
    10. &#xA;

    &#xA;

    PS :&#xA;. C-code used to encode & decode text into the image is working well. No ambiguity in it.&#xA;. Encoded video is playable properly. Only issue is loss of embedded text while overlaying the encoded image back into the video

    &#xA;

    Any help is appreciated.

    &#xA;