Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

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

Autres articles (98)

  • Formulaire personnalisable

    21 juin 2013, par

    Cette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
    Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire. (...)

  • Qu’est ce qu’un masque de formulaire

    13 juin 2013, par

    Un masque de formulaire consiste en la personnalisation du formulaire de mise en ligne des médias, rubriques, actualités, éditoriaux et liens vers des sites.
    Chaque formulaire de publication d’objet peut donc être personnalisé.
    Pour accéder à la personnalisation des champs de formulaires, il est nécessaire d’aller dans l’administration de votre MediaSPIP puis de sélectionner "Configuration des masques de formulaires".
    Sélectionnez ensuite le formulaire à modifier en cliquant sur sont type d’objet. (...)

  • 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.

Sur d’autres sites (6142)

  • Dash.js not playing mpd files made with ffmpeg

    31 décembre 2022, par Macster

    I'm using ffmpeg to create chunks and manifest of a webm file which I want to live stream with Dash.js. Unfortunately Dash.js won't play the mpd file, no matter which way I create the chunks and manifest. However, the sample mpd URL from Dash.js is working.

    


    Commands

    


    ffmpeg -re -r 25 -i Dash/strm.webm
-map 0:v:0
-pix_fmt yuv420p
-c:v libvpx
-s 640x480 -keyint_min 60 -g 60 -speed 6 -tile-columns 4 -frame-parallel 1 -threads 8 -static-thresh 0 -max-intra-rate 300 -deadline realtime -lag-in-frames 0 -error-resilient 1
-b:v 3000k
-f webm_chunk
-header "Dash/glass_360.hdr"
-chunk_start_index 1 Dash/glass_360_%d.chk
-map 0:a:0
-c:a libvorbis
-b:a 128k -ar 44100
-f webm_chunk
-audio_chunk_duration 2000
-header Dash/glass_171.hdr
-chunk_start_index 1 Dash/glass_171_%d.chk


//Manifest
ffmpeg
-f webm_dash_manifest -live 1
-i Dash/glass_360.hdr
-f webm_dash_manifest -live 1
-i Dash/glass_171.hdr
-c copy
-map 0 -map 1
-f webm_dash_manifest -live 1
-adaptation_sets "id=0,streams=0 id=1,streams=1"
-chunk_start_index 1
-chunk_duration_ms 2000
-time_shift_buffer_depth 7200
-minimum_update_period 7200 Dash/glass_video_manifest.mpd


    


    Manifest output

    


    ffmpeg version git-2020-05-27-8b5ffae Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3.1 (GCC) 20200523
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 49.100 / 56. 49.100
  libavcodec     58. 87.101 / 58. 87.101
  libavformat    58. 43.100 / 58. 43.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 83.100 /  7. 83.100
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, webm_dash_manifest, from 'Dash/glass_360.hdr':
  Metadata:
    ENCODER         : Lavf58.43.100
  Duration: N/A, bitrate: N/A
    Stream #0:0(eng): Video: vp8, yuv420p, 640x480, SAR 1:1 DAR 4:3, 1k tbr, 1k tbn, 1k tbc (default)
    Metadata:
      ALPHA_MODE      : 1
      ENCODER         : Lavc58.87.101 libvpx
      webm_dash_manifest_file_name: glass_360.hdr
      webm_dash_manifest_track_number: 1
Input #1, webm_dash_manifest, from 'Dash/glass_171.hdr':
  Metadata:
    ENCODER         : Lavf58.43.100
  Duration: N/A, bitrate: N/A
    Stream #1:0(eng): Audio: vorbis, 44100 Hz, mono, fltp (default)
    Metadata:
      ENCODER         : Lavc58.87.101 libvorbis
      webm_dash_manifest_file_name: glass_171.hdr
      webm_dash_manifest_track_number: 1
Output #0, webm_dash_manifest, to 'Dash/glass_video_manifest.mpd':
  Metadata:
    encoder         : Lavf58.43.100
    Stream #0:0(eng): Video: vp8, yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=2-31, 1k tbr, 1k tbn, 1k tbc (default)
    Metadata:
      ALPHA_MODE      : 1
      ENCODER         : Lavc58.87.101 libvpx
      webm_dash_manifest_file_name: glass_360.hdr
      webm_dash_manifest_track_number: 1
    Stream #0:1(eng): Audio: vorbis, 44100 Hz, mono, fltp (default)
    Metadata:
      ENCODER         : Lavc58.87.101 libvorbis
      webm_dash_manifest_file_name: glass_171.hdr
      webm_dash_manifest_track_number: 1
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #1:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=    0 fps=0.0 q=-1.0 Lsize=       1kB time=00:00:00.00 bitrate=N/A speed=   0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:4kB muxing overhead: unknown


    


    Manifest file
    (glass_video_manifest.mpd)
    
I tried to delete the ContetntComponent like suggested in other questions, but it didn't work.

    


    &lt;?xml version="1.0" encoding="UTF-8"?>&#xA;&#xA;<period start="PT0S">&#xA;<adaptationset mimetype="video/webm" codecs="vp8" lang="eng" bitstreamswitching="true" subsegmentalignment="true" subsegmentstartswithsap="1">&#xA;<contentcomponent type="video"></contentcomponent>&#xA;<segmenttemplate timescale="1000" duration="2000" media="glass_$RepresentationID$_$Number$.chk" startnumber="1" initialization="glass_$RepresentationID$.hdr"></segmenttemplate>&#xA;<representation bandwidth="1000000" width="640" height="480" codecs="vp8" mimetype="video/webm" startswithsap="1"></representation>&#xA;</adaptationset>&#xA;<adaptationset mimetype="audio/webm" codecs="vorbis" lang="eng" bitstreamswitching="true" subsegmentalignment="true" subsegmentstartswithsap="1">&#xA;<contentcomponent type="audio"></contentcomponent>&#xA;<segmenttemplate timescale="1000" duration="2000" media="glass_$RepresentationID$_$Number$.chk" startnumber="1" initialization="glass_$RepresentationID$.hdr"></segmenttemplate>&#xA;<representation bandwidth="128000" audiosamplingrate="44100" codecs="vorbis" mimetype="audio/webm" startswithsap="1"></representation>&#xA;</adaptationset>&#xA;</period>&#xA;&#xA;

    &#xA;

    Dash.js-Player

    &#xA;

    <code class="echappe-js">&lt;script&gt;&amp;#xA;&amp;#xA;(function(){&amp;#xA;  // var url = &quot;https://dash.akamaized.net/envivio/EnvivioDash3/manifest.mpd&quot;;&amp;#xA;  var url = &quot;http://localhost:8081/videos/Dash/glass_live_manifest.mpd&quot;;&amp;#xA;  var player = dashjs.MediaPlayer().create();&amp;#xA;                &amp;#xA;  // config&amp;#xA;  targetLatency = 2.0;        // Lowering this value will lower latency but may decrease the player&amp;#x27;s ability to build a stable buffer.&amp;#xA;  minDrift = 0.05;            // Minimum latency deviation allowed before activating catch-up mechanism.&amp;#xA;  catchupPlaybackRate = 0.5;  // Maximum catch-up rate, as a percentage, for low latency live streams.&amp;#xA;  stableBuffer = 2;           // The time that the internal buffer target will be set to post startup/seeks (NOT top quality).&amp;#xA;  bufferAtTopQuality = 2;     // The time that the internal buffer target will be set to once playing the top quality.&amp;#xA;&amp;#xA;   player.updateSettings({&amp;#xA;      &amp;#x27;streaming&amp;#x27;: {&amp;#xA;          &amp;#x27;liveDelay&amp;#x27;: 2,&amp;#xA;          &amp;#x27;liveCatchUpMinDrift&amp;#x27;: 0.05,&amp;#xA;          &amp;#x27;liveCatchUpPlaybackRate&amp;#x27;: 0.5,&amp;#xA;          &amp;#x27;stableBufferTime&amp;#x27;: 2,&amp;#xA;          &amp;#x27;bufferTimeAtTopQuality&amp;#x27;: 2,&amp;#xA;          &amp;#x27;bufferTimeAtTopQualityLongForm&amp;#x27;: 2,&amp;#xA;          &amp;#x27;bufferToKeep&amp;#x27;: 2,&amp;#xA;          &amp;#x27;bufferAheadToKeep&amp;#x27;: 2,&amp;#xA;          &amp;#x27;lowLatencyEnabled&amp;#x27;: true,&amp;#xA;          &amp;#x27;fastSwitchEnabled&amp;#x27;: true,&amp;#xA;          &amp;#x27;abr&amp;#x27;: {&amp;#xA;               &amp;#x27;limitBitrateByPortal&amp;#x27;: true&amp;#xA;          },&amp;#xA;       }&amp;#xA;   });&amp;#xA;&amp;#xA;   console.log(player.getSettings());&amp;#xA;&amp;#xA;   setInterval(() =&gt; {&amp;#xA;      console.log(&amp;#x27;Live latency= &amp;#x27;, player.getCurrentLiveLatency());&amp;#xA;      console.log(&amp;#x27;Buffer length= &amp;#x27;, player.getBufferLength(&amp;#x27;video&amp;#x27;));&amp;#xA;     }, 3000);&amp;#xA;&amp;#xA;     player.initialize(document.querySelector(&quot;#videoPlayer&quot;), url, true);&amp;#xA;&amp;#xA;   })();&amp;#xA;&lt;/script&gt;&#xA;

    &#xA;

    Chrome

    &#xA;

    {debug: {…}, streaming: {…}}&#xA;dash.all.min.js:2 XHR finished loading: GET "http://localhost:8081/videos/Dash/glass_live_manifest.mpd".&#xA;load @ dash.all.min.js:2&#xA;C @ dash.all.min.js:2&#xA;load @ dash.all.min.js:2&#xA;load @ dash.all.min.js:2&#xA;load @ dash.all.min.js:2&#xA;load @ dash.all.min.js:2&#xA;se @ dash.all.min.js:2&#xA;te @ dash.all.min.js:2&#xA;initialize @ dash.all.min.js:2&#xA;(anonymous) @ Dash:92&#xA;(anonymous) @ Dash:94&#xA;DevTools failed to load SourceMap: Could not parse content for http://localhost:8081/js/dash.all.min.js.map: Cannot read property &#x27;length&#x27; of undefined&#xA;Dash:88 Live latency=  NaN&#xA;Dash:89 Buffer length=  NaN&#xA;Dash:88 Live latency=  NaN&#xA;Dash:89 Buffer length=  NaN&#xA;Dash:88 Live latency=  NaN&#xA;Dash:89 Buffer length=  NaN&#xA;Dash:88 Live latency=  NaN&#xA;Dash:89 Buffer length=  NaN&#xA;Dash:88 Live latency=  NaN&#xA;Dash:89 Buffer length=  NaN&#xA;

    &#xA;

    UPDATE

    &#xA;

    Well, it seems like the problem in general was, that the mpd's wouldn't play from that /dash folder. So i took a look into the code and found a bad routing. Anyways, the mpd would't start with the given command I used, probably becasue it creates a dynamic manifest, like @Markus Schumann says. So I'm going with a new one which seems to be working for now, but not very well.

    &#xA;

    ffmpeg -y -re -i strm.webm &#xA;-c:v libx264 -x264opts "keyint=24:min-keyint=24:no-scenecut" &#xA;-r 24 -c:a aac -b:a 128k -bf 1 -b_strategy 0 -sc_threshold 0 -pix_fmt yuv420p &#xA;-map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0 -b:v:0 250k  &#xA;-filter:v:0 "scale=-2:240" -profile:v:0 baseline -b:v:1 750k  &#xA;-filter:v:1 "scale=-2:480" -profile:v:1 main -b:v:2 1500k &#xA;-filter:v:2 "scale=-2:720" -profile:v:2 high &#xA;-use_timeline 1 -use_template 1 -window_size 5 -adaptation_sets "id=0,streams=v id=1,streams=a" &#xA;-f dash glass_video_manifest.mpd&#xA;

    &#xA;

  • 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;

  • lavfi : fix race when func rets holder is NULL

    28 mars 2017, par Clément Bœsch
    lavfi : fix race when func rets holder is NULL
    

    If ret is NULL, a dummy common holder is created to hold *all* the
    parallel function returns, which gets written concurrently. This commit
    simplify the whole logic by simply not writing to that holder when not
    set.

    • [DH] libavfilter/pthread.c