
Recherche avancée
Autres articles (53)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
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 ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (7442)
-
Anomalie #2819 (Nouveau) : css navigation haute et plugin menus
12 août 2012, par b bSalut, j’ai tenté d’utiliser le plugin Menus avec la dist comme ceci : 1) création d’un menu avec id = barrenav afin qu’il prenne la place de http://zone.spip.org/trac/spip-zone/browser/_core_/plugins/dist/inclure/nav.html => ok le menu s’affiche bien, on peut donc personnaliser la navigation (...)
-
Evolution #4434 : Placement des boutons d’admin
17 février 2020, par RastaPopoulos ♥Je suis assez d’accord avec Équipement, mais attention ça ne résout pas tout magiquement.
Actuellement en absolu, ça gênera forcément pour ci ou pour ça, ça dépend de la maquette des sites. Combien de fois je peste parce qu’une fois connecté, les boutons d’admins me masque le menu de langue, ou le form de recherche, etc.
Dans Drupal c’est comme WP, si on est connecté en admin, c’est une barre en plus qui s’ajoute à priori, donc ça a l’air d’une piste bien réfléchie dans d’autres CMS. Le problème (plus rare) c’est que ça peut péter le fonctionnement public quand on a par ex un entête/menu flottant fixed/sticky. Mais peut-être qu’en positionnant le menu d’admin de SPIP en JS, ça peut péter le moins possible. Faudrait vraiment voir comme c’est fait chez les autres.
-
How can I export a video with a widget overlay in a Flutter app ?
30 juin 2024, par Mohammed BekeleI'm developing a Flutter app for a embedding caption on a videos that need to be export as video file after processing it. I'm utilizing the flutter_ffmpeg_kit package. However, I'm having trouble getting the export to work properly.


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 ?