Recherche avancée

Médias (91)

Autres articles (68)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

Sur d’autres sites (2519)

  • sharedarraybuffer error in edge and firefox but not in chrome when uploading with ffmpeg in nodejs

    29 juillet 2021, par Juliette

    I have the code below in React.js that uses ffmpeg to convert files :

    


    import { createFFmpeg, fetchFile } from '@ffmpeg/ffmpeg';

  const doTranscode = async () => {
    setMessage('Loading ffmpeg-core.js');
    await ffmpeg.load();
    setMessage('Uploading file');
    ffmpeg.FS('writeFile', filename, await fetchFile(file));
    await ffmpeg.run('-i', filename, 'test.wav');
    setMessage('Upload to manager complete. Sound file will be available and playable on the manger within 1-2 minutes.');
    const data = ffmpeg.FS('readFile', 'test.wav');
    setAudioSrc(URL.createObjectURL(new Blob([data.buffer], { type: 'audio/wav' })));

    var file_name = prompt('What would you like to call this file?');

    if (!file_name) {
      file_name = Date.now()
    }
    
    (async function(){
      let output = await getSoundID(customer_id, file_name);
      let sound_id = output.data;
      var bucket_file = new File([new Blob([data.buffer], { type: 'audio/wav' })], "sounds/" + customer_id + "/" + sound_id + ".wav");
      uploadFileToS3(bucket_file);
      updateSoundData(sound_id, customer_id);
    })();
  };

  useEffect(() => {
    if (file) {
      doTranscode()
    }
  }, [file])


    


    The code above works great in Chrome and the files are successfully converted. However, when I bring it to Firefox or Edge I get this error Unhandled Rejection (ReferenceError): SharedArrayBuffer is not defined.

    


    I looked up this issue and they said I need to modify my headers to include this :

    


    You need to set two response headers for your document:

Cross-Origin-Opener-Policy: same-origin Cross-Origin-Embedder-Policy: require-corp


    


    Not sure how I would this in my JS code ?

    


    Would love to hear what you guys think.

    


  • Unable to record mediasoup producer using FFmpeg on real server

    30 novembre 2020, par Sarvesh Patil

    I have built a nice app in react native for audio calling, many thanks to MediaSoup !!

    


    To take it to next level, I need to record some of my calls.
I used this tutorial for reference :
mediasoup recording demo

    


    I followed the FFmpeg way and have reached a point where I have created a plainTransport with

    


        router.createPlainTransport({
        // No RTP will be received from the remote side
        comedia: false,
        // FFmpeg and GStreamer don't support RTP/RTCP multiplexing ("a=rtcp-mux" in SDP)
        rtcpMux: false,
        listenIp: {ip:"0.0.0.0", announcedIp:"MY_PUBLIC_IP"},
    });



    


    Then I connect to this transport :

    


        rtpPlainTransport.connect({
        ip: 127.0.0.1,
        port: "port1",
        rtcpPort: "port2",
    });



    


    My first doubt : is the ip address in .connect({}) parameters supplied above correct ?

    


    Second, the FFMPEG command requires an SDP header. This is mine :

    


        v=0
    o=- 0 0 IN IP4 127.0.0.1
    s=-
    c=IN IP4 127.0.0.1
    t=0 0
    m=audio port1 RTP/AVPF 111
    a=rtcp:port2
    a=rtpmap:111 opus/48000/2
    a=fmtp:111 minptime=10;useinbandfec=1


    


    When I start recording, the FFMPEG process does not receive any data.
Moreover, on stopping, I get the following message

    


    


    Output file is empty, nothing was encoded (check -ss / -t / -frames
parameters if used) Exiting normally, received signal 2. Recording
process exit, code : 255, signal : null

    


    


    I was able to make the recording save on localhost with 127.0.0.1 when the server was itself running on localhost.

    


    However, with my actual server hosted with Nginx, I'm not able to figure out what is going wrong.

    


    I can see data being sent on my audio port :

    


    1 0.000000000    127.0.0.1 → 127.0.0.1    UDP 117 10183 → 5004 Len=75
2 0.020787740    127.0.0.1 → 127.0.0.1    UDP 108 10183 → 5004 Len=66
3 0.043201757    127.0.0.1 → 127.0.0.1    UDP 118 10183 → 5004 Len=76


    


    What do I do with FFmpeg so that it starts the recording !?

    


    Can someone please help ?

    


  • FFMPEG Audio Not Working Using VideoShow Package

    17 février, par dev.skas

    I am creating a Node.js app that make video. I am facing some audio issue for each image, but my background sound is working

    


    

    

    async function generateVideo() {
  const images = [];
  for (let i = 0; i < conversation.length; i++) {
    images.push({
      path: `assets/image/conversation${i}.png`,
      duration: 5,
      caption: questions[i].question,
      audio: `assets/audio/conversation${i}.mp3`,
    }); // Show question for 5 sec
    images.push({
      path: `assets/image/reply${i}.png`,
      duration: 5,
      audio: `assets/audio/reply${i}.mp3`,
    }); // Show answer for 5 sec
  }

  const videoOptions = {
    fps: 30,
    loop: 5, // Each image duration
    transition: false,
    videoBitrate: 1024,
    videoCodec: "libx264",
    size: "1280x720",
    audioBitrate: "128k",
    format: "mp4",
    pixelFormat: "yuv420p",
  };

  videoshow(images, videoOptions)
    // .audio("assets/template/bgm.mp3")
    .save("video.mp4")
    .on("start", () => console.log("Generating video..."))
    .on("error", (err) => console.error("Error:", err))
    .on("end", () => console.log(" video created: video.mp4"));
}

    


    


    



    Background sound is working. How i solve this issue. The FFmpeg build pack is downloaded from gyan.dev