
Recherche avancée
Autres articles (74)
-
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 (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
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 (...)
Sur d’autres sites (6730)
-
concatenate audio files with an image
9 juin 2020, par Roman KubivI am trying to concatenate multiple audio files and a single image into one video file using one command.
I have list of mp3 files and a playlist file (.m3u) in a direcotry.



I managed to do this but my solution is bad :



- 

- reading the playlist file and creating a new .txt in the ffmpeg required format
- concatenating the audio files using the .txt into an .mp3
- concatenating the large audio file and the static image into a video









This creates 2 unnecessary files that I have to delete.





I tried a different command



ffmpeg -loop 1 -framerate 1 -i myImage.jpg -i file1.mp3 -i file2.mp3 -i file3.mp3 -filter_complex '[0:0][1:0][2:0]concat=n=3:v=0:a=1' -tune stillimage -shortest output.mp4




however im getting a
Error initializing complex filters.
Invalid argument
error


Another kick in the nuts is that the system im working on has spaces in the folder names.
i tried using -i "concat:file1.mp3|file2.mp3|..." however i cannot use double quote marks to quote out the path so I get an invalid argument error.



Thank you very much for your help.


-
Frozen video clips when concatenating mp4 videos using ffmpeg via nodje.js fluent-ffmpeg
21 novembre 2023, par Rasmus PulsI'm trying to write a simple js application that takes all video files in a directory and the produce one single video consisting of all the clips combined one after another into one timeline.


To test the application I have download for random short stock video clips from pexels :


Shown in order : clip 1, clip 2, clip 3, clip 4


Each of the clips plays perfectly in vlc on windows (no broken or frozen frames)


I use the following script to concat the clips :


const ffmpeg = require('fluent-ffmpeg');

 ffmpeg()
 .input(concatFilePath)
 .inputOptions(['-f concat', '-safe 0'])
 .outputOptions(['-c copy', '-c:v libx264', '-b:v 5M', '-r 30', '-preset', 'slow'])
 .on('end', () => {
 console.log('Video clips concatenated successfully.');
 })
 .on('error', (err) => {
 console.error('Error concatenating video clips:', err);

 // Cleanup: Delete the output folder
 console.log('Cleaning up...');
 deleteOutputFolder(outputDir);
 })
 .save(outputPath);



The contect of my
concatFilePath
(concat.txt) file looks like this :

file src\input\d69de4a3-2b72-462c-be70-f8b8287b45e0\pexels-fred-c-19065853 (Original).mp4
file src\input\d69de4a3-2b72-462c-be70-f8b8287b45e0\pexels-imad-clicks-16270463 (2160p).mp4
file src\input\d69de4a3-2b72-462c-be70-f8b8287b45e0\pexels-peter-fowler-9683061 (2160p).mp4
file src\input\d69de4a3-2b72-462c-be70-f8b8287b45e0\pexels-sascha-5799767 (1080p).mp4



The problem


When I run the program it takes about 15 seconds to render the output video.
The first clip looks as the stock clip, but when I get to the 2nd clip it just sits frozen at the first fram of that video, and only runs for 3-4 seconds despite the stock clip is 8 seconds long. It then transitions into the 3rd clip which is renderd correctly but the rest of the video is frozen on the last frame of clip 3 instead of showing clip 4.


I'm assuming that my input options are to blame for the result of the output, I have tried various other input options suggested from github thread and other sources, but none of them have produces a reasonable result.


-
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 ?