Recherche avancée

Médias (2)

Mot : - Tags -/plugins

Autres articles (58)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

Sur d’autres sites (6950)

  • FFMPEG 4.2.4, Python 3.9 : "ffmpeg : error while loading shared libraries : libopenh264.so.5 : cannot open shared object file : No such file or directory"

    7 mars 2021, par Wilan

    I'm using ffmpeg 4.2.4 and Python 3.9

    


    Currently getting error :
    
ffmpeg: error while loading shared libraries: libopenh264.so.5: cannot open shared object file: No such file or directory

    


    Tried the solutions from these links but they didn't work :
    
ffmpeg : error while loading shared libraries : libopenh264.so.5
    
Ffmpeg error in linux

    


    If anyone has any idea how to fix it, or needs any more information, please let me know.

    


  • Error using FFmpeg.wasm for audio files in react : "ffmpeg.FS('readFile', 'output.mp3') error. Check if the path exists"

    25 février 2021, par Rayhan Memon

    I'm currently building a browser-based audio editor and I'm using ffmpeg.wasm (a pure WebAssembly/JavaScript port of FFmpeg) to do it.

    


    I'm using this excellent example, which allows you to uploaded video file and convert it into a gif :

    


    import React, { useState, useEffect } from &#x27;react&#x27;;&#xA;import &#x27;./App.css&#x27;;&#xA;&#xA;import { createFFmpeg, fetchFile } from &#x27;@ffmpeg/ffmpeg&#x27;;&#xA;const ffmpeg = createFFmpeg({ log: true });&#xA;&#xA;function App() {&#xA;  const [ready, setReady] = useState(false);&#xA;  const [video, setVideo] = useState();&#xA;  const [gif, setGif] = useState();&#xA;&#xA;  const load = async () => {&#xA;    await ffmpeg.load();&#xA;    setReady(true);&#xA;  }&#xA;&#xA;  useEffect(() => {&#xA;    load();&#xA;  }, [])&#xA;&#xA;  const convertToGif = async () => {&#xA;    // Write the file to memory &#xA;    ffmpeg.FS(&#x27;writeFile&#x27;, &#x27;test.mp4&#x27;, await fetchFile(video));&#xA;&#xA;    // Run the FFMpeg command&#xA;    await ffmpeg.run(&#x27;-i&#x27;, &#x27;test.mp4&#x27;, &#x27;-t&#x27;, &#x27;2.5&#x27;, &#x27;-ss&#x27;, &#x27;2.0&#x27;, &#x27;-f&#x27;, &#x27;gif&#x27;, &#x27;out.gif&#x27;);&#xA;&#xA;    // Read the result&#xA;    const data = ffmpeg.FS(&#x27;readFile&#x27;, &#x27;out.gif&#x27;);&#xA;&#xA;    // Create a URL&#xA;    const url = URL.createObjectURL(new Blob([data.buffer], { type: &#x27;image/gif&#x27; }));&#xA;    setGif(url)&#xA;  }&#xA;&#xA;  return ready ? (&#xA;    &#xA;    <div classname="App">&#xA;      { video &amp;&amp; &#xA;&#xA;      }&#xA;&#xA;&#xA;      <input type="file" />> setVideo(e.target.files?.item(0))} />&#xA;&#xA;      <h3>Result</h3>&#xA;&#xA;      <button>Convert</button>&#xA;&#xA;      { gif &amp;&amp; <img src="http://stackoverflow.com/feeds/tag/{gif}" width="250" style='max-width: 300px; max-height: 300px' />}&#xA;&#xA;    </div>&#xA;  )&#xA;    :&#xA;    (&#xA;      <p>Loading...</p>&#xA;    );&#xA;}&#xA;&#xA;export default App;&#xA;

    &#xA;

    I've modified the above code to take an mp3 file recorded in the browser (recorded using the npm package 'mic-recorder-to-mp3' and passed to this component as a blobURL in the global state) and do something to it using ffmpeg.wasm :

    &#xA;

    import React, { useContext, useState, useEffect } from &#x27;react&#x27;;&#xA;import Context from &#x27;../../store/Context&#x27;;&#xA;import Toolbar from &#x27;../Toolbar/Toolbar&#x27;;&#xA;import AudioTranscript from &#x27;./AudioTranscript&#x27;;&#xA;&#xA;import { createFFmpeg, fetchFile } from &#x27;@ffmpeg/ffmpeg&#x27;;&#xA;&#xA;//Create ffmpeg instance and set &#x27;log&#x27; to true so we can see everything&#xA;//it does in the console&#xA;const ffmpeg = createFFmpeg({ log: true });&#xA;&#xA;const AudioEditor = () => {&#xA;    //Setup Global State and get most recent recording&#xA;    const { globalState } = useContext(Context);&#xA;    const { blobURL } = globalState;&#xA;&#xA;    //ready flag for when ffmpeg is loaded&#xA;    const [ready, setReady] = useState(false);&#xA;&#xA;    const [outputFileURL, setOutputFileURL] = useState(&#x27;&#x27;);&#xA;&#xA;    //Load FFmpeg asynchronously and set ready when it&#x27;s ready&#xA;    const load = async () => {&#xA;        await ffmpeg.load();&#xA;        setReady(true);&#xA;    }&#xA;&#xA;    //Use UseEffect to run the &#x27;load&#x27; function on mount&#xA;    useEffect(() => {&#xA;        load();&#xA;    }, []);&#xA;&#xA;    const ffmpegTest = async () => {&#xA;        //must first write file to memory as test.mp3&#xA;        ffmpeg.FS(&#x27;writeFile&#x27;, &#x27;test.mp3&#x27;, await fetchFile(blobURL));&#xA;&#xA;        //Run the FFmpeg command&#xA;        //in this case, trim file size down to 1.5s and save to memory as output.mp3&#xA;        ffmpeg.run(&#x27;-i&#x27;, &#x27;test.mp3&#x27;, &#x27;-t&#x27;, &#x27;1.5&#x27;, &#x27;output.mp3&#x27;);&#xA;&#xA;        //Read the result from memory&#xA;        const data = ffmpeg.FS(&#x27;readFile&#x27;, &#x27;output.mp3&#x27;);&#xA;&#xA;        //Create URL so it can be used in the browser&#xA;        const url = URL.createObjectURL(new Blob([data.buffer], { type: &#x27;audio/mp3&#x27; }));&#xA;        setOutputFileURL(url);&#xA;    }&#xA;&#xA;    return ready ? ( &#xA;        <div>&#xA;            <audiotranscript></audiotranscript>&#xA;            <toolbar></toolbar>&#xA;            <button>&#xA;                Edit&#xA;            </button>&#xA;            {outputFileURL &amp;&amp; &#xA;                &#xA;            }&#xA;        </div>&#xA;    ) : (&#xA;        <div>&#xA;            Loading...&#xA;        </div>&#xA;    )&#xA;}&#xA;&#xA;export default AudioEditor;&#xA;

    &#xA;

    This code returns the following error when I press the edit button to call the ffmpegTest function :&#xA;enter image description here

    &#xA;

    I've experimented, and when I tweak the culprit line of code to :

    &#xA;

    const data = ffmpeg.FS(&#x27;readFile&#x27;, &#x27;test.mp3&#x27;);&#xA;

    &#xA;

    the function runs without error, simply returning the input file. So I assume there must be something wrong with ffmpeg.run() line not storing 'output.mp3' in memory perhaps ? I can't for the life of me figure out what's going on...any help would be appreciated !

    &#xA;

  • Getting this error using ffmpeg concat in ReactNative "concat imposible to open"

    2 février 2021, par Josip Bogdan

    Hy, I am trying to concat multyple video using ffmpeg concat, testing on samsung j76, android version 8.1.0

    &#xA;

    const textFile = await (await writeTextFileWithAllVideoFiles(filePaths))  &#xA;const outputPath = Platform.OS === &#x27;ios&#x27; ? `${RNFS.DocumentDirectoryPath}/video-1.mp4` : `${RNFS.DocumentDirectoryPath}/video-1.mp4`&#xA;console.log(`-f concat -safe 0 -i ${textFile} -c copy ${outputPath}`)&#xA;const result = await RNFFmpeg.execute(`-f concat -safe 0 -i ${textFile} -c copy ${outputPath}`)&#xA;

    &#xA;

    And here is how I create the txt file

    &#xA;

    const writeTextFileWithAllVideoFiles = async (filePaths) => {&#xA;var RNFS = require(&#x27;react-native-fs&#x27;);&#xA;var path = RNFS.DocumentDirectoryPath &#x2B; &#x27;/videoList.txt&#x27;;&#xA;&#xA;var fileContent = &#x27;&#x27;&#xA;console.log("fileplay1");&#xA;filePaths.forEach(path => {&#xA;   fileContent &#x2B;= &#x27;file &#x27; &#x2B; &#x27;\&#x27;&#x27; &#x2B; path.substring(8) &#x2B; &#x27;\&#x27;&#x27; &#x2B; &#x27;\r\n&#x27;&#xA;});&#xA;console.log(fileContent);&#xA;return RNFS.writeFile(path, fileContent, &#x27;utf8&#x27;)&#xA;.then((success) => {&#xA;   console.log(path)&#xA;   if (RNFS.exists(path))&#xA;      console.log(&#x27;FILE WRITTEN!&#x27;)&#xA;   return path&#xA;})&#xA;.catch((err) => {&#xA;    console.log(err.message)&#xA;    return err.message&#xA;});  &#xA;}&#xA;

    &#xA;

    This is my console log output

    &#xA;

    file &#x27;data/user/0/com.videoeditorapp/cache/Camera/f27579d2-1488-4a59-8a9d-7a4e7b6fe716.mp4&#x27;&#xA;file &#x27;data/user/0/com.videoeditorapp/cache/Camera/58130175-bd20-4002-9629-070d0cdd18ac.mp4&#x27;&#xA;&#xA;[Tue Feb 02 2021 16:30:45.375]  LOG      /data/user/0/com.videoeditorapp/files/videoList.txt&#xA;[Tue Feb 02 2021 16:30:45.376]  LOG      FILE WRITTEN!&#xA;[Tue Feb 02 2021 16:30:45.376]  LOG      -f concat -safe 0 -i /data/user/0/com.videoeditorapp/files/videoList.txt -c copy /data/user/0/com.videoeditorapp/files/video-1.mp4&#xA;[Tue Feb 02 2021 16:30:45.376]  LOG      [concat @ 0xe2b22000] Impossible to open &#x27;/data/user/0/com.videoeditorapp/files/data/user/0/com.videoeditorapp/cache/Camera/f27579d2-1488-4a59-8a9d-7a4e7b6fe716.mp4&#x27;&#xA;[Tue Feb 02 2021 16:30:45.377]  LOG      /data/user/0/com.videoeditorapp/files/videoList.txt: No such file or directory&#xA;

    &#xA;

    And the txt file is not on my android device&#xA;My manifest is like this

    &#xA;

    &#xA;  &#xA;      &#xA;&#xA;<application></application>&#xA;

    &#xA;