
Recherche avancée
Autres articles (23)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
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 (4695)
-
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.


-
VP8 for Real-time Video Applications
15 février 2011, par noreply@blogger.com (John Luther)With the growing interest in videoconferencing on the web platform, it’s a good time to explore the features of VP8 that make it an exceptionally good codec for real-time applications like videoconferencing.
VP8 Design History & Features
Real-time applications were a primary use case when VP8 was designed. The VP8 encoder has features specifically engineered to overcome the challenges inherent in compressing and transmitting real-time video data.
- Processor-adaptive encoding. 16 encoder complexity levels automatically (or manually) adjust encoder features such as motion search strategy, quantizer optimizations, and loop filtering strength.
- Encoder can be configured to use a target percentage of the host CPU.
Ability to measure the time taken to encode each frame and adjust encoder complexity dynamically to keep the encoding time per frame constant - Robust error recovery (packet retransmission, forward error correction, recovery frame/new keyframe requests)
- Temporal scalability (i.e., a single video bitstream that can degrade as needed depending on a participant’s available bandwidth)
- Highly efficient decoding performance on low-power devices. Conventional video technology has grown to a state of complexity where dedicated hardware chips are needed to make it work well. With VP8, software-based solutions have proven to meet customer needs without requiring specialized hardware.
For a more information about real-time video features in VP8, see the slide presentation by WebM Project engineer Paul Wilkins (PDF file).
Commercially Available Products
Millions of people around the world have been using VP7/8 for video chat for years. VP8 is deployed in some of today’s most popular consumer videoconferencing applications, including Skype (group video calling), Sightspeed, ooVoo and Logitech Vid. All of these vendors are active WebM project supporters. VP8’s predecessor, VP7, has been used in Skype video calling since 2005 and is supported in the new Skype app for iPhone. Other real-time VP8 implementations are coming soon, including ooVoo, and VP8 will play a leading role in Google’s plans for real-time applications on the web platform.
Real-time applications will be extremely important as the web platform matures. The WebM community has made significant improvements in VP8 for real-time use cases since our launch and will continue to do so in the future.
John Luther is Product Manager of the WebM Project.
-
Cutting and rejoining videos causes audio de-synchronization using ffmpeg [closed]
10 décembre 2023, par DonotaloThis is the original post. I'm not getting any answer there so I thought may be the programming community knows the answer.


Main Post


I'm trying to cut a video into pieces and rejoin them using
ffmpeg
on Windows 11 x64. Here's the details offfmpeg
:

ffmpeg version 2023-11-22-git-0008e1c5d5-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
 built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --pkg-config=pkgconf --disable-w32threads
--disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp
--enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt
--enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2
--enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d
--enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx
--enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi
--enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg
--enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc
--enable-dxva2 --enable-d3d11va --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo
--enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt
--enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame
--enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb
--enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite
--enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
 libavutil 58. 32.100 / 58. 32.100
 libavcodec 60. 34.100 / 60. 34.100
 libavformat 60. 17.100 / 60. 17.100
 libavdevice 60. 4.100 / 60. 4.100
 libavfilter 9. 13.100 / 9. 13.100
 libswscale 7. 6.100 / 7. 6.100
 libswresample 4. 13.100 / 4. 13.100
 libpostproc 57. 4.100 / 57. 4.100



I've a video file in MKV format. I've cut it into 3 pieces using the following command :


ffmpeg.exe -ss 0:0:0 -i input.mkv -t 0:54:15 -c:v hevc_amf -b:v 3M -c:s mov_text seg-01.mp4
ffmpeg.exe -ss 0:54:29 -i input.mkv -t 0:35:35 -c:v hevc_amf -b:v 3M -c:s mov_text seg-02.mp4
ffmpeg.exe -ss 1:30:12 -i input.mkv -t 0:4:10 -c:v hevc_amf -b:v 3M -c:s mov_text seg-03.mp4



The audio is copied in all 3 pieces like original. Now I'm joining them using the following command :


ffmpeg.exe -y -f concat -safe 0 -i .\join.txt -c:v hevc_amf -c:a copy -c:s copy -fflags +genpts out.mp4



where,
join.txt
is :

file seg-01.mp4
file seg-02.mp4
file seg-03.mp4



ffmpeg
throws the following warning :

[mp4 @ 000002a5cf9cc040] Non-monotonic DTS in output stream 0:1; previous: 156240896, current: 156240084; changing to 156240897.
This may result in incorrect timestamps in the output file.
[mp4 @ 000002a5cf9cc040] Non-monotonic DTS in output stream 0:1; previous: 258720980, current: 258720462; changing to 258720981.
This may result in incorrect timestamps in the output file.



I've observed that audio is de-synchronized after the places where I cut.


How to keep audio, video and subtitle synchronized after cutting and rejoining the video using
ffmpeg
?