
Recherche avancée
Médias (1)
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
Autres articles (54)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)
Sur d’autres sites (8489)
-
Révision 20387 : Distinguer le titre ’0’ d’un titre vide (Fil).
29 mars 2013, par esj - -
Anomalie #3407 (Nouveau) : La colonne "extension" est vide concernant certaine url distante
12 mars 2015, par Franck DalotBonjour :-)
SPIP 3.1.0-alpha [21937] (neuf et vierge)
Php 5.6.6
prefix des tables : spipdev25
Installation faite en MySQLSi je vais dans ecrire/ ?exec=documents&ajouter=oui que je clique sur "internet" que je fait un copier/coller d’une adresse youtube comme :
https://youtu.be/_h1N8MDaVXA
Puis, je clique sur "choisir", le doc n’est pas visible sous l’onglet "autres" de la médiathèque
L’unique chose qui montre bien, que le doc est dans la base de données, est que l’onglet "autres" s’affiche "Autres (1)"
Dans la base de données, la colonne "extension" est vide concernant ce doc
Je vois rien dans les logs :-(
L’unique chose qui m’apparait, ce sont trois notices, donc, je doute que que cela soit le problème
Notice : Undefined index : extension in /.../ecrire/inc/distant.php on line 942
Notice : Undefined index : extension in /.../plugins-dist/medias/action/ajouter_documents.php on line 120
Notice : Undefined index : extension in /.../plugins-dist/medias/action/ajouter_documents.php on line 188A savoir que cela me fait pareil, avec l’adresse :
https://www.youtube.com/watch?v=_h1N8MDaVXAMais que cela fonctionne très bien avec cette adresse (même pas de notice) :
http://contrib.spip.net -
ffmpeg.wasm in Angular 19
2 mai, par Yashar TabriziI am developing an Angular app that records videos. Since the videos that come out usually have variable and "wrong" framerates, I want to re-encode them using FFmpeg, particularly ffmpeg.wasm.


I have installed the packages
@ffmpeg/ffmpeg
,@ffmpeg/core
and@ffmpeg/util
and I have written the following workerffmpeg.worker.ts
to do the initialization and to execute the FFmpeg processing :

/// <reference lib="webworker"></reference>
import { FFmpeg } from '@ffmpeg/ffmpeg';
import { toBlobURL } from '@ffmpeg/util';


const baseURL = 'https://unpkg.com/@ffmpeg/core@0.12.10/dist/esm';

const ffmpeg = new FFmpeg();

let isLoaded = false;

(async () => {
 await ffmpeg.load({
 coreURL: await toBlobURL(`${baseURL}/ffmpeg-core.js`, "text/javascript"),
 wasmURL: await toBlobURL(`${baseURL}/ffmpeg-core.wasm`, "application/wasm"),
 });
 isLoaded = true;
 self.postMessage({ type: 'ready' });
})();

self.onmessage = async (e: MessageEvent<arraybuffer>) => {
 if (!isLoaded) {
 self.postMessage({ type: 'error', error: 'FFmpeg not loaded yet!' });
 return;
 }

 if (e.data.byteLength === 0) return;

 try {
 await ffmpeg.writeFile('input', new Uint8Array(e.data));

 await ffmpeg.exec([
 '-i', 'input',
 '-r', '30',
 '-c:v', 'libx264',
 '-preset', 'ultrafast',
 '-pix_fmt', 'yuv420p',
 '-movflags', 'faststart',
 'out.mp4',
 ]);

 const data = await ffmpeg.readFile('out.mp4');
 if (data instanceof Uint8Array) {
 self.postMessage({ type: 'done', file: data.buffer }, [data.buffer]);
 } else {
 self.postMessage({ type: 'error', error: 'Unexpected output from ffmpeg.readFile,' });
 }

 } catch (err) {
 self.postMessage({ type: 'error', error: (err as Error).message });
 } finally {
 await ffmpeg.deleteFile(('input'));
 await ffmpeg.deleteFile(('out.mp4'));
 }
}
</arraybuffer>


I have a service called
cameraService
where I do the recording and where I want to do the re-encoding after the recording has stopped, so I have this method that initializes the FFmpeg process :

private encoder: Worker | null = null;

 private initEncoder() {
 if (this.encoder) return;
 this.encoder = new Worker(
 new URL('../workers/ffmpeg.worker', import.meta.url), // Location of my worker
 { type: 'module' }
 );

 this.encoder.onmessage = (e: MessageEvent) => {
 switch (e.data.type) {
 case 'ready':
 console.log('FFmpeg worker ready.');
 break;

 case 'done':
 this.reEncodedVideo = new Blob([e.data.file], { type: 'video/mp4' });
 this.videoUrlSubject.next(URL.createObjectURL(this.reEncodedVideo));
 console.log('FFmpeg encoding completed.');
 break;
 case 'error':
 console.error('FFmpeg encoding error:', e.data.error);
 break;
 }
 };
 }



However, the loading of FFmpeg won't work, no matter what I do. Hosting the
ffmpeg-core.js
andffmpeg-core.wasm
files doesn't help either. I keep getting this message wheneverffmpeg.load()
is called :

The file does not exist at ".../.angular/cache/19.2.0/mover/vite/deps/worker.js?worker_file&type=module" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to 'optimizeDeps.exclude'.


I know this has something to do with Web Workers and their integration with Vite but has anybody been able to implement ffmpeg.wasm in Angular 19 or is there even any way to achieve this ? If not FFmpeg, are there alternatives to perform re-encoding after recording a video in Angular 19 ?