
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (31)
-
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
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 (...) -
Emballe Médias : Mettre en ligne simplement des documents
29 octobre 2010, parLe plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...)
Sur d’autres sites (4032)
-
FFmpeg Video Overlay Function Not Working (Flutter)
30 août 2022, par Dennis AshfordI am simply trying to get a watermarked video from the Flutter FFmpeg package and cannot seem to get it to work. For right now, I am downloading the video from Firebase, storing it in cache, overlaying a watermark image using the Flutter
FFmpeg Kit
package. The original video file, image file, and output file are being created properly. However, the overlay function is not working properly. Can someone help me with theFFmpegKit.execute
function string ? I am not seeing any obvious errors in the function, but it isn't working properly. I tried writing as a new File andasBytes
but neither worked.

Edit : I want to take the
originalVideo
and overlay it with thewatermark
image with the expected outcome being a new file that contains the new overlayed video. Not concerned with where the overlay is yet.

Pubspec.yaml


ffmpeg_kit_flutter: ^4.5.1



The function is :


import 'package:ffmpeg_kit_flutter/ffmpeg_kit.dart';

Future<file> waterMarkVideo(String videoPath, String watermarkPath) async {
 //these calls are to load the video into temporary directory
 final response = await http.get(Uri.parse(videoPath));
 final originalVideo = File ('${(await getTemporaryDirectory()).path}/video.mp4');
 await originalVideo.create(recursive: true);
 await originalVideo.writeAsBytes(response.bodyBytes);
 print('video path' + originalVideo.path);

 //this grabs the watermark image from assets and decodes it
 final byteData = await rootBundle.load(watermarkPath);
 final watermark = File('${(await getTemporaryDirectory()).path}/image.png');
 await watermark.create(recursive: true);
 await watermark.writeAsBytes(byteData.buffer.asUint8List(byteData.offsetInBytes, byteData.lengthInBytes));
 print('watermark path' + watermark.path);

 //this creates temporary directory for new watermarked video
 var tempDir = await getTemporaryDirectory();
 final newVideoPath = '${tempDir.path}/${DateTime.now().microsecondsSinceEpoch}result.mp4';
 final videoFile = await File(newVideoPath).create();

//overlaying video using FFmpegkit where I need some help
 await FFmpegKit.executeAsync("-i $originalVideo -i $watermark -filter_complex 'overlay=(W-w)/2:(H-h)/2' $videoFile")
 .then((session) async {
 final state = FFmpegKitConfig.sessionStateToString(await session.getState());
 final returnCode = await session.getReturnCode();
 final failStackTrace = await session.getFailStackTrace();
 final output = await session.getOutput();
 print('FFmpeg process exited with state ${state} and rs ${returnCode}.If failed ${failStackTrace}');
 print('Last output $output');
 } );
 print('new video path' + newVideoPath);
 Uint8List videoByteData = await videoFile.readAsBytes();
 return videoFile.writeAsBytes(videoByteData);
}
</file>


The output for the function above is


flutter: video path/Users/dennisashford/Library/Developer/CoreSimulator/Devices/FBFB4D51-EC31-47DF-8FE0-66B114806EA4/data/Containers/Data/Application/0EA3BB35-D364-4B98-A104-15CDB17AAD54/Library/Caches/video.mp4
flutter: watermark path/Users/dennisashford/Library/Developer/CoreSimulator/Devices/FBFB4D51-EC31-47DF-8FE0-66B114806EA4/data/Containers/Data/Application/0EA3BB35-D364-4B98-A104-15CDB17AAD54/Library/Caches/image.png
ffmpeg version v4.5-dev-3393-g30322ebe3c Copyright (c) 2000-2021 the FFmpeg developers
 built with Apple clang version 13.0.0 (clang-1300.0.29.30)
 configuration: --cross-prefix=x86_64-ios-darwin- --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk --prefix=/Users/taner/Projects/ffmpeg-kit/prebuilt/apple-ios-x86_64/ffmpeg --pkg-config=/opt/homebrew/bin/pkg-config --enable-version3 --arch=x86_64 --cpu=x86_64 --target-os=darwin --disable-neon --disable-asm --ar=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar --cc=clang --cxx=clang++ --as='clang -arch x86_64 -target x86_64-apple-ios12.1-simulator -march=x86-64 -msse4.2 -mpopcnt -m64 -DFFMPEG_KIT_X86_64 -Wno-unused-function -Wno-deprecated-declarations -fstrict-aliasing -DIOS -DFFMPEG_KIT_BUILD_DATE=20220114 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk -O2 -mios-simulator-version-min=12.1 -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/usr/include' --ranlib=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib --strip=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip --nm=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm --extra-ldflags='-mios-simulator-version-min=12.1' --disable-autodetect --enable-cross-compile --enable-pic --enable-inline-asm --enable-optimizations --enable-swscale --enable-shared --disable-static --install-name-dir='@rpath' --enable-pthreads --disable-v4l2-m2m --disable-outdev=v4l2 --disable-outdev=fbdev --disable-indev=v4l2 --disable-indev=fbdev --enable-small --disable-xmm-clobber-test --disable-debug --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-gmp --enable-gnutls --disable-sdl2 --disable-openssl --enable-zlib --enable-audiotoolbox --disable-outdev=audiotoolbox --enable-bzlib --enable-videotoolbox --enable-avfoundation --enable-iconv --disable-coreimage --disable-appkit --disable-opencl --disable-opengl
 libavutil 57. 13.100 / 57. 13.100
 libavcodec 59. 15.102 / 59. 15.102
 libavformat 59. 10.100 / 59. 10.100
 libavdevice 59. 1.100 / 59. 1.100
 libavfilter 8. 21.100 / 8. 21.100
 libswscale 6. 1.102 / 6. 1.102
 libswresample 4. 0.100 / 4. 0.100
File:: Protocol not found
Did you mean file:File:?
flutter: FFmpeg process exited with state RUNNING and rs 1.If failed null
flutter: Last output ffmpeg version v4.5-dev-3393-g30322ebe3c Copyright (c) 2000-2021 the FFmpeg developers
flutter: built with Apple clang version 13.0.0 (clang-1300.0.29.30)
flutter: configuration: --cross-prefix=x86_64-ios-darwin- --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk --prefix=/Users/taner/Projects/ffmpeg-kit/prebuilt/apple-ios-x86_64/ffmpeg --pkg-config=/opt/homebrew/bin/pkg-config --enable-version3 --arch=x86_64 --cpu=x86_64 --target-os=darwin --disable-neon --disable-asm --ar=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar --cc=clang --cxx=clang++ --as='clang -arch x86_64 -target x86_64-apple-ios12.1-simulator -march=x86-64 -msse4.2 -mpopcnt -m64 -DFFMPEG_KIT_X86_64 -Wno-unused-function -Wno-deprecated-declarations -fstrict-aliasing -DIOS -DFFMPEG_KIT_BUILD_DATE=20220114 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk -O2 -mios-simulator-version-min=12.1 -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/usr/include' --ranlib=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib --strip=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip --nm=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm --extra-ldflags='-mios-simulator-version-min=12.1' --disable-autodetect --enable-cross-compile --enable-pic --enable-inline-asm --enable-optimizations --enable-swscale --enable-shared --disable-static --install-name-dir='@rpath' --enable-pthreads --disable-v4l2-m2m --disable-outdev=v4l2 --disable-outdev=fbdev --disable-indev=v4l2 --disable-indev=fbdev --enable-small --disable-xmm-clobber-test --disable-debug --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-gmp --enable-gnutls --disable-sdl2 --disable-openssl --enable-zlib --enable-audiotoolbox --disable-outdev=audiotoolbox --enable-bzlib --enable-videotoolbox --enable-avfoundation --enable-iconv --disable-coreimage --disable-appkit --disable-opencl --disable-opengl
flutter: libavutil 57. 13.100 / 57. 13.100
flutter: libavcodec 59. 15.102 / 59. 15.102
flutter: libavformat 59. 10.100 / 59. 10.100
flutter: libavdevice 59. 1.100 / 59. 1.100
flutter: libavfilter 8. 21.100 / 8. 21.100
flutter: libswscale 6. 1.102 / 6. 1.102
flutter: libswresample 4. 0.100 / 4. 0.100
flutter: File:: Protocol not found
flutter: Did you mean file:File:?
flutter: 
flutter: new video path/Users/dennisashford/Library/Developer/CoreSimulator/Devices/FBFB4D51-EC31-47DF-8FE0-66B114806EA4/data/Containers/Data/Application/0EA3BB35-D364-4B98-A104-15CDB17AAD54/Library/Caches/1661892011213545result.mp4



Update : So I built the code on a physical device and was able to get a little more information for what may be the problem. The error may be coming from


File:: Protocol not found
Did you mean file:File:?



Complete logs from the physical device are given below


flutter: video path/var/mobile/Containers/Data/Application/70EA92CD-DF5D-440E-BBE1-C130BC7F0CC7/Library/Caches/video.mp4
flutter: watermark path/var/mobile/Containers/Data/Application/70EA92CD-DF5D-440E-BBE1-C130BC7F0CC7/Library/Caches/image.png
ffmpeg version v4.5-dev-3393-g30322ebe3c Copyright (c) 2000-2021 the FFmpeg developers
 built with Apple clang version 13.0.0 (clang-1300.0.29.30)
 configuration: --cross-prefix=arm64-ios-darwin- --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk --prefix=/Users/taner/Projects/ffmpeg-kit/prebuilt/apple-ios-arm64/ffmpeg --pkg-config=/opt/homebrew/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8 --target-os=darwin --enable-neon --enable-asm --ar=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar --cc=clang --cxx=clang++ --as='/Users/taner/Projects/ffmpeg-kit/.tmp/gas-preprocessor.pl -arch aarch64 -- clang -arch arm64 -target arm64-apple-ios12.1 -march=armv8-a+crc+crypto -mcpu=generic -DFFMPEG_KIT_ARM64 -Wno-unused-function -Wno-deprecated-declarations -fstrict-aliasing -fembed-bitcode -DIOS -DFFMPEG_KIT_BUILD_DATE=20220114 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk -Oz -miphoneos-version-min=12.1 -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk/usr/include' --ranlib=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib --strip=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip --nm=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm --extra-ldflags='-miphoneos-version-min=12.1' --disable-autodetect --enable-cross-compile --enable-pic --enable-inline-asm --enable-optimizations --enable-swscale --enable-shared --disable-static --install-name-dir='@rpath' --enable-pthreads --disable-v4l2-m2m --disable-outdev=v4l2 --disable-outdev=fbdev --disable-indev=v4l2 --disable-indev=fbdev --enable-small --disable-xmm-clobber-test --disable-debug --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-gmp --enable-gnutls --disable-sdl2 --disable-openssl --enable-zlib --enable-audiotoolbox --disable-outdev=audiotoolbox --enable-bzlib --enable-videotoolbox --enable-avfoundation --enable-iconv --disable-coreimage --disable-appkit --disable-opencl --disable-opengl
 libavutil 57. 13.100 / 57. 13.100
 libavcodec 59. 15.102 / 59. 15.102
 libavformat 59. 10.100 / 59. 10.100
 libavdevice 59. 1.100 / 59. 1.100
 libavfilter 8. 21.100 / 8. 21.100
 libswscale 6. 1.102 / 6. 1.102
 libswresample 4. 0.100 / 4. 0.100
File:: Protocol not found
Did you mean file:File:?
flutter: FFmpeg process exited with state RUNNING and rs 1.If failed null
flutter: Last output ffmpeg version v4.5-dev-3393-g30322ebe3c Copyright (c) 2000-2021 the FFmpeg developers
 built with Apple clang version 13.0.0 (clang-1300.0.29.30)
 configuration: --cross-prefix=arm64-ios-darwin- --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk --prefix=/Users/taner/Projects/ffmpeg-kit/prebuilt/apple-ios-arm64/ffmpeg --pkg-config=/opt/homebrew/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8 --target-os=darwin --enable-neon --enable-asm --ar=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar --cc=clang --cxx=clang++ --as='/Users/taner/Projects/ffmpeg-kit/.tmp/gas-preprocessor.pl -arch aarch64 -- clang -arch arm64 -target arm64-apple-ios12.1 -march=armv8-a+crc+crypto -mcpu=generic -DFFMPEG_KIT_ARM64 -Wno-unused-function -Wno-deprecated-declarations -fstrict-aliasing -fembed-bitcode -DIOS -DFFMPEG_KIT_BUILD_DATE=20220114 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk -Oz -miphoneos-version-min=12.1 -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk/usr/include' --ranlib=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib --strip=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip --nm=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm --extra-ldflags='-miphoneos-version-min=12.1' --disable-autodetect --enable-cross-compile --enable-pic --enable-inline-asm --enable-optimizations --enable-swscale --enable-shared --disable-static --install-name-dir='@rpath' --enable-pthreads --disable-v4l2-m2m --disable-outdev=v4l2 --disable-outdev=fbdev --disable-indev=v4l2 --disable-indev=fbdev --enable-small --disable-xmm-clobber-test --disable-debug --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-gmp --enable-gnutls --disable-sdl2 --disable-openssl --enable-zlib --enable-audiotoolbox --disable-outdev=audiotoolbox --enable-bzlib --enable-videotoolbox --enable-avfoundation --enable-iconv --disable-coreimage --disable-appkit --disable-opencl --disable-opengl
 libavutil 57. 13.100 / 57. 13.100
 libavcodec 59. 15.102 / 59. 15.102
 libavformat 59. 10.100 / 59. 10.100
 libavdevice 59. 1.100 / 59. 1.100
 libavfilter 8. 21.100 / 8. 21.100
 libswscale 6. 1.102 / 6. 1.102
 libswresample 4. 0.100 / 4. 0.100
File:: Protocol not found
Did you mean file:File:?
flutter: new video path/var/mobile/Containers/Data/Application/70EA92CD-DF5D-440E-BBE1-C130BC7F0CC7/Library/Caches/1661891272856433result.mp4



Update #2 after a lot of help from @kesh below, this function was actually able to overlay the image on the video.


await FFmpegKit.executeAsync('-i $videoPath -i ${watermark.path} -filter_complex "overlay=10:10" -y ${videoFile.path}')



-
H264 keyframe issue with RTP
3 septembre 2015, par Mat DePasqualeI’m building an RTP encoder for H264 video. The video data provider doesn’t periodically stream the keyframe in the data, instead they have provided me with a binary file representation of the keyframe. This includes the SPS-PPS-SEI and then 8 slices of the i-frame.
Since I am encoding RTP, I need to rebroadcast this keyframe at 2 second intervals. I am doing that in my code, along with the rest of the data as it comes in. I am using ffmpeg to connect to the RTP data via a UDP socket for display testing.
I am noticing that every 2 seconds, the video seems to blank and resync itself, pixelate, etc. Obviously, this is highly undesirable in the video product. I’ve been trying to debug this for quite some time and the only thing I can determine is that it has to do with the keyframe. If I just send the keyframe once, and then the rest of the data, ffmpeg displays the video fine. But in a network environment, I need to send the keyframe at periodic intervals.
Does anyone have an idea as to why this resyncing of the video happens and most importantly, how to stop it from happening ?
Thanks !
-
FFmpeg native AAC decoder
30 juillet 2015, par Tran ToanI’m working on a commercial C\C++ app on Windows that need to decode AAC. I have looked at this question AAC Codec Library (libFAAC alternative)
From the answer, it seems that FFmpeg has a native LGPL AAC decoder. However, when I looked at FFmpeg home page, I found no information about this decoder or what AAC object type it supports (only information about encoder). I have been searching for this for 2 days but I found almost nothing. So my questions are :- What type of object type does native FFmpeg AAC decoder support or does it even exist ?
- If the above decoder does not exist then is there any alternative free library ? I have also looked at FDK AAC but I don’t understand its license, can I use it for commercial product ?
Please help I’m new to audio codec.