
Recherche avancée
Autres articles (104)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
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 (...) -
Sélection de projets utilisant MediaSPIP
29 avril 2011, parLes exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
Ferme MediaSPIP @ Infini
L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)
Sur d’autres sites (11814)
-
Flutter video_compress and then ffmpeg trim video to 30s fails with endless logs
7 mars 2021, par Charles BassI am trying to make a simple app in Flutter. A user can either take or pick a video and then upload it. However, I wanted to compress the video for storage purposes on firebase storage, and also trim it to only get the first 30 seconds.


I am facing a very puzzling problem. I am able to compress the video, but with the resultant file, FFmpeg fails to trim it and I get endless logs which result in me having to stop the app and re-run. Alternatively, I am able to trim the video, but with the resultant file, I am unable to compress it getting the error :
Failed to open file '/data/user/0/live.roots.roots/app_flutter/TRIMMED.mp4'. (No such file or directory) PlatformException(error, java.io.IOException: Failed to instantiate extractor., null, java.lang.RuntimeException: java.io.IOException: Failed to instantiate extractor.


This is my code below :




//! function that controls file compression and trimming
static Future<file> compressFile(File file) async {
 print('[COMPRESSING FILE]');

 String mimeStr = lookupMimeType(file.path);
 var fileType = mimeStr.split('/');

 if (fileType.contains("image")) {
 print('[COMPRESSING FILE] - file is image');
 String tempPath = (await getTemporaryDirectory()).path;
 String targetPath = '$tempPath/${DateTime.now().toIso8601String()}.jpg';
 return await compressImageAndGetFile(file, targetPath);
 } else {
 print('[COMPRESSING FILE] - file is video');

 final compressedVideoFile = await compressVideoAndGetFile(file);
 print('[VIDEO FILE COMPRESSED]');
 return await trimVideoGetFile(compressedVideoFile);
 }
 }
 
 
//! function to compress video
static Future<file> compressVideoAndGetFile(File file) async {
 print('[COMPRESSING VIDEO]');

 var result = await VideoCompress.compressVideo(
 file.absolute.path,
 quality: VideoQuality.DefaultQuality,
 deleteOrigin: true,
 );

 print('[COMPRESSED VIDEO TO]: ${result.file.path}');

 return result.file;
 }
 
//! function to trim video
static Future<file> trimVideoGetFile(File file) async {
 print('[TRIMMING VIDEO]');

 Directory appDocumentDir = await getApplicationDocumentsDirectory();
 String rawDocumentPath = appDocumentDir.path;
 String outputPath = rawDocumentPath + "/TRIMMED.mp4";

 final newFile = File(outputPath);

 if (await newFile.exists()) {
 await newFile.delete();
 }

 _flutterFFmpeg
 .execute(
 "-ss 00:00:00 -i ${file.path} -to 00:00:30 -c copy $outputPath")
 .then((rt) async {
 print('[TRIMMED VIDEO RESULT] : $rt');
 if (rt == -1) {
 throw Exception("Something went wrong when trimming the video");
 }
 });

 return File(outputPath);
 }</file></file></file>







Thank you in advance


-
png : Minor whitespace change and added missing comment
28 mars 2015, par Donny Yang -
avcodec/apng : Remove blending support for AV_PIX_FMT_ARGB
2 juin 2015, par Donny Yang