Recherche avancée

Médias (91)

Autres articles (71)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (9043)

  • OpenCV 3.4.3 - GStream not called when VideoWriting

    14 décembre 2018, par taubhi

    I’d like to succeed writing a file with OpenCV encoding with GStreamer.

    Thus I’m using the code :

    VideoWriter.open("appsrc ! autovideoconvert ! omxh264enc ! matroskamux ! filesink location=test2.mkv sync=false",
    //cv::CAP_GSTREAMER, //set or not, I get the same problem
    0, (double)25, //fourcc, fps
    cv::Size(1024, 1024),
    true);

    And my problem :

    A video file called appsrc ! autovideoconvert ! omxh264enc ! matroskamux ! filesink location=test2.mkv sync=false is created (rather than test2.mkv), and it is empty. The same problem is corrected and seems to work in the following thread, without any effect for me : Opening a GStreamer pipeline from OpenCV with VideoWriter

    I tried, without success :

    • Add quotes to the file name test2 :
      "appsrc ! autovideoconvert ! omxh264enc ! matroskamux ! filesink location=\"test2.mkv\" sync=false" neither
    • Encode with different format : .flv rather than .mkv
    • Encode with different codec : omxh265enc rather than omxh264en

    I checked :

    • That GStreamer is well compiled with OpenCV ; the CMake of the OpenCV project outputs :

      Video I/O:Video for Windows : YES
      DC1394 : NO
      FFMPEG : YES (prebuilt binaries)
      avcodec : YES (ver 57.107.100)
      avformat : YES (ver 57.83.100)
      avutil : YES (ver 55.78.100)
      swscale : YES (ver 4.8.100)
      avresample : YES (ver 3.7.0)
      GStreamer :

      base : YES (ver 1.0)

      video : YES (ver 1.0)

      app : YES (ver 1.0)

      riff : YES (ver 1.0)

      pbutils : YES (ver 1.0)

      DirectShow : YES

      Media Foundation : YES

    • That FFMpeg is installed on my computer ; for this I used VLC :

      File -> Stream -> Add a file then stream
      New destination : RTP/MPEG Transport Stream
      Profile : Video - H.264 + MP3 (MP4)
      Then no error happens ; Note : an error occured with Video - H.265 + MP3
      (MP4), but I’m using omxh264enc in my code, not 265

    I’m struggled :/ Do you have any idea ?
    Thanks a lot :)

    Have a good day,

    Thibaut

    PS - Complete OpenCV CMake output :

    Selecting Windows SDK version 10.0.17134.0 to target Windows 10.0.17763.
    AVX_512F is not supported by C++ compiler

    AVX512_SKX is not supported by C++ compiler

    Dispatch optimization AVX512_SKX is not available, skipped

    libjpeg-turbo: VERSION = 1.5.3, BUILD = opencv-3.4.3-libjpeg-turbo

    Looking for Mfapi.h

    Looking for Mfapi.h - found

    found Intel IPP (ICV version): 2017.0.3 [2017.0.3]

    at: E:/OpenCV/3.4.3/build-cuda92-gstreamer/3rdparty/ippicv/ippicv_win

    found Intel IPP IW sources: 2017.0.3

    at: E:/OpenCV/3.4.3/build-cuda92-gstreamer/3rdparty/ippicv/ippiw_win

    CUDA detected: 9.2

    CUDA NVCC target flags: -gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_52,code=sm_52;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-D_FORCE_INLINES

    Found apache ant: C:/NVPACK/apache-ant-1.8.2/bin/ant.bat (1.8.2)

    Could NOT find Matlab (missing: MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN)

    VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file

    Caffe: NO

    Protobuf: NO

    Glog: YES

    freetype2: NO

    harfbuzz: NO

    Module opencv_ovis disabled because OGRE3D was not found

    No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.

    Found installed version of gflags: E:/Git/gflags/BUILD-VS2015

    Detected gflags version: 2.2.1

    Checking SFM deps... FALSE

    Module opencv_sfm disabled because the following dependencies are not found: Eigen Glog/Gflags

    Excluding from source files list: <build>/modules/dnn/layers/layers_common.avx512_skx.cpp

    Tesseract: NO


    General configuration for OpenCV 3.4.3 =====================================

    Version control: unknown


    Extra modules:

    Location (extra): E:/OpenCV/3.4.3/opencv_contrib-3.4.3/modules

    Version control (extra): unknown


    Platform:

    Timestamp: 2018-11-07T16:57:18Z

    Host: Windows 10.0.17763 AMD64

    CMake: 3.12.0-rc2

    CMake generator: Visual Studio 14 2015 Win64

    CMake build tool: C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe

    MSVC: 1900


    CPU/HW features:

    Baseline: SSE SSE2 SSE3

    requested: SSE3

    Dispatched code generation: SSE4_1 SSE4_2 FP16 AVX AVX2

    requested: SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX

    SSE4_1 (5 files): + SSSE3 SSE4_1

    SSE4_2 (2 files): + SSSE3 SSE4_1 POPCNT SSE4_2

    FP16 (2 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX

    AVX (6 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX

    AVX2 (11 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2


    C/C++:

    Built as dynamic libs?: YES

    C++11: YES

    C++ Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe (ver 19.0.24215.1)

    C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP16 /MD /O2 /Ob2 /DNDEBUG

    C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP16 /MDd /Zi /Ob0 /Od /RTC1

    C Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe

    C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /MP16 /MD /O2 /Ob2 /DNDEBUG

    C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /MP16 /MDd /Zi /Ob0 /Od /RTC1

    Linker flags (Release): /machine:x64 /INCREMENTAL:NO

    Linker flags (Debug): /machine:x64 /debug /INCREMENTAL

    ccache: NO

    Precompiled headers: YES

    Extra dependencies: cudart.lib nppc.lib nppial.lib nppicc.lib nppicom.lib nppidei.lib nppif.lib nppig.lib nppim.lib nppist.lib nppisu.lib nppitc.lib npps.lib cublas.lib cufft.lib -LIBPATH:C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.2/lib/x64

    3rdparty dependencies:


    OpenCV modules:

    To be built: aruco bgsegm bioinspired calib3d ccalib core cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev datasets dnn dnn_objdetect dpm face features2d flann fuzzy hfs highgui img_hash imgcodecs imgproc java java_bindings_generator line_descriptor ml objdetect optflow phase_unwrapping photo plot python_bindings_generator reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab xfeatures2d ximgproc xobjdetect xphoto

    Disabled: js world

    Disabled by dependency: -

    Unavailable: cnn_3dobj cvv freetype hdf matlab ovis python2 python3 sfm viz

    Applications: tests perf_tests apps

    Documentation: NO

    Non-free algorithms: NO


    Windows RT support: NO


    GUI:

    Win32 UI: YES

    VTK support: NO


    Media I/O:

    ZLib: build (ver 1.2.11)

    JPEG: build-libjpeg-turbo (ver 1.5.3-62)

    WEBP: build (ver encoder: 0x020e)

    PNG: build (ver 1.6.34)

    TIFF: build (ver 42 - 4.0.9)

    JPEG 2000: build (ver 1.900.1)

    OpenEXR: build (ver 1.7.1)

    HDR: YES

    SUNRASTER: YES

    PXM: YES


    Video I/O:

    Video for Windows: YES

    DC1394: NO

    FFMPEG: YES (prebuilt binaries)

    avcodec: YES (ver 57.107.100)

    avformat: YES (ver 57.83.100)

    avutil: YES (ver 55.78.100)

    swscale: YES (ver 4.8.100)

    avresample: YES (ver 3.7.0)

    GStreamer:

    base: YES (ver 1.0)

    video: YES (ver 1.0)

    app: YES (ver 1.0)

    riff: YES (ver 1.0)

    pbutils: YES (ver 1.0)

    DirectShow: YES

    Media Foundation: YES


    Parallel framework: Concurrency


    Trace: YES (with Intel ITT)


    Other third-party libraries:

    Intel IPP: 2017.0.3 [2017.0.3]

    at: E:/OpenCV/3.4.3/build-cuda92-gstreamer/3rdparty/ippicv/ippicv_win

    Intel IPP IW: sources (2017.0.3)

    at: E:/OpenCV/3.4.3/build-cuda92-gstreamer/3rdparty/ippicv/ippiw_win

    Custom HAL: NO

    Protobuf: build (3.5.1)


    NVIDIA CUDA: YES (ver 9.2, CUFFT CUBLAS NVCUVID)

    NVIDIA GPU arch: 30 35 37 50 52 60 61 70

    NVIDIA PTX archs:


    OpenCL: YES (no extra features)

    Include path: E:/OpenCV/3.4.3/opencv-3.4.3/3rdparty/include/opencl/1.2

    Link libraries: Dynamic load


    Python (for build): C:/ProgramData/Miniconda3/python.exe


    Java:

    ant: C:/NVPACK/apache-ant-1.8.2/bin/ant.bat (ver 1.8.2)

    JNI: C:/NVPACK/jdk1.8.0_77/include C:/NVPACK/jdk1.8.0_77/include/win32 C:/NVPACK/jdk1.8.0_77/include

    Java wrappers: YES

    Java tests: YES


    Matlab: NO


    Install to: E:/OpenCV/3.4.3/build/install

    -----------------------------------------------------------------


    Configuring done
    </build>
  • FFMPEG Link error

    30 novembre 2014, par Thomas

    I’m trying to compile a modified version of this transcoding example from the FFMPEG site, I’ve used all the required includes and joined the libs using this :

    INCLUDEPATH += $$(FFMPEG_DEV_PATH)\include
       LIBS += -L$$(FFMPEG_DEV_PATH)\lib -lavformat -lavcodec -lavutil -lswscale -liconv -lz -lavfilter

    but I get this linking error that I can’t understand :

     "avio_close(AVIOContext*)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "av_strerror(int, char*, unsigned long)", referenced from:
         av_make_error_string(char*, unsigned long, int) in PhVideoEncoder.o
     "av_rescale_q(long long, AVRational, AVRational)", referenced from:
         PhVideoEncoder::encode_write_frame(AVFrame*, unsigned int, int*) in PhVideoEncoder.o
     "av_frame_free(AVFrame**)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
         PhVideoEncoder::filter_encode_write_frame(AVFrame*, unsigned int) in PhVideoEncoder.o
         PhVideoEncoder::encode_write_frame(AVFrame*, unsigned int, int*) in PhVideoEncoder.o
     "av_read_frame(AVFormatContext*, AVPacket*)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "avcodec_close(AVCodecContext*)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "avcodec_open2(AVCodecContext*, AVCodec const*, AVDictionary**)", referenced from:
         PhVideoEncoder::open_input_file(char const*) in PhVideoEncoder.o
         PhVideoEncoder::open_output_file(char const*) in PhVideoEncoder.o
     "av_dump_format(AVFormatContext*, int, char const*, int)", referenced from:
         PhVideoEncoder::open_input_file(char const*) in PhVideoEncoder.o
         PhVideoEncoder::open_output_file(char const*) in PhVideoEncoder.o
     "av_frame_alloc()", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
         PhVideoEncoder::filter_encode_write_frame(AVFrame*, unsigned int) in PhVideoEncoder.o
     "av_free_packet(AVPacket*)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "av_init_packet(AVPacket*)", referenced from:
         PhVideoEncoder::encode_write_frame(AVFrame*, unsigned int, int*) in PhVideoEncoder.o
     "av_opt_set_bin(void*, char const*, unsigned char const*, int, int)", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "av_register_all()", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "av_rescale_q_rnd(long long, AVRational, AVRational, AVRounding)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
         PhVideoEncoder::encode_write_frame(AVFrame*, unsigned int, int*) in PhVideoEncoder.o
     "av_write_trailer(AVFormatContext*)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "avfilter_graph_free(AVFilterGraph**)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "avfilter_inout_free(AVFilterInOut**)", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "avformat_new_stream(AVFormatContext*, AVCodec const*)", referenced from:
         PhVideoEncoder::open_output_file(char const*) in PhVideoEncoder.o
     "avformat_open_input(AVFormatContext**, char const*, AVInputFormat*, AVDictionary**)", referenced from:
         PhVideoEncoder::open_input_file(char const*) in PhVideoEncoder.o
     "avcodec_copy_context(AVCodecContext*, AVCodecContext const*)", referenced from:
         PhVideoEncoder::open_output_file(char const*) in PhVideoEncoder.o
     "avcodec_find_decoder(AVCodecID)", referenced from:
         PhVideoEncoder::open_input_file(char const*) in PhVideoEncoder.o
     "avcodec_find_encoder(AVCodecID)", referenced from:
         PhVideoEncoder::open_output_file(char const*) in PhVideoEncoder.o
     "avfilter_get_by_name(char const*)", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "avfilter_graph_alloc()", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "avfilter_inout_alloc()", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "avformat_close_input(AVFormatContext**)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "avcodec_decode_audio4(AVCodecContext*, AVFrame*, int*, AVPacket const*)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "avcodec_decode_video2(AVCodecContext*, AVFrame*, int*, AVPacket const*)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "avcodec_encode_audio2(AVCodecContext*, AVPacket*, AVFrame const*, int*)", referenced from:
         PhVideoEncoder::encode_write_frame(AVFrame*, unsigned int, int*) in PhVideoEncoder.o
     "avcodec_encode_video2(AVCodecContext*, AVPacket*, AVFrame const*, int*)", referenced from:
         PhVideoEncoder::encode_write_frame(AVFrame*, unsigned int, int*) in PhVideoEncoder.o
     "avfilter_graph_config(AVFilterGraph*, void*)", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "avfilter_register_all()", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "avformat_free_context(AVFormatContext*)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "avformat_write_header(AVFormatContext*, AVDictionary**)", referenced from:
         PhVideoEncoder::open_output_file(char const*) in PhVideoEncoder.o
     "av_get_sample_fmt_name(AVSampleFormat)", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "av_buffersink_get_frame(AVFilterContext*, AVFrame*)", referenced from:
         PhVideoEncoder::filter_encode_write_frame(AVFrame*, unsigned int) in PhVideoEncoder.o
     "avfilter_graph_parse_ptr(AVFilterGraph*, char const*, AVFilterInOut**, AVFilterInOut**, void*)", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "avformat_find_stream_info(AVFormatContext*, AVDictionary**)", referenced from:
         PhVideoEncoder::open_input_file(char const*) in PhVideoEncoder.o
     "av_interleaved_write_frame(AVFormatContext*, AVPacket*)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
         PhVideoEncoder::encode_write_frame(AVFrame*, unsigned int, int*) in PhVideoEncoder.o
     "av_buffersrc_add_frame_flags(AVFilterContext*, AVFrame*, int)", referenced from:
         PhVideoEncoder::filter_encode_write_frame(AVFrame*, unsigned int) in PhVideoEncoder.o
     "avfilter_graph_create_filter(AVFilterContext**, AVFilter const*, char const*, char const*, void*, AVFilterGraph*)", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "av_get_default_channel_layout(int)", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "avformat_alloc_output_context2(AVFormatContext**, AVOutputFormat*, char const*, char const*)", referenced from:
         PhVideoEncoder::open_output_file(char const*) in PhVideoEncoder.o
     "av_get_channel_layout_nb_channels(unsigned long long)", referenced from:
         PhVideoEncoder::open_output_file(char const*) in PhVideoEncoder.o
     "av_frame_get_best_effort_timestamp(AVFrame const*)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "av_log(void*, int, char const*, ...)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
         PhVideoEncoder::filter_encode_write_frame(AVFrame*, unsigned int) in PhVideoEncoder.o
         PhVideoEncoder::flush_encoder(unsigned int) in PhVideoEncoder.o
         PhVideoEncoder::open_input_file(char const*) in PhVideoEncoder.o
         PhVideoEncoder::open_output_file(char const*) in PhVideoEncoder.o
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
         PhVideoEncoder::encode_write_frame(AVFrame*, unsigned int, int*) in PhVideoEncoder.o
         ...
     "av_free(void*)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "av_malloc(unsigned long)", referenced from:
         av_malloc_array(unsigned long, unsigned long) in PhVideoEncoder.o
     "av_strdup(char const*)", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "avio_open(AVIOContext**, char const*, int)", referenced from:
         PhVideoEncoder::open_output_file(char const*) in PhVideoEncoder.o

    I tried looking for missing libraries but with no luck... What am I missing ?

    EDIT

    Thanks to the first answer, I added the extern C stuff but I still face a few errors :

    Undefined symbols for architecture x86_64:
     "_av_buffersink_get_frame", referenced from:
         PhVideoEncoder::filter_encode_write_frame(AVFrame*, unsigned int) in PhVideoEncoder.o
     "_av_buffersrc_add_frame_flags", referenced from:
         PhVideoEncoder::filter_encode_write_frame(AVFrame*, unsigned int) in PhVideoEncoder.o
     "_avfilter_get_by_name", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "_avfilter_graph_alloc", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "_avfilter_graph_config", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "_avfilter_graph_create_filter", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "_avfilter_graph_free", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "_avfilter_graph_parse_ptr", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "_avfilter_inout_alloc", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "_avfilter_inout_free", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "_avfilter_register_all", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
    ld: symbol(s) not found for architecture x86_64
  • Can't set seeker in GSTREAMER cv2, python

    29 avril, par Alperen Ölçer

    I want to skip n seconds forward and backward in gstreamer cv2 capture for recorded videos. But when I use cap_gstreamer.set(cv2.CAP_PROP_POS_FRAMES, fps*skip_second) it resets seeker to beginning of video. How can I solve it ? I wrote an example, used recorded clock video.

    &#xA;

    import cv2&#xA;&#xA;video_p = &#x27;/home/alperenlcr/Videos/clock.mp4&#x27;&#xA;&#xA;cap_gstreamer = cv2.VideoCapture(video_p, cv2.CAP_GSTREAMER)&#xA;cap_ffmpeg = cv2.VideoCapture(video_p, cv2.CAP_FFMPEG)&#xA;&#xA;fps = cap_gstreamer.get(cv2.CAP_PROP_FPS)&#xA;skip_second = 100&#xA;&#xA;im1 = cv2.resize(cap_gstreamer.read()[1], (960, 540))&#xA;im1_ffmpeg = cv2.resize(cap_ffmpeg.read()[1], (960, 540))&#xA;&#xA;cap_gstreamer.set(cv2.CAP_PROP_POS_FRAMES, fps*skip_second)&#xA;cap_ffmpeg.set(cv2.CAP_PROP_POS_FRAMES, fps*skip_second)&#xA;&#xA;im2 = cv2.resize(cap_gstreamer.read()[1], (960, 540))&#xA;im2_ffmpeg = cv2.resize(cap_ffmpeg.read()[1], (960, 540))&#xA;&#xA;merge_gstreamer = cv2.hconcat([im1, im2])&#xA;merge_ffmpeg = cv2.hconcat([im1_ffmpeg, im2_ffmpeg])&#xA;&#xA;cv2.imshow(str(skip_second) &#x2B; &#x27; gstreamer&#x27;, merge_gstreamer)&#xA;cv2.imshow(str(skip_second) &#x2B; &#x27; ffmpeg&#x27;, merge_ffmpeg)&#xA;cv2.waitKey(0)&#xA;cv2.destroyAllWindows()&#xA;&#xA;cap_gstreamer.release()&#xA;cap_ffmpeg.release()&#xA;&#xA;

    &#xA;

    Result :&#xA;enter image description here

    &#xA;

    My cv2 build is like :

    &#xA;

    >>> print(cv2.getBuildInformation())&#xA;&#xA;General configuration for OpenCV 4.8.1 =====================================&#xA;  Version control:               4.8.1-dirty&#xA;&#xA;  Extra modules:&#xA;    Location (extra):            /home/alperenlcr/SourceInstalls/opencv_contrib/modules&#xA;    Version control (extra):     4.8.1&#xA;&#xA;  Platform:&#xA;    Timestamp:                   2024-12-02T13:44:58Z&#xA;    Host:                        Linux 6.8.0-49-generic x86_64&#xA;    CMake:                       3.22.1&#xA;    CMake generator:             Unix Makefiles&#xA;    CMake build tool:            /usr/bin/gmake&#xA;    Configuration:               RELEASE&#xA;&#xA;  CPU/HW features:&#xA;    Baseline:                    SSE SSE2 SSE3&#xA;      requested:                 SSE3&#xA;    Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX AVX2 AVX512_SKX&#xA;      requested:                 SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX&#xA;      SSE4_1 (18 files):         &#x2B; SSSE3 SSE4_1&#xA;      SSE4_2 (2 files):          &#x2B; SSSE3 SSE4_1 POPCNT SSE4_2&#xA;      FP16 (1 files):            &#x2B; SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX&#xA;      AVX (8 files):             &#x2B; SSSE3 SSE4_1 POPCNT SSE4_2 AVX&#xA;      AVX2 (37 files):           &#x2B; SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2&#xA;      AVX512_SKX (8 files):      &#x2B; SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_COMMON AVX512_SKX&#xA;&#xA;  C/C&#x2B;&#x2B;:&#xA;    Built as dynamic libs?:      NO&#xA;    C&#x2B;&#x2B; standard:                11&#xA;    C&#x2B;&#x2B; Compiler:                /usr/bin/c&#x2B;&#x2B;  (ver 10.5.0)&#xA;    C&#x2B;&#x2B; flags (Release):         -fsigned-char -ffast-math -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG&#xA;    C&#x2B;&#x2B; flags (Debug):           -fsigned-char -ffast-math -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG&#xA;    C Compiler:                  /usr/bin/cc&#xA;    C flags (Release):           -fsigned-char -ffast-math -W -Wall -Wreturn-type -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG&#xA;    C flags (Debug):             -fsigned-char -ffast-math -W -Wall -Wreturn-type -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG&#xA;    Linker flags (Release):      -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a   -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined  &#xA;    Linker flags (Debug):        -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a   -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined  &#xA;    ccache:                      NO&#xA;    Precompiled headers:         NO&#xA;    Extra dependencies:          /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib/x86_64-linux-gnu/libpng.so /usr/lib/x86_64-linux-gnu/libtiff.so /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib/x86_64-linux-gnu/libharfbuzz.so Iconv::Iconv m pthread cudart_static dl rt nppc nppial nppicc nppidei nppif nppig nppim nppist nppisu nppitc npps cublas cudnn cufft -L/usr/lib/x86_64-linux-gnu -L/usr/lib/cuda/lib64&#xA;    3rdparty dependencies:       libprotobuf ade ittnotify libwebp libopenjp2 IlmImf quirc ippiw ippicv&#xA;&#xA;  OpenCV modules:&#xA;    To be built:                 aruco bgsegm bioinspired calib3d ccalib core cudaarithm cudabgsegm cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev datasets dnn dnn_objdetect dnn_superres dpm face features2d flann freetype fuzzy gapi hfs highgui img_hash imgcodecs imgproc intensity_transform line_descriptor mcc ml objdetect optflow phase_unwrapping photo plot python3 quality rapid reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab wechat_qrcode xfeatures2d ximgproc xobjdetect xphoto&#xA;    Disabled:                    cudacodec world&#xA;    Disabled by dependency:      -&#xA;    Unavailable:                 alphamat cvv hdf java julia matlab ovis python2 sfm viz&#xA;    Applications:                tests perf_tests examples apps&#xA;    Documentation:               NO&#xA;    Non-free algorithms:         NO&#xA;&#xA;  GUI:                           GTK2&#xA;    QT:                          NO&#xA;    GTK&#x2B;:                        YES (ver 2.24.33)&#xA;      GThread :                  YES (ver 2.72.4)&#xA;      GtkGlExt:                  NO&#xA;    OpenGL support:              NO&#xA;    VTK support:                 NO&#xA;&#xA;  Media I/O: &#xA;    ZLib:                        /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.11)&#xA;    JPEG:                        /usr/lib/x86_64-linux-gnu/libjpeg.so (ver 80)&#xA;    WEBP:                        build (ver encoder: 0x020f)&#xA;    PNG:                         /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.6.37)&#xA;    TIFF:                        /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 / 4.3.0)&#xA;    JPEG 2000:                   build (ver 2.5.0)&#xA;    OpenEXR:                     build (ver 2.3.0)&#xA;    HDR:                         YES&#xA;    SUNRASTER:                   YES&#xA;    PXM:                         YES&#xA;    PFM:                         YES&#xA;&#xA;  Video I/O:&#xA;    DC1394:                      NO&#xA;    FFMPEG:                      YES&#xA;      avcodec:                   YES (58.134.100)&#xA;      avformat:                  YES (58.76.100)&#xA;      avutil:                    YES (56.70.100)&#xA;      swscale:                   YES (5.9.100)&#xA;      swresample:                YES (3.9.100)&#xA;    GStreamer:                   YES (1.20.3)&#xA;    v4l/v4l2:                    YES (linux/videodev2.h)&#xA;&#xA;  Parallel framework:            TBB (ver 2021.5 interface 12050)&#xA;&#xA;  Trace:                         YES (with Intel ITT)&#xA;&#xA;  Other third-party libraries:&#xA;    Intel IPP:                   2021.8 [2021.8.0]&#xA;           at:                   /home/alperenlcr/SourceInstalls/opencv/build/3rdparty/ippicv/ippicv_lnx/icv&#xA;    Intel IPP IW:                sources (2021.8.0)&#xA;              at:                /home/alperenlcr/SourceInstalls/opencv/build/3rdparty/ippicv/ippicv_lnx/iw&#xA;    VA:                          NO&#xA;    Lapack:                      NO&#xA;    Eigen:                       NO&#xA;    Custom HAL:                  NO&#xA;    Protobuf:                    build (3.19.1)&#xA;    Flatbuffers:                 builtin/3rdparty (23.5.9)&#xA;&#xA;  NVIDIA CUDA:                   YES (ver 11.5, CUFFT CUBLAS NVCUVID NVCUVENC FAST_MATH)&#xA;    NVIDIA GPU arch:             86&#xA;    NVIDIA PTX archs:&#xA;&#xA;  cuDNN:                         YES (ver 8.6.0)&#xA;&#xA;  OpenCL:                        YES (no extra features)&#xA;    Include path:                /home/alperenlcr/SourceInstalls/opencv/3rdparty/include/opencl/1.2&#xA;    Link libraries:              Dynamic load&#xA;&#xA;  ONNX:                          NO&#xA;&#xA;  Python 3:&#xA;    Interpreter:                 /usr/bin/python3 (ver 3.10.12)&#xA;    Libraries:                   /usr/lib/x86_64-linux-gnu/libpython3.10.so (ver 3.10.12)&#xA;    numpy:                       /usr/lib/python3/dist-packages/numpy/core/include (ver 1.21.5)&#xA;    install path:                lib/python3.10/dist-packages/cv2/python-3.10&#xA;&#xA;  Python (for build):            /usr/bin/python3&#xA;&#xA;  Java:                          &#xA;    ant:                         NO&#xA;    Java:                        NO&#xA;    JNI:                         NO&#xA;    Java wrappers:               NO&#xA;    Java tests:                  NO&#xA;&#xA;  Install to:                    /usr/local&#xA;-----------------------------------------------------------------&#xA;&#xA;

    &#xA;