Recherche avancée

Médias (1)

Mot : - Tags -/3GS

Autres articles (59)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Configuration spécifique pour PHP5

    4 février 2011, par

    PHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
    Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
    Modules spécifiques
    Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

Sur d’autres sites (9196)

  • ffmpeg with libopenh264 to get profile high422

    24 juillet 2023, par Андрей Тернити

    I have raw MJPEG video file. 3840x2160, 25fps, YUYV 4:2:2. I want use ffmpeg with encoder libopenh264. Why I can't use profile high422 ?

    


    ffmpeg -framerate 25 -i inFile.yuvj422p -profile:v high422 -c:v libopenh264 -q 2 -b 2500000 -allow_skip_frames 1 -maxrate 3500000 outFile.mkv


    


    Log

    


    ...
[libopenh264enc @ 0x56077580ed80] [Eval @ 0x7ffe78457230] Undefined constant or missing '(' in 'high422'


    


    Let's know encoder's capability

    


    # ffmpeg -h encoder=libopenh264&#xA;Encoder libopenh264 [OpenH264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10]:&#xA;    General capabilities: threads &#xA;    Threading capabilities: other&#xA;    Supported pixel formats: yuv420p&#xA;libopenh264enc AVOptions:&#xA;  -slice_mode        <int>        E..V......P set slice mode, use slices/max_nal_size (from 0 to 4) (default fixed)&#xA;     fixed           1            E..V....... a fixed number of slices&#xA;     dyn             3            E..V....... Size limited (compatibility name)&#xA;     sizelimited     3            E..V....... Size limited&#xA;  -loopfilter        <int>        E..V....... enable loop filter (from 0 to 1) (default 1)&#xA;  -profile           <int>        E..V....... set profile restrictions (from -99 to 65535) (default -99)&#xA;     constrained_baseline 578          E..V.......&#xA;     main            77           E..V.......&#xA;     high            100          E..V.......&#xA;  -max_nal_size      <int>        E..V....... set maximum NAL size in bytes (from 0 to INT_MAX) (default 0)&#xA;  -allow_skip_frames <boolean>    E..V....... allow skipping frames to hit the target bitrate (default false)&#xA;  -cabac             <int>        E..V......P Enable cabac(deprecated, use coder) (from 0 to 1) (default 0)&#xA;  -coder             <int>        E..V....... Coder type (from -1 to 1) (default default)&#xA;     default         -1           E..V.......&#xA;     cavlc           0            E..V.......&#xA;     cabac           1            E..V.......&#xA;     vlc             0            E..V.......&#xA;     ac              1            E..V.......&#xA;  -rc_mode           <int>        E..V....... Select rate control mode (from -1 to 3) (default quality)&#xA;     off             -1           E..V....... bit rate control off&#xA;     quality         0            E..V....... quality mode&#xA;     bitrate         1            E..V....... bitrate mode&#xA;     buffer          2            E..V....... using buffer status to adjust the video quality (no bitrate control)&#xA;     timestamp       3            E..V....... bit rate control based on timestamp&#xA;</int></int></int></boolean></int></int></int></int>

    &#xA;

    Looks like there is no high422 profile in libopenh264. But I can find&#xA;PRO_HIGH422 in several places of source code...

    &#xA;

    ffmpeg version

    &#xA;

    # ffmpeg -v&#xA;ffmpeg version N-111611-g5b11ee9429 Copyright (c) 2000-2023 the FFmpeg developers&#xA;  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)&#xA;  configuration: --prefix=/home/a/Downloads/myGitHub/FFmpeg_fixing/ffmpeg_openh264/ffmpeg_build/ --pkg-config-flags=--static --extra-cflags=-I/home/a/Downloads/myGitHub/FFmpeg_fixing/ffmpeg_openh264/ffmpeg_build/include --extra-ldflags=-L/home/a/Downloads/myGitHub/FFmpeg_fixing/ffmpeg_openh264/ffmpeg_build/lib --extra-libs=&#x27;-lpthread -lm&#x27; --ld=g&#x2B;&#x2B; --bindir=/home/a/bin --enable-gpl --enable-libopenh264&#xA;

    &#xA;

    Why I can't use profile high422 ?

    &#xA;

  • How do I configure codec parameters for a RTSP stream ?

    16 mai 2024, par Kermit

    I am trying to stream a network camera source into /dev/video0. However, all attempts keep telling me I have set incorrect codec parameters. Any suggestions ?

    &#xA;

    # works&#xA;ffplay rtsp://admin:password@172.16.0.184:554/live&#xA;

    &#xA;

    Then trying any of these to feed into /dev/video0 (valid from list of ls /dev/video*) :

    &#xA;

    ffmpeg -rtsp_transport tcp -i "rtsp://admin:password@172.16.0.184:554/live" -c:v rawvideo -pix_fmt yuv420p -f v4l2 /dev/video0&#xA;

    &#xA;

    Results in

    &#xA;

    ffmpeg version 5.1.4-0&#x2B;rpt3&#x2B;deb12u1 Copyright (c) 2000-2023 the FFmpeg developers&#xA;  built with gcc 12 (Debian 12.2.0-14)&#xA;  configuration: --prefix=/usr --extra-version=0&#x2B;rpt3&#x2B;deb12u1 --toolchain=hardened --incdir=/usr/include/aarch64-linux-gnu --enable-gpl --disable-stripping --disable-mmal --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sand --enable-sdl2 --disable-sndio --enable-libjxl --enable-neon --enable-v4l2-request --enable-libudev --enable-epoxy --libdir=/usr/lib/aarch64-linux-gnu --arch=arm64 --enable-pocketsphinx --enable-librsvg --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared&#xA;  libavutil      57. 28.100 / 57. 28.100&#xA;  libavcodec     59. 37.100 / 59. 37.100&#xA;  libavformat    59. 27.100 / 59. 27.100&#xA;  libavdevice    59.  7.100 / 59.  7.100&#xA;  libavfilter     8. 44.100 /  8. 44.100&#xA;  libswscale      6.  7.100 /  6.  7.100&#xA;  libswresample   4.  7.100 /  4.  7.100&#xA;  libpostproc    56.  6.100 / 56.  6.100&#xA;Input #0, rtsp, from &#x27;rtsp://admin:password@172.16.0.184:554/live&#x27;:&#xA;  Metadata:&#xA;    title           : Media Server&#xA;  Duration: N/A, start: 0.000000, bitrate: N/A&#xA;  Stream #0:0: Video: hevc (Main), yuv420p(tv), 3840x2160, 30 fps, 100 tbr, 90k tbn&#xA;  Stream #0:1: Audio: aac (LC), 32000 Hz, mono, fltp&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (hevc (native) -> rawvideo (native))&#xA;Press [q] to stop, [?] for help&#xA;[video4linux2,v4l2 @ 0x55562d9faa70] ioctl(VIDIOC_G_FMT): Invalid argument&#xA;Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument&#xA;Error initializing output stream 0:0 -- &#xA;Conversion failed!&#xA;

    &#xA;

  • Save video using opencv with H264 codec

    31 octobre 2023, par ldiaz997

    This is beyond me and I don't know what I'm doing wrong. I have read that in order to have my video in h265 codec, I need to build opencv from source. Well, I did that, and I also did it for ffmpeg Docker ffmpeg Compiler. But I'm trying to run my application using docker, and I still can't get over the error :

    &#xA;

    [ERROR:0@93.327] global cap_ffmpeg_impl.hpp:3018 open Could not find encoder for codec_id=27, error: Encoder not found&#xA;[ERROR:0@93.327] global cap_ffmpeg_impl.hpp:3093 open VIDEOIO/FFMPEG: Failed to initialize VideoWriter&#xA;

    &#xA;

    Dockerfile :

    &#xA;

    FROM python:3.10.12-slim-buster&#xA;&#xA;RUN apt-get update&#xA;&#xA;# Set the working directory in the container&#xA;WORKDIR /app&#xA;&#xA;# Copy the application code into the container&#xA;COPY . .&#xA;&#xA;# Set ffmpeg and ffprobe binary files&#xA;RUN mv ffmpeg /usr/local/bin&#xA;RUN mv ffprobe /usr/local/bin&#xA;&#xA;# Build opencv from source, to be able to use h264 codec.&#xA;RUN apt-get install -y cmake \&#xA;    gcc \&#xA;    g&#x2B;&#x2B; \&#xA;    python3-numpy \&#xA;    libavcodec-dev \&#xA;    libavformat-dev \&#xA;    libswscale-dev \&#xA;    libgstreamer-plugins-base1.0-dev \&#xA;    libgstreamer1.0-dev \&#xA;    libpng-dev \&#xA;    libjpeg-dev \&#xA;    libopenexr-dev \&#xA;    libtiff-dev \&#xA;    libwebp-dev \&#xA;    git&#xA;&#xA;RUN git clone --depth 1 --branch 4.8.0 https://github.com/opencv/opencv.git &amp;&amp; \&#xA;    git clone --depth 1 --branch 4.8.0 https://github.com/opencv/opencv_contrib.git &amp;&amp; \&#xA;    cd opencv &amp;&amp; \&#xA;    mkdir build &amp;&amp; \&#xA;    cd build &amp;&amp; \&#xA;    cmake -D OPENCV_EXTRA_MODULES_PATH=/app/opencv_contrib/modules ../ &amp;&amp; \&#xA;    make -j"$(nproc)" &amp;&amp; \&#xA;    make install&#xA;&#xA;# Remove opencv github project&#xA;RUN rm -r opencv&#xA;&#xA;# Remove opencv_contrib github project&#xA;RUN rm -r opencv_contrib&#xA;&#xA;# Prevents Python from writing pyc files to disc&#xA;ENV PYTHONDONTWRITEBYTECODE 1&#xA;&#xA;# Prevents Python from buffering stdout and stderr&#xA;ENV PYTHONUNBUFFERED 1&#xA;&#xA;# Install python dependencies&#xA;RUN pip install --upgrade pip&#xA;RUN pip install --no-cache-dir -r requirements.txt&#xA;&#xA;# Install netcat to know when rabbitmq is running&#xA;RUN apt-get install -y netcat&#xA;&#xA;# Set execute permissions&#xA;RUN chmod &#x2B;x entrypoint.sh&#xA;RUN chmod &#x2B;x web_start.sh&#xA;&#xA;ENTRYPOINT ["./entrypoint.sh"]&#xA;

    &#xA;

    I ran the command ./ffmpeg -i 57b3e3a7-ad22-469d-a7ff-cf76ba780664 -vcodec libx264 -acodec aac output.mp4 to test ffmpeg and this was the result.

    &#xA;

    ffmpeg version N-112515-gba6a5e7a3d Copyright (c) 2000-2023 the FFmpeg developers&#xA;  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 20160609&#xA;  configuration: --prefix=/root/ffmpeg_build --pkg-config-flags=--static --extra-libs=-static --extra-cflags=--static --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --extra-libs=&#x27;-lpthread -lm&#x27; --bindir=/root/bin --enable-gpl --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree&#xA;  libavutil      58. 27.100 / 58. 27.100&#xA;  libavcodec     60. 30.102 / 60. 30.102&#xA;  libavformat    60. 15.101 / 60. 15.101&#xA;  libavdevice    60.  2.101 / 60.  2.101&#xA;  libavfilter     9. 11.100 /  9. 11.100&#xA;  libswscale      7.  4.100 /  7.  4.100&#xA;  libswresample   4. 11.100 /  4. 11.100&#xA;  libpostproc    57.  2.100 / 57.  2.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;57b3e3a7-ad22-469d-a7ff-cf76ba780664&#x27;:&#xA;  Metadata:&#xA;    major_brand     : qt  &#xA;    minor_version   : 0&#xA;    compatible_brands: qt  &#xA;    creation_time   : 2023-10-30T15:34:32.000000Z&#xA;    com.apple.quicktime.make: Apple&#xA;    com.apple.quicktime.model: iPhone 13 Pro Max&#xA;    com.apple.quicktime.software: 16.6&#xA;    com.apple.quicktime.creationdate: 2023-10-30T11:34:32-0400&#xA;  Duration: 00:00:03.60, start: 0.000000, bitrate: 16264 kb/s&#xA;  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080, 16120 kb/s, 29.99 fps, 29.97 tbr, 600 tbn (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-10-30T15:34:32.000000Z&#xA;      handler_name    : Core Media Video&#xA;      vendor_id       : [0][0][0][0]&#xA;      encoder         : H.264&#xA;    Side data:&#xA;      displaymatrix: rotation of -90.00 degrees&#xA;  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 89 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-10-30T15:34:32.000000Z&#xA;      handler_name    : Core Media Audio&#xA;      vendor_id       : [0][0][0][0]&#xA;  Stream #0:2[0x3](und): Data: none (mebx / 0x7862656D), 0 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-10-30T15:34:32.000000Z&#xA;      handler_name    : Core Media Metadata&#xA;  Stream #0:3[0x4](und): Data: none (mebx / 0x7862656D), 0 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-10-30T15:34:32.000000Z&#xA;      handler_name    : Core Media Metadata&#xA;  Stream #0:4[0x5](und): Data: none (mebx / 0x7862656D), 34 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-10-30T15:34:32.000000Z&#xA;      handler_name    : Core Media Metadata&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))&#xA;  Stream #0:1 -> #0:1 (aac (native) -> aac (native))&#xA;Press [q] to stop, [?] for help&#xA;[libx264 @ 0x5ae4c00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2&#xA;[libx264 @ 0x5ae4c00] profile High, level 4.0&#xA;[libx264 @ 0x5ae4c00] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - 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=-2 threads=30 lookahead_threads=5 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=25 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;output.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : qt  &#xA;    minor_version   : 0&#xA;    compatible_brands: qt  &#xA;    com.apple.quicktime.creationdate: 2023-10-30T11:34:32-0400&#xA;    com.apple.quicktime.make: Apple&#xA;    com.apple.quicktime.model: iPhone 13 Pro Max&#xA;    com.apple.quicktime.software: 16.6&#xA;    encoder         : Lavf60.15.101&#xA;  Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1080x1920, q=2-31, 29.97 fps, 30k tbn (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-10-30T15:34:32.000000Z&#xA;      handler_name    : Core Media Video&#xA;      vendor_id       : [0][0][0][0]&#xA;      encoder         : Lavc60.30.102 libx264&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A&#xA;      displaymatrix: rotation of -0.00 degrees&#xA;  Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 69 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-10-30T15:34:32.000000Z&#xA;      handler_name    : Core Media Audio&#xA;      vendor_id       : [0][0][0][0]&#xA;      encoder         : Lavc60.30.102 aac&#xA;[out#0/mp4 @ 0x5ae3440] video:2773kB audio:31kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.157082%&#xA;frame=  108 fps= 74 q=-1.0 Lsize=    2809kB time=00:00:03.59 bitrate=6393.3kbits/s speed=2.47x    &#xA;[libx264 @ 0x5ae4c00] frame I:4     Avg QP:22.27  size: 48408&#xA;[libx264 @ 0x5ae4c00] frame P:104   Avg QP:24.58  size: 25440&#xA;[libx264 @ 0x5ae4c00] mb I  I16..4: 10.3% 82.9%  6.8%&#xA;[libx264 @ 0x5ae4c00] mb P  I16..4:  4.6% 18.1%  0.8%  P16..4: 40.3%  6.9%  4.1%  0.0%  0.0%    skip:25.3%&#xA;[libx264 @ 0x5ae4c00] 8x8 transform intra:78.0% inter:85.0%&#xA;[libx264 @ 0x5ae4c00] coded y,uvDC,uvAC intra: 44.9% 29.1% 0.1% inter: 22.5% 23.3% 0.0%&#xA;[libx264 @ 0x5ae4c00] i16 v,h,dc,p: 17% 49% 14% 19%&#xA;[libx264 @ 0x5ae4c00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 25% 37%  3%  3%  5%  3%  2%  4%&#xA;[libx264 @ 0x5ae4c00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 30% 17%  3%  4%  8%  3%  2%  3%&#xA;[libx264 @ 0x5ae4c00] i8c dc,h,v,p: 67% 20% 12%  0%&#xA;[libx264 @ 0x5ae4c00] Weighted P-Frames: Y:1.9% UV:0.0%&#xA;[libx264 @ 0x5ae4c00] ref P L0: 61.8% 10.4% 18.3%  9.4%  0.2%&#xA;[libx264 @ 0x5ae4c00] kb/s:6303.40&#xA;[aac @ 0x68c9880] Qavg: 119.986&#xA;

    &#xA;

    The resulting video had an h264 codec. In my opinion, the problem is in opencv. Basically this is what I do in my python code :

    &#xA;

    cap = cv2.VideoCapture(video)&#xA;shoot_frames = []&#xA;while True:&#xA;    ret, img = cap.read()&#xA;    if not ret:&#xA;       break&#xA;    if some_condition:&#xA;       shoot_frames.append(img)&#xA;    if len(shoot_frames) > 41:&#xA;       out1 = cv2.VideoWriter(upload_path(name , dir), cv2.VideoWriter_fourcc(*&#x27;avc1&#x27;), int(fps), (int(width), int(height)), True)&#xA;       for shoot_frame in shoot_frames:&#xA;           out1.write(shoot_frame)&#xA;       out1.release()&#xA;       shoot_frames = []&#xA;

    &#xA;

    Output from print(cv2.getBuildInformation()) :

    &#xA;

    General configuration for OpenCV 4.8.1 =====================================&#xA;  Version control:               4.8.1-dirty&#xA;&#xA;  Platform:&#xA;    Timestamp:                   2023-09-27T14:20:56Z&#xA;    Host:                        Linux 5.15.0-1046-azure x86_64&#xA;    CMake:                       3.27.5&#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 (16 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 (7 files):             &#x2B; SSSE3 SSE4_1 POPCNT SSE4_2 AVX&#xA;      AVX2 (35 files):           &#x2B; SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2&#xA;      AVX512_SKX (5 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:                /opt/rh/devtoolset-10/root/usr/bin/c&#x2B;&#x2B;  (ver 10.2.1)&#xA;    C&#x2B;&#x2B; flags (Release):         -Wl,-strip-all   -fsigned-char -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):           -Wl,-strip-all   -fsigned-char -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:                  /opt/rh/devtoolset-10/root/usr/bin/cc&#xA;    C flags (Release):           -Wl,-strip-all   -fsigned-char -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):             -Wl,-strip-all   -fsigned-char -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 -L/ffmpeg_build/lib  -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined  &#xA;    Linker flags (Debug):        -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a -L/ffmpeg_build/lib  -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined  &#xA;    ccache:                      YES&#xA;    Precompiled headers:         NO&#xA;    Extra dependencies:          /lib64/libopenblas.so Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Test Qt5::Concurrent /usr/local/lib/libpng.so /lib64/libz.so dl m pthread rt&#xA;    3rdparty dependencies:       libprotobuf ade ittnotify 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:                           QT5&#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.1.3-62)&#xA;    WEBP:                        build (ver encoder: 0x020f)&#xA;    PNG:                         /usr/local/lib/libpng.so (ver 1.6.40)&#xA;    TIFF:                        build (ver 42 - 4.2.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 (59.37.100)&#xA;      avformat:                  YES (59.27.100)&#xA;      avutil:                    YES (57.28.100)&#xA;      swscale:                   YES (6.7.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:                   2021.8 [2021.8.0]&#xA;           at:                   /io/_skbuild/linux-x86_64-3.7/cmake-build/3rdparty/ippicv/ippicv_lnx/icv&#xA;    Intel IPP IW:                sources (2021.8.0)&#xA;              at:                /io/_skbuild/linux-x86_64-3.7/cmake-build/3rdparty/ippicv/ippicv_lnx/iw&#xA;    VA:                          NO&#xA;    Lapack:                      YES (/lib64/libopenblas.so)&#xA;    Eigen:                       NO&#xA;    Custom HAL:                  NO&#xA;    Protobuf:                    build (3.19.1)&#xA;    Flatbuffers:                 builtin/3rdparty (23.5.9)&#xA;&#xA;  OpenCL:                        YES (no extra features)&#xA;    Include path:                /io/opencv/3rdparty/include/opencl/1.2&#xA;    Link libraries:              Dynamic load&#xA;&#xA;  Python 3:&#xA;    Interpreter:                 /opt/python/cp37-cp37m/bin/python3.7 (ver 3.7.17)&#xA;    Libraries:                   libpython3.7m.a (ver 3.7.17)&#xA;    numpy:                       /home/ci/.local/lib/python3.7/site-packages/numpy/core/include (ver 1.17.0)&#xA;    install path:                python/cv2/python-3&#xA;&#xA;  Python (for build):            /opt/python/cp37-cp37m/bin/python3.7&#xA;&#xA;  Java:                          &#xA;    ant:                         NO&#xA;    Java:                        NO&#xA;    JNI:                         NO&#xA;    Java wrappers:               NO&#xA;    Java tests:                  NO&#xA;&#xA;  Install to:                    /io/_skbuild/linux-x86_64-3.7/cmake-install&#xA;-----------------------------------------------------------------&#xA;&#xA;&#xA;

    &#xA;

    Update

    &#xA;

    I made my docker image more simpler, and therefore my question. Install ffmpeg from the repository :

    &#xA;

    FROM python:3.10.12-slim-buster&#xA;&#xA;RUN apt-get update&#xA;&#xA;# Set the working directory in the container&#xA;WORKDIR /app&#xA;&#xA;# Install ffmpeg for opencv&#xA;RUN apt-get install -y ffmpeg&#xA;&#xA;# Copy the application code into the container&#xA;COPY . .&#xA;&#xA;# Build opencv from source, to be able to use h264 codec.&#xA;RUN apt-get install -y cmake \&#xA;    gcc \&#xA;    g&#x2B;&#x2B; \&#xA;    python3-numpy \&#xA;    libavcodec-dev \&#xA;    libavformat-dev \&#xA;    libswscale-dev \&#xA;    libgstreamer-plugins-base1.0-dev \&#xA;    libgstreamer1.0-dev \&#xA;    libpng-dev \&#xA;    libjpeg-dev \&#xA;    libopenexr-dev \&#xA;    libtiff-dev \&#xA;    libwebp-dev \&#xA;    git&#xA;&#xA;RUN git clone --depth 1 --branch 4.8.0 https://github.com/opencv/opencv.git &amp;&amp; \&#xA;    git clone --depth 1 --branch 4.8.0 https://github.com/opencv/opencv_contrib.git &amp;&amp; \&#xA;    cd opencv &amp;&amp; \&#xA;    mkdir build &amp;&amp; \&#xA;    cd build &amp;&amp; \&#xA;    cmake -D CMAKE_BUILD_TYPE=Release -D OPENCV_EXTRA_MODULES_PATH=/app/opencv_contrib/modules -D OPENCV_ENABLE_NONFREE=ON ../ &amp;&amp; \&#xA;    make -j"$(nproc)" &amp;&amp; \&#xA;    make install&#xA;&#xA;# Remove opencv github project&#xA;RUN rm -r opencv&#xA;&#xA;# Remove opencv_contrib github project&#xA;RUN rm -r opencv_contrib&#xA;&#xA;# Prevents Python from writing pyc files to disc&#xA;ENV PYTHONDONTWRITEBYTECODE 1&#xA;&#xA;# Prevents Python from buffering stdout and stderr&#xA;ENV PYTHONUNBUFFERED 1&#xA;&#xA;# Install python dependencies&#xA;RUN pip install --upgrade pip&#xA;RUN pip install --no-cache-dir -r requirements.txt&#xA;&#xA;# Install netcat to know when rabbitmq is running&#xA;RUN apt-get install -y netcat&#xA;&#xA;# Set execute permissions&#xA;RUN chmod &#x2B;x entrypoint.sh&#xA;RUN chmod &#x2B;x web_start.sh&#xA;&#xA;ENTRYPOINT ["./entrypoint.sh"]&#xA;

    &#xA;

    Run the following commands inside the docker container :

    &#xA;

    $ ffmpeg -version&#xA;&#xA;ffmpeg version 4.1.11-0&#x2B;deb10u1 Copyright (c) 2000-2023 the FFmpeg developers&#xA;built with gcc 8 (Debian 8.3.0-6)&#xA;configuration: --prefix=/usr --extra-version=0&#x2B;deb10u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared&#xA;libavutil      56. 22.100 / 56. 22.100&#xA;libavcodec     58. 35.100 / 58. 35.100&#xA;libavformat    58. 20.100 / 58. 20.100&#xA;libavdevice    58.  5.100 / 58.  5.100&#xA;libavfilter     7. 40.101 /  7. 40.101&#xA;libavresample   4.  0.  0 /  4.  0.  0&#xA;libswscale      5.  3.100 /  5.  3.100&#xA;libswresample   3.  3.100 /  3.  3.100&#xA;libpostproc    55.  3.100 / 55.  3.100&#xA;

    &#xA;

    $ ffmpeg -i cf91f302-c357-49ba-b59c-bcfb8b7f4866 -vcodec libx264 -f mp4 output.mp4&#xA;&#xA;ffmpeg version 4.1.11-0&#x2B;deb10u1 Copyright (c) 2000-2023 the FFmpeg developers&#xA;  built with gcc 8 (Debian 8.3.0-6)&#xA;  configuration: --prefix=/usr --extra-version=0&#x2B;deb10u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared&#xA;  libavutil      56. 22.100 / 56. 22.100&#xA;  libavcodec     58. 35.100 / 58. 35.100&#xA;  libavformat    58. 20.100 / 58. 20.100&#xA;  libavdevice    58.  5.100 / 58.  5.100&#xA;  libavfilter     7. 40.101 /  7. 40.101&#xA;  libavresample   4.  0.  0 /  4.  0.  0&#xA;  libswscale      5.  3.100 /  5.  3.100&#xA;  libswresample   3.  3.100 /  3.  3.100&#xA;  libpostproc    55.  3.100 / 55.  3.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;cf91f302-c357-49ba-b59c-bcfb8b7f4866&#x27;:&#xA;  Metadata:&#xA;    major_brand     : qt  &#xA;    minor_version   : 0&#xA;    compatible_brands: qt  &#xA;    creation_time   : 2023-10-31T10:38:42.000000Z&#xA;    com.apple.quicktime.make: Apple&#xA;    com.apple.quicktime.model: iPhone 13 Pro Max&#xA;    com.apple.quicktime.software: 16.6&#xA;    com.apple.quicktime.creationdate: 2023-10-31T06:38:42-0400&#xA;  Duration: 00:00:04.23, start: 0.000000, bitrate: 15915 kb/s&#xA;    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 15767 kb/s, 30 fps, 30 tbr, 600 tbn, 1200 tbc (default)&#xA;    Metadata:&#xA;      rotate          : 90&#xA;      creation_time   : 2023-10-31T10:38:42.000000Z&#xA;      handler_name    : Core Media Video&#xA;      encoder         : H.264&#xA;    Side data:&#xA;      displaymatrix: rotation of -90.00 degrees&#xA;    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 89 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-10-31T10:38:42.000000Z&#xA;      handler_name    : Core Media Audio&#xA;    Stream #0:2(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-10-31T10:38:42.000000Z&#xA;      handler_name    : Core Media Metadata&#xA;    Stream #0:3(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-10-31T10:38:42.000000Z&#xA;      handler_name    : Core Media Metadata&#xA;    Stream #0:4(und): Data: none (mebx / 0x7862656D), 34 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-10-31T10:38:42.000000Z&#xA;      handler_name    : Core Media Metadata&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))&#xA;  Stream #0:1 -> #0:1 (aac (native) -> aac (native))&#xA;Press [q] to stop, [?] for help&#xA;[libx264 @ 0x55db965ee980] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2&#xA;[libx264 @ 0x55db965ee980] profile High, level 4.0&#xA;[libx264 @ 0x55db965ee980] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - 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=-2 threads=6 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=25 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;output.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : qt  &#xA;    minor_version   : 0&#xA;    compatible_brands: qt  &#xA;    com.apple.quicktime.creationdate: 2023-10-31T06:38:42-0400&#xA;    com.apple.quicktime.make: Apple&#xA;    com.apple.quicktime.model: iPhone 13 Pro Max&#xA;    com.apple.quicktime.software: 16.6&#xA;    encoder         : Lavf58.20.100&#xA;    Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1080x1920, q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)&#xA;    Metadata:&#xA;      encoder         : Lavc58.35.100 libx264&#xA;      creation_time   : 2023-10-31T10:38:42.000000Z&#xA;      handler_name    : Core Media Video&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1&#xA;      displaymatrix: rotation of -0.00 degrees&#xA;    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 69 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-10-31T10:38:42.000000Z&#xA;      handler_name    : Core Media Audio&#xA;      encoder         : Lavc58.35.100 aac&#xA;frame=  127 fps= 27 q=-1.0 Lsize=    2005kB time=00:00:04.24 bitrate=3866.2kbits/s speed=0.909x    &#xA;video:1964kB audio:36kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.282549%&#xA;[libx264 @ 0x55db965ee980] frame I:1     Avg QP:21.43  size: 36791&#xA;[libx264 @ 0x55db965ee980] frame P:59    Avg QP:23.61  size: 22380&#xA;[libx264 @ 0x55db965ee980] frame B:67    Avg QP:24.20  size:  9743&#xA;[libx264 @ 0x55db965ee980] consecutive B-frames: 20.5% 22.0% 16.5% 40.9%&#xA;[libx264 @ 0x55db965ee980] mb I  I16..4: 29.4% 58.6% 11.9%&#xA;[libx264 @ 0x55db965ee980] mb P  I16..4: 15.0% 21.8%  1.3%  P16..4: 26.1%  7.5%  3.1%  0.0%  0.0%    skip:25.2%&#xA;[libx264 @ 0x55db965ee980] mb B  I16..4:  1.9%  1.7%  0.1%  B16..8: 36.3%  3.6%  0.5%  direct: 3.9%  skip:52.1%  L0:42.9% L1:52.1% BI: 5.0%&#xA;[libx264 @ 0x55db965ee980] 8x8 transform intra:56.2% inter:86.6%&#xA;[libx264 @ 0x55db965ee980] coded y,uvDC,uvAC intra: 19.5% 27.3% 2.1% inter: 11.7% 18.9% 0.1%&#xA;[libx264 @ 0x55db965ee980] i16 v,h,dc,p: 25% 54%  8% 12%&#xA;[libx264 @ 0x55db965ee980] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 25% 44%  1%  2%  2%  2%  1%  1%&#xA;[libx264 @ 0x55db965ee980] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 45% 13%  2%  7%  6%  6%  3%  3%&#xA;[libx264 @ 0x55db965ee980] i8c dc,h,v,p: 62% 27% 10%  1%&#xA;[libx264 @ 0x55db965ee980] Weighted P-Frames: Y:3.4% UV:0.0%&#xA;[libx264 @ 0x55db965ee980] ref P L0: 65.2% 18.0% 12.2%  4.6%  0.1%&#xA;[libx264 @ 0x55db965ee980] ref B L0: 89.1%  9.3%  1.6%&#xA;[libx264 @ 0x55db965ee980] ref B L1: 97.2%  2.8%&#xA;[libx264 @ 0x55db965ee980] kb/s:3798.37&#xA;[aac @ 0x55db965edf00] Qavg: 125.454&#xA;

    &#xA;

    The errors persist.

    &#xA;

    >>> import cv2&#xA;>>> out = cv2.VideoWriter("./out.mp4", cv2.VideoWriter_fourcc(*&#x27;avc1&#x27;), 30, (800, 600), True)&#xA;[ERROR:0@91.872] global cap_ffmpeg_impl.hpp:3018 open Could not find encoder for codec_id=27, error: Encoder not found&#xA;[ERROR:0@91.872] global cap_ffmpeg_impl.hpp:3093 open VIDEOIO/FFMPEG: Failed to initialize VideoWriter&#xA;

    &#xA;

    Could someone please tell me what I'm doing wrong ?

    &#xA;