Recherche avancée

Médias (0)

Mot : - Tags -/organisation

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (21)

  • Qu’est ce qu’un éditorial

    21 juin 2013, par

    Ecrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
    Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
    Vous pouvez personnaliser le formulaire de création d’un éditorial.
    Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)

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

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

Sur d’autres sites (5620)

  • avcodec/ac3_parser : improve false positive detection when parsing sync frames

    22 octobre 2022, par James Almer
    avcodec/ac3_parser : improve false positive detection when parsing sync frames
    

    A two byte sync word is not enough to ensure we got a real syncframe, nor are
    all the range checks we do in the first seven bytes. Do therefore an integrity
    check for the sync frame in order to prevent the parser from filling avctx with
    bogus information.

    Signed-off-by : James Almer <jamrial@gmail.com>

    • [DH] libavcodec/aac_ac3_parser.c
    • [DH] libavcodec/aac_ac3_parser.h
    • [DH] libavcodec/ac3_parser.c
  • ffmpeg works at command line but I got this error when I use it in nodejs app :

    15 avril 2023, par Ibrahim Ashour

    This is the code :

    &#xA;

    import fs from &#x27;fs&#x27;;&#xA;import googleTTS from &#x27;google-tts-api&#x27;;&#xA;import https from &#x27;https&#x27;;&#xA;import { exec } from &#x27;child_process&#x27;;&#xA;&#xA;async function convertTextToVoice(text, fileName) {&#xA;  const outputFile = `./audios/${fileName}.mp3`;&#xA;&#xA;  const words = text.split(&#x27; &#x27;);&#xA;  const chunks = [];&#xA;  let chunk = &#x27;&#x27;;&#xA;&#xA;  for (const word of words) {&#xA;    if (chunk.length &#x2B; word.length &lt; 200) {&#xA;      chunk &#x2B;= &#x27; &#x27; &#x2B; word;&#xA;    } else {&#xA;      chunks.push(chunk.trim());&#xA;      chunk = word;&#xA;    }&#xA;  }&#xA;&#xA;  chunks.push(chunk.trim());&#xA;&#xA;  for (let i = 0; i &lt; chunks.length; i&#x2B;&#x2B;) {&#xA;    const chunkFile = `./audios/${fileName}-chunk${i}.mp3`;&#xA;    const url = await googleTTS.getAudioUrl(chunks[i], {&#xA;      lang: &#x27;ar&#x27;,&#xA;      slow: false,&#xA;      host: &#x27;https://translate.google.com&#x27;,&#xA;    });&#xA;&#xA;&#xA;    try {&#xA;      const file = await fs.createWriteStream(chunkFile);&#xA;      https.get(url, response => {&#xA;        response.pipe(file);&#xA;        file.on(&#x27;finish&#x27;, () => {&#xA;          file.close();&#xA;          console.log(`Chunk ${i} created successfully`);&#xA;        });&#xA;      }).on(&#x27;error&#x27;, error => {&#xA;        console.error(`Error downloading chunk ${i}: ${error}`);&#xA;      });&#xA;    } catch (error) {&#xA;      console.error(error);&#xA;    }&#xA;  }&#xA;&#xA;  const chunkFiles = chunks.map((chunk, i) => `./audios/${fileName}-chunk${i}.mp3`);&#xA;&#xA;  // Use ffmpeg to merge the audio files&#xA;  const concatCommand = `ffmpeg -i "concat:${chunkFiles.join(&#x27;|&#x27;)}" -acodec copy ${outputFile}`;&#xA;  try {&#xA;    await new Promise((resolve, reject) => {&#xA;      exec(concatCommand, (error, stdout, stderr) => {&#xA;        if (error) {&#xA;          console.error(`Error executing ffmpeg command: ${error}`);&#xA;          reject(error);&#xA;        } else {&#xA;          console.log(`Audio file ${outputFile} created successfully`);&#xA;          resolve();&#xA;        }&#xA;      });&#xA;    });&#xA;&#xA;    for (const chunkFile of chunkFiles) {&#xA;      await fs.promises.unlink(chunkFile);&#xA;      console.log(`${chunkFile} deleted successfully`);&#xA;    }&#xA;  } catch (error) {&#xA;    console.error(error);&#xA;  }&#xA;}&#xA;

    &#xA;

    This is the Error :&#xA;./audios/تجربة-chunk0.mp3|./audios/تجربة-chunk1.mp3&#xA;ffmpeg -i "concat :./audios/تجربة-chunk0.mp3|./audios/تجربة-chunk1.mp3" -acodec copy ./audios/تجربة.mp3&#xA;Error executing ffmpeg command : Error : Command failed : ffmpeg -i "concat :./audios/تجربة-chunk0.mp3|./audios/تجربة-chunk1.mp3" -acodec copy ./audios/تجربة.mp3&#xA;ffmpeg version 2023-02-04-git-bdc76f467f-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers&#xA;built with gcc 12.2.0 (Rev10, Built by MSYS2 project)&#xA;configuration : —enable-gpl —enable-version3 —enable-static —disable-w32threads —disable-autodetect —enable-fontconfig —enable-iconv —enable-gnutls —enable-libxml2 —enable-gmp —enable-bzlib —enable-lzma —enable-libsnappy —enable-zlib —enable-librist —enable-libsrt —enable-libssh —enable-libzmq —enable-avisynth —enable-libbluray —enable-libcaca —enable-sdl2 —enable-libaribb24 —enable-libdav1d —enable-libdavs2 —enable-libuavs3d —enable-libzvbi —enable-librav1e —enable-libsvtav1 —enable-libwebp —enable-libx264 —enable-libx265 —enable-libxavs2 —enable-libxvid —enable-libaom —enable-libjxl —enable-libopenjpeg —enable-libvpx —enable-mediafoundation —enable-libass —enable-frei0r —enable-libfreetype —enable-libfribidi —enable-liblensfun —enable-libvidstab —enable-libvmaf —enable-libzimg —enable-amf —enable-cuda-llvm —enable-cuvid —enable-ffnvcodec —enable-nvdec —enable-nvenc —enable-d3d11va —enable-dxva2 —enable-libvpl —enable-libshaderc —enable-vulkan —enable-libplacebo —enable-opencl —enable-libcdio —enable-libgme —enable-libmodplug —enable-libopenmpt —enable-libopencore-amrwb —enable-libmp3lame —enable-libshine —enable-libtheora —enable-libtwolame —enable-libvo-amrwbenc —enable-libilbc —enable-libgsm —enable-libopencore-amrnb —enable-libopus —enable-libspeex —enable-libvorbis —enable-ladspa —enable-libbs2b —enable-libflite —enable-libmysofa —enable-librubberband —enable-libsoxr —enable-chromaprint&#xA;libavutil 57. 44.100 / 57. 44.100&#xA;libavcodec 59. 63.100 / 59. 63.100&#xA;libavformat 59. 38.100 / 59. 38.100&#xA;libavdevice 59. 8.101 / 59. 8.101&#xA;libavfilter 8. 56.100 / 8. 56.100&#xA;libswscale 6. 8.112 / 6. 8.112&#xA;libswresample 4. 9.100 / 4. 9.100&#xA;libpostproc 56. 7.100 / 56. 7.100&#xA;[mp3 @ 00000177df48a1c0] Format mp3 detected only with low score of 1, misdetection possible !&#xA;[mp3 @ 00000177df48a1c0] Failed to read frame size : Could not seek to 1026.&#xA;concat :./audios/تجربة-chunk0.mp3|./audios/تجربة-chunk1.mp3 : Invalid argument

    &#xA;

    Error : Command failed : ffmpeg -i "concat :./audios/تجربة-chunk0.mp3|./audios/تجربة-chunk1.mp3" -acodec copy ./audios/تجربة.mp3&#xA;ffmpeg version 2023-02-04-git-bdc76f467f-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers&#xA;built with gcc 12.2.0 (Rev10, Built by MSYS2 project)&#xA;configuration : —enable-gpl —enable-version3 —enable-static —disable-w32threads —disable-autodetect —enable-fontconfig —enable-iconv —enable-gnutls —enable-libxml2 —enable-gmp —enable-bzlib —enable-lzma —enable-libsnappy —enable-zlib —enable-librist —enable-libsrt —enable-libssh —enable-libzmq —enable-avisynth —enable-libbluray —enable-libcaca —enable-sdl2 —enable-libaribb24 —enable-libdav1d —enable-libdavs2 —enable-libuavs3d —enable-libzvbi —enable-librav1e —enable-libsvtav1 —enable-libwebp —enable-libx264 —enable-libx265 —enable-libxavs2 —enable-libxvid —enable-libaom —enable-libjxl —enable-libopenjpeg —enable-libvpx —enable-mediafoundation —enable-libass —enable-frei0r —enable-libfreetype —enable-libfribidi —enable-liblensfun —enable-libvidstab —enable-libvmaf —enable-libzimg —enable-amf —enable-cuda-llvm —enable-cuvid —enable-ffnvcodec —enable-nvdec —enable-nvenc —enable-d3d11va —enable-dxva2 —enable-libvpl —enable-libshaderc —enable-vulkan —enable-libplacebo —enable-opencl —enable-libcdio —enable-libgme —enable-libmodplug —enable-libopenmpt —enable-libopencore-amrwb —enable-libmp3lame —enable-libshine —enable-libtheora —enable-libtwolame —enable-libvo-amrwbenc —enable-libilbc —enable-libgsm —enable-libopencore-amrnb —enable-libopus —enable-libspeex —enable-libvorbis —enable-ladspa —enable-libbs2b —enable-libflite —enable-libmysofa —enable-librubberband —enable-libsoxr —enable-chromaprint&#xA;libavutil 57. 44.100 / 57. 44.100&#xA;libavcodec 59. 63.100 / 59. 63.100&#xA;libavformat 59. 38.100 / 59. 38.100&#xA;libavdevice 59. 8.101 / 59. 8.101&#xA;libavfilter 8. 56.100 / 8. 56.100&#xA;libswscale 6. 8.112 / 6. 8.112&#xA;libswresample 4. 9.100 / 4. 9.100&#xA;libpostproc 56. 7.100 / 56. 7.100&#xA;[mp3 @ 00000177df48a1c0] Format mp3 detected only with low score of 1, misdetection possible !&#xA;[mp3 @ 00000177df48a1c0] Failed to read frame size : Could not seek to 1026.&#xA;concat :./audios/تجربة-chunk0.mp3|./audios/تجربة-chunk1.mp3 : Invalid argument

    &#xA;

    at ChildProcess.exithandler (node:child_process:419:12)&#xA;at ChildProcess.emit (node:events:513:28)&#xA;at maybeClose (node:internal/child_process:1091:16)&#xA;at ChildProcess._handle.onexit (node:internal/child_process:302:5) {&#xA;

    &#xA;

    code : 1,&#xA;killed : false,&#xA;signal : null,&#xA;cmd : 'ffmpeg -i "concat :./audios/تجربة-chunk0.mp3|./audios/تجربة-chunk1.mp3" -acodec copy ./audios/تجربة.mp3'&#xA;}&#xA;Chunk 1 created successfully&#xA;Chunk 0 created successfully

    &#xA;

    I expected the command to work in the nodejs app like in the command line

    &#xA;

  • Synchronize video subtitle with text-to-speech voice

    8 décembre 2015, par Ahmad

    I try to create a video of a text in which the text is narrated by text-to-speech.

    To create the video file, I use the VideoFileWriter of Aforge.Net as the following :

    VideoWriter = new VideoFileWriter();

    VideoWriter.Open(CurVideoFile, (int)(Properties.Settings.Default.VideoWidth),
       (int)(Properties.Settings.Default.VideoHeight), 25, VideoCodec.MPEG4, 800000);

    To read aloud the text I use SpeechSynthesizer class and write the output to a wave stream

    AudioStream = new FileStream(CurAudioFile, FileMode.Create);
    synth.SetOutputToWaveStream(AudioStream);

    I want to highlight the word is spoken in the video, so I synchronize them by the SpeakProgress event :

       void synth_SpeakProgress(object sender, SpeakProgressEventArgs e)
       {

           curAuidoPosition = e.AudioPosition;
           using (Graphics g = Graphics.FromImage(Screen))
           {
                g.DrawString(e.Text,....);
           }                    
           VideoWriter.WriteVideoFrame(Screen, curAuidoPosition);
       }

    And finally, I merge the video and audio using ffmpeg

    using (Process process = new Process())
    {
             process.StartInfo.FileName = exe_path;
             process.StartInfo.Arguments = string.Format(@"-i ""{0}"" -i ""{1}"" -y -acodec copy -vcodec copy ""{2}""",
                                              avi_path, mp3_path, output_file);
    ......

    The problem is that for some voices like Microsoft Hazel, Zira and David, the video is not synchronized with the audio, and the audio is much faster than the shown subtitle. In windows 7, it works for Mircrosoft Sam

    How can I synchronize them so that it works for any text-to-speech voices ?