
Recherche avancée
Autres articles (78)
-
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 (...) -
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 (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, 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 (5922)
-
Video file stopping in between due to debugging error in openCV C++ [closed]
24 juin 2022, par Vaibhav KhamesraI am trying to open a video file using openCV in C++ using visual studio but the video is stopping in between prompting a debugging error not sure what to do, I tried some things taking reference from some solutions but none of them is working i.e. switching the runtime library. Here is my code followed by the error message and screenshot of the error.


[ INFO:0@0.005] global c:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\videoio_registry.cpp (223) cv::`anonymous-namespace'::VideoBackendRegistry::VideoBackendRegistry VIDEOIO: Enabled backends(8, sorted by priority): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); MSMF(970); DSHOW(960); CV_IMAGES(950); CV_MJPEG(940); UEYE(930)
[ INFO:0@0.006] global c:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\backend_plugin.cpp (383) cv::impl::getPluginCandidates Found 3 plugin(s) for FFMPEG
[ INFO:0@0.007] global c:\build\master_winpack-build-win64-vc15\opencv\modules\core\src\utils\plugin_loader.impl.hpp (67) cv::plugin::impl::DynamicLib::libraryLoad load D:\opencv\build\bin\opencv_videoio_ffmpeg460_64d.dll => FAILED
[ INFO:0@0.007] global c:\build\master_winpack-build-win64-vc15\opencv\modules\core\src\utils\plugin_loader.impl.hpp (67) cv::plugin::impl::DynamicLib::libraryLoad load opencv_videoio_ffmpeg460_64d.dll => FAILED
[ INFO:0@0.011] global c:\build\master_winpack-build-win64-vc15\opencv\modules\core\src\utils\plugin_loader.impl.hpp (67) cv::plugin::impl::DynamicLib::libraryLoad load opencv_videoio_ffmpeg460_64.dll => OK
[ INFO:0@0.011] global c:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\backend_plugin.cpp (50) cv::impl::PluginBackend::initCaptureAPI Found entry: 'opencv_videoio_capture_plugin_init_v1'
[ INFO:0@0.011] global c:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\backend_plugin.cpp (169) cv::impl::PluginBackend::checkCompatibility Video I/O: initialized 'FFmpeg OpenCV Video I/O Capture plugin': built with OpenCV 4.6 (ABI/API = 1/1), current OpenCV version is '4.6.0' (ABI/API = 1/1)
[ INFO:0@0.012] global c:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\backend_plugin.cpp (69) cv::impl::PluginBackend::initCaptureAPI Video I/O: plugin is ready to use 'FFmpeg OpenCV Video I/O Capture plugin'
[ INFO:0@0.012] global c:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\backend_plugin.cpp (84) cv::impl::PluginBackend::initWriterAPI Found entry: 'opencv_videoio_writer_plugin_init_v1'
[ INFO:0@0.012] global c:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\backend_plugin.cpp (169) cv::impl::PluginBackend::checkCompatibility Video I/O: initialized 'FFmpeg OpenCV Video I/O Writer plugin': built with OpenCV 4.6 (ABI/API = 1/1), current OpenCV version is '4.6.0' (ABI/API = 1/1)
[ INFO:0@0.012] global c:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\backend_plugin.cpp (103) cv::impl::PluginBackend::initWriterAPI Video I/O: plugin is ready to use 'FFmpeg OpenCV Video I/O Writer plugin'
[ INFO:0@0.026] global c:\build\master_winpack-build-win64-vc15\opencv\modules\highgui\src\registry.impl.hpp (114) cv::highgui_backend::UIBackendRegistry::UIBackendRegistry UI: Enabled backends(4, sorted by priority): GTK(1000); GTK3(990); GTK2(980); WIN32(970) + BUILTIN(WIN32UI)
[ INFO:0@0.026] global c:\build\master_winpack-build-win64-vc15\opencv\modules\core\src\utils\plugin_loader.impl.hpp (67) cv::plugin::impl::DynamicLib::libraryLoad load D:\opencv\build\bin\opencv_highgui_gtk460_64.dll => FAILED
[ INFO:0@0.027] global c:\build\master_winpack-build-win64-vc15\opencv\modules\core\src\utils\plugin_loader.impl.hpp (67) cv::plugin::impl::DynamicLib::libraryLoad load opencv_highgui_gtk460_64.dll => FAILED
[ INFO:0@0.027] global c:\build\master_winpack-build-win64-vc15\opencv\modules\core\src\utils\plugin_loader.impl.hpp (67) cv::plugin::impl::DynamicLib::libraryLoad load D:\opencv\build\bin\opencv_highgui_gtk3460_64.dll => FAILED
[ INFO:0@0.027] global c:\build\master_winpack-build-win64-vc15\opencv\modules\core\src\utils\plugin_loader.impl.hpp (67) cv::plugin::impl::DynamicLib::libraryLoad load opencv_highgui_gtk3460_64.dll => FAILED
[ INFO:0@0.028] global c:\build\master_winpack-build-win64-vc15\opencv\modules\core\src\utils\plugin_loader.impl.hpp (67) cv::plugin::impl::DynamicLib::libraryLoad load D:\opencv\build\bin\opencv_highgui_gtk2460_64.dll => FAILED
[ INFO:0@0.028] global c:\build\master_winpack-build-win64-vc15\opencv\modules\core\src\utils\plugin_loader.impl.hpp (67) cv::plugin::impl::DynamicLib::libraryLoad load opencv_highgui_gtk2460_64.dll => FAILED
[ INFO:0@0.028] global c:\build\master_winpack-build-win64-vc15\opencv\modules\highgui\src\backend.cpp (90) cv::highgui_backend::createUIBackend UI: using backend: WIN32 (priority=970)
[ INFO:0@0.029] global c:\build\master_winpack-build-win64-vc15\opencv\modules\highgui\src\window_w32.cpp (3013) cv::impl::Win32BackendUI::createWindow OpenCV/UI: Creating Win32UI window: Image (1)
[ INFO:0@0.048] global c:\build\master_winpack-build-win64-vc15\opencv\modules\core\src\parallel\registry_parallel.impl.hpp (96) cv::parallel::ParallelBackendRegistry::ParallelBackendRegistry core(parallel): Enabled backends(3, sorted by priority): ONETBB(1000); TBB(990); OPENMP(980)
[ INFO:0@0.048] global c:\build\master_winpack-build-win64-vc15\opencv\modules\core\src\utils\plugin_loader.impl.hpp (67) cv::plugin::impl::DynamicLib::libraryLoad load D:\opencv\build\bin\opencv_core_parallel_onetbb460_64d.dll => FAILED
[ INFO:0@0.049] global c:\build\master_winpack-build-win64-vc15\opencv\modules\core\src\utils\plugin_loader.impl.hpp (67) cv::plugin::impl::DynamicLib::libraryLoad load opencv_core_parallel_onetbb460_64d.dll => FAILED
[ INFO:0@0.049] global c:\build\master_winpack-build-win64-vc15\opencv\modules\core\src\utils\plugin_loader.impl.hpp (67) cv::plugin::impl::DynamicLib::libraryLoad load D:\opencv\build\bin\opencv_core_parallel_tbb460_64d.dll => FAILED
[ INFO:0@0.050] global c:\build\master_winpack-build-win64-vc15\opencv\modules\core\src\utils\plugin_loader.impl.hpp (67) cv::plugin::impl::DynamicLib::libraryLoad load opencv_core_parallel_tbb460_64d.dll => FAILED
[ INFO:0@0.050] global c:\build\master_winpack-build-win64-vc15\opencv\modules\core\src\utils\plugin_loader.impl.hpp (67) cv::plugin::impl::DynamicLib::libraryLoad load D:\opencv\build\bin\opencv_core_parallel_openmp460_64d.dll => FAILED
[ INFO:0@0.050] global c:\build\master_winpack-build-win64-vc15\opencv\modules\core\src\utils\plugin_loader.impl.hpp (67) cv::plugin::impl::DynamicLib::libraryLoad load opencv_core_parallel_openmp460_64d.dll => FAILED
OpenCV(4.6.0) Error: Assertion failed (size.width>0 && size.height>0) in cv::imshow, file c:\build\master_winpack-build-win64-vc15\opencv\modules\highgui\src\window.cpp, line 967
OpenCV: terminate handler is called! The last OpenCV error is:
OpenCV(4.6.0) Error: Assertion failed (size.width>0 && size.height>0) in cv::imshow, file c:\build\master_winpack-build-win64-vc15\opencv\modules\highgui\src\window.cpp, line 967



Here is my code :


#include<opencv2></opencv2>imgcodecs.hpp>
#include<opencv2></opencv2>highgui.hpp>
#include<opencv2></opencv2>imgproc.hpp>
#include<opencv2></opencv2>highgui/highgui.hpp>
#include<iostream>
using namespace std;
using namespace cv;

//Video
int main() {
 string path = "Resources/test_video.mp4";
 VideoCapture cap(path);
 Mat img;
 while (true) {
 cap.read(img);
 imshow("Image", img);
 waitKey(1);
 }
 return EXIT_SUCCESS;
}
</iostream>


And the photo of the error message :



-
How can I build a custom version of opencv while enabling CUDA and opengl ? [closed]
10 février, par JoshI have a hard requirement of python3.7 for certain libraries (aeneas & afaligner). I've been using the regular opencv-python and ffmpeg libraries in my program and they've been working find.


Recently I wanted to adjust my program to use h264 instead of mpeg4 and ran down a licensing rabbit hole of how opencv-python uses a build of ffmpeg with opengl codecs off to avoid licensing issues. x264 is apparently opengl, and is disabled in the opencv-python library.


In order to solve this issue, I built a custom build of opencv using another custom build of ffmpeg both with opengl enabled. This allowed me to use the x264 encoder with the VideoWriter in my python program.


Here's the dockerfile of how I've been running it :



FROM python:3.7-slim

# Set optimization flags and number of cores globally
ENV CFLAGS="-O3 -march=native -ffast-math -flto -fno-fat-lto-objects -ffunction-sections -fdata-sections" \
 CXXFLAGS="-O3 -march=native -ffast-math -flto -fno-fat-lto-objects -ffunction-sections -fdata-sections" \
 LDFLAGS="-flto -fno-fat-lto-objects -Wl,--gc-sections" \
 MAKEFLAGS="-j\$(nproc)"

# Combine all system dependencies in a single layer
RUN apt-get update && apt-get install -y --no-install-recommends \
 build-essential \
 cmake \
 git \
 wget \
 unzip \
 yasm \
 pkg-config \
 libsm6 \
 libxext6 \
 libxrender-dev \
 libglib2.0-0 \
 libavcodec-dev \
 libavformat-dev \
 libswscale-dev \
 libavutil-dev \
 libswresample-dev \
 nasm \
 mercurial \
 libnuma-dev \
 espeak \
 libespeak-dev \
 libtiff5-dev \
 libjpeg62-turbo-dev \
 libopenjp2-7-dev \
 zlib1g-dev \
 libfreetype6-dev \
 liblcms2-dev \
 libwebp-dev \
 tcl8.6-dev \
 tk8.6-dev \
 python3-tk \
 libharfbuzz-dev \
 libfribidi-dev \
 libxcb1-dev \
 python3-dev \
 python3-setuptools \
 libsndfile1 \
 libavdevice-dev \
 libavfilter-dev \
 libpostproc-dev \
 && apt-get clean \
 && rm -rf /var/lib/apt/lists/*

# Build x264 with optimizations
RUN cd /tmp && \
 wget https://code.videolan.org/videolan/x264/-/archive/master/x264-master.tar.bz2 && \
 tar xjf x264-master.tar.bz2 && \
 cd x264-master && \
 ./configure \
 --enable-shared \
 --enable-pic \
 --enable-asm \
 --enable-lto \
 --enable-strip \
 --enable-optimizations \
 --bit-depth=8 \
 --disable-avs \
 --disable-swscale \
 --disable-lavf \
 --disable-ffms \
 --disable-gpac \
 --disable-lsmash \
 --extra-cflags="-O3 -march=native -ffast-math -fomit-frame-pointer -flto -fno-fat-lto-objects" \
 --extra-ldflags="-O3 -flto -fno-fat-lto-objects" && \
 make && \
 make install && \
 cd /tmp && \
 # Build FFmpeg with optimizations
 wget https://ffmpeg.org/releases/ffmpeg-7.1.tar.bz2 && \
 tar xjf ffmpeg-7.1.tar.bz2 && \
 cd ffmpeg-7.1 && \
 ./configure \
 --enable-gpl \
 --enable-libx264 \
 --enable-shared \
 --enable-nonfree \
 --enable-pic \
 --enable-asm \
 --enable-optimizations \
 --enable-lto \
 --enable-pthreads \
 --disable-debug \
 --disable-static \
 --disable-doc \
 --disable-ffplay \
 --disable-ffprobe \
 --disable-filters \
 --disable-programs \
 --disable-postproc \
 --extra-cflags="-O3 -march=native -ffast-math -fomit-frame-pointer -flto -fno-fat-lto-objects -ffunction-sections -fdata-sections" \
 --extra-ldflags="-O3 -flto -fno-fat-lto-objects -Wl,--gc-sections" \
 --prefix=/usr/local && \
 make && \
 make install && \
 ldconfig && \
 rm -rf /tmp/*

# Install Python dependencies first
RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \
 pip install --no-cache-dir numpy py-spy

# Build OpenCV with optimized configuration
RUN cd /tmp && \
 # Download specific OpenCV version archives
 wget -O opencv.zip https://github.com/opencv/opencv/archive/4.8.0.zip && \
 wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/4.8.0.zip && \
 unzip opencv.zip && \
 unzip opencv_contrib.zip && \
 mv opencv-4.8.0 opencv && \
 mv opencv_contrib-4.8.0 opencv_contrib && \
 rm opencv.zip opencv_contrib.zip && \
 cd opencv && \
 mkdir build && cd build && \
 cmake \
 -D CMAKE_BUILD_TYPE=RELEASE \
 -D CMAKE_C_FLAGS="-O3 -march=native -ffast-math -flto -fno-fat-lto-objects -ffunction-sections -fdata-sections" \
 -D CMAKE_CXX_FLAGS="-O3 -march=native -ffast-math -flto -fno-fat-lto-objects -ffunction-sections -fdata-sections -Wno-deprecated" \
 -D CMAKE_EXE_LINKER_FLAGS="-flto -fno-fat-lto-objects -Wl,--gc-sections" \
 -D CMAKE_SHARED_LINKER_FLAGS="-flto -fno-fat-lto-objects -Wl,--gc-sections" \
 -D CMAKE_INSTALL_PREFIX=/usr/local \
 -D ENABLE_FAST_MATH=ON \
 -D CPU_BASELINE_DETECT=ON \
 -D CPU_BASELINE=SSE3 \
 -D CPU_DISPATCH=SSE4_1,SSE4_2,AVX,AVX2,AVX512_SKX,FP16 \
 -D WITH_OPENMP=ON \
 -D OPENCV_ENABLE_NONFREE=ON \
 -D WITH_FFMPEG=ON \
 -D FFMPEG_ROOT=/usr/local \
 -D OPENCV_EXTRA_MODULES_PATH=/tmp/opencv_contrib/modules \
 -D PYTHON_EXECUTABLE=/usr/local/bin/python3.7 \
 -D PYTHON3_EXECUTABLE=/usr/local/bin/python3.7 \
 -D PYTHON3_INCLUDE_DIR=/usr/local/include/python3.7m \
 -D PYTHON3_LIBRARY=/usr/local/lib/libpython3.7m.so \
 -D PYTHON3_PACKAGES_PATH=/usr/local/lib/python3.7/site-packages \
 -D PYTHON3_NUMPY_INCLUDE_DIRS=/usr/local/lib/python3.7/site-packages/numpy/core/include \
 -D BUILD_opencv_python3=ON \
 -D INSTALL_PYTHON_EXAMPLES=OFF \
 -D BUILD_TESTS=OFF \
 -D BUILD_PERF_TESTS=OFF \
 -D BUILD_EXAMPLES=OFF \
 -D BUILD_DOCS=OFF \
 -D BUILD_opencv_apps=OFF \
 -D WITH_OPENCL=OFF \
 -D WITH_CUDA=OFF \
 -D WITH_IPP=OFF \
 -D WITH_TBB=OFF \
 -D WITH_V4L=OFF \
 -D WITH_QT=OFF \
 -D WITH_GTK=OFF \
 -D BUILD_LIST=core,imgproc,imgcodecs,videoio,python3 \
 .. && \
 make && \
 make install && \
 ldconfig && \
 rm -rf /tmp/*

# Set working directory and copy application code
WORKDIR /app

COPY requirements.txt .

RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg

RUN pip install --no-cache-dir aeneas afaligner && \
 pip install --no-cache-dir -r requirements.txt

COPY . .

# Make entrypoint executable
RUN chmod +x entrypoint.sh
ENTRYPOINT ["./entrypoint.sh"]



My trouble now, is I've been considering running parts of my program on my GPU, it's creating graphics for a video after all. I have no idea how to edit my Dockerfile to make the opencv build run with CUDA enabled, every combination I try leads to issues.


How can I tell which version of CUDA, opencv and ffmpeg are compatible with python 3.7 ? I've tried so so many combinations and they all lead to different issues, I've asked various AI agents and they all flounder. Where can I find a reliable source of information about this ?


-
ffmpeg for android, out of memory on encoding h264
15 juin 2018, par Rafael LimaI’m getting an weird error when enconding a video with ffmpeg on android
Failed to inject frame into filter network: Out of memory
Althoug is a pretty objective error, I do believe this is some "generic message" for another problem, because the video I used for testing is 17MB and less than 11 seconds length and I’ve sucessfully tested with videos bigger than 200MB and longer than 5min
This problem happens to
any videovertical videos recorded on my phone (the videos were recorded and play fine on my phone but i cant reencode them... other video h264 were encoded fine on same phone)this is ffmpeg output
ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
built with Android (4691093 based on r316199) clang version 6.0.2 (https://android.googlesource.com/toolchain/clang 183abd29fc496f55536e7d904e0abae47888fc7f) (https://android.googlesource.com/toolchain/llvm 34361f192e41ed6e4e8f9aca80a4ea7e9856f327) (based on LLVM 6.0.2svn)
configuration: --prefix=/home/rafa/Desktop/m4/build --target-os=android --arch=i686 --cpu=i686 --cross-prefix=/home/rafa/Desktop/m4/ndk/toolchain/i686/bin/i686-linux-android- --enable-cross-compile --cc=/home/rafa/Desktop/m4/ndk/toolchain/i686/bin/clang --cxx=/home/rafa/Desktop/m4/ndk/toolchain/i686/bin/clang++ --pkg-config=/usr/bin/pkg-config --pkg-config-flags=--static --enable-pic --enable-gpl --enable-nonfree --enable-static --disable-shared --enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-doc --disable-devices --enable-libx264 --enable-libfdk-aac --enable-bsf=aac_adtstoasc --disable-asm
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/data/data/com.tomatedigital.toolsforinstagram/qqq.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2018-06-09T04:28:55.000000Z
location : -08.0638-034.8723/
location-eng : -08.0638-034.8723/
com.android.version: 7.0
Duration: 00:00:09.06, start: 0.000000, bitrate: 17349 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 17088 kb/s, SAR 1:1 DAR 16:9, 30.04 fps, 30 tbr, 90k tbn, 180k tbc (default)
Metadata:
rotate : 90
creation_time : 2018-06-09T04:28:55.000000Z
handler_name : VideoHandle
Side data:
displaymatrix: rotation of -90.00 degrees
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 255 kb/s (default)
Metadata:
creation_time : 2018-06-09T04:28:55.000000Z
handler_name : SoundHandle
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
Error reinitializing filters!
Failed to inject frame into filter network: Out of memory
Error while processing the decoded data for stream #0:0
Conversion failed!=====================UPDATE===================
I re-run the command with
-v 9 -loglevel 99
and got paste the log file at :If someone have real good expertise at ffmpeg i would apreciate very much the help
=====================UPDATE 2=================
I made more tests and the problem happens only when i record the video with my phone at vertical (other videos in vertical work and videos from my phone in horizontal also work)
==================UPDATE 3====================
I detected the problem happens to ANY video with theMetadata:
rotate : 90 (or any value)It was suggested to use
-noautorotate
as workaround and it WORKDED, but this implies in tons of other complications ex :-if i decide to apply any filter to the video, it will be applied to the horizontal version but the video will be played at vertical producing a totally different effect
ex : https://i.stack.imgur.com/R3jXJ.jpg (at this photo the drawtext filter should be placed at bottom line with horizontal text, but as ffmpeg can’t handle the orientation it is missplaced and rotated at runtime producing this vertical message)
-I checked and if I set
-metadata:s:v:0 rotate=
while enconding it has no effect ex :ffmpeg -i input.mp4 -c copy -metadata:s:v:0 rotate= output.mp4
will remove the rotate metadata and produce a non rotated videoBUT
ffmpeg -i input.mp4 -c:v libx264 -metadata:s:v:0 rotate= output.mp4
will keep the metadata and the produced video will be played rotated (this behavior was also noticed on the official ffmpeg 4.0 binaries for windows available at ffmpeg website)I’M STILL LOOKING FOR A BETTER SOLUTION, THANKS FOR THE HELP