Recherche avancée

Médias (2)

Mot : - Tags -/doc2img

Autres articles (17)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (5048)

  • Appending a list of movies MP4s causes the sound to be dropped or garbled at some point

    9 février 2020, par Marie

    Update I am able to reproduce the issue by concatenating 10 Hello.mp4 clips and see the audio drop out/garbled at about 5 seconds playback. This is via VLC latest 3.0.8 on Windows7 64bit. Window Player zero sound. Media Player Classic it plays fine all 10 audio or the word "Hello". The same movie when dragged onto Whatsapp the PC app plays OK but no sound if played from the Phone Whatsapp. Perhaps its my computer too slow in the production of this clip ??? I don’t know what to trust anymore.

    I copied the same ffmpeg.exe onto my kid’s Windows10 laptop and was able to produce the same behavior with sound dropping out with VLC however Windows10 media player is able to play the audio without a glitch.

    You can reproduce the same on your end with this batch file

    _HELLO_MP4s.CMD

    rem 2:07 AM 2/8/2020
    rem
    rem  
    SET EXE="S:\_BINS\FFmpeg 4.2.1 20200112\bin\ffmpeg.exe"

    SET ROOTPATH=.\

    SET OUT_FILE="%ROOTPATH%HELLOs.MP4"

    SET IN_FILES_LIST="%ROOTPATH%IN_FILES_LIST.TXT"
    ECHO file '%ROOTPATH%HELLO.mp4' > %IN_FILES_LIST%
    ECHO file '%ROOTPATH%HELLO.mp4' >> %IN_FILES_LIST%
    ECHO file '%ROOTPATH%HELLO.mp4' >> %IN_FILES_LIST%
    ECHO file '%ROOTPATH%HELLO.mp4' >> %IN_FILES_LIST%
    ECHO file '%ROOTPATH%HELLO.mp4' >> %IN_FILES_LIST%
    ECHO file '%ROOTPATH%HELLO.mp4' >> %IN_FILES_LIST%
    ECHO file '%ROOTPATH%HELLO.mp4' >> %IN_FILES_LIST%
    ECHO file '%ROOTPATH%HELLO.mp4' >> %IN_FILES_LIST%
    ECHO file '%ROOTPATH%HELLO.mp4' >> %IN_FILES_LIST%
    ECHO file '%ROOTPATH%HELLO.mp4' >> %IN_FILES_LIST%

    SET OPTIONS= -f concat -safe 0 -i  %IN_FILES_LIST%  -c copy -y  %OUT_FILE%

    SET INFO_FILE="INFO.TXT"

    %EXE% %OPTIONS%  1> %INFO_FILE% 2>&1

    ECHO ======================== >> %INFO_FILE%
    ECHO OUT_FILE=%OUT_FILE%  >> %INFO_FILE%
    ECHO EXE=%EXE%  >> %INFO_FILE%
    ECHO OPTIONS=%OPTIONS%  >> %INFO_FILE%
    ECHO ======================== >> %INFO_FILE%

    Original Post
    My process is in 3 steps
    Step 1) Corresponding to each bitmap I have 00.JPG ... NN.JPG I combine a list of "SOURCE" mp3 audio into a single audio mp3 to produce matching 00.MP3 ... NN.MP3

    I had glitch here where one my mp3 was not of the correct Sample Rate, however a kind soul in this forum helped me fix that.
    You can read the details here :

    When I append a silent audio (mp3) to an existing list of audio it garbles the final audio ?

    Step 2) combine each mp3 from previous with a the filename matching bitmap to produce a movie .MP4

    IOW,

    • 00.JPG + 00.MP3 >> 00.MP4
    • 01.JPG + 01.MP3 >> 01.MP4
    • and so on

    From this run of 24 subparts, I hand tested some of these movies against Whatsapp and they are accepted fine.
    However, the final MOVIE.MP4 is not.
    I will list below their info from ffprobe.

    Step 3) combine the list of movies from previous into a final MOVIE.MP4
    This is where I have been having random issues typically with audio, currently this audio drops at about 20s from start. Corresponding to roughly movies parts 04.mp4 to 07.mp4

    I play the videos via VLC but Windows Media Player has even worse playback.

    I am able to reproduce Step3 and thus MOVIE.MP4 with following batch file

    rem 10:33 PM 2/6/2020
    SET EXE="S:\_BINS\FFmpeg 4.2.1 20200112\bin\ffmpeg.exe"

    SET ROOTPATH=.\

    SET OUT_FILE="%ROOTPATH%MOVIE.MP4"

    SET IN_FILES_LIST="%ROOTPATH%IN_FILES_LIST.TXT"

    SET OPTIONS= -f concat -safe 0 -i  %IN_FILES_LIST%  -c copy -y  %OUT_FILE%

    SET INFO_FILE="INFO.TXT"

    %EXE% %OPTIONS%  1> %INFO_FILE% 2>&1

    rem PAUSE

    The content of IN_FILES_LIST.TXT

    file '00.mp4'
    file '01.mp4'
    file '02.mp4'
    ...
    file '23.mp4'
    file '24.mp4'

    (Step 2) uses the following :)
    enter image description here

    The following is ffprobe on the source audio MP3s (Step 1)

    MP3s_ORIGINAL.TXT
    ========================BEGIN
    [mp3 @ 0000000000513100] Estimating duration from bitrate, this may be inaccurate
    Input #0, mp3, from '.\PLAY\00.mp3':
     Duration: 00:00:03.36, start: 0.000000, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    [mp3 @ 00000000003f3180] Estimating duration from bitrate, this may be inaccurate
    Input #0, mp3, from '.\PLAY\01.mp3':
     Duration: 00:00:00.46, start: 0.000000, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    [mp3 @ 00000000004a3180] Estimating duration from bitrate, this may be inaccurate
    Input #0, mp3, from '.\PLAY\02.mp3':
     Duration: 00:00:00.58, start: 0.000000, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    [mp3 @ 0000000000623180] Estimating duration from bitrate, this may be inaccurate
    Input #0, mp3, from '.\PLAY\03.mp3':
     Duration: 00:00:00.84, start: 0.000000, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    [mp3 @ 00000000003a3180] Estimating duration from bitrate, this may be inaccurate
    Input #0, mp3, from '.\PLAY\04.mp3':
     Duration: 00:00:00.86, start: 0.000000, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    [mp3 @ 0000000000433180] Estimating duration from bitrate, this may be inaccurate
    Input #0, mp3, from '.\PLAY\05.mp3':
     Duration: 00:00:00.98, start: 0.000000, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    [mp3 @ 0000000000683180] Estimating duration from bitrate, this may be inaccurate
    Input #0, mp3, from '.\PLAY\06.mp3':
     Duration: 00:00:00.98, start: 0.000000, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    [mp3 @ 00000000004d3180] Estimating duration from bitrate, this may be inaccurate
    Input #0, mp3, from '.\PLAY\07.mp3':
     Duration: 00:00:00.98, start: 0.000000, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    [mp3 @ 00000000004c3180] Estimating duration from bitrate, this may be inaccurate
    Input #0, mp3, from '.\PLAY\08.mp3':
     Duration: 00:00:00.98, start: 0.000000, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    [mp3 @ 0000000000573180] Estimating duration from bitrate, this may be inaccurate
    Input #0, mp3, from '.\PLAY\09.mp3':
     Duration: 00:00:00.98, start: 0.000000, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    [mp3 @ 0000000000583180] Estimating duration from bitrate, this may be inaccurate
    Input #0, mp3, from '.\PLAY\10.mp3':
     Duration: 00:00:00.98, start: 0.000000, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    [mp3 @ 00000000005e3180] Estimating duration from bitrate, this may be inaccurate
    Input #0, mp3, from '.\PLAY\11.mp3':
     Duration: 00:00:00.98, start: 0.000000, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    [mp3 @ 0000000000553180] Estimating duration from bitrate, this may be inaccurate
    Input #0, mp3, from '.\PLAY\12.mp3':
     Duration: 00:00:00.98, start: 0.000000, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    [mp3 @ 0000000000563180] Estimating duration from bitrate, this may be inaccurate


    trimmed because SO limits post to 30000 chars

    The following is ffprobe on the MP3s concatenated with 2second Silence. All their Sample Rate 24K and Bit Rate 32k seems OK ?? (Also Step 1)

    MP3s_withSilenceAppended.TXT
    ========================BEGIN
    Input #0, mp3, from '00.mp3':
     Metadata:
       encoder         : Lavf58.35.101
     Duration: 00:00:05.42, start: 0.046042, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    Input #0, mp3, from '01.mp3':
     Metadata:
       encoder         : Lavf58.35.101
     Duration: 00:00:02.52, start: 0.046042, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    Input #0, mp3, from '02.mp3':
     Metadata:
       encoder         : Lavf58.35.101
     Duration: 00:00:02.64, start: 0.046042, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    Input #0, mp3, from '03.mp3':
     Metadata:
       encoder         : Lavf58.35.101
     Duration: 00:00:02.90, start: 0.046042, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    Input #0, mp3, from '04.mp3':
     Metadata:
       encoder         : Lavf58.35.101
     Duration: 00:00:02.93, start: 0.046042, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    Input #0, mp3, from '05.mp3':
     Metadata:
       encoder         : Lavf58.35.101
     Duration: 00:00:03.05, start: 0.046042, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    Input #0, mp3, from '06.mp3':
     Metadata:
       encoder         : Lavf58.35.101
     Duration: 00:00:03.05, start: 0.046042, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    Input #0, mp3, from '07.mp3':
     Metadata:
       encoder         : Lavf58.35.101
     Duration: 00:00:03.05, start: 0.046042, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    Input #0, mp3, from '08.mp3':
     Metadata:
       encoder         : Lavf58.35.101
     Duration: 00:00:03.05, start: 0.046042, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    Input #0, mp3, from '09.mp3':
     Metadata:
       encoder         : Lavf58.35.101
     Duration: 00:00:03.05, start: 0.046042, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    Input #0, mp3, from '10.mp3':
     Metadata:
       encoder         : Lavf58.35.101
     Duration: 00:00:03.05, start: 0.046042, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    Input #0, mp3, from '11.mp3':
     Metadata:
       encoder         : Lavf58.35.101
     Duration: 00:00:03.05, start: 0.046042, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    Input #0, mp3, from '12.mp3':
     Metadata:
       encoder         : Lavf58.35.101
     Duration: 00:00:03.05, start: 0.046042, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    Input #0, mp3, from '13.mp3':
     Metadata:
       encoder         : Lavf58.35.101
     Duration: 00:00:05.81, start: 0.046042, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    Input #0, mp3, from '14.mp3':
     Metadata:
       encoder         : Lavf58.35.101
     Duration: 00:00:02.93, start: 0.046042, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    Input #0, mp3, from '15.mp3':
     Metadata:
       encoder         : Lavf58.35.101
     Duration: 00:00:02.66, start: 0.046042, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    Input #0, mp3, from '16.mp3':
     Metadata:
       encoder         : Lavf58.35.101
     Duration: 00:00:02.66, start: 0.046042, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    Input #0, mp3, from '17.mp3':
     Metadata:
       encoder         : Lavf58.35.101
     Duration: 00:00:02.66, start: 0.046042, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    Input #0, mp3, from '18.mp3':
     Metadata:
       encoder         : Lavf58.35.101
     Duration: 00:00:02.83, start: 0.046042, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    Input #0, mp3, from '19.mp3':
     Metadata:
       encoder         : Lavf58.35.101
     Duration: 00:00:06.50, start: 0.046042, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    Input #0, mp3, from '20.mp3':
     Metadata:
       encoder         : Lavf58.35.101
     Duration: 00:00:03.05, start: 0.046042, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    Input #0, mp3, from '21.mp3':
     Metadata:
       encoder         : Lavf58.35.101
     Duration: 00:00:03.05, start: 0.046042, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    Input #0, mp3, from '22.mp3':
     Metadata:
       encoder         : Lavf58.35.101
     Duration: 00:00:03.14, start: 0.046042, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    Input #0, mp3, from '23.mp3':
     Metadata:
       encoder         : Lavf58.35.101
     Duration: 00:00:06.12, start: 0.046042, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
    Input #0, mp3, from '24.mp3':
     Metadata:
       encoder         : Lavf58.35.101
     Duration: 00:00:03.14, start: 0.046042, bitrate: 32 kb/s
       Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s

    The following is ffmpeg info output during the production of final movie MOVIE.MP4
    (Step 3)

    ========================BEGIN
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\VID\00.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.35.101
     Duration: 00:00:05.54, start: 0.000000, bitrate: 174 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 137 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 32 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\VID\01.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.35.101
     Duration: 00:00:02.71, start: 0.000000, bitrate: 269 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 242 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 32 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\VID\02.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.35.101
     Duration: 00:00:02.71, start: 0.000000, bitrate: 285 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 245 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 32 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\VID\03.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.35.101
     Duration: 00:00:03.04, start: 0.000000, bitrate: 275 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 239 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 32 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\VID\04.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.35.101
     Duration: 00:00:03.04, start: 0.000000, bitrate: 286 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 250 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 32 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\VID\05.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.35.101
     Duration: 00:00:03.21, start: 0.000000, bitrate: 281 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 249 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 32 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\VID\06.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.35.101
     Duration: 00:00:03.21, start: 0.000000, bitrate: 281 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 249 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 32 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\VID\07.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.35.101
     Duration: 00:00:03.21, start: 0.000000, bitrate: 150 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 115 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 32 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\VID\08.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.35.101
     Duration: 00:00:03.21, start: 0.000000, bitrate: 201 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 166 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 32 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\VID\09.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.35.101
     Duration: 00:00:03.21, start: 0.000000, bitrate: 247 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 214 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 32 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\VID\10.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.35.101
     Duration: 00:00:03.21, start: 0.000000, bitrate: 247 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 214 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 32 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\VID\11.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.35.101
     Duration: 00:00:03.21, start: 0.000000, bitrate: 131 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 95 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 32 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\VID\12.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.35.101
     Duration: 00:00:03.21, start: 0.000000, bitrate: 194 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 159 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 32 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\VID\13.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.35.101
     Duration: 00:00:05.88, start: 0.000000, bitrate: 207 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 169 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 32 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\VID\14.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.35.101
     Duration: 00:00:03.04, start: 0.000000, bitrate: 335 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 300 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 32 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\VID\15.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.35.101
     Duration: 00:00:02.88, start: 0.000000, bitrate: 365 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 342 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 32 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\VID\16.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.35.101
     Duration: 00:00:02.88, start: 0.000000, bitrate: 384 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 362 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 32 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\VID\17.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.35.101
     Duration: 00:00:02.88, start: 0.000000, bitrate: 390 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 368 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 32 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\VID\18.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.35.101
     Duration: 00:00:03.04, start: 0.000000, bitrate: 386 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 363 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 32 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\VID\19.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.35.101
     Duration: 00:00:06.71, start: 0.000000, bitrate: 204 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 169 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 32 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\VID\20.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.35.101
     Duration: 00:00:03.21, start: 0.000000, bitrate: 194 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 159 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 32 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\VID\21.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.35.101
     Duration: 00:00:03.21, start: 0.000000, bitrate: 194 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 159 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 32 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\VID\22.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.35.101
     Duration: 00:00:03.21, start: 0.000000, bitrate: 208 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 169 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 32 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\VID\23.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.35.101
     Duration: 00:00:06.21, start: 0.000000, bitrate: 204 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 166 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 32 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\VID\24.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.35.101
     Duration: 00:00:03.21, start: 0.000000, bitrate: 173 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 134 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 32 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\VID\MOVIE.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.35.101
     Duration: 00:01:29.05, start: 0.000000, bitrate: 239 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 203 kb/s, 23.53 fps, 24 tbr, 24k tbn, 48 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 30 kb/s (default)
       Metadata:
         handler_name    : SoundHandler

    I have not been able yet to reproduce the issue with a smaller set of movies, in the meantime if you would to get a copy I would have to upload an archive to a link so you can have them on your side.

    Alternatively, if you would like me to provide additional info from these steps let me know what commands and I will be happy to provide.

    Thank you.

  • Our latest improvement to QA : Screenshot Testing

    2 octobre 2013, par benaka — Development

    Introduction to QA in Piwik

    Like any piece of good software, Piwik comes with a comprehensive QA suite that includes unit and integration tests. The unit tests make sure core components of Piwik work properly. The integration tests make sure Piwik’s tracking and report aggregation and APIs work properly.

    To complete our QA suite, we’ve recently added a new type of tests : Screenshot tests, that we use to make sure Piwik’s controller and JavaScript code works properly.

    This blog post will explain how they work and describe our experiences setting them up ; we hope to show you an example of innovative QA practices in an active open source project.

    Screenshot Tests

    As the name implies, our screenshot tests (1) first capture a screenshot of a URL, then (2) compare the result with an expected image. This lets us test the code in Piwik’s controllers and Piwik’s JavaScript simply by specifying a URL.

    Contrast this with conventional UI tests that test for page content changes. Such tests require writing large amounts of test code that, at most, check for changes in HTML. Our tests, on the otherhand, will be able to show regressions in CSS and JavaScript rendering logic with a bare minimum of testing code.

    Capturing Screenshots

    Screenshots are captured using a 3rd party tool. We tried several tools before settling on PhantomJS. PhantomJS executes a JavaScript file with an environment that allows it to create WebKit powered web views. When capturing a screenshot, we supply PhantomJS with a script that :

    • opens a web page view,
    • loads a URL,
    • waits for all AJAX requests to be completed,
    • waits for all images to be loaded
    • waits for all JavaScript to be run.

    Then it renders the completed page to an PNG file.

    • To see how we use PhantomJS see capture.js.
    • To see how we wait for AJAX requests to complete and images to load see override.js.

    Comparing Screenshots

    Once a screenshot is generated we test for UI regressions by comparing it with an expected image. There is no sort of fuzzy matching involved. We just check that the images consist of the same bytes.

    If a screenshot test fails we use ImageMagick’s compare command line tool to generate an image diff :

    Showing differences QA tests screenshots pixel by pixel comparison

    In this example above, there was a change that caused the Search box to be hidden in the datatable. This resulted in the whole Data table report being shifted up a few pixels. The differences are visible in red color which gives rapid feedback to the developers what has changed in the last commit.

    Screenshot Tests on Travis

    We experienced trouble generating identical screenshots on different machines, so our tests were not initially automated by Travis. Once we surpassed this hurdle, we created a new github repo to store our UI tests and screenshots and then enabled the travis build for it. We also made sure that every time a commit is pushed to the Piwik repo, our travis build will push a commit to the UI test repo to run the UI tests.

    We decided to create a new repository so the main repository wouldn’t be burdened with the large screenshot files (which git would not handle very well). We also made sure the travis build would upload all the generated screenshots to a server so debugging failures would be easier.

    Problems we experienced

    Getting generated screenshots to render identically on separate machines was quite a challenge. It took months to figure out how to get it right. Here’s what we learned :

    Fonts will render identically on different machines, but different machines can pick the wrong fonts. When we first tried getting these tests to run on Travis, we noticed small differences in the way fonts were rendered on different machines. We thought this was an insurmountable problem that would occur due to the libraries installed on these machines. It turns out, the machines were just picking the wrong fonts. After installing certain fonts during our Travis build, everything started working.

    Different versions of GD can generate slightly different images. GD is used in Piwik to, among other things, generate sparkline images. Different versions of GD will result in slightly different images. They look the same to the naked eye, but some pixels will have slightly different colors. This is, unfortunately, a problem we couldn’t solve. We couldn’t make sure that everyone who runs the tests uses the same version of GD, so instead we disabled sparklines for UI testing.

    What we learned about existing screenshot capturing tools

    We tried several screenshot capturing tools before finding one that would work adequately. Here’s what we learned about them :

    • CutyCapt This is the first screenshot capturing tool we tried. CutyCapt is a C++ program that uses QtWebKit to load and take a screenshot of a page. It can’t be used to capture multiple screenshots in one run and it can’t be used to wait for all AJAX/Images/JavaScript to complete/load (at least not currently).

    • PhantomJS This is the solution we eventually chose. PhantomJS is a headless scriptable browser that currently uses WebKit as its rendering engine.

      For the most part, PhantomJS is the best solution we found. It reliably renders screenshots, allows JavaScript to be injected into pages it loads, and since it essentially just runs JavaScript code that you provide, it can be made to do whatever you want.

    • SlimerJS SlimerJS is a clone of PhantomJS that uses Gecko as the rendering engine. It is meant to function similarly to PhantomJS. Unfortunately, due to some limitations hard-coded in Mozilla’s software, we couldn’t use it.

      For one, SlimerJS is not headless. There is, apparently, no way to do that when embedding Mozilla. You can, however, run it through xvfb, however the fact that it has to create a window means some odd things can happen. When using SlimerJS, we would sometimes end up with images where tooltips would display as if the mouse was hovering over an element. This inconsistency meant we couldn’t use it for our tests.

    One tool we didn’t try was Selenium Webdriver. Although Selenium is traditionally used to create tests that check for HTML content, it can be used to generate screenshots. (Note : PhantomJS supports using a remote WebDriver.)

    Our Future Plans for Screenshot Testing

    At the moment we render a couple dozen screenshots. We test how our PHP code, JavaScript code and CSS makes Piwik’s UI look, but we don’t test how it behaves. This is our next step.

    We want to create Screenshot Unit Tests for each UI control Piwik uses (for example, the Data Table View or the Site Selector). These tests would use the Widgetize plugin to load a control by itself, then execute JavaScript that simulates events and user behavior, and finally take a screenshot. This way we can test how our code handles clicks and hovers and all sorts of other behavior.

    Screenshots Tests will make Piwik more stable and keep us agile and able to release early and often. Thank you for your support & Spreading the word about Piwik !

  • Consent Mode v2 : Everything You Need to Know

    7 mai 2024, par Alex — Analytics Tips

    Confused about Consent Mode v2 and its impact on your website analytics ? You’re not the only one. 

    Google’s latest update has left many scratching their heads about data privacy and tracking. 

    In this blog, we’re getting straight to the point. We’ll break down what Consent Mode v2 is, how it works, and the impact it has.

    What is Consent Mode ?

    What exaclty is Google Consent Mode and why is there so much buzz surrounding it ? This question has been frustrating analysts and marketers worldwide since the beginning of this year. 

    Consent Mode is the solution from Google designed to manage data collection on websites in accordance with user privacy requirements.

    This mode enables website owners to customise how Google tags respond to users’ consent status for cookie usage. At its core, Consent Mode adheres to privacy regulations such as GDPR in Europe and CCPA in California, without significant loss of analytical data.

    Diagram displaying how consent mode works

    How does Consent Mode work ?

    Consent Mode operates by adjusting the behaviour of tags on a website depending on whether consent for cookie usage is provided or not. If a user does not consent to the use of analytical or advertising cookies, Google tags automatically switch to collecting a limited amount of data, ensuring privacy compliance.

    This approach allows for continued valuable insights into website traffic and user behavior, even if users opt out of most tracking cookies.

    What types of consent are available in Consent Mode ?

    As of 6 March 2024, Consent Mode v2 has become the current standard (and in terms of utilising Google Advertising Services, practically mandatory), indicating the incorporation of four consent types :

    1. ad_storage : allows for the collection and storage of data necessary for delivering personalised ads based on user actions.
    2. ad_user_data : pertains to the collection and usage of data that can be associated with the user for ad customisation and optimisation.
    3. ad_personalization : permits the use of user data for ad personalisation and providing more relevant content.
    4. analytics_storage : relates to the collection and storage of data for analytics, enabling websites to analyse user behaviour and enhance user experience.

    Additionally, in Consent Mode v2, there are two modes :

    1. Basic Consent Mode : in which Google tags are not used for personalised advertising and measurements if consent is not obtained.
    2. Advanced Consent Mode : allows Google tags to utilise anonymised data for personalised advertising campaigns and measurements, even if consent is not obtained.

    What is Consent Mode v2 ? (And how does it differ from Consent Mode v1 ?)

    Consent Mode v2 is an improved version of the original Consent Mode, offering enhanced customisation capabilities and better compliance with privacy requirements. 

    The new version introduces additional consent configuration parameters, allowing for even more precise control over which data is collected and how it’s used. The key difference between Consent Mode v2 and Consent Mode v1 lies in more granular consent management, making this tool even more flexible and powerful in safeguarding personal data.

    In Consent Mode v2, the existing markers (ad_storage and analytics_storage) are accompanied by two new markers :

    1. ad_user_data – does the user agree to their personal data being utilized for advertising purposes ?
    2. ad_personalization – does the user agree to their data being employed for remarketing ?

    In contrast to ad_storage and analytics_storage, these markers don’t directly affect how the tags operate on the site itself. 

    They serve as additional directives sent alongside the pings to Google services, indicating how user data can be utilised for advertising purposes.

    While ad_storage and analytics_storage serve as upstream qualifiers for data (determining which identifiers are sent with the pings), ad_user_data and ad_personalization serve as downstream instructions for Google services regarding data processing.

    How is the implementation of Consent Mode v2 going ?

    The implementation of Consent Mode v2 is encountering some issues and bugs (as expected). The most important thing to understand :

    1. Advanced Consent Mode v2 is essential if you have traffic and campaigns with Google Ads in the European Union.
    2. If you don’t have substantially large traffic, enabling Advanced Consent Mode v2 will likely result in a traffic drop in GA4 – because this version of consent mode (unlike the basic one) applies behavioural modelling to users who haven’t accepted the use of cookies. And modelling the behaviour requires time.

    The aspect of behavioural modelling in Consent Mode v2 implies the following : the data of users who have declined tracking options begin to be modelled using machine learning. 

    However, training the model requires a suitable data volume. As the Google’s documentation states :

    The property should collect at least 1,000 events per day with analytics_storage=’denied’ for at least 7 days. The property should have at least 1,000 daily users submitting events with analytics_storage=’granted’ for at least 7 of the previous 28 days.

    Largely due to this, the market’s response to the Consent Mode v2 implementation was mixed : many reported a significant drop in traffic in their GA4 and Google Ads reports upon enabling the Advanced mode. Essentially, a portion of the data was lost because Google’s models lacked enough data for training. 

    And from the very beginning of implementation, users regularly report about a few examples of that scenario. If your website doesn’t have enough traffic for behaviour modelling, after Consent Mode v2 switching you will face significant drop in your traffic in Google Ads and GA4 reports. There are a lot of cases of observing 90-95% drop in metrics of users and sessions.

    In a nutshell, you should be prepared for significant data losses if you are planning to switch to Google Consent Mode v2.

    How does Consent Mode v2 impact web analytics ? 

    The transition to Consent Mode v2 alters the methods of user data collection and processing. The main concerns arise from the potential loss of accuracy and completeness of analytical data due to restrictions on the use of cookies and other identifiers when user consent is absent. 

    With Google Consent Mode v2, the data of visitors who have not agreed to tracking will be modelled and may not accurately reflect your actual visitors’ behaviours and actions. So as an analyst or marketer, you will not have true insights into these visitors and the data acquired will be more generalised and less accurate.

    Google Consent Mode v2 appears to be a kind of compromise band-aid solution. 

    It tries to solve these issues by using data modelling and anonymised data collection. However, it’s critical to note that there are specific limitations inherent to the modelling mechanism.

    This complicates the analysis of visitor behavior, advertising campaigns, and website optimisation, ultimately impacting decision-making and resulting in poor website performance and marketing outcomes.

    Wrap up

    Consent Mode v2 is a mechanism of managing Google tag operations based on user consent settings. 

    It’s mandatory if you’re using Google’s advertising services, and optional (at least for Advanced mode) if you don’t advertise on Google Ads. 

    There are particular indications that this technology is unreliable from a GDPR perspective. 

    Using Google Consent Mode will inevitably lead to data losses and inaccuracies in its analysis. 

    In other words, it in some sense jeopardises your business.