
Recherche avancée
Médias (91)
-
Les Miserables
9 décembre 2019, par
Mis à jour : Décembre 2019
Langue : français
Type : Textuel
-
VideoHandle
8 novembre 2019, par
Mis à jour : Novembre 2019
Langue : français
Type : Video
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
-
Un test - mauritanie
3 avril 2014, par
Mis à jour : Avril 2014
Langue : français
Type : Textuel
-
Pourquoi Obama lit il mes mails ?
4 février 2014, par
Mis à jour : Février 2014
Langue : français
-
IMG 0222
6 octobre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Image
Autres articles (47)
-
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
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 (...)
Sur d’autres sites (8006)
-
Batch script cannot read file if there is a space
25 août 2022, par ShahpariCD "C:\Input"
for %%a in ("*.*") do "C:\ffmpeg.exe" -i %%a -map 0:v -map 0:a:0 -map 0:s -c:v copy -c:a ac3 -b:a 640K "C:\Out\%%~na.mkv"
pause



if there is no space this script works fine, but if there is a space in file name, the script reads only the first word of the file and throws an error. i tried to add a double quote first %%a. but then the script does not even run.


here is an example file name :

[TEST] ABC test - 99


-
How to add a subtitle to a video using ffmpeg in Flutter ?
3 juillet 2024, par Mohammed BekeleI'm using flutter_ffmpeg_kit_full package to add subtitles to my video. First I loop through all words and create an srt file and stored it in temp folder :


Future<string> _createSrtFile() async {
 String filePath = await getSrtOutputFilePath();

 final file = File(filePath);
 final buffer = StringBuffer();

 for (int i = 0; i < widget.words.length; i++) {
 final word = widget.words[i];
 final startTime = _formatSrtTime(word['startTime'].toDouble());
 final endTime = _formatSrtTime(word['endTime'].toDouble());
 final text = word['word'];

 buffer.writeln('${i + 1}');
 buffer.writeln('$startTime --> $endTime');
 buffer.writeln('$text');
 buffer.writeln('');
 }

 await file.writeAsString(buffer.toString());
 return filePath;
 }

 String _formatSrtTime(double seconds) {
 final int hours = seconds ~/ 3600;
 final int minutes = ((seconds % 3600) ~/ 60);
 final int secs = (seconds % 60).toInt();
 final int millis = ((seconds - secs) * 1000).toInt() % 1000;

 return '${hours.toString().padLeft(2, '0')}:${minutes.toString().padLeft(2, '0')}:${secs.toString().padLeft(2, '0')},${millis.toString().padLeft(3, '0')}';
 }
</string>


Then I create a future function to handle the export by using ffmpeg command :


Future<void> _exportVideo() async {
 final hasPermission = await _requestStoragePermission();
 if (!hasPermission) {
 ScaffoldMessenger.of(context).showSnackBar(
 const SnackBar(content: Text('Storage permission denied')));
 return;
 }

 setState(() {
 _isProcessing = true;
 _outputFilePath = "";
 });

 try {
 final srtFilePath = await _createSrtFile();

 String videoPath = widget.videoFile!.path;

 String _outputPath = await getOutputFilePath();

 final command =
 '-i $videoPath -vf "drawtext="text=\'Stack Overflow\':fontcolor=white:fontsize=24:box=1:boxcolor=black@0.5:boxborderw=5:x=(w-text_w)/2:y=(h-text_h)/2"" -codec:a copy $_outputPath';

 // final cmd = [
 // '-i',
 // videoPath,
 // '-preset',
 // 'ultrafast',
 // '-vf',
 // 'subtitles=$srtFilePath:force_style=\'Fontname=Roboto Bold,FontSize=30,MarginV=70,PrimaryColour=ffffff,OutlineColour=000000\'',
 // _outputPath
 // ];
 // FFmpegKit.executeWithArguments(cmd)

 print('Executing FFmpeg command: $command');

 await FFmpegKit.execute(command).then((session) async {
 final returnCode = await session.getReturnCode();
 final output = await session.getOutput();
 final failStackTrace = await session.getFailStackTrace();

 print('FFmpeg Output: $output');
 if (failStackTrace != null) {
 print('FFmpeg Fail StackTrace: $failStackTrace');
 }

 if (ReturnCode.isSuccess(returnCode)) {
 setState(() {
 _outputFilePath = _outputPath;
 });
 ScaffoldMessenger.of(context).showSnackBar(
 const SnackBar(content: Text('Export successful!')));
 } else {
 final logs = await session.getLogsAsString();
 print('FFmpeg Logs: $logs');
 ScaffoldMessenger.of(context)
 .showSnackBar(const SnackBar(content: Text('Export failed!')));
 }
 });
 } catch (e) {
 print('Error: $e');
 ScaffoldMessenger.of(context).showSnackBar(
 SnackBar(content: Text('Export failed with error: $e')));
 } finally {
 setState(() {
 _isProcessing = false;
 });
 }
 }
</void>


I did the export without the subtitles and it works. but the issue is when I try to do it with subtitles. I don't know what fault I'm making but this code is failing to export. Here is the path for the srt and video itself :


Future<string> getOutputFilePath() async {
 final Directory? downloadsDir = await getDownloadsDirectory();
 final timestamp = DateTime.now().millisecondsSinceEpoch;
 final name = "output-$timestamp.avi";
 return '${downloadsDir!.path}/$name'; // Save in downloads folder
 }

 Future<string> getSrtOutputFilePath() async {
 final Directory? downloadsDir = await getDownloadsDirectory();
 final timestamp = DateTime.now().millisecondsSinceEpoch;
 final name = "caption-$timestamp.srt";
 return '${downloadsDir!.path}/$name'; // Save in downloads folder
 }
</string></string>


-
ffmpeg-How to burn subtitles into the video
28 décembre 2013, par user3141070Sir i want to burn subtitles into video.
i use this commandffmpeg -i video.avi -vf subtitles=subtitle.srt out.avi
but nothing is burn on video.
My video is 30 sec.
and my srt file is like this1
00:00:04,700 --> 00:00:06,736
where are you going so early?
2
00:00:06,900 --> 00:00:09,494
Don't record any more messages
on my alarm clock.
3
00:00:09 --> 00:00:11
why not?
4
00:00:11 --> 00:00:13
I'll start to think we're married
or something.
5
00:00:14 --> 00:00:15
Don't ever say that word.
6
00:00:15 --> 00:00:20
I'll never bring you chicken soup
and fuck your brains out again.
7
00:00:20--> 00:00:25
- How's your cold?
- Still there. How about yours?
8
00:00:25 --> 00:00:29
- You definitely took my mind off it.
- Really?so what's the problem ?