
Recherche avancée
Médias (1)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (64)
-
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...) -
MediaSPIP Core : La Configuration
9 novembre 2010, parMediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...) -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (5747)
-
How to Track Website Visitors : Benefits, Tools and FAQs
31 août 2023, par Erin — Analytics Tips, Marketing -
How to save a video on top of it a text widget changes every couple of seconds flutter ?
23 septembre 2023, par abdallah mostafaI've been working on auto subtitle tool for videos but I did not How to save a final video.
should I record the video or get screenshots of all the frames and combine them together to be a video.


I've used FFmpegKit but it's so hard to make the position of the text


Future<void> saveSubtitle(
 {required double leftPosition,
 required double topPosition,
 required double opacityOfBackground,
 required String backgroundColor,
 required String subtitleColor}) async {
 emit(ExportSubtitleLoading());

 String fontDirectoryPath =
 await _exportSubtitle.writeFontToFile('assets/fonts/arial.ttf');
 if (backgroundColor == 'Transparent') {
 opacityOfBackground = 0.0;
 backgroundColor = 'black';
 }
 String subtitleFilter = "";
 for (var subtitle in subtitles!.fotmatedSubtitle!) {
 double startTime = _exportSubtitle.timeToSeconds(subtitle.interval![0]);
 double endTime = _exportSubtitle.timeToSeconds(subtitle.interval![1]);
 String text = subtitle.displayText!.replaceComma;
 int fontSize = controller!.value.aspectRatio > 0.5625 ? 24 * 3 : 24;
 if (countWords(text) > 9 && countWords(text) <= 15) {
 // Add line breaks ("\n") to the text
 text = _exportSubtitle.addLineBreaks(
 text,
 );
 } else {
 text = _exportSubtitle.addLineBreaks(text, true);
 }
 final centeredNumber = text.split('\n');
 // centeredNumber[2].split(' ').logger;
 // return;
 for (var i = 0; i < centeredNumber.length; i++) {
 if (i == 0) {
 if (centeredNumber.length > 1 &&
 centeredNumber[i].split(' ').join().length >
 centeredNumber[i + 1].split(' ').join().length) {
 subtitleFilter +=
 " drawtext=text='${centeredNumber[i]}':enable='between(t,$startTime,$endTime)':x=$leftPosition-30:y=$topPosition:fontsize=$fontSize:fontcolor=$subtitleColor:fontfile=$fontDirectoryPath:box=1:boxcolor=$backgroundColor@$opacityOfBackground,";
 } else {
 subtitleFilter +=
 " drawtext=text='${centeredNumber[i]}':enable='between(t,$startTime,$endTime)':x=$leftPosition+20:y=$topPosition:fontsize=$fontSize:fontcolor=$subtitleColor:fontfile=$fontDirectoryPath:box=1:boxcolor=$backgroundColor@$opacityOfBackground,";
 }
 } else if (i == 1) {
 subtitleFilter +=
 " drawtext=text='${centeredNumber[i]}':enable='between(t,$startTime,$endTime)':x=$leftPosition:y=$topPosition+25:fontsize=$fontSize:fontcolor=$subtitleColor:fontfile=$fontDirectoryPath:box=1:boxcolor=$backgroundColor@$opacityOfBackground,";
 } else {
 if (centeredNumber.length > 1 &&
 centeredNumber[i - 1].split(' ').join().length >
 centeredNumber[i].split(' ').join().length) {
 subtitleFilter +=
 " drawtext=text='${centeredNumber[i]}':enable='between(t,$startTime,$endTime)':x=$leftPosition+text_w/16:y=$topPosition+50:fontsize=$fontSize:fontcolor=$subtitleColor:fontfile=$fontDirectoryPath:box=1:boxcolor=$backgroundColor@$opacityOfBackground,";
 } else {
 subtitleFilter +=
 " drawtext=text='${centeredNumber[i]}':enable='between(t,$startTime,$endTime)':x=$leftPosition-text_w/16:y=$topPosition+50:fontsize=$fontSize:fontcolor=$subtitleColor:fontfile=$fontDirectoryPath:box=1:boxcolor=$backgroundColor@$opacityOfBackground,";
 }
 }
 }

 // subtitleFilter +=
 // " drawtext=text='$text':enable='between(t,$startTime,$endTime)':x=$leftPosition:y=$topPosition:fontsize=24:fontcolor=$subtitleColor:fontfile=$fontDirectoryPath:box=1:boxcolor=$backgroundColor@$opacityOfBackground,";
 }

 final finalFilter = "\"$subtitleFilter\"";
 // final finalFilter =
 // "\"$subtitleFilter split[s1][s2];[s1]crop=w=576:h=1024,scale=576:1024[p];[s2][p]overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2[v]\"";
 final dir = await getTemporaryDirectory();
 String outputPath = '${dir.path}/ex_vid.mp4';
 final arguments = [
 '-y',
 '-i',
 inputFile,
 '-vf',
 finalFilter,
 '-c:v',
 'libx264',
 '-c:a',
 'copy',
 outputPath
 ];
 arguments.join(' ').logger;
 // return;
 // String command =
 // "-y -i $inputFile -vf \" drawtext=text='You know those cat are memes that everybody uses\nin their videos and the TV movie clips that people use.':enable='between(t,0,4.000)':x=(w-text_w)/2:y=(h-text_h)/2:fontsize=24:fontcolor=white:fontfile=$fontDirectoryPath:box=1:boxcolor=$backgroundColor@0.5, drawtext=text='Well, who are the four best free\nwebsites to find a move?':enable='between(t,4.000,6.240)':x=(w-text_w)/2:y=(h-text_h)/2+30:fontsize=24:fontcolor=white:fontfile=$fontDirectoryPath:box=1:boxcolor=$backgroundColor@0.5, split[s1][s2];[s1]crop=w=576:h=1024,scale=576:1024[p];[s2][p]overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2[v]\" -c:v libx264 -c:a copy $outputPath";

 String command =
 "-y -i $inputFile -vf \" drawtext=text='You know those cat are memes that everybody uses\nin their videos and the TV movie clips that people use.':enable='between(t,0,4.000)':x=(w-text_w)/2:y=(h-text_h)/2:fontsize=24:fontcolor=white:fontfile=$fontDirectoryPath:box=1:boxcolor=$backgroundColor@0.5, drawtext=text='Well, who are the four best free\nwebsites to find a move?':enable='between(t,4.000,6.240)':x=$leftPosition:y=$topPosition:fontsize=24:fontcolor=white:fontfile=$fontDirectoryPath:box=1:boxcolor=$backgroundColor@0.5 \" -c:v libx264 -c:a copy $outputPath";

 '================='.logger;
 // FFmpegKitConfig.enableUTF8Charset();
 command.logger;
 await FFmpegKit.execute(arguments.join(' ')).then((session) async {
 final returnCode = await session.getReturnCode();

 if (ReturnCode.isSuccess(returnCode)) {
 ('The Converstion is Success').logger;
 final path = await _exportSubtitle.exportFile(File(outputPath));
 emit(ExportSubtitleSuccess(path));
 } else if (ReturnCode.isCancel(returnCode)) {
 // CANCEL
 ('The Converstion is Cancelled').logger;
 } else {
 emit(ExportSubtitleerror());
 ('The Converstion Have an Error').logger;
 }
 });
 }
</void>


This function, named saveSubtitle. It is responsible for applying subtitle to a video using FFmpeg. Here's a breakdown of what this function does :


It starts by emitting an event to indicate that the subtitle export process is loading.


It obtains the file path of a font (arial.ttf) from assets and stores it in fontDirectoryPath.


It checks if the background color for subtitles is set to "Transparent." If so, it sets the opacityOfBackground to 0.0 and changes the backgroundColor to black.


It initializes an empty subtitleFilter string, which will store FFmpeg filter commands for each subtitle.


It iterates through the subtitles and calculates the start and end time, text, and font size for each subtitle.


For each subtitle, it calculates the position (x and y coordinates) based on the leftPosition and topPosition. It also sets the font color, font file path, and background color with opacity for the subtitle.


It appends the FFmpeg drawtext filter command for each subtitle to the subtitleFilter string.


After processing all subtitles, it wraps the subtitleFilter string in double quotes and prepares to use it as an argument for the FFmpeg command.


It specifies the output path for the video with subtitles.


It constructs the FFmpeg command using various arguments, including the input video file, the subtitle filter, video and audio codecs, and the output path.


It executes the FFmpeg command using FFmpegKit and waits for the conversion process to complete.


Once the conversion is finished, it checks the return code to determine if it was successful. If successful, it emits a success event with the path to the exported video with subtitles. If canceled or if an error occurred, it emits corresponding events to indicate the status.


In summary, this function is used to add subtitles to a video by overlaying text on specific positions and with specified styles. It utilizes FFmpeg for video processing and emits events to notify the application about the export status.


-
Virginia Consumer Data Protection Act (VCDPA) Guide
27 septembre 2023, par Erin — Privacy