Recherche avancée

Médias (1)

Mot : - Tags -/artwork

Autres articles (40)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (5858)

  • Video Frame Skipping Issues During Chunking and Uploading in React Native App

    24 février 2024, par Kishore J

    To create a social media platform like Instagram and Facebook, we have incorporated the functionality for users to upload reels-style videos. To enhance the viewing experience, we have implemented a strategy to segment these videos and upload them to the backend.

    


    To achieve this, we have employed the ffmpeg-kit-react-native and rn-fetch-blob libraries to segment videos efficiently. We've written an asynchronous function, chunkVideo, which chunks the input video file into segments of a specified duration. Here's a snippet of the code :

    


    async function chunkVideo(inputVideoFile, fileName, segmentDuration = 3) {
try {
  // Define the cache directory path
  const cacheDir = RNFetchBlob.fs.dirs.CacheDir;
  const outputTSFilePattern = `${cacheDir}/${fileName}_video%d.ts`;
  await FFmpegKit.execute(
   `-i ${inputVideoFile} -codec: copy -start_number 0 -hls_time ${segmentDuration} -hls_list_size 0 -hls_segment_filename ${outputTSFilePattern} -f hls ${cacheDir}/index.m3u8`,
  );
} catch (err) {
  logEvent("chunkVideoError", {error: err?.message});
  errorToast(err, true);
  }
}


    


    While this approach works well for segmenting videos, we encountered an issue where some frames are skipping during the chunking process, leading to a compromised viewing experience for the end-users.

    


    How to mitigate the frame skipping problems ?

    


  • Uploading Reel to Instagram via API error : The video format is not supported

    24 juin 2024, par Ben Fox

    I'm using FFMPeg to create a video with backing audio to upload to Instagram via the Graph API. I've followed the specs here as closely as I can : https://www.facebook.com/business/help/1197310377458196?id=376980407544978 and I've used ffprobe and MediaInfo to try and debug differences between my generated file and the requirements from Meta but every time, I get "Video process failed with error : Unsupported format : The video format is not supported. Please check spec for supported duration format".

    


    I've tried doing binary uploads and supplying a URL via their Resumable Upload protocol with the same result both times.

    


    Media Info Video
Media Info Audio

    


    I've uploaded screenshots from MediaInfo showing the entire breakout of the file and here is the code using the Node package fluent ffmpeg to create it :

    


    await new Promise<void>((resolve, reject) => {&#xA;  ffmpeg()&#xA;    .size(&#x27;1080x1920&#x27;)&#xA;    .aspect(&#x27;9:16&#x27;)&#xA;    .autopad()&#xA;&#xA;    .input(imageFilePath)&#xA;    .videoCodec(&#x27;libx264&#x27;)&#xA;    // .inputFPS(fps)&#xA;&#xA;    .input(audioFilePath)&#xA;&#xA;    .audioCodec(&#x27;aac&#x27;)&#xA;    .audioChannels(2)&#xA;    .audioFrequency(48000)&#xA;    .audioBitrate(&#x27;128k&#x27;)&#xA;&#xA;    .addOption(&#x27;-use_editlist&#x27;, &#x27;0&#x27;)&#xA;    .addOption(&#x27;-movflags&#x27;, &#x27;&#x2B;faststart&#x27;)&#xA;    .addOption(&#x27;-crf&#x27;, &#x27;23&#x27;)&#xA;&#xA;    /* .outputOptions([&#xA;      // YUV color space with 4:2:0 chroma subsampling for maximum compatibility with&#xA;      // video players&#xA;      &#x27;-pix_fmt yuv420p&#x27;,&#xA;    ]) */&#xA;&#xA;    // Set the output duration. It is required because FFmpeg would otherwise&#xA;    // automatically set the duration to the longest input, and the soundtrack might&#xA;    // be longer than the desired video length&#xA;    .duration(duration)&#xA;    // Set output frame rate&#xA;    .fps(fps)&#xA;&#xA;    // Resolve or reject (throw an error) the Promise once FFmpeg completes&#xA;    .toFormat(&#x27;mp4&#x27;)&#xA;    .saveToFile(outputPath)&#xA;    .on(&#x27;end&#x27;, () => resolve())&#xA;    .on(&#x27;error&#x27;, (error) => {&#xA;      console.log(&#x27;[render] :: Error&#x27;, error);&#xA;      reject(new Error(error));&#xA;    });&#xA;});&#xA;</void>

    &#xA;

  • Having sound issues while streaming to youtube

    23 septembre 2024, par Hen Simkin

    I created an app that uses rtmp and ffmppeg and youtube api for streaming to youtube,&#xA;when i stream and i go to youtube i face sound issues, the sound of the live sounds laggy and robotic.

    &#xA;

    this is my configuration :

    &#xA;

    const commonOutputOptions = [&#xA;        &#x27;-c:v libx264&#x27;,&#xA;        &#x27;-c:a aac&#x27;,&#xA;        &#x27;-preset veryfast&#x27;,&#xA;        &#x27;-crf 30&#x27;,&#xA;        &#x27;-b:v 3500k&#x27;,&#xA;        &#x27;-b:a 128k&#x27;,&#xA;        &#x27;-ac 2&#x27;,&#xA;        &#x27;-ar 44100&#x27;,&#xA;        &#x27;-g 48&#x27;,&#xA;        &#x27;-keyint_min 48&#x27;,&#xA;        &#x27;-pix_fmt yuv420p&#x27;,&#xA;        &#x27;-x264-params keyint=48:min-keyint=48:scenecut=-1&#x27;,&#xA;        &#x27;-flvflags no_duration_filesize&#x27;,&#xA;        &#x27;-probesize 32&#x27;,&#xA;        &#x27;-analyzeduration 0&#x27;,&#xA;        &#x27;-f flv&#x27;,&#xA;    ];&#xA;

    &#xA;

    i tried to change it to :

    &#xA;

    const commonOutputOptions = [&#xA;    &#x27;-re&#x27;,  // Enable real-time mode for streaming.&#xA;    &#x27;-c:v libx264&#x27;,&#xA;    &#x27;-c:a aac&#x27;,&#xA;    &#x27;-preset veryfast&#x27;,&#xA;    &#x27;-crf 23&#x27;,  // Improved quality setting.&#xA;    &#x27;-b:v 4500k&#x27;,  // Adjusted bitrate for better quality.&#xA;    &#x27;-b:a 160k&#x27;,  // Higher audio bitrate.&#xA;    &#x27;-ac 2&#x27;,&#xA;    &#x27;-ar 48000&#x27;,  // Updated sample rate.&#xA;    &#x27;-g 48&#x27;,&#xA;    &#x27;-keyint_min 48&#x27;,&#xA;    &#x27;-pix_fmt yuv420p&#x27;,&#xA;    &#x27;-x264-params keyint=48:min-keyint=48:scenecut=-1&#x27;,&#xA;    &#x27;-flvflags no_duration_filesize&#x27;,&#xA;    &#x27;-f flv&#x27;,&#xA;    &#x27;-movflags &#x2B;faststart&#x27;,  // Improved streaming compatibility.&#xA;];&#xA;

    &#xA;

    and to this :

    &#xA;

    const commonOutputOptions = [&#xA;    &#x27;-c:v libx264&#x27;,&#xA;    &#x27;-c:a aac&#x27;,&#xA;    &#x27;-preset veryfast&#x27;,&#xA;    &#x27;-crf 30&#x27;,&#xA;    &#x27;-b:v 3500k&#x27;,&#xA;    &#x27;-b:a 128k&#x27;,&#xA;    &#x27;-ac 2&#x27;,&#xA;    &#x27;-ar 48000&#x27;, // Updated sampling rate&#xA;    &#x27;-g 48&#x27;,&#xA;    &#x27;-keyint_min 48&#x27;,&#xA;    &#x27;-pix_fmt yuv420p&#x27;,&#xA;    &#x27;-x264-params keyint=48:min-keyint=48:scenecut=-1&#x27;,&#xA;    &#x27;-flvflags no_duration_filesize&#x27;,&#xA;    &#x27;-f flv&#x27;,&#xA;];&#xA;

    &#xA;

    i tried differnt configurations and nothing makes the sound normal.

    &#xA;

    when i stream to facebook and twitch the sound is perfect.

    &#xA;