Recherche avancée

Médias (0)

Mot : - Tags -/clipboard

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (70)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (4595)

  • OpenCV VideoWriter using ffmpeg with "Could not open codec 'libx264'" Error

    19 avril, par user2262504

    I am new to OpenCV, and I want write Mat images into video using VideoWriter on Ubuntu 12.04. But when constructing VideoWriter, errors came out.

    



    It seems that OpenCV invoke ffmpeg API using default parameters and ffmpeg invoke x264 using its default parameters. Then these setting is broken for libx264. Thus the "Could not open codec 'libx264'" error.

    



    Anyone has ideas to solve this problem ?

    



    More specifically :

    



      

    1. anyone knows where and how OpenCV invoke ffmpeg API ?
    2. 


    3. how to change ffmpeg default settings using code, hopefull, can be easily embeded into OpenCV ?
    4. 


    5. will changes of default in ffmpeg be carried to libx264 ?
    6. 


    



    Errors :

    



    1. Uising CV_FOURCC(&#x27;H&#x27;, &#x27;2&#x27;, &#x27;6&#x27;, &#x27;4&#x27;)&#xA;[libx264 @ 0x255de40] broken ffmpeg default settings detected&#xA;[libx264 @ 0x255de40] use an encoding preset (e.g. -vpre medium)&#xA;[libx264 @ 0x255de40] preset usage: -vpre <speed> -vpre <profile>&#xA;[libx264 @ 0x255de40] speed presets are listed in x264 --help&#xA;[libx264 @ 0x255de40] profile is optional; x264 defaults to high&#xA;Could not open codec &#x27;libx264&#x27;: Unspecified error&#xA;&#xA;2. Using FOURCC = -1 to invoke user customized codec&#xA;OpenCV Error: Unsupported format or combination of formats (Gstreamer Opencv &#xA;backend doesn&#x27;t support this codec acutally.) in CvVideoWriter_GStreamer::open, &#xA;file /home/XXX/Downloads/opencv-2.4.8/modules/highgui/src/cap_gstreamer.cpp, &#xA;line 505 terminate called after throwing an instance of &#x27;cv::Exception&#x27;&#xA;what():  /home/XXX/Downloads/opencv-2.4.8/modules/highgui/src/cap_gstreamer.cpp:&#xA;505: error: (-210) Gstreamer Opencv backend doesn&#x27;t support this codec acutally.&#xA;in function CvVideoWriter_GStreamer::open&#xA;</profile></speed>

    &#xA;&#xA;

    Codes :

    &#xA;&#xA;

    int main(int argc, char *argv[])&#xA;{&#xA;    VideoWriter outputVideo;&#xA;    bool fourcc_on = true; //switch on / off different error&#xA;    if (fourcc_on)&#xA;        outputVideo.open("outVideo.avi", CV_FOURCC(&#x27;H&#x27;, &#x27;2&#x27;, &#x27;6&#x27;, &#x27;4&#x27;), 25, Size(100, 100), true);&#xA;    else&#xA;        outputVideo.open("outVideo.avi", -1, 25, Size(100, 100), true);&#xA;&#xA;    if (!outputVideo.isOpened())&#xA;    {&#xA;        cout  &lt;&lt; "Could not open the output video for write" &lt;&lt; endl;&#xA;        return -1;&#xA;    }&#xA;    return 0;&#xA;}&#xA;

    &#xA;&#xA;

    OpenCV Configuration :

    &#xA;&#xA;

    -- Detected version of GNU GCC: 46 (406)&#xA;-- Found OpenEXR: /usr/lib/libIlmImf.so&#xA;-- Looking for linux/videodev.h&#xA;-- Looking for linux/videodev.h - not found&#xA;-- Looking for linux/videodev2.h&#xA;-- Looking for linux/videodev2.h - found&#xA;-- Looking for sys/videoio.h&#xA;-- Looking for sys/videoio.h - not found&#xA;-- Looking for libavformat/avformat.h&#xA;-- Looking for libavformat/avformat.h - found&#xA;-- Looking for ffmpeg/avformat.h&#xA;-- Looking for ffmpeg/avformat.h - not found&#xA;-- Could NOT find JNI (missing:  JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) &#xA;-- &#xA;-- General configuration for OpenCV 2.4.8 =====================================&#xA;--   Version control:               unknown&#xA;-- &#xA;--   Platform:&#xA;--     Host:                        Linux 3.8.0-38-generic x86_64&#xA;--     CMake:                       2.8.7&#xA;--     CMake generator:             Unix Makefiles&#xA;--     CMake build tool:            /usr/bin/make&#xA;--     Configuration:               RELEASE&#xA;-- &#xA;--   C/C&#x2B;&#x2B;:&#xA;--     Built as dynamic libs?:      YES&#xA;--     C&#x2B;&#x2B; Compiler:                /usr/bin/c&#x2B;&#x2B;  (ver 4.6)&#xA;--     C&#x2B;&#x2B; flags (Release):         -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG  -DNDEBUG&#xA;--     C&#x2B;&#x2B; flags (Debug):           -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g  -O0 -DDEBUG -D_DEBUG&#xA;--     C Compiler:                  /usr/bin/gcc&#xA;--     C flags (Release):           -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG  -DNDEBUG&#xA;--     C flags (Debug):             -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g  -O0 -DDEBUG -D_DEBUG&#xA;--     Linker flags (Release):      &#xA;--     Linker flags (Debug):        &#xA;--     Precompiled headers:         YES&#xA;-- &#xA;--   OpenCV modules:&#xA;--     To be built:                 core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu ocl nonfree contrib python stitching superres ts videostab&#xA;--     Disabled:                    world&#xA;--     Disabled by dependency:      -&#xA;--     Unavailable:                 androidcamera dynamicuda java&#xA;-- &#xA;--   GUI: &#xA;--     QT:                          NO&#xA;--     GTK&#x2B; 2.x:                    YES (ver 2.24.10)&#xA;--     GThread :                    YES (ver 2.32.4)&#xA;--     GtkGlExt:                    NO&#xA;--     OpenGL support:              NO&#xA;-- &#xA;--   Media I/O: &#xA;--     ZLib:                        /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.3.4)&#xA;--     JPEG:                        /usr/lib/x86_64-linux-gnu/libjpeg.so (ver )&#xA;--     PNG:                         /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.2.46)&#xA;--     TIFF:                        /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 - 3.9.5)&#xA;--     JPEG 2000:                   /usr/lib/x86_64-linux-gnu/libjasper.so (ver 1.900.1)&#xA;--     OpenEXR:                     /usr/lib/libImath.so /usr/lib/libIlmImf.so /usr/lib/libIex.so /usr/lib/libHalf.so /usr/lib/libIlmThread.so (ver 1.6.1)&#xA;-- &#xA;--   Video I/O:&#xA;--     DC1394 1.x:                  NO&#xA;--     DC1394 2.x:                  YES (ver 2.2.0)&#xA;--     FFMPEG:                      YES&#xA;--       codec:                     YES (ver 55.58.105)&#xA;--       format:                    YES (ver 55.37.101)&#xA;--       util:                      YES (ver 52.78.100)&#xA;--       swscale:                   YES (ver 2.6.100)&#xA;--       gentoo-style:              YES&#xA;--     GStreamer:                   &#xA;--       base:                      YES (ver 0.10.36)&#xA;--       app:                       YES (ver 0.10.36)&#xA;--       video:                     YES (ver 0.10.36)&#xA;--     OpenNI:                      NO&#xA;--     OpenNI PrimeSensor Modules:  NO&#xA;--     PvAPI:                       NO&#xA;--     GigEVisionSDK:               NO&#xA;--     UniCap:                      NO&#xA;--     UniCap ucil:                 NO&#xA;--     V4L/V4L2:                    Using libv4l (ver 1.0.1)&#xA;--     XIMEA:                       NO&#xA;--     Xine:                        NO&#xA;-- &#xA;--   Other third-party libraries:&#xA;--     Use IPP:                     NO&#xA;--     Use Eigen:                   NO&#xA;--     Use TBB:                     NO&#xA;--     Use OpenMP:                  NO&#xA;--     Use GCD                      NO&#xA;--     Use Concurrency              NO&#xA;--     Use C=:                      NO&#xA;--     Use Cuda:                    NO&#xA;--     Use OpenCL:                  YES&#xA;-- &#xA;--   OpenCL:&#xA;--     Version:                     dynamic&#xA;--     Include path:                /home/shixudongleo/Downloads/opencv-2.4.8/3rdparty/include/opencl/1.2&#xA;--     Use AMD FFT:                 NO&#xA;--     Use AMD BLAS:                NO&#xA;-- &#xA;--   Python:&#xA;--     Interpreter:                 /usr/bin/python (ver 2.7.3)&#xA;--     Libraries:                   /usr/lib/libpython2.7.so&#xA;--     numpy:                       /usr/lib/python2.7/dist-packages/numpy/core/include (ver 1.6.1)&#xA;--     packages path:               lib/python2.7/dist-packages&#xA;-- &#xA;--   Java:&#xA;--     ant:                         NO&#xA;--     JNI:                         NO&#xA;--     Java tests:                  NO&#xA;-- &#xA;--   Documentation:&#xA;--     Build Documentation:         NO&#xA;--     Sphinx:                      NO&#xA;--     PdfLaTeX compiler:           /usr/bin/pdflatex&#xA;-- &#xA;--   Tests and samples:&#xA;--     Tests:                       YES&#xA;--     Performance tests:           YES&#xA;--     C/C&#x2B;&#x2B; Examples:              NO&#xA;-- &#xA;--   Install path:                  /usr/local&#xA;-- &#xA;--   cvconfig.h is in:              /home/shixudongleo/Downloads/opencv-2.4.8/build&#xA;-- -----------------------------------------------------------------&#xA;-- &#xA;-- Configuring done&#xA;-- Generating done&#xA;-- Build files have been written to: /home/XXX/Downloads/opencv-2.4.8/build&#xA;

    &#xA;&#xA;

    FFMPEG

    &#xA;&#xA;

    ffmpeg is enable to support OpenCV and libx264 is enabled when compiling ffmpeg.&#xA;By using ffmpeg command line, libx264 is running normally.

    &#xA;&#xA;

    $ ffmpeg -i test.avi -vcodec libx264 test.mp4&#xA;ffmpeg -i test.avi -vcodec libx264 test.mp4 > ~/Downloads/ffmpeg_log.txt&#xA;ffmpeg version 2.2.git Copyright (c) 2000-2014 the FFmpeg developers&#xA;  built on Apr 24 2014 16:39:51 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)&#xA;  configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-shared --enable-pic&#xA;  libavutil      52. 78.100 / 52. 78.100&#xA;  libavcodec     55. 58.105 / 55. 58.105&#xA;  libavformat    55. 37.101 / 55. 37.101&#xA;  libavdevice    55. 13.100 / 55. 13.100&#xA;  libavfilter     4.  4.100 /  4.  4.100&#xA;  libswscale      2.  6.100 /  2.  6.100&#xA;  libswresample   0. 18.100 /  0. 18.100&#xA;  libpostproc    52.  3.100 / 52.  3.100&#xA;Input #0, avi, from &#x27;test.avi&#x27;:&#xA;  Duration: 00:00:03.73, start: 0.000000, bitrate: 1757 kb/s&#xA;    Stream #0:0: Video: msvideo1 (CRAM / 0x4D415243), rgb555le, 320x240, 1781 kb/s, 15 tbr, 15 tbn, 15 tbc&#xA;    Metadata:&#xA;      title           : julius.avi Video #1&#xA;File &#x27;test.mp4&#x27; already exists. Overwrite ? [y/N] y&#xA;No pixel format specified, yuv444p for H.264 encoding chosen.&#xA;Use -pix_fmt yuv420p for compatibility with outdated media players.&#xA;[libx264 @ 0x25d08e0] using cpu capabilities: none!&#xA;[libx264 @ 0x25d08e0] profile High 4:4:4 Predictive, level 1.2, 4:4:4 8-bit&#xA;[libx264 @ 0x25d08e0] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=4 threads=12 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=15 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00&#xA;Output #0, mp4, to &#x27;test.mp4&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf55.37.101&#xA;    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv444p, 320x240, q=-1--1, 15360 tbn, 15 tbc&#xA;    Metadata:&#xA;      title           : julius.avi Video #1&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (msvideo1 -> libx264)&#xA;Press [q] to stop, [?] for help&#xA;frame=   56 fps=0.0 q=-1.0 Lsize=     321kB time=00:00:03.60 bitrate= 731.0kbits/s    &#xA;video:320kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.409949%&#xA;[libx264 @ 0x25d08e0] frame I:3     Avg QP:15.36  size:  7975&#xA;[libx264 @ 0x25d08e0] frame P:38    Avg QP:26.05  size:  6230&#xA;[libx264 @ 0x25d08e0] frame B:15    Avg QP:28.25  size:  4418&#xA;[libx264 @ 0x25d08e0] consecutive B-frames: 46.4% 53.6%  0.0%  0.0%&#xA;[libx264 @ 0x25d08e0] mb I  I16..4:  1.4% 72.8% 25.8%&#xA;[libx264 @ 0x25d08e0] mb P  I16..4:  1.6%  5.7% 15.1%  P16..4:  7.6%  6.3%  7.4%  0.0%  0.0%    skip:56.3%&#xA;[libx264 @ 0x25d08e0] mb B  I16..4:  0.2%  1.0%  2.0%  B16..8: 13.3%  7.8%  8.7%  direct: 8.3%  skip:58.8%  L0:34.9% L1:36.6% BI:28.5%&#xA;[libx264 @ 0x25d08e0] 8x8 transform intra:37.7% inter:2.3%&#xA;[libx264 @ 0x25d08e0] coded y,u,v intra: 52.1% 42.1% 30.1% inter: 19.6% 9.2% 5.2%&#xA;[libx264 @ 0x25d08e0] i16 v,h,dc,p: 56% 17% 24%  2%&#xA;[libx264 @ 0x25d08e0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 16% 68%  1%  1%  1%  1%  1%  1%&#xA;[libx264 @ 0x25d08e0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 18% 28%  5%  6%  5%  7%  5%  6%&#xA;[libx264 @ 0x25d08e0] Weighted P-Frames: Y:31.6% UV:21.1%&#xA;[libx264 @ 0x25d08e0] ref P L0: 70.5%  9.0% 12.1%  6.5%  2.0%&#xA;[libx264 @ 0x25d08e0] ref B L0: 91.3%  8.7%&#xA;[libx264 @ 0x25d08e0] kb/s:700.56&#xA;

    &#xA;

  • FFMPEG, "Could not open file.. " "av_interleaved_write_frame() : Input/output error"

    10 juillet 2018, par justaguytrynabuildawebsite

    Trying to run a simple ffmpeg line on my Ubuntu 16.04 vps shell,

    ffmpeg -ss 1 -i /var/www/html/lib/vid/4581989_022810100718.mp4 -r 1 -vframes 1 /var/www/html/lib/thumbnail/4581989_022810100718/20.jpg

    but am met with

    Could not open file

    and

    av_interleaved_write_frame(): Input/output error

    I have already tried giving the ../lib/vid folder in question 777 permissions but it didnt help.

    Full print-out :

    ffmpeg version 2.8.14-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg developers
    built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 20160609
    configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
    libavutil      54. 31.100 / 54. 31.100
    libavcodec     56. 60.100 / 56. 60.100
    libavformat    56. 40.101 / 56. 40.101
    libavdevice    56.  4.100 / 56.  4.100
    libavfilter     5. 40.101 /  5. 40.101
    libavresample   2.  1.  0 /  2.  1.  0
    libswscale      3.  1.101 /  3.  1.101
    libswresample   1.  2.101 /  1.  2.101
    libpostproc    53.  3.100 / 53.  3.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/html/lib/vid/4581989_022810100718.mp4':
    Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf56.36.100
    Duration: 00:00:04.90, start: 0.000000, bitrate: 2595 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1820x1024 [SAR 1:1 DAR 455:256], 2593 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
     handler_name    : VideoHandler
    [swscaler @ 0x1652280] deprecated pixel format used, make sure you did set range correctly
    Output #0, image2, to '/var/www/html/lib/thumbnail/4581989_022810100718/20.jpg':
    Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf56.40.101
    Stream #0:0(und): Video: mjpeg, yuvj420p(pc), 1820x1024 [SAR 1:1 DAR 455:256], q=2-31, 200 kb/s, 1 fps, 1 tbn, 1 tbc (default)
    Metadata:
     handler_name    : VideoHandler
     encoder         : Lavc56.60.100 mjpeg
    Stream mapping:
    Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
    Press [q] to stop, [?] for help
    [image2 @ 0x16103a0] Could not open file : /var/www/html/lib/thumbnail/4581989_022810100718/20.jpg
    av_interleaved_write_frame(): Input/output error
    frame=    1 fps=0.0 q=3.4 Lsize=N/A time=00:00:01.00 bitrate=N/A    
    video:48kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    Conversion failed!
  • Open VideoStream using OpenCV 4.5.1 works on Windows but fails on Docker python:3.9.2-slim-buster for specific IP cam

    18 mai 2021, par Qua285

    I have 2 ip cameras - one of Hikvision and another of Provision ISR. Both use Onvif and work on VLC.&#xA;I've written a simple python script to record images every 5 sec from their video stream.&#xA;On Windows 10, using VSCode they both work as expected. Once deployed to a Docker container, my script works as expected with the Hikvision but fails with the Provision ISR - it doesn't open the stream.

    &#xA;

    Running python -c "import cv2; print(cv2.getBuildInformation())" on windows (venv 3.9.2) and on docker machine bring slightly different results but it's beyond my understanding to take something out of it...&#xA;Here is the Windows one :

    &#xA;

    General configuration for OpenCV 4.5.1 =====================================&#xA;  Version control:               4.5.1&#xA;&#xA;  Platform:&#xA;    Timestamp:                   2021-01-02T14:30:58Z&#xA;    Host:                        Windows 6.3.9600 AMD64&#xA;    CMake:                       3.18.4&#xA;    CMake generator:             Visual Studio 14 2015 Win64&#xA;    CMake build tool:            C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe&#xA;    MSVC:                        1900&#xA;&#xA;  CPU/HW features:&#xA;    Baseline:                    SSE SSE2 SSE3&#xA;      requested:                 SSE3&#xA;    Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX AVX2&#xA;      requested:                 SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX&#xA;      SSE4_1 (15 files):         &#x2B; SSSE3 SSE4_1&#xA;      SSE4_2 (1 files):          &#x2B; SSSE3 SSE4_1 POPCNT SSE4_2&#xA;      FP16 (0 files):            &#x2B; SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX&#xA;      AVX (4 files):             &#x2B; SSSE3 SSE4_1 POPCNT SSE4_2 AVX&#xA;      AVX2 (29 files):           &#x2B; SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2&#xA;&#xA;  C/C&#x2B;&#x2B;:&#xA;    Built as dynamic libs?:      NO&#xA;    C&#x2B;&#x2B; standard:                11&#xA;    C&#x2B;&#x2B; Compiler:                C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe  (ver 19.0.24241.7)&#xA;    C&#x2B;&#x2B; 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  /fp:precise     /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 &#xA;/MP  /MT /O2 /Ob2 /DNDEBUG&#xA;    C&#x2B;&#x2B; 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  /fp:precise     /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 &#xA;/MP  /MTd /Zi /Ob0 /Od /RTC1&#xA;    C Compiler:                  C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe&#xA;    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  /fp:precise     /MP   /MT /O2 /Ob2 /DNDEBUG&#xA;    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  /fp:precise     /MP /MTd /Zi /Ob0 /Od /RTC1&#xA;    Linker flags (Release):      /machine:x64  /NODEFAULTLIB:atlthunk.lib /INCREMENTAL:NO  /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:libcpmtd.lib /NODEFAULTLIB:msvcrtd.lib&#xA;    Linker flags (Debug):        /machine:x64  /NODEFAULTLIB:atlthunk.lib /debug /INCREMENTAL  /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcpmt.lib /NODEFAULTLIB:msvcrt.lib&#xA;    ccache:                      NO&#xA;    Precompiled headers:         YES&#xA;    Extra dependencies:          ade wsock32 comctl32 gdi32 ole32 setupapi ws2_32&#xA;    3rdparty dependencies:       ittnotify libprotobuf zlib libjpeg-turbo libwebp libpng libtiff libopenjp2 IlmImf quirc ippiw ippicv&#xA;&#xA;  OpenCV modules:&#xA;    To be built:                 calib3d core dnn features2d flann gapi highgui imgcodecs imgproc ml objdetect photo python3 stitching video videoio&#xA;    Disabled:                    world&#xA;    Disabled by dependency:      -&#xA;    Unavailable:                 java python2 ts&#xA;    Applications:                -&#xA;    Documentation:               NO&#xA;    Non-free algorithms:         NO&#xA;&#xA;  Windows RT support:            NO&#xA;&#xA;  GUI:&#xA;    Win32 UI:                    YES&#xA;    VTK support:                 NO&#xA;&#xA;  Media I/O:&#xA;    ZLib:                        build (ver 1.2.11)&#xA;    JPEG:                        build-libjpeg-turbo (ver 2.0.6-62)&#xA;    WEBP:                        build (ver encoder: 0x020f)&#xA;    PNG:                         build (ver 1.6.37)&#xA;    TIFF:                        build (ver 42 - 4.0.10)&#xA;    JPEG 2000:                   build (ver 2.3.1)&#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 (prebuilt binaries)&#xA;      avcodec:                   YES (58.91.100)&#xA;      avformat:                  YES (58.45.100)&#xA;      avutil:                    YES (56.51.100)&#xA;      swscale:                   YES (5.7.100)&#xA;      avresample:                YES (4.0.0)&#xA;    GStreamer:                   NO&#xA;    DirectShow:                  YES&#xA;    Media Foundation:            YES&#xA;      DXVA:                      NO&#xA;&#xA;  Parallel framework:            Concurrency&#xA;&#xA;  Trace:                         YES (with Intel ITT)&#xA;&#xA;  Other third-party libraries:&#xA;    Intel IPP:                   2020.0.0 Gold [2020.0.0]&#xA;           at:                   C:/Users/appveyor/AppData/Local/Temp/1/pip-req-build-wvn_it83/_skbuild/win-amd64-3.9/cmake-build/3rdparty/ippicv/ippicv_win/icv&#xA;    Intel IPP IW:                sources (2020.0.0)&#xA;              at:                C:/Users/appveyor/AppData/Local/Temp/1/pip-req-build-wvn_it83/_skbuild/win-amd64-3.9/cmake-build/3rdparty/ippicv/ippicv_win/iw&#xA;    Lapack:                      NO&#xA;    Eigen:                       NO&#xA;    Custom HAL:                  NO&#xA;    Protobuf:                    build (3.5.1)&#xA;&#xA;  OpenCL:                        YES (NVD3D11)&#xA;    Include path:                C:/Users/appveyor/AppData/Local/Temp/1/pip-req-build-wvn_it83/opencv/3rdparty/include/opencl/1.2&#xA;    Link libraries:              Dynamic load&#xA;&#xA;  Python 3:&#xA;    Interpreter:                 C:/Python39-x64/python.exe (ver 3.9)&#xA;    Libraries:                   C:/Python39-x64/libs/python39.lib (ver 3.9.0)&#xA;    numpy:                       C:/Users/appveyor/AppData/Local/Temp/1/pip-build-env-sk7r7w_5/overlay/Lib/site-packages/numpy/core/include (ver 1.19.3)&#xA;    install path:                python&#xA;&#xA;  Python (for build):            C:/Python27-x64/python.exe&#xA;&#xA;  Java:&#xA;    ant:                         NO&#xA;    JNI:                         C:/Program Files/Java/jdk1.8.0/include C:/Program Files/Java/jdk1.8.0/include/win32 C:/Program Files/Java/jdk1.8.0/include&#xA;    Java wrappers:               NO&#xA;    Java tests:                  NO&#xA;&#xA;  Install to:                    C:/Users/appveyor/AppData/Local/Temp/1/pip-req-build-wvn_it83/_skbuild/win-amd64-3.9/cmake-install&#xA;-----------------------------------------------------------------&#xA;

    &#xA;

    this is the Docker one (python:3.9.2-slim-buster) :

    &#xA;

    General configuration for OpenCV 4.5.1 =====================================&#xA;  Version control:               4.5.1-dirty&#xA;&#xA;  Platform:&#xA;    Timestamp:                   2021-01-02T13:04:10Z&#xA;    Host:                        Linux 4.15.0-1077-gcp x86_64&#xA;    CMake:                       3.18.4&#xA;    CMake generator:             Unix Makefiles&#xA;    CMake build tool:            /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 (15 files):         &#x2B; SSSE3 SSE4_1&#xA;      SSE4_2 (1 files):          &#x2B; SSSE3 SSE4_1 POPCNT SSE4_2&#xA;      FP16 (0 files):            &#x2B; SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX&#xA;      AVX (4 files):             &#x2B; SSSE3 SSE4_1 POPCNT SSE4_2 AVX&#xA;      AVX2 (29 files):           &#x2B; SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2&#xA;      AVX512_SKX (4 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/lib/ccache/compilers/c&#x2B;&#x2B;  (ver 9.3.1)&#xA;    C&#x2B;&#x2B; flags (Release):         -Wl,-strip-all   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-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):           -Wl,-strip-all   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-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/lib/ccache/compilers/cc&#xA;    C flags (Release):           -Wl,-strip-all   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -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):             -Wl,-strip-all   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -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 -L/root/ffmpeg_build/lib  -Wl,--gc-sections -Wl,--as-needed&#xA;    Linker flags (Debug):        -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a -L/root/ffmpeg_build/lib  -Wl,--gc-sections -Wl,--as-needed&#xA;    ccache:                      YES&#xA;    Precompiled headers:         NO&#xA;    Extra dependencies:          ade Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Test Qt5::Concurrent /lib64/libpng.so /lib64/libz.so dl m pthread rt&#xA;    3rdparty dependencies:       ittnotify libprotobuf libjpeg-turbo libwebp libtiff libopenjp2 IlmImf quirc ippiw ippicv&#xA;&#xA;  OpenCV modules:&#xA;    To be built:                 calib3d core dnn features2d flann gapi highgui imgcodecs imgproc ml objdetect photo python3 stitching video videoio&#xA;    Disabled:                    world&#xA;    Disabled by dependency:      -&#xA;    Unavailable:                 java python2 ts&#xA;    Applications:                -&#xA;    Documentation:               NO&#xA;    Non-free algorithms:         NO&#xA;&#xA;  GUI:&#xA;    QT:                          YES (ver 5.15.0)&#xA;      QT OpenGL support:         NO&#xA;    GTK&#x2B;:                        NO&#xA;    VTK support:                 NO&#xA;&#xA;  Media I/O:&#xA;    ZLib:                        /lib64/libz.so (ver 1.2.7)&#xA;    JPEG:                        libjpeg-turbo (ver 2.0.6-62)&#xA;    WEBP:                        build (ver encoder: 0x020f)&#xA;    PNG:                         /lib64/libpng.so (ver 1.5.13)&#xA;    TIFF:                        build (ver 42 - 4.0.10)&#xA;    JPEG 2000:                   build (ver 2.3.1)&#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.109.100)&#xA;      avformat:                  YES (58.61.100)&#xA;      avutil:                    YES (56.60.100)&#xA;      swscale:                   YES (5.8.100)&#xA;      avresample:                NO&#xA;    GStreamer:                   NO&#xA;    v4l/v4l2:                    YES (linux/videodev2.h)&#xA;&#xA;  Parallel framework:            pthreads&#xA;&#xA;  Trace:                         YES (with Intel ITT)&#xA;&#xA;  Other third-party libraries:&#xA;    Intel IPP:                   2020.0.0 Gold [2020.0.0]&#xA;           at:                   /tmp/pip-req-build-ddpkm6fn/_skbuild/linux-x86_64-3.9/cmake-build/3rdparty/ippicv/ippicv_lnx/icv&#xA;    Intel IPP IW:                sources (2020.0.0)&#xA;              at:                /tmp/pip-req-build-ddpkm6fn/_skbuild/linux-x86_64-3.9/cmake-build/3rdparty/ippicv/ippicv_lnx/iw&#xA;    Lapack:                      NO&#xA;    Eigen:                       NO&#xA;    Custom HAL:                  NO&#xA;    Protobuf:                    build (3.5.1)&#xA;&#xA;  OpenCL:                        YES (no extra features)&#xA;    Include path:                /tmp/pip-req-build-ddpkm6fn/opencv/3rdparty/include/opencl/1.2&#xA;    Link libraries:              Dynamic load&#xA;&#xA;  Python 3:&#xA;    Interpreter:                 /opt/python/cp39-cp39/bin/python (ver 3.9)&#xA;    Libraries:                   libpython3.9.a (ver 3.9.0)&#xA;    numpy:                       /tmp/pip-build-env-jqrfyj0w/overlay/lib/python3.9/site-packages/numpy/core/include (ver 1.19.3)&#xA;    install path:                python&#xA;&#xA;  Python (for build):            /bin/python2.7&#xA;&#xA;  Java:&#xA;    ant:                         NO&#xA;    JNI:                         NO&#xA;    Java wrappers:               NO&#xA;    Java tests:                  NO&#xA;&#xA;  Install to:                    /tmp/pip-req-build-ddpkm6fn/_skbuild/linux-x86_64-3.9/cmake-install&#xA;-----------------------------------------------------------------&#xA;

    &#xA;

    If relevant, the docker is installed on an Intel NUC with Ubuntu Desktop 20.04

    &#xA;

    If relevant, this is the dockerfile I've used to build the image :

    &#xA;

    FROM python:3.9.2-slim-buster as builder&#xA;&#xA;# Keeps Python from generating .pyc files in the container&#xA;ENV PYTHONDONTWRITEBYTECODE=1&#xA;# Without this setting, Python never prints anything out.&#xA;ENV PYTHONUNBUFFERED=1&#xA;&#xA;RUN pip install --upgrade pip&#xA;COPY ./Cam/requirements.txt .&#xA;RUN pip install -r requirements.txt&#xA;RUN apt-get update&#xA;RUN apt-get install ffmpeg libsm6 libxext6 -y&#xA;&#xA;WORKDIR /app&#xA;&#xA;FROM builder&#xA;COPY ./Cam .&#xA;CMD ["python", "camStreamer.py"]&#xA;

    &#xA;

    and last, this is the script code (simplified) :

    &#xA;

    import os, logging, threading&#xA;from os.path import join&#xA;import sys, inspect, datetime, time&#xA;from pathlib import Path&#xA;import cv2&#xA;import imutils&#xA;from imutils.video import VideoStream&#xA;&#xA;def StartRecording(showVideoWindow, interval, imagePath):&#xA;    key = None&#xA;    cam = VideoStream(os.getenv("CAM_RTSP")).start()&#xA;    counter = 0&#xA;    try:&#xA;        while True:&#xA;            ## 2 min retry to connect if frame is None&#xA;            if counter > 60/interval*2: break&#xA;&#xA;            ts = time.time()&#xA;            ## Wait for [interval] seconds&#xA;            while ts &#x2B; interval > time.time():&#xA;                continue&#xA;            print(f"Counter: {counter}, ts: {str(ts)}")&#xA;&#xA;            frame = cam.read()&#xA;            if frame is None:&#xA;                counter &#x2B;= 1&#xA;                continue&#xA;            counter = 0&#xA;&#xA;            print("frame is valid")&#xA;            if showVideoWindow:&#xA;                frame = imutils.resize(frame, width=1200)&#xA;                cv2.imshow(&#x27;VIDEO&#x27;, frame)&#xA;&#xA;            imageName = f"{datetime.datetime.fromtimestamp(ts).strftime(&#x27;%Y-%m-%dT%H_%M_%S&#x27;)}.jpg"&#xA;            cv2.imwrite(join(imagePath, imageName), frame)&#xA;            print("saved image to disk")&#xA;&#xA;            key = cv2.waitKey(1) &amp; 0xFF&#xA;            if key == ord(&#x27;q&#x27;) or key == ord(&#x27;r&#x27;):&#xA;                break&#xA;&#xA;    except Exception as e:&#xA;        exc_tb = sys.exc_info()[2]&#xA;        extra = ""&#xA;        print(f"{inspect.stack()[0][3]}: {e} (lineno: {exc_tb.tb_lineno}) {extra}")&#xA;    finally:&#xA;        if showVideoWindow: cv2.destroyAllWindows()&#xA;        cam.stop()&#xA;        return key&#xA;&#xA;&#xA;while True:&#xA;    log.warning(f"Starting {Name}")&#xA;    key = StartRecording(&#xA;                showVideoWindow=(Env.startswith("development") and os.getenv("SHOW_VIDEO") == "True"),&#xA;                interval=int(os.getenv("SAVE_IMAGE_INTERVAL")),&#xA;                imagePath=os.getenv(&#x27;CAPTURE_FOLDER&#x27;)&#xA;                )&#xA;    if key == ord(&#x27;q&#x27;):&#xA;        break&#xA;

    &#xA;

    I apologize for the very long post. Hopefully someone can put me on the right direction...

    &#xA;