
Recherche avancée
Médias (2)
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (58)
-
Le profil des utilisateurs
12 avril 2011, parChaque 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, parAccé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, parLa 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 WilanI'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 MemonI'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 'react';
import './App.css';

import { createFFmpeg, fetchFile } from '@ffmpeg/ffmpeg';
const ffmpeg = createFFmpeg({ log: true });

function App() {
 const [ready, setReady] = useState(false);
 const [video, setVideo] = useState();
 const [gif, setGif] = useState();

 const load = async () => {
 await ffmpeg.load();
 setReady(true);
 }

 useEffect(() => {
 load();
 }, [])

 const convertToGif = async () => {
 // Write the file to memory 
 ffmpeg.FS('writeFile', 'test.mp4', await fetchFile(video));

 // Run the FFMpeg command
 await ffmpeg.run('-i', 'test.mp4', '-t', '2.5', '-ss', '2.0', '-f', 'gif', 'out.gif');

 // Read the result
 const data = ffmpeg.FS('readFile', 'out.gif');

 // Create a URL
 const url = URL.createObjectURL(new Blob([data.buffer], { type: 'image/gif' }));
 setGif(url)
 }

 return ready ? (
 
 <div classname="App">
 { video && 

 }


 <input type="file" />> setVideo(e.target.files?.item(0))} />

 <h3>Result</h3>

 <button>Convert</button>

 { gif && <img src="http://stackoverflow.com/feeds/tag/{gif}" width="250" style='max-width: 300px; max-height: 300px' />}

 </div>
 )
 :
 (
 <p>Loading...</p>
 );
}

export default App;



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 :


import React, { useContext, useState, useEffect } from 'react';
import Context from '../../store/Context';
import Toolbar from '../Toolbar/Toolbar';
import AudioTranscript from './AudioTranscript';

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

//Create ffmpeg instance and set 'log' to true so we can see everything
//it does in the console
const ffmpeg = createFFmpeg({ log: true });

const AudioEditor = () => {
 //Setup Global State and get most recent recording
 const { globalState } = useContext(Context);
 const { blobURL } = globalState;

 //ready flag for when ffmpeg is loaded
 const [ready, setReady] = useState(false);

 const [outputFileURL, setOutputFileURL] = useState('');

 //Load FFmpeg asynchronously and set ready when it's ready
 const load = async () => {
 await ffmpeg.load();
 setReady(true);
 }

 //Use UseEffect to run the 'load' function on mount
 useEffect(() => {
 load();
 }, []);

 const ffmpegTest = async () => {
 //must first write file to memory as test.mp3
 ffmpeg.FS('writeFile', 'test.mp3', await fetchFile(blobURL));

 //Run the FFmpeg command
 //in this case, trim file size down to 1.5s and save to memory as output.mp3
 ffmpeg.run('-i', 'test.mp3', '-t', '1.5', 'output.mp3');

 //Read the result from memory
 const data = ffmpeg.FS('readFile', 'output.mp3');

 //Create URL so it can be used in the browser
 const url = URL.createObjectURL(new Blob([data.buffer], { type: 'audio/mp3' }));
 setOutputFileURL(url);
 }

 return ready ? ( 
 <div>
 <audiotranscript></audiotranscript>
 <toolbar></toolbar>
 <button>
 Edit
 </button>
 {outputFileURL && 
 
 }
 </div>
 ) : (
 <div>
 Loading...
 </div>
 )
}

export default AudioEditor;



This code returns the following error when I press the edit button to call the ffmpegTest function :



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


const data = ffmpeg.FS('readFile', 'test.mp3');



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 !


-
Getting this error using ffmpeg concat in ReactNative "concat imposible to open"
2 février 2021, par Josip BogdanHy, I am trying to concat multyple video using ffmpeg concat, testing on samsung j76, android version 8.1.0


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



And here is how I create the txt file


const writeTextFileWithAllVideoFiles = async (filePaths) => {
var RNFS = require('react-native-fs');
var path = RNFS.DocumentDirectoryPath + '/videoList.txt';

var fileContent = ''
console.log("fileplay1");
filePaths.forEach(path => {
 fileContent += 'file ' + '\'' + path.substring(8) + '\'' + '\r\n'
});
console.log(fileContent);
return RNFS.writeFile(path, fileContent, 'utf8')
.then((success) => {
 console.log(path)
 if (RNFS.exists(path))
 console.log('FILE WRITTEN!')
 return path
})
.catch((err) => {
 console.log(err.message)
 return err.message
}); 
}



This is my console log output


file 'data/user/0/com.videoeditorapp/cache/Camera/f27579d2-1488-4a59-8a9d-7a4e7b6fe716.mp4'
file 'data/user/0/com.videoeditorapp/cache/Camera/58130175-bd20-4002-9629-070d0cdd18ac.mp4'

[Tue Feb 02 2021 16:30:45.375] LOG /data/user/0/com.videoeditorapp/files/videoList.txt
[Tue Feb 02 2021 16:30:45.376] LOG FILE WRITTEN!
[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
[Tue Feb 02 2021 16:30:45.376] LOG [concat @ 0xe2b22000] Impossible to open '/data/user/0/com.videoeditorapp/files/data/user/0/com.videoeditorapp/cache/Camera/f27579d2-1488-4a59-8a9d-7a4e7b6fe716.mp4'
[Tue Feb 02 2021 16:30:45.377] LOG /data/user/0/com.videoeditorapp/files/videoList.txt: No such file or directory



And the txt file is not on my android device
My manifest is like this



 
 

<application></application>