
Recherche avancée
Médias (2)
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (69)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...)
Sur d’autres sites (6609)
-
How to split video or audio by silent parts
9 février 2021, par TermiTI need to automatically split video of a speech by words, so every word is a separate video file. Do you know any ways to do this ?



My plan was to detect silent parts and use them as words separators. But i didn't find any tool to do this and looks like ffmpeg is not the right tool for that.


-
Evolution #4754 : Mettre à jeu le jeu des icônes de extensions
30 avril 2021Yaru est trop détaillé, trop OS.
Les 3 autres me semblent vraiment bien :
- les couleurs sont franches
- les codes sont universels
- c’est plat mais pas trop :pA titre de test, voici le rendu du fichier .doc (j’ai fait exprès de prendre un format bien propriétaire car cela finit souvent en pièce jointe d’article)
- vince https://github.com/vinceliuice/vimix-icon-theme/blob/master/src/scalable/mimetypes/application-vnd.ms-word.svg
- papirus https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/blob/master/Papirus/64x64/mimetypes/x-office-document.svg
- numix https://github.com/numixproject/numix-icon-theme/blob/master/Numix/64/mimetypes/wps-office-doc.svgmes préférences vont à numix (on voit l’extension doc) ou papirus (carrement l’icône office).
-
How to export a video with a widget overlay in a Flutter app ?
30 juin 2024, par Mohammed BekeleI'm developing a Flutter app for a caption embeding on a video that needs to export a video file after processing it. I'm using the flutter_ffmpeg_kit package. However, I'm having trouble getting the export to work correctly.


Here's the code I'm using :


initially this is my stack


Expanded(
 child: Stack(
 children: [
 Center(
 child: _videoPlayerController.value.isInitialized
 ? AspectRatio(
 aspectRatio:
 _videoPlayerController.value.aspectRatio,
 child: VideoPlayer(_videoPlayerController),
 )
 : CircularProgressIndicator(),
 ),
 if (_currentCaption.isNotEmpty)
 Positioned.fill(
 child: Center(child: _buildCaptionText()),
 ),
 ],
 ),
 ),



and in export button i executed this function


Future<void> _exportVideo() async {
 setState(() {
 _isProcessing = true;
 });

 try {
 final directory = await getExternalStorageDirectory();
 final rootPath = directory?.parent.parent.parent.parent.path;
 final mobixPath = path.join(rootPath!, 'Mobix App');
 final appPath = path.join(mobixPath, 'Caption');
 final outputPath = path.join(appPath, 'Output');

 // Create the directories if they don't exist
 await Directory(outputPath).create(recursive: true);

 final timestamp = DateTime.now().millisecondsSinceEpoch;
 final outputFilePath = path.join(outputPath, 'output-$timestamp.mp4');


 // Generate the FFmpeg command
 final ffmpegCommand = _generateFFmpegCommand(
 widget.videoPath,
 outputFilePath,
 widget.words,
 _fontSize,
 _isBold,
 _isItalic,
 _fontColor,
 _backgroundColor,
 );

 // Execute the FFmpeg command
 await FFmpegKit.execute(
 ffmpegCommand,
 ).then(
 (session) async {
 // Update progress if needed
 final returnCode = await session.getReturnCode();
 if (ReturnCode.isSuccess(returnCode)) {
 setState(() {
 _outputFilePath = outputFilePath;
 });
 ScaffoldMessenger.of(context).showSnackBar(
 SnackBar(content: Text('Export successful: $_outputFilePath')),
 );
 } else {
 print('Export failed with rc: $returnCode');

 ScaffoldMessenger.of(context).showSnackBar(
 SnackBar(content: Text('Export failed with rc: $returnCode')),
 );
 }
 setState(() {
 _isProcessing = false;
 });
 },
 );
 } catch (e) {
 print('Export failed: $e');
 ScaffoldMessenger.of(context).showSnackBar(
 SnackBar(content: Text('Export failed: $e')),
 );
 setState(() {
 _isProcessing = false;
 });
 }
 }

 String _generateFFmpegCommand(
 String inputPath,
 String outputPath,
 List<dynamic> words,
 double fontSize,
 bool isBold,
 bool isItalic,
 Color fontColor,
 Color backgroundColor,
 ) {
 final ffmpegCommand = StringBuffer();

 // Add input file
 ffmpegCommand.write('-i $inputPath ');

 // Add subtitles filter
 final subtitleFilter = StringBuffer();
 for (var word in words) {
 final startTime = word['startTime'].toDouble();
 final endTime = word['endTime'].toDouble();
 final caption = word['word'];

 final fontStyle = isBold && isItalic
 ? 'bold italic'
 : isBold
 ? 'bold'
 : isItalic
 ? 'italic'
 : 'normal';
 final fontColorHex = fontColor.value.toRadixString(16).substring(2);
 final backgroundColorHex =
 backgroundColor.value.toRadixString(16).substring(2);

 subtitleFilter.write(
 "drawtext=text='$caption':x=(w-tw)/2:y=h-(2*lh):fontcolor=$fontColorHex:fontsize=$fontSize:fontStyle=$fontStyle:box=1:boxcolor=$backgroundColorHex@0.5:boxborderw=5:enable='between(t,$startTime,$endTime)',");
 }
 ffmpegCommand.write('-vf "${subtitleFilter.toString()}" ');

 // Add output file
 ffmpegCommand.write('$outputPath');

 return ffmpegCommand.toString();
 }
</dynamic></void>


when i run this it returns ReturnCode 1. what am i doing wrong ?