Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP 0.2

Autres articles (32)

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

Sur d’autres sites (3485)

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

    


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


    


    Dockerfile :

    


    FROM python:3.10.12-slim-buster

RUN apt-get update

# Set the working directory in the container
WORKDIR /app

# Copy the application code into the container
COPY . .

# Set ffmpeg and ffprobe binary files
RUN mv ffmpeg /usr/local/bin
RUN mv ffprobe /usr/local/bin

# Build opencv from source, to be able to use h264 codec.
RUN apt-get install -y cmake \
    gcc \
    g++ \
    python3-numpy \
    libavcodec-dev \
    libavformat-dev \
    libswscale-dev \
    libgstreamer-plugins-base1.0-dev \
    libgstreamer1.0-dev \
    libpng-dev \
    libjpeg-dev \
    libopenexr-dev \
    libtiff-dev \
    libwebp-dev \
    git

RUN git clone --depth 1 --branch 4.8.0 https://github.com/opencv/opencv.git && \
    git clone --depth 1 --branch 4.8.0 https://github.com/opencv/opencv_contrib.git && \
    cd opencv && \
    mkdir build && \
    cd build && \
    cmake -D OPENCV_EXTRA_MODULES_PATH=/app/opencv_contrib/modules ../ && \
    make -j"$(nproc)" && \
    make install

# Remove opencv github project
RUN rm -r opencv

# Remove opencv_contrib github project
RUN rm -r opencv_contrib

# Prevents Python from writing pyc files to disc
ENV PYTHONDONTWRITEBYTECODE 1

# Prevents Python from buffering stdout and stderr
ENV PYTHONUNBUFFERED 1

# Install python dependencies
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt

# Install netcat to know when rabbitmq is running
RUN apt-get install -y netcat

# Set execute permissions
RUN chmod +x entrypoint.sh
RUN chmod +x web_start.sh

ENTRYPOINT ["./entrypoint.sh"]


    


    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.

    


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


    


    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 :

    


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


    


    Output from print(cv2.getBuildInformation()) :

    


    General configuration for OpenCV 4.8.1 =====================================
  Version control:               4.8.1-dirty

  Platform:
    Timestamp:                   2023-09-27T14:20:56Z
    Host:                        Linux 5.15.0-1046-azure x86_64
    CMake:                       3.27.5
    CMake generator:             Unix Makefiles
    CMake build tool:            /bin/gmake
    Configuration:               Release

  CPU/HW features:
    Baseline:                    SSE SSE2 SSE3
      requested:                 SSE3
    Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX AVX2 AVX512_SKX
      requested:                 SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
      SSE4_1 (16 files):         + SSSE3 SSE4_1
      SSE4_2 (1 files):          + SSSE3 SSE4_1 POPCNT SSE4_2
      FP16 (0 files):            + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
      AVX (7 files):             + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
      AVX2 (35 files):           + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
      AVX512_SKX (5 files):      + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_COMMON AVX512_SKX

  C/C++:
    Built as dynamic libs?:      NO
    C++ standard:                11
    C++ Compiler:                /opt/rh/devtoolset-10/root/usr/bin/c++  (ver 10.2.1)
    C++ 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
    C++ 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
    C Compiler:                  /opt/rh/devtoolset-10/root/usr/bin/cc
    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
    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
    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  
    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  
    ccache:                      YES
    Precompiled headers:         NO
    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
    3rdparty dependencies:       libprotobuf ade ittnotify libjpeg-turbo libwebp libtiff libopenjp2 IlmImf quirc ippiw ippicv

  OpenCV modules:
    To be built:                 calib3d core dnn features2d flann gapi highgui imgcodecs imgproc ml objdetect photo python3 stitching video videoio
    Disabled:                    world
    Disabled by dependency:      -
    Unavailable:                 java python2 ts
    Applications:                -
    Documentation:               NO
    Non-free algorithms:         NO

  GUI:                           QT5
    QT:                          YES (ver 5.15.0 )
      QT OpenGL support:         NO
    GTK+:                        NO
    VTK support:                 NO

  Media I/O: 
    ZLib:                        /lib64/libz.so (ver 1.2.7)
    JPEG:                        libjpeg-turbo (ver 2.1.3-62)
    WEBP:                        build (ver encoder: 0x020f)
    PNG:                         /usr/local/lib/libpng.so (ver 1.6.40)
    TIFF:                        build (ver 42 - 4.2.0)
    JPEG 2000:                   build (ver 2.5.0)
    OpenEXR:                     build (ver 2.3.0)
    HDR:                         YES
    SUNRASTER:                   YES
    PXM:                         YES
    PFM:                         YES

  Video I/O:
    DC1394:                      NO
    FFMPEG:                      YES
      avcodec:                   YES (59.37.100)
      avformat:                  YES (59.27.100)
      avutil:                    YES (57.28.100)
      swscale:                   YES (6.7.100)
      avresample:                NO
    GStreamer:                   NO
    v4l/v4l2:                    YES (linux/videodev2.h)

  Parallel framework:            pthreads

  Trace:                         YES (with Intel ITT)

  Other third-party libraries:
    Intel IPP:                   2021.8 [2021.8.0]
           at:                   /io/_skbuild/linux-x86_64-3.7/cmake-build/3rdparty/ippicv/ippicv_lnx/icv
    Intel IPP IW:                sources (2021.8.0)
              at:                /io/_skbuild/linux-x86_64-3.7/cmake-build/3rdparty/ippicv/ippicv_lnx/iw
    VA:                          NO
    Lapack:                      YES (/lib64/libopenblas.so)
    Eigen:                       NO
    Custom HAL:                  NO
    Protobuf:                    build (3.19.1)
    Flatbuffers:                 builtin/3rdparty (23.5.9)

  OpenCL:                        YES (no extra features)
    Include path:                /io/opencv/3rdparty/include/opencl/1.2
    Link libraries:              Dynamic load

  Python 3:
    Interpreter:                 /opt/python/cp37-cp37m/bin/python3.7 (ver 3.7.17)
    Libraries:                   libpython3.7m.a (ver 3.7.17)
    numpy:                       /home/ci/.local/lib/python3.7/site-packages/numpy/core/include (ver 1.17.0)
    install path:                python/cv2/python-3

  Python (for build):            /opt/python/cp37-cp37m/bin/python3.7

  Java:                          
    ant:                         NO
    Java:                        NO
    JNI:                         NO
    Java wrappers:               NO
    Java tests:                  NO

  Install to:                    /io/_skbuild/linux-x86_64-3.7/cmake-install
-----------------------------------------------------------------




    


    Update

    


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

    


    FROM python:3.10.12-slim-buster

RUN apt-get update

# Set the working directory in the container
WORKDIR /app

# Install ffmpeg for opencv
RUN apt-get install -y ffmpeg

# Copy the application code into the container
COPY . .

# Build opencv from source, to be able to use h264 codec.
RUN apt-get install -y cmake \
    gcc \
    g++ \
    python3-numpy \
    libavcodec-dev \
    libavformat-dev \
    libswscale-dev \
    libgstreamer-plugins-base1.0-dev \
    libgstreamer1.0-dev \
    libpng-dev \
    libjpeg-dev \
    libopenexr-dev \
    libtiff-dev \
    libwebp-dev \
    git

RUN git clone --depth 1 --branch 4.8.0 https://github.com/opencv/opencv.git && \
    git clone --depth 1 --branch 4.8.0 https://github.com/opencv/opencv_contrib.git && \
    cd opencv && \
    mkdir build && \
    cd build && \
    cmake -D CMAKE_BUILD_TYPE=Release -D OPENCV_EXTRA_MODULES_PATH=/app/opencv_contrib/modules -D OPENCV_ENABLE_NONFREE=ON ../ && \
    make -j"$(nproc)" && \
    make install

# Remove opencv github project
RUN rm -r opencv

# Remove opencv_contrib github project
RUN rm -r opencv_contrib

# Prevents Python from writing pyc files to disc
ENV PYTHONDONTWRITEBYTECODE 1

# Prevents Python from buffering stdout and stderr
ENV PYTHONUNBUFFERED 1

# Install python dependencies
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt

# Install netcat to know when rabbitmq is running
RUN apt-get install -y netcat

# Set execute permissions
RUN chmod +x entrypoint.sh
RUN chmod +x web_start.sh

ENTRYPOINT ["./entrypoint.sh"]


    


    Run the following commands inside the docker container :

    


    $ ffmpeg -version

ffmpeg version 4.1.11-0+deb10u1 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 8 (Debian 8.3.0-6)
configuration: --prefix=/usr --extra-version=0+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
libavutil      56. 22.100 / 56. 22.100
libavcodec     58. 35.100 / 58. 35.100
libavformat    58. 20.100 / 58. 20.100
libavdevice    58.  5.100 / 58.  5.100
libavfilter     7. 40.101 /  7. 40.101
libavresample   4.  0.  0 /  4.  0.  0
libswscale      5.  3.100 /  5.  3.100
libswresample   3.  3.100 /  3.  3.100
libpostproc    55.  3.100 / 55.  3.100


    


    $ ffmpeg -i cf91f302-c357-49ba-b59c-bcfb8b7f4866 -vcodec libx264 -f mp4 output.mp4

ffmpeg version 4.1.11-0+deb10u1 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --prefix=/usr --extra-version=0+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
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'cf91f302-c357-49ba-b59c-bcfb8b7f4866':
  Metadata:
    major_brand     : qt  
    minor_version   : 0
    compatible_brands: qt  
    creation_time   : 2023-10-31T10:38:42.000000Z
    com.apple.quicktime.make: Apple
    com.apple.quicktime.model: iPhone 13 Pro Max
    com.apple.quicktime.software: 16.6
    com.apple.quicktime.creationdate: 2023-10-31T06:38:42-0400
  Duration: 00:00:04.23, start: 0.000000, bitrate: 15915 kb/s
    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)
    Metadata:
      rotate          : 90
      creation_time   : 2023-10-31T10:38:42.000000Z
      handler_name    : Core Media Video
      encoder         : H.264
    Side data:
      displaymatrix: rotation of -90.00 degrees
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 89 kb/s (default)
    Metadata:
      creation_time   : 2023-10-31T10:38:42.000000Z
      handler_name    : Core Media Audio
    Stream #0:2(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
    Metadata:
      creation_time   : 2023-10-31T10:38:42.000000Z
      handler_name    : Core Media Metadata
    Stream #0:3(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
    Metadata:
      creation_time   : 2023-10-31T10:38:42.000000Z
      handler_name    : Core Media Metadata
    Stream #0:4(und): Data: none (mebx / 0x7862656D), 34 kb/s (default)
    Metadata:
      creation_time   : 2023-10-31T10:38:42.000000Z
      handler_name    : Core Media Metadata
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x55db965ee980] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x55db965ee980] profile High, level 4.0
[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
Output #0, mp4, to 'output.mp4':
  Metadata:
    major_brand     : qt  
    minor_version   : 0
    compatible_brands: qt  
    com.apple.quicktime.creationdate: 2023-10-31T06:38:42-0400
    com.apple.quicktime.make: Apple
    com.apple.quicktime.model: iPhone 13 Pro Max
    com.apple.quicktime.software: 16.6
    encoder         : Lavf58.20.100
    Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1080x1920, q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
    Metadata:
      encoder         : Lavc58.35.100 libx264
      creation_time   : 2023-10-31T10:38:42.000000Z
      handler_name    : Core Media Video
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
      displaymatrix: rotation of -0.00 degrees
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 69 kb/s (default)
    Metadata:
      creation_time   : 2023-10-31T10:38:42.000000Z
      handler_name    : Core Media Audio
      encoder         : Lavc58.35.100 aac
frame=  127 fps= 27 q=-1.0 Lsize=    2005kB time=00:00:04.24 bitrate=3866.2kbits/s speed=0.909x    
video:1964kB audio:36kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.282549%
[libx264 @ 0x55db965ee980] frame I:1     Avg QP:21.43  size: 36791
[libx264 @ 0x55db965ee980] frame P:59    Avg QP:23.61  size: 22380
[libx264 @ 0x55db965ee980] frame B:67    Avg QP:24.20  size:  9743
[libx264 @ 0x55db965ee980] consecutive B-frames: 20.5% 22.0% 16.5% 40.9%
[libx264 @ 0x55db965ee980] mb I  I16..4: 29.4% 58.6% 11.9%
[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%
[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%
[libx264 @ 0x55db965ee980] 8x8 transform intra:56.2% inter:86.6%
[libx264 @ 0x55db965ee980] coded y,uvDC,uvAC intra: 19.5% 27.3% 2.1% inter: 11.7% 18.9% 0.1%
[libx264 @ 0x55db965ee980] i16 v,h,dc,p: 25% 54%  8% 12%
[libx264 @ 0x55db965ee980] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 25% 44%  1%  2%  2%  2%  1%  1%
[libx264 @ 0x55db965ee980] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 45% 13%  2%  7%  6%  6%  3%  3%
[libx264 @ 0x55db965ee980] i8c dc,h,v,p: 62% 27% 10%  1%
[libx264 @ 0x55db965ee980] Weighted P-Frames: Y:3.4% UV:0.0%
[libx264 @ 0x55db965ee980] ref P L0: 65.2% 18.0% 12.2%  4.6%  0.1%
[libx264 @ 0x55db965ee980] ref B L0: 89.1%  9.3%  1.6%
[libx264 @ 0x55db965ee980] ref B L1: 97.2%  2.8%
[libx264 @ 0x55db965ee980] kb/s:3798.37
[aac @ 0x55db965edf00] Qavg: 125.454


    


    The errors persist.

    


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


    


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

    


  • Custom Segmentation Guide : How it Works & Segments to Test

    13 novembre 2023, par Erin — Analytics Tips, Uncategorized

    Struggling to get the insights you’re looking for with premade reports and audience segments in your analytics ?

    Custom segmentation can help you better understand your customers, app users or website visitors, but only if you know what you’re doing.

    You can derive false insights with the wrong segments, leading your marketing campaigns or product development in the wrong direction.

    In this article, we’ll break down what custom segmentation is, useful custom segments to consider, how new privacy laws affect segmentation options and how to create these segments in an analytics platform.

    What is custom segmentation ?

    Custom segmentation is when you divide your audience (customers, users, website visitors) into bespoke segments of your own design, not premade segments designed by the analytics or marketing platform provider.

    To do this, you single out “custom segment input” — data points you will use to pinpoint certain users. For example, it could be everyone who has visited a certain page on your site.

    Illustration of how custom segmentation works

    Segmentation isn’t just useful for targeting marketing campaigns and also for analysing your customer data. Creating segments is a great way to dive deeper into your data beyond surface-level insights.

    You can explore how various factors impact engagement, conversion rates, and customer lifetime value. These insights can help guide your higher-level strategy, not just campaigns.

    How custom segments can help your business

    As the global business world clamours to become more “data-driven,” even smaller companies collect all sorts of data on visitors, users, and customers.

    However, inexperienced organisations often become “data hoarders” without meaningful insights. They have in-house servers full of data or gigabytes stored by Google Analytics and other third-party providers.

    Illustration of a company that only collects data

    One way to leverage this data is with standard customer segmentation models. This can help you get insights into your most valuable customer groups and other standard segments.

    Custom segments, in turn, can help you dive deeper. They help you unlock insights into the “why” of certain behaviours. They can help you segment customers and your audience to figure out :

    • Why and how someone became a loyal customer
    • How high-order-value customers interact with your site before purchases
    • Which behaviours indicate audience members are likely to convert
    • Which traffic sources drive the most valuable customers

    This specific insight’s power led Gartner to predict that 70% of companies will shift focus from “big data” to “small and wide” by 2025. The lateral detail is what helps inform your marketing strategy. 

    You don’t need the same volume of data if you’re analysing and segmenting it effectively.

    Custom segment inputs : 6 data points you can use to create valuable custom segments 

    To help you get started, here are six useful data points you can use as a basis to create segments — AKA customer segment inputs :

    Diagram of the different possible custom segment inputs

    Visits to certain pages

    A basic data point that’s great for custom segments is visits to certain pages. Create segments for popular middle-of-funnel pages and compare their engagement and conversion rates. 

    For example, if a user visits a case study page, you can compare their likelihood to convert vs. other visitors.

    This is a type of behavioural segmentation, but it is the easiest custom segment to set up in terms of analysis and marketing efforts.

    Visitors who perform certain actions

    The other important type of behavioural segment is visitors or users who take certain actions. Think of things like downloading a file, clicking a link, playing a video or scrolling a certain amount.

    For instance, you can create a segment of all visitors who have downloaded a white paper. This can help you explore, for example, what drives someone to download a white paper. You can look at the typical user journey and make it easier for them to access the white paper — especially if your sales reps indicate many inbound leads mention it as a key driver of their interest.

    User devices

    Device-based segmentation lets you compare engagement and conversion rates on mobile, desktop and tablets. You can also get insights into their usage patterns and potential issues with certain mobile elements.

    Mobile device users segment in Matomo Analytics

    This is one aspect of technographic segmentation, where you segment based on users’ hardware or software. You can also create segments based on browser software or even specific versions.

    Loyal or high-value customers

    The best way to get more loyal or high-value customers is to explore their journey in more detail. These types of segments can help you better understand your ideal customers and how they act on your site.

    You can then use this insight to alter your campaigns or how you communicate with your target audience.

    For example, you might notice that high-value customers tend to come from a certain source. You can then focus your marketing efforts on this source to reach more of your ideal customers.

    Visitor or customer source

    You need to track the results if you’re investing in marketing (like an influencer campaign or a sponsored post) outside platforms with their own analytics.

    Screenshot of the free Matomo tracking URL builder

    Before you can create a reliable segment, you need to make sure that you use campaign tracking parameters to reliably track the source. You can use our free campaign tracking URL builder for that.

    Demographic segments — location (country, state) and more

    Web analytics tools, such as Matomo, use visitors’ IP addresses to pinpoint their location more accurately by cross-referencing with a database of known and estimated IP locations. In addition, these tools can detect a visitor’s location through the language settings in their browser. 

    This can help create segments based on location or language. By exploring these trends, you can identify patterns in behaviour, tailor your content to specific audiences, and adapt your overall strategy to better meet the preferences and needs of your diverse visitor base.

    How new privacy laws affect segmentation options

    Over the past few years, new legislation regarding privacy and customer data has been passed globally. The most notable privacy laws are the GDPR in the EU, the CCPA in California and the VCDPA in Virginia.

    Illustration of the impact of new privacy regulations on analytics

    For most companies, it can save a lot of work and future headaches to choose a GDPR-compliant web analytics solution not only streamlines operations, saving considerable effort and preventing future headaches, but also ensures peace of mind by guaranteeing the collection of compliant and accurate data. This approach allows companies to maintain compliance with privacy regulations while remaining firmly committed to a data-driven strategy.

    Create your very own custom segments in Matomo (while ensuring compliance and data accuracy)

    Crafting precise marketing messages and optimising ROI is crucial, but it becomes challenging without the right tools, especially when it comes to maintaining accurate data.

    That’s where Matomo comes in. Our privacy-friendly web analytics platform is GDPR-compliant and ensures accurate data, empowering you to effortlessly create and analyse precise custom segments.

    If you want to improve your marketing campaigns while remaining GDPR-compliant, start your 21-day free trial of Matomo. No credit card required.

  • The Guide to an Ethical Web : With Big Data Comes Big Responsibility

    13 mars, par Alex Carmona

    Roughly two-thirds of Earth’s 8 billion people use the internet for communication, education, entertainment, business and more. We are connected globally in ways previous generations could’ve never dreamed of. It’s been a wild ride, and we’re just starting.

    Many users have learned that experiences online can be a mix of good and bad. Sometimes, the bad can feel like it outweighs the good, particularly when large tech companies use our data shadily, cut corners on accessibility or act in any other way that devalues the human being behind the screen.

    As fellow internet citizens, what responsibility do we have to create a more ethical web for our customers ?

    In this article, we’ll look at ethical principles online and how to act (and not act) to build trust, reach customers regardless of ability, safeguard privacy and stay compliant while improving business outcomes.

    2025 Ethical Marketing Guide image with a mobile phone and orange button call to action.

    What is an “ethical web” ?

    When we talk about the ethical web, we’re talking about the use of the internet in an ethical way. Among other values, it involves transparency, consent and restraint. It applies the Golden Rule to the internet : Treat others (and their data and user experience) how you’d want yourself (and yours) to be treated. 

    With limited oversight, the internet has evolved in ways that often prioritise profit over user rights. While selling data or pushing cookies might seem logical in this context, they can undermine trust and reputation. And the tide is slowly but surely shifting as consumers and legislators push back.

    Consumers no longer want to buy from companies that will use their data in ways they don’t agree to. In 2022, 75% of UK and US consumers surveyed said they were uncomfortable purchasing from businesses with weak data ethics.

    Legislators worldwide have been taking part in this effort for nearly a decade, with laws like GDPR in the EU and LGPD in Brazil, as well as the various state laws in the US, like California’s CCPA and Virginia’s VCDPA

    Even tech giants are no longer above the law, like Meta, which was fined over a billion Euros for GDPR violations in 2023.

    An image defining the Golden Rule of the Internet. Treat others, their data and user experience like you would want yourself and yours to be treated.

    These changes may make the internet feel less business-friendly at first glance, but ethical choices ultimately build a stronger digital ecosystem for both companies and consumers. 

    Likewise, all internet users alike can make this happen by shunning short-term profit and convenience for healthier, long-term choices and behaviour.

    As we dig into what it takes to build an ethical web, remember that no company or individual is free from mistakes in these areas nor is it an overnight fix. Progress is made one click at a time.

    Ethical SEO : Optimising your content and your ethics

    Content creation and search engine optimisation (SEO) require so much work that it’s hard to fault creators for not always abiding by search engine guidelines and seeking shortcuts – especially when there’s a sea of LinkedIn posts about how copying/pasting ChatGPT responses helped someone rank #1 for several keywords in one week.

    However, users turn to Google and other search engines for something of substance that will guide or entertain them.

    Content meets customer needs and is more likely to lead to sales when it’s well-written, original and optimised just enough to make it easier to find on the first page of results. This doesn’t happen when content teams dilute quality and waste a reader or viewer’s time on posts that will only yield a higher bounce rate.

    Some SEO pros do find success by building backlinks through private blog networks or crafting a million unedited posts with generative AI, but it’s short-lived. Google and other search engines always catch up, and their content plummets or gets penalised and delisted with every new update.

    Content teams can still rank at the top while sticking to ethical SEO principles. Here’s a sample list of dos and don’ts to get started :

    • Do put content quality above all else. Make content that serves the audience, not just a brand or partner ad network.
    • Do apply the E-E-A-T framework. Search engines value content written by authors who bring expertise, experience, authority and trust (E-E-A-T).
    • Don’t keyword stuff. This might have worked in the early days of SEO, but it hurts readability and now harms article performance.
    • Do use alt text as intended. While it can still help SEO, alt text should prioritise accessibility for users with screen readers.
    • Don’t steal content. Whether it’s violating copyright, copying/pasting other people’s content or simply paraphrasing without citation, companies should never steal content.
    • Don’t steal ideas. It’s okay to join in on a current conversation or trends in an industry, but content creators should be sure they have something valuable to add.
    • Do use AI tools as partners, not creators. AI can be an incredible aid in crafting content, but it should never be posted without a human’s touch.

    When we follow ethical SEO guidelines and get more clients with our content, how do we best handle their data ?

    Ethical data governance : Important principles and how to avoid data misuse

    Data governance comprises every aspect of how a company manages data, including storage, security, privacy, lifecycle management, setting policies and maintaining compliance with laws like GDPR and HIPAA.

    Applying data ethics to governance is doing it all in a transparent, restrained way that acknowledges an individual’s right to ownership over their data. 

    For organisations, this translates to getting consent to collect data and clearly spelling out how it will be stored and used — and sticking to it.

    If a user’s birth date is needed for legal reasons, it cannot be sold to a third party or later used for something else without explicit permission. Reusing data in ways that stray from its original purpose is a form of commingling, one of the data misuses that is easy for even well-intentioned teams to do accidentally.

    Ethical data governance also includes the vigilant safeguarding of users’ data and minimising potential privacy issues.

    Failing to implement and adhere to strong security measures leads to situations like the National Public Data (NPD) breach, where cyber criminals expose the addresses, phone numbers and social security numbers of hundreds of millions of people. This was due in large part to a weakness in storing login credentials and a lack of password policy enforcement.

    No one at NPD wanted this to happen, but security likely took a backseat to other business concerns, leading to the company’s filing for bankruptcy.

    More importantly, as a data broker that aggregates information from other sources, the people affected likely had no clue this organisation had been buying and selling their data. The companies originally entrusted with their information helped provide the leaked data, showing a lack of care for privacy.

    Situations like this reinforce the need for strict data protection laws and for companies to refine their data governance approach. 

    Businesses can improve their data governance posturing with managers and other higher-ups setting the right tone at the top. If leadership takes a firm and disciplined approach by setting and adhering to strong policies, the rest of the team will follow and minimise the chances of data misuse and security incidents.

    One way to start is by using tools that make the principles of data ethics easier to follow.

    Ethical web analytics : Drawing insights while respecting privacy

    Web analytics tools are designed to gather data about users and what they do while visiting a site.
    The most popular tool worldwide is Google Analytics (GA). Its brand name and feature set carry a lot of weight, but many former users have switched to alternatives due to dissatisfaction with the changes made in GA4 and reservations about the way Google handles data.

    An image of a spiderweb with a user trapped in it. A spider looks hungrily at the user to symbolise the relationship between the unethical use of web analytics data and customer harm

    Google is another tech giant that has been slapped with massive GDPR fines for issues over its data processing practices. It has run so afoul of compliance that it was banned in France and Austria for a while. Additionally, in the US Department of Justice’s ongoing antitrust lawsuit against Google, the company’s data tracking has been targeted for both how it affects users and potential rivals.

    Unlike GA, ethical web analytics tools allow websites to get the data they need while respecting user privacy.

    Matomo offers privacy protections like :

    We’re also fully transparent about how we handle your data on the web and in the Matomo Cloud and in how we build Matomo as an open-source tool. Our openness allows you to be more open with your customers and how you ethically use their data.

    There are other GDPR-compliant tools on the market, but some of them, like Adobe Analytics, require more setup from users for compliance, don’t grant full control over data and don’t offer on-premise options or consent-free tracking.

    Beyond tracking, there are other ways to make a user’s experience more enjoyable and ethical.

    Ethical user experience : User-friendliness, not user-hostility

    When designing a website or application, creating a positive user experience (UX) always comes first. 

    The UI should be simple to navigate, data and privacy policy information should be easy to find and customers should feel welcomed. They must never be tricked into consenting or installing. 

    When businesses resort to user-hostile tactics, the UX becomes a battle between the user and them. What may seem like a clever tactic to increase sign-ups can alienate potential customers and ruin a brand’s image. 

    Here are some best practices for creating a more ethical UX :

    Avoid dark patterns

    Dark patterns are UI designs and strategies that mislead users into paying for, agreeing to or doing something they don’t actually want. These designs are unethical because they’re manipulative and remove transparency and consent from the interaction. 

    In some cases, they’re illegal and can bring lawsuits. 

    In 2023, Italy’s Data Protection Authority (DPA) fined a digital marketing company €300,000 for alleged GDPR violations. They employed dark patterns by asking customers to accept cookies again after rejecting them and placing the option to reject cookies outside the cookie banner. 

    Despite their legality and 56% of surveyed customers losing trust in platforms that employ dark patterns, a review by the Organisation for Economic Co-operation and Development (OECD) found that 76% of the websites examined contained at least one dark pattern.

    An image showing a person frustrated at a computer with an evil smile on it to symbolise poor user experience caused by unethical web design.

    If a company is worried that they may be relying on dark patterns, here are some examples of what to avoid :

    • Pre-ticking boxes to have users agree to third-party cookies, sign up for a newsletter, etc.
    • Complicated cookie banners without a one-click way to reject all unnecessary cookies
    • Hiding important text with text colour, under drop-down menus or requiring hovering over something with a mouse 
    • Confirm shaming” users with emotionally manipulative language to delay subscription cancellations or opt out of tracking 

    Improve trust centres

    Trust centres are the sections of a website that outline how a company approaches topics like data governance, user privacy and security. 

    They should be easy to find and understand. If a user has a question about a company’s data policy, it should be one click away with language that doesn’t require a law degree to comprehend.

    Additionally, trust centres must cover all relevant details, including where data is stored and who does the subprocessing. This is an area where even some of the best-intentioned companies may miss the mark, but it’s also an easy fix and a great place to start creating a more ethical web.

    Embrace inclusivity

    People want to feel welcomed to the party — and deserve to be — regardless of their race, ethnicity, religion, gender identity, orientation or ability. 

    Inclusivity is great for customers and companies alike. 

    A study by the Unstereotype Alliance found that progressive marketing drove up short- and long-term sales, customer loyalty and purchase consideration. A Kantar study reported that 75% of surveyed customers around the world consider a company’s diversity and inclusivity when making a purchasing decision.

    An easy place to start embracing inclusivity is with a website’s blog images. The people in photos and cartoons should reflect a variety of different backgrounds.

    Another area to improve inclusivity is by making your site or app more accessible.

    Accessibility ethics : An internet for everyone

    Accessibility is designing your product in a way that everyone can enjoy or take part in, regardless of ability. Digital accessibility is applying this design to the web and applications by making accommodations like adding descriptive alt text to images for users with visual impairments.

    Just because someone has a hearing, vision, speech, mobility, neurological or other impairment doesn’t mean they have any less of a right to shop online, read silly listicles or get into arguments with strangers in the comment section.

    Beyond being the right thing to do, the Fable team shows there’s a strong business case for accessibility. People with disabilities have money to spend, and the accommodations businesses make for them often benefit people without disabilities, too – as anyone who streams with subtitles can attest.

    Despite being a win-win for greater inclusivity and business, much of the web is still inaccessible. WebAIM, a leader in web accessibility, studied a million web pages and found an average of over 55 accessibility errors per page.

    We must all play a more active role in improving the experience of our users with disabilities, and we can start with accessibility auditing and testing.

    An accessibility audit is an evaluation of how usable a site is for people with disabilities. It may be done in-house by an expert on a company’s team or, for better results, a third-party consultant who can give a fully objective audit.

    Auditing might consist of running an automated tool or manually checking your site, PDFs, emails and other materials for compliance with the Web Content Accessibility Guidelines list.

    Accessibility testing is narrower than auditing. It checks how accessibility or its absence looks in action. It can be done after a site, app, email or product is released, but it ideally starts in the development process.

    Testing should be done manually and with automated tools. Manual checks put developers in the position of their users, allowing them to get a better idea of what users are dealing with firsthand. Automated tools can save time and money, but there should always be manual testing in the process.

    Auditing gives teams an idea of where to start with improving accessibility, and testing helps make sure accommodations work as intended.

    Conclusion

    At Matomo, we strive to make the ethical web a reality, starting with web analytics.

    For our users, it means full compliance with stringent policies like GDPR and providing 100% accurate data. For their customers, it’s collecting only the data required to do the job and enabling cookieless configurations to get rid of annoying banners. 

    For both parties, it’s knowing that respect for privacy is one of our foundational values, whether it’s the ability to look under Matomo’s hood and read our open-source code, the option to store data on-premise to minimise the chances of it falling into the wrong hands or one of the other ways that we protect privacy.

    If you weren’t 100% ethical before, it’s never too late to change. You can even bring your Google Analytics data with you.

    Join us in our mission to improve the web. We can’t do it alone ! 

    no credit card required