Recherche avancée

Médias (1)

Mot : - Tags -/belgique

Autres articles (68)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (7850)

  • B2B Marketing Attribution Guide : How to Master It in 2024

    21 mai 2024, par Erin

    The last thing you want is to invest your advertising dollars in channels, campaigns and ads that don’t work. But B2B marketing attribution — figuring out which marketing efforts drive revenue — is far from easy.

    With longer sales funnels and multiple people from the same company involved in the same sales process, B2B (business-to-business) is a different ballgame from B2C (business-to-consumer) marketing.

    In this guide, we break down what B2B marketing attribution is, how it’s different, which tools you can use to set it up and the best practices.

    What is B2B marketing attribution ?

    Marketing attribution in B2B companies is about figuring out where your high-value leads come from — nailing down long customer journeys across many different touchpoints.

    Illustration of attributing a multi-person customer journey

    The goal is to determine which campaigns and content contributed to various parts of the customer journey. It’s a complex process that needs a reliable, privacy-focused web analytics tool and a CRM that integrates with it.

    This process significantly differs from traditional marketing attribution, where you focus more on short sales cycles from individual customers. With multiple contributing decision makers, B2B attribution requires more robust systems.

    What makes marketing attribution different for B2B ?

    The key differences between B2B and B2C marketing attribution are a longer sales funnel and more people involved in the sales process.

    The B2B sales funnel is significantly longer and more complex

    The typical B2C sales funnel is often broken down into four simple stages :

    1. Awareness : when a prospect first finds out about your product or brand
    2. Interest : where a prospect starts to learn about the benefits of your product
    3. Desire : when a prospect understands that they need your product
    4. Action : the actual process of closing the sale

    Even the most simplified B2B sales funnel includes several key stages.

    5 stages of the B2B customer journey.

    Here’s a brief overview of each :

    1. Awareness : Buyers recognise they have a problem and start looking for solutions. Stand out with blog posts, social media updates, ebooks and whitepapers.
    2. Consideration : Buyers are aware of your company and are comparing options. Provide product demos, webinars and case studies to address their concerns and build trust.
    3. Conversion : Buyers have chosen your product or company. Offer live demos, customer service, case studies and testimonials to finalise the purchase.
    4. Loyalty : Buyers have made a purchase and are now customers. Nurture relationships with thank you emails, follow-ups, how-tos, reward programs and surveys to encourage repeat business.
    5. Advocacy : Loyal customers become advocates, promoting your brand to others. Encourage this with surveys, testimonial requests and a referral program.

    A longer sales cycle typically involves not only more touchpoints but also extended decision-making processes.

    More teams are involved in the marketing and sales process

    The last differentiation in B2B attribution is the number of people involved. Instead of clear-cut sales and marketing teams, revenue teams are becoming more common.

    They include all go-to-market teams like sales, marketing, customer success and customer support. In B2B sales, long-term customer relationships can be incredibly valuable. As such, the focus shifts away from new customer acquisition alone.

    For example, you can also track and optimise your onboarding process. Marketing gets involved in post-sale efforts to boost loyalty. Sales reps follow up with customer success to get new sales angles and insights. Customer support insights drive future product development.

    Everyone works together to meet high-level company goals.

    The next section will explore how to set up an attribution system.

    How to find the right mix of B2B marketing attribution tools

    For most B2B marketing teams, the main struggle with attribution is not with the strategy but with creating a reliable system that gives them the data points they need to implement that strategy.

    We’ll outline one approach you can take to achieve this without a million-dollar budget or internal data science team.

    Use website analytics to track touchpoints

    The first thing you want to do is install a reliable website analytics solution on your website. 

    Once you’ve got your analytics in place, use campaign tracking parameters to track touchpoints from external campaigns like email newsletters, social media ads, review sites (like Capterra) and third-party partner campaigns.

    This way, you get a clear picture of which sources are driving traffic and conversions, helping you improve your marketing strategies.

    With analytics installed, you can track the referring sources of visits, engagement and conversion events. A robust solution like Matomo tracks everything from traffic sources, marketing attribution and visitor counts to behavioural analytics, like clicks, scrolling patterns and form interactions on your site.

    Marketing attribution will give you a cohesive view of which traffic sources and campaigns drive conversions and revenue over long periods. With Matomo’s marketing attribution feature, you can even use different marketing attribution models to compare results :

    Matomo comparing linear, first click, and last click attribution models in the marketing attribution dashboard

    For example, in a single report, you can compare the last interaction, first interaction and linear (three common marketing attribution models). 

    In total, Matomo has 6 available attribution models to choose from :

    1. First interaction
    2. Last interaction
    3. Last non-direct 
    4. Linear
    5. Position based
    6. Time decay 

    These additional attribution models are crucial for B2B sites. While other web analytics solutions often limit to last-click attribution, this model isn’t optimal for B2B with extended sales cycles.

    Try Matomo for Free

    Get the web insights you need, without compromising data accuracy.

    No credit card required

    Use a CRM to integrate customer data from multiple sources

    Use your CRM software to integrate customer data from multiple sources. This will give you the ability to get meaningful B2B marketing insights. For example, you can get company-level insights so you can view conversion information by company, not just by person.

    Done effectively, you can close the loop back to analytics data by integrating data from multiple teams and platforms. 

    Implement self-reported attribution

    To further enhance the data, add qualifying questions in the lead signup process to create a hybrid attribution model. This is also known as self-reported attribution.

    Example of self-reported attribution

    Your web analytics platform won’t always be able to track the source of certain visits — for instance, “dark social” or peer-to-peer sharing, where links are shared privately and are not easily traceable by analytics tools.

    Doing self-reported attribution is crucial for getting a holistic image of your customer journey. 

    However, self-reported attribution isn’t foolproof ; users may click randomly or inaccurately recall where they first heard about you. So it’s essential to blend this data with your analytics to gain a more accurate understanding.

    Best practices for handling B2B prospect data in a privacy-sensitive world 

    Lastly, it’s important to respect your prospects’ privacy and comply with privacy regulations when conducting B2B marketing attribution.

    Privacy regulations and their enforcement are rapidly gaining momentum around the globe. Meta recently received a record GDPR fine of €1.2 billion for insufficient privacy measures when handling user data by the Irish Data Protection Agency.

    If you don’t want to risk major fines (or customers feeling betrayed), you shouldn’t follow in the same footsteps.

    Switch to a privacy-friendly web analytics

    Instead of using a controversial solution like Google Analytics, use a privacy-friendly web analytics solution like Matomo, Fathom or Plausible. 

    These alternatives not only ensure compliance with regulations like GDPR but also provide peace of mind amid the uncertain relationship between Google and GDPR. Google Analytics has faced bans in recent years, raising concerns about the future of the solution.

    While organisations governed by GDPR can currently use Google Analytics, there’s no guarantee of its continued availability.

    Make the switch to privacy-friendly web analytics to avoid potential fines and disruptive rulings that could force you to change platforms urgently. Such disruptions can be catastrophic for marketing teams heavily reliant on web analytics for tracking campaigns, business goals and marketing efforts.

    Improve your B2B marketing attribution with Matomo

    Matomo’s privacy-by-design architecture makes it the perfect analytics platform for the modern B2B marketer. Matomo enables you to meet even the strictest privacy regulations.

    At the same time, through campaign tracking URLs, marketing attribution, integrations and our API, you can track the results of various marketing channels and campaigns effectively. We help you understand the impact of each dollar of your marketing budget. 

    If you want a competitive edge over other B2B companies, try Matomo for free for 21 days. No credit card required.

  • What is Web Log Analytics and Why You Should Use It

    26 juin 2024, par Erin

    Can’t use JavaScript tracking on your website ? Need a more secure and privacy-friendly way to understand your website visitors ? Web log analytics is your answer. This method pulls data directly from your server logs, offering a secure and privacy-respecting alternative.  

    In this blog, we cover what web log analytics is, how it compares to JavaScript tracking, who it is best suited for, and why it might be the right choice for you. 

    What are server logs ? 

    Before diving in, let’s start with the basics : What are server logs ? Think of your web server as a diary that notes every visit to your website. Each time someone visits, the server records details like : 

    • User agent : Information about the visitor’s browser and operating system. 
    • Timestamp : The exact time the request was made. 
    • Requested URL : The specific page or resource the visitor requested. 

    These “diary entries” are called server logs, and they provide a detailed record of all interactions with your website. 

    Server log example 

    Here’s what a server log looks like : 

    192.XXX.X.X – – [24/Jun/2024:14:32:01 +0000] “GET /index.html HTTP/1.1” 200 1024 “https://www.example.com/referrer.html” “Mozilla/5.0 (Windows NT 10.0 ; Win64 ; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36” 

    192.XXX.X.X – – [24/Jun/2024:14:32:02 +0000] “GET /style.css HTTP/1.1” 200 3456 “https://www.example.com/index.html” “Mozilla/5.0 (Windows NT 10.0 ; Win64 ; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36” 

    192.XXX.X.X – – [24/Jun/2024:14:32:03 +0000] “GET /script.js HTTP/1.1” 200 7890 “https://www.example.com/index.html” “Mozilla/5.0 (Windows NT 10.0 ; Win64 ; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36” 

    192.XXX.X.X – – [24/Jun/2024:14:32:04 +0000] “GET /images/logo.png HTTP/1.1” 200 1234 “https://www.example.com/index.html” “Mozilla/5.0 (Windows NT 10.0 ; Win64 ; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36” 

    Breakdown of the log entry 

    Each line in the server log represents a single request made by a visitor to your website. Here’s a detailed breakdown of what each part means : 

    • IP Address : 192.XXX.X.X 
      • This is the IP address of the visitor’s device. 
    • User Identifier : – – 
      • These fields are typically used for user identification and authentication, which are not applicable here, hence the hyphens. 
    • Timestamp : [24/Jun/2024:14:32:01 +0000] 
        • The date and time of the request, including the timezone. 
    • Request Line : “GET /index.html HTTP/1.1” 
      • The request method (GET), the requested resource (/index.html), and the HTTP version (HTTP/1.1). 
    • Response Code : 200 
      • The HTTP status code indicates the result of the request (200 means OK). 
    • Response Size : 1024 
      • The size of the response in bytes. 
    • Referrer :https://www.example.com/referrer.html 
      • The URL of the referring page that led the visitor to the current page. 
    • User Agent : “Mozilla/5.0 (Windows NT 10.0 ; Win64 ; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36” 
      • Information about the visitor’s browser and operating system. 

    In the example above, there are multiple log entries for different resources (HTML page, CSS file, JavaScript file, and an image). This shows that when a visitor loads a webpage, multiple requests are made to load all the necessary resources. 

    What is web log analytics ? 

    Web log analytics is one of many methods for tracking visitors to your site.  

    Web log analytics is the process of analysing server log files to track and understand website visitors. Unlike traditional methods that use JavaScript tracking codes embedded in web pages, web log analytics pulls data directly from these server logs. 

    How it works : 

    1. Visitor request : A visitor’s browser requests your website. 
    2. Server logging : The server logs the request details. 
    3. Analysis : These logs are analysed to extract useful information about your visitors and their activities. 

    Web log analytics vs. JavaScript tracking 

    JavaScript tracking 

    JavaScript tracking is the most common method used to track website visitors. It involves embedding a JavaScript code snippet into your web pages. This code collects data on visitor interactions and sends it to a web analytics platform. 

    Web log analytics vs JavaScript tracking

    Differences and benefits :

    Privacy : 

    • Web log analytics : Since it doesn’t require embedding tracking codes, it is considered less intrusive and helps maintain higher privacy standards. 
    • JavaScript tracking : Embeds tracking codes directly on your website, which can be more invasive and raise privacy concerns. 

    Ease of setup : 

    • Web log analytics : No need to modify your website’s code. All you need is access to your server logs. 
    • JavaScript tracking : Requires adding tracking code on your web pages. This is generally an easier setup process.  

    Data collection : 

    • Web log analytics : Contain requests of users with adblockers (ghostery, adblock, adblock plus, privacy badger, etc.) sometimes making it more accurate. However, it may miss certain interactive elements like screen resolution or user events. It may also over-report data.  
    • JavaScript tracking : Can collect a wide range of data, including Custom dimensions, Ecommerce tracking, Heatmaps, Session recordings, Media and Form analytics, etc. 

    Why choose web log analytics ? 

    Enhanced privacy 

    Avoiding embedded tracking codes means there’s no JavaScript running on your visitors’ browsers. This significantly reduces the risk of data leakage and enhances overall privacy. 

    Comprehensive data collection 

    It isn’t affected by ad blockers or browser tracking protections, ensuring you capture more complete and accurate data about your visitors. 

    Historical data analysis 

    You can import and analyse historical log files, giving you insights into long-term visitor behaviour and trends. 

    Simple setup 

    Since it relies on server logs, there’s no need to alter your website’s code. This makes setup straightforward and minimises potential technical issues. 

    Who should use web log analytics ? 

    Web log analytics is particularly suited for businesses that prioritise data privacy and security.

    Organisations that handle sensitive data, such as banks, healthcare providers, and government agencies, can benefit from the enhanced privacy.  

    By avoiding JavaScript tracking, these entities minimise data exposure and comply with strict privacy regulations like Sarbanes Oxley and PCI. 

    Why use Matomo for web log analytics ? 

    Matomo stands out as a top choice for web log analytics because it prioritises privacy and data ownership

    Screenshot example of the Matomo dashboard

    Here’s why : 

    • Complete data control : You own all your data, so you don’t have to worry about third-party access. 
    • IP anonymisation : Matomo anonymises IP addresses to further protect user privacy. 
    • Bot filtering : Automatically excludes bots from your reports, ensuring you get accurate data. 
    • Simple migration : You can easily switch from other tools like AWStats by importing your historical logs into Matomo. 
    • Server log recognition : Recognises most server log formats (Apache, Nginx, IIS, etc.). 

    Start using web log analytics 

    Web log analytics offers a secure, privacy-focused alternative to traditional JavaScript tracking methods. By analysing server logs, you get valuable insights into your website traffic while maintaining high privacy standards.  

    If you’re serious about privacy and want reliable data, give Matomo’s web log analytics a try.  

    Start your 21-day free trial now. No credit card required. 

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