
Recherche avancée
Médias (1)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
Autres articles (100)
-
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
Sur d’autres sites (11181)
-
Merge pull request #19 from Grandt/3.20
29 décembre 2013, par GrandtMerge pull request #19 from Grandt/3.20
* Fixed : Issue #15, where name space declarations were erroneously stripped off the html tag of added chapters.
* Fixed : An issue, where PNG images exceeding the maximum specified sizes were broken during resizing.
* Fixed : Issue #16, where ePub 3 multimedia needed to be added to the automatic chapter processing.
* Fixed : Potential issue related to Issue #16 with loading large files from external sources, where these might result in memory errors. These will now be loaded into a temp file on the server, before being added to the book.
* Fixed : Issue #17, where a function was called as a global. -
Nothing happens when I am clicking on the create video button nothing happens and it displays the error failed to load ffmpeg
3 août 2024, par shashwat bajpaiSo here is my code in react and ffmpeg and wasm which I used to create a simple video editor to just apply audio on top of the image and convert it into mp3


This is my code :


import React, { useState, useEffect } from 'react';
import { FFmpeg } from '@ffmpeg/ffmpeg';
import { fetchFile, toBlobURL } from '@ffmpeg/util';

function App() {
 const [videosrc, setvideosrc] = useState('');
 const [imgfile, setimgfile] = useState(null);
 const [audiofile, setaudiofile] = useState(null);
 const [ffmpeg, setFfmpeg] = useState(null);
 const [loading, setLoading] = useState(false);
 const [error, setError] = useState(null);

 useEffect(() => {
 const load = async () => {
 try {
 const ffmpegInstance = new FFmpeg();
 ffmpegInstance.on('log', ({ message }) => console.log(message));
 await ffmpegInstance.load({
 coreURL: await toBlobURL(`http://localhost:5173/node_modules/@ffmpeg/core/dist/ffmpeg-core.js`, 'text/javascript'),
 wasmURL: await toBlobURL(`http://localhost:5173/node_modules/@ffmpeg/core/dist/ffmpeg-core.wasm`, 'application/wasm'),
 });
 setFfmpeg(ffmpegInstance);
 console.log('FFmpeg loaded successfully');
 } catch (err) {
 console.error('Failed to load FFmpeg:', err);
 setError('Failed to load FFmpeg');
 }
 };
 load();
 }, []);

 const createVideo = async () => {
 console.log('Create Video button clicked');
 setLoading(true);
 setError(null);

 if (!ffmpeg) {
 console.error('FFmpeg not loaded');
 setError('FFmpeg not loaded');
 setLoading(false);
 return;
 }

 if (!imgfile || !audiofile) {
 console.error('Image or audio file not selected');
 setError('Please select both image and audio files');
 setLoading(false);
 return;
 }

 try {
 console.log('Writing files to MEMFS');
 await ffmpeg.writeFile('image.png', await fetchFile(imgfile));
 await ffmpeg.writeFile('sound.mp3', await fetchFile(audiofile));

 console.log('Running FFmpeg command');
 await ffmpeg.exec([
 "-framerate", "1/10",
 "-i", "image.png",
 "-i", "sound.mp3",
 "-c:v", "libx264",
 "-t", "10",
 "-pix_fmt", "yuv420p",
 "-vf", "scale=1920:1080",
 "test.mp4"
 ]);

 console.log('Reading output file');
 const data = await ffmpeg.readFile('test.mp4');

 console.log('Creating URL for video');
 const url = URL.createObjectURL(new Blob([data.buffer], { type: 'video/mp4' }));
 setvideosrc(url);
 console.log('Video created successfully');
 } catch (err) {
 console.error('Error creating video:', err);
 setError(`Error creating video: ${err.message}`);
 } finally {
 setLoading(false);
 }
 };

 const handlechangeimage = (e) => {
 setimgfile(e.target.files[0]);
 };

 const handlechangesound = (e) => {
 setaudiofile(e.target.files[0]);
 };

 return (
 <div>
 <h1>Image</h1>
 <input type="file" accept="'image/*'" />
 <h1>Audio</h1>
 <input type="file" accept="'audio/*'" />
 <button disabled="{loading}">
 {loading ? 'Creating Video...' : 'Create Video'}
 </button>
 {error && <p style="{{color:">{error}</p>}
 {videosrc && (
 <div>
 <h2>Generated Video:</h2>
 <video controls="controls" src="{videosrc}"></video>
 </div>
 )}
 </div>
 );
}

export default App;



Version which I am using is : "@ffmpeg/ffmpeg" : "^0.12.7",
"@ffmpeg/util" : "^0.12.1",
"@ffmpeg/core" : "^0.12.3",


Is it issue with the version / Blob URL ? How can I run ffmpeg in my system ?


-
arm : Load mb_y properly in mbtree_propagate_list_internal_neon
26 décembre 2016, par Martin Storsjö