
Recherche avancée
Autres articles (44)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (10004)
-
pyinstaller and moviepy, ffmpeg works from terminal but not from finder
12 novembre 2014, par ToddI am packaging python using pyinstaller 2.1 on OSX Mavericks. I have done this successfully in the past, but this is my first package that uses moviepy and ffmpeg. I use the following import :
from moviepy.video.io import ffmpeg_reader
Without this line in the code, everything works fine and I can launch my final package from its icon in finder. With the moviepy import, it will work if I launch from the terminal like this :
open ./myapp.app
but it will not open if I click on the icon from finder (opens quickly and crashes). I am assuming this has something to do with paths or environment variables that are set in terminal, but are not transferred to my packaged app. I have tried various hidden imports in pyinstaller for moviepy and its dependencies, but nothing seems to work. —debug mode hasn’t provided much info to track it down. Any other ideas ?
Thanks !
-
Flutter FFMPEG : The BackgroundIsolateBinaryMessenger.instance value is invalid until BackgroundIsolateBinaryMessenger.ensureInitialized is executed
25 juin 2023, par DannyHey guys I have a function that uses
ffmpeg
to convert images togifs
. I am using the simple compute function provided by flutter, but I am getting this error.



I/flutter (12889) : Loading ffmpeg-kit-flutter. E/flutter (12889) :
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled
Exception : Bad state : The BackgroundIsolateBinaryMessenger.instance
value is invalid until
BackgroundIsolateBinaryMessenger.ensureInitialized is executed.
E/flutter (12889) : #0 BackgroundIsolateBinaryMessenger.instance




Logs :




I/flutter (12889) : Loading ffmpeg-kit-flutter. E/flutter (12889) :
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled
Exception : Bad state : The BackgroundIsolateBinaryMessenger.instance
value is invalid until
BackgroundIsolateBinaryMessenger.ensureInitialized is executed.
E/flutter (12889) : #0 BackgroundIsolateBinaryMessenger.instance
(package:flutter/src/services/_background_isolate_binary_messenger_io.dart:27:7)
E/flutter (12889) : #1 _findBinaryMessenger
(package:flutter/src/services/platform_channel.dart:135:42) E/flutter
(12889) : #2 EventChannel.binaryMessenger
(package:flutter/src/services/platform_channel.dart:619:27) E/flutter
(12889) : #3 EventChannel.receiveBroadcastStream. (package:flutter/src/services/platform_channel.dart:639:7)
E/flutter (12889) : #4 _runGuarded
(dart:async/stream_controller.dart:815:24) E/flutter (12889) : #5

_BroadcastStreamController._subscribe (dart:async/broadcast_stream_controller.dart:207:7) E/flutter (12889) :
#6 _ControllerStream._createSubscription (dart:async/stream_controller.dart:828:19) E/flutter (12889) : #7

_StreamImpl.listen (dart:async/stream_impl.dart:471:9) E/flutter (12889) : #8 FFmpegKitInitializer._initialize
(package:ffmpeg_kit_flutter_min_gpl/src/ffmpeg_kit_flutter_initializer.dart:311:44)
E/flutter (12889) : #9 FFmpegKitInitializer.initialize
(package:ffmpeg_kit_flutter_min_gpl/src/ffmpeg_kit_flutter_initializer.dart:54:23)
E/flutter (12889) : #10 FFmpegKitConfig.init
(package:ffmpeg_kit_flutter_min_gpl/ffmpeg_kit_config.dart:50:32)
E/flutter (12889) : #11 AbstractSession.createFFmpegSession
(package:ffmpeg_kit_flutter_min_gpl/abstract_session.dart:69:29)
E/flutter (12889) : #12 FFmpegSession.create
(package:ffmpeg_kit_flutter_min_gpl/ffmpeg_session.dart:40:43)
E/flutter (12889) : #13 FFmpegKit.executeWithArguments
(package:ffmpeg_kit_flutter_min_gpl/ffmpeg_kit.dart:44:29) E/flutter
(12889) : #14 FFmpegKit.execute
(package:ffmpeg_kit_flutter_min_gpl/ffmpeg_kit.dart:38:17) E/flutter
(12889) : #15 _shareMoments
(package:carefour/presentation/maker/create_function.dart:217:19)
E/flutter (12889) : #16 compute.
(package:flutter/src/foundation/_isolates_io.dart:19:20) E/flutter
(12889) : #17 _RemoteRunner._run (dart:isolate:1021:47) E/flutter
(12889) : #18 _RemoteRunner._remoteExecute (dart:isolate:1015:12)
E/flutter (12889) : #19 _delayEntrypointInvocation. (dart:isolate-patch/isolate_patch.dart:299:17) E/flutter
(12889) : #20 _RawReceivePort._handleMessage
(dart:isolate-patch/isolate_patch.dart:189:12)



This is the code :


Future<bool> shareMoments(ComputeMomentModel data) async {
 File? imgFile;
 File? paletteFile;
 var uuid = const Uuid();
 String newUuid = uuid.v4();
 String finalImagePath = "momentGif-$newUuid.gif";
 String paletteFileName= "momentPalette-$newUuid.png";
 File? finalImage;
 finalImage = null;

 await FFmpegKit.execute('-i ${data.directoryPath}/image%d.png -vf palettegen ${data.directoryPath}/$paletteFileName').then((session) async {
 final returnCode = await session.getReturnCode();

 if (ReturnCode.isSuccess(returnCode)) {
 paletteFile = File("${data.directoryPath}/$paletteFileName");

 await FFmpegKit.execute('-f image2 -y -r 8 -i ${data.directoryPath}/image%d.png -i ${paletteFile?.path} -filter_complex fps=8,scale=720:-1:flags=lanczos,split[s0][s1];[s0]palettegen=max_colors=32[p];[s1][p]paletteuse=dither=bayer ${data.directoryPath}/$finalImagePath').then((session) async {
 final returnCode = await session.getReturnCode();
 if (ReturnCode.isSuccess(returnCode)) {
 finalImage = File("${data.directoryPath}/$finalImagePath");
 }
 });

 } else {
 debugPrint("Failed");
 }
 });

 // Below block to clear the cache - else ffmpeg keeps on creating the first one
 int i = 0;
 for (i = 0; i<24; i++) {
 imgFile = File('${data.directoryPath}/image$i.png');
 imgFile.delete(recursive: true);
 }

 // —> Calling Backend API

 return true;

}
</bool>


compute function


Future<bool> computeShareMoments({required String directoryPath}) async {
 ComputeCreateMomentModel data = ComputeMomentModel(null, directoryPath);
 return await compute(shareMoments, data);

}
</bool>


Can anyone help with a solution ? I am stuck for a while now. Thanks in advance.


-
Ffmpeg Windows split 1 video to chunks with random length (no re-encode)
24 janvier 2021, par Anna LoneI have 1 big video file and I need to split it to random length chunks without re-encode.


For example chunks from 130 to 240 seconds.


For windows ffmpeg


Tried this and. Nothing in output folder.


$ times=$(ruby -e 's=[]; d=0; while d < 150 do t=rand(15..50); s << (d+t); d=d+t end; puts s.join(",")')
$ echo $times
15,53,96,124,168
$ ffmpeg -i lutherceleb.mp4 -f segment -segment_times $times -c copy -reset_timestamps 1 -map 0 OUTPUT%d.mp4