Recherche avancée

Médias (91)

Autres articles (11)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • 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 (...)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (3057)

  • ffmpeg : remove frames when audio mute

    23 septembre 2022, par dvt

    I have a video record of a public academic conference. For some reason, the audio is complete but intermittent(spectrogram sample). For each 5 10 secs, short mute interrupts, make me hard to focus on the content.
Thinking most of the video is static image, removing mute portion of the audio and corresponding frames might be a way to fix this.

    


    For now I've partially done using silenceremove and rubberband, stripping mute interruptions and stretch the audio to the same duration of the video. Steps below :

    


      

    1. Get the video duration with ffprobe
ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 sample.mp4

      


    2. 


    3. Try silenceremove the audio once and Get its duration.

      


      ffmpeg -i "sample.mp4" -filter_complex "[a]silenceremove=stop_periods=-1:start_threshold=-50dB:stop_threshold=-50dB:detection=rms:window=0.01[a1]" -vn sample.wav
ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 sample.mp4


      


    4. 


    5. Calculate the tempo manually (duration-audio/duration-video), for example I got 0.948.

      


    6. 


    7. AIO command, rubberband added. Generate a fixed version from the source.

      


      ffmpeg -i "sample.mp4" -filter_complex "[a]silenceremove=stop_periods=-1:start_threshold=-50dB:stop_threshold=-50dB:detection=rms:window=0.01[a1];[a1]rubberband=tempo=0.948" -c:v copy -cutoff 7500 sample.fix.mp4

      


    8. 


    


    I still wonder if there is a better way. Thanks guys.

    


    Refer :

    


      

    1. How to stretch the WAV file to the same video length ?
    2. 


    3. How to trim out black frames with ffmpeg on windows ?
    4. 


    


  • Ffmpeg gentle stop sending [closed]

    31 mars 2023, par Ли Шеньшунь

    Good day. I'm trying to do a simple video sending and receiving on two computers that are on the same network. Video simulates streaming (video conference for example). I want to use ffmpeg but have run into a number of difficulties.
I start with two simple scripts :
Sender machine

    


    ffmpeg -re -i input_file.mp4 -c copy -f mpegts udp://192.168.2.10:1234


    


    recipient machine :

    


    ffmpeg -i udp://192.168.2.10:1234 -c copy save_video.mp4


    


    I got 2 questions :

    


      

    1. Is there a way to correctly end video reception when the sender does not send anything else ?
    2. 


    


    The receive command works by waiting indefinitely. If the sender is still sending video and at this moment interrupt the receiver with ctrl+c, then the video is saved correctly. If the sender is finished, then after that, to stop, you need to use ctrl + c twice and the video is "broken", because. does not open apparently due to damage to the meta-data or codecs.

    


    I'm aware of options like using timeout, or saving to mkv format, they really work. But setting a specific number of seconds is problematic, and simply killing a process does not look very nice.

    


      

    1. Is the -re switch enough to simulate a "webcam" from a video file ? I heard that ffmpeg buffers packets in case of loss and can send them later later. I need to send it as it is, if there are any problems, then we lose the package forever. The -flush_packets key, as I understand it, is for writing to a file, but not when sending over the network.
    2. 


    


  • Can I use the file buffer or stream as input for fluent-ffmpeg ? I am trying to avoid saving the video locally to get its path before removing

    22 avril 2023, par Moath Thawahreh

    I am receiving the file via an api, I was trying to process the file.buffer as input for FFmpeg but it did not work, I had to save the video locally first and then process the path and remove the saved video later on.
I don't want to believe that there is no other way to solve this and I have been looking for solutions and workarounds but it was all about ffmpeg input as a path.

    


    I would love to find a solution using fluent-ffmpeg because it has some other great features, but I won't mind any suggestions for compressing the video using any different approaches if it's more efficient

    


    Again my code below works fine but I have to save the video and then remove it I am hoping for a more efficient solution :

    


      fs.writeFileSync(&#x27;temp.mp4&#x27;, file.buffer);&#xA;&#xA;    // Resize the temporary file using ffmpeg&#xA;    ffmpeg(&#x27;temp.mp4&#x27;) // here I tried pass file.buffer as readable stream,it receives paths only &#xA;      .format(&#x27;mp4&#x27;)&#xA;      .size(&#x27;50%&#x27;)&#xA;      .save(&#x27;resized.mp4&#x27;)&#xA;      .on(&#x27;end&#x27;, async () => {&#xA;        // Upload the resized file to Firebase&#xA;        const resizedFileStream = bucket.file(`video/${uniqueId}`).createWriteStream();&#xA;        fs.createReadStream(&#x27;resized.mp4&#x27;).pipe(resizedFileStream);&#xA;&#xA;        await new Promise<void>((resolve, reject) => {&#xA;          resizedFileStream&#xA;            .on(&#x27;finish&#x27;, () => {&#xA;              // Remove the local files after they have been uploaded&#xA;              fs.unlinkSync(&#x27;temp.mp4&#x27;);&#xA;              fs.unlinkSync(&#x27;resized.mp4&#x27;);&#xA;              resolve();&#xA;            })&#xA;            .on(&#x27;error&#x27;, reject);&#xA;        });&#xA;&#xA;        // Get the URL of the uploaded resized version&#xA;        const resizedFile = bucket.file(`video/${uniqueId}`);&#xA;        const url = await resizedFile.getSignedUrl({&#xA;          action: &#x27;read&#x27;,&#xA;          expires: &#x27;03-17-2025&#x27;, // Change this to a reasonable expiration date&#xA;        });&#xA;&#xA;        console.log(&#x27;Resized file uploaded successfully.&#x27;);&#xA;      })&#xA;      .on(&#x27;error&#x27;, (err) => {&#xA;        console.log(&#x27;An error occurred: &#x27; &#x2B; err.message);&#xA;      });&#xA;</void>

    &#xA;