Recherche avancée

Médias (1)

Mot : - Tags -/epub

Autres articles (80)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

Sur d’autres sites (4306)

  • HLS script has been lost to time, previous content was made in specific format, attempting to recreate using FFMPEG primitives

    28 février, par Wungo

    Looking to add this video to a stitched playlist. The variants, encoding, and everything must match exactly. We have no access to how things were done previously, so I am literally vibing through this as best as I can.

    


    I recommend using a clip of buck bunny that's 30 seconds long, or the original buck bunny 1080p video.

    


    #!/bin/bash
ffmpeg -i bbb_30s.mp4 -filter_complex "
[0:v]split=7[v1][v2][v3][v4][v5][v6][v7];
[v1]scale=416:234[v1out];
[v2]scale=416:234[v2out];
[v3]scale=640:360[v3out];
[v4]scale=768:432[v4out];
[v5]scale=960:540[v5out];
[v6]scale=1280:720[v6out];
[v7]scale=1920:1080[v7out]
" \
-map "[v1out]" -c:v:0 libx264 -b:v:0 200k -maxrate 361k -bufsize 400k -r 29.97 -g 60 -keyint_min 60 -sc_threshold 0 -preset veryfast -profile:v baseline -level 3.0 \
-map "[v2out]" -c:v:1 libx264 -b:v:1 500k -maxrate 677k -bufsize 700k -r 29.97 -g 60 -keyint_min 60 -sc_threshold 0 -preset veryfast -profile:v baseline -level 3.0 \
-map "[v3out]" -c:v:2 libx264 -b:v:2 1000k -maxrate 1203k -bufsize 1300k -r 29.97 -g 60 -keyint_min 60 -sc_threshold 0 -preset veryfast -profile:v main -level 3.1 \
-map "[v4out]" -c:v:3 libx264 -b:v:3 1800k -maxrate 2057k -bufsize 2200k -r 29.97 -g 60 -keyint_min 60 -sc_threshold 0 -preset veryfast -profile:v main -level 3.1 \
-map "[v5out]" -c:v:4 libx264 -b:v:4 2500k -maxrate 2825k -bufsize 3000k -r 29.97 -g 60 -keyint_min 60 -sc_threshold 0 -preset veryfast -profile:v main -level 4.0 \
-map "[v6out]" -c:v:5 libx264 -b:v:5 5000k -maxrate 5525k -bufsize 6000k -r 29.97 -g 60 -keyint_min 60 -sc_threshold 0 -preset veryfast -profile:v high -level 4.1 \
-map "[v7out]" -c:v:6 libx264 -b:v:6 8000k -maxrate 9052k -bufsize 10000k -r 29.97 -g 60 -keyint_min 60 -sc_threshold 0 -preset veryfast -profile:v high -level 4.2 \
-map a:0 -c:a:0 aac -b:a:0 128k -ar 48000 -ac 2 \
-f hls -hls_time 6 -hls_playlist_type vod -hls_flags independent_segments \
-hls_segment_type fmp4 \
-hls_segment_filename "output_%v_%03d.mp4" \
-master_pl_name master.m3u8 \
-var_stream_map "v:0,name:layer-416x234-200k v:1,name:layer-416x234-500k v:2,name:layer-640x360-1000k v:3,name:layer-768x432-1800k v:4,name:layer-960x540-2500k v:5,name:layer-1280x720-5000k v:6,name:layer-1920x1080-8000k a:0,name:layer-audio-128k" \
output_%v.m3u8



    


    Above is what i've put together over the past few days.

    


    I consistently run into the same issues :

    


      

    1. my variants must match identically, the bit rate etc. must match identically no excuses. No variance allowed.
    2. 


    3. When I did it a different way previously, it became impossible to sync the variants timing, thus making the project not stitchable, making the asset useless.The variants are encoded to last longer than the master.m3u8 says it will last. Rejecting the asset downstream.
    4. 


    5. I end up either having variants mismatched with timing, or no audio/audio channels synced properly. Here is what the master.m3u8 should look like.
    6. 


    


    #EXTM3U
#EXT-X-VERSION:7

#EXT-X-STREAM-INF:AUDIO="aac",AVERAGE-BANDWIDTH=333000,BANDWIDTH=361000,CLOSED-CAPTIONS="cc1",CODECS="avc1.4d400d,mp4a.40.2",FRAME-RATE=29.97,RESOLUTION=416x234
placeholder.m3u8
#EXT-X-STREAM-INF:AUDIO="aac",AVERAGE-BANDWIDTH=632000,BANDWIDTH=677000,CLOSED-CAPTIONS="cc1",CODECS="avc1.4d400d,mp4a.40.2",FRAME-RATE=29.97,RESOLUTION=416x234
placeholder2.m3u8
#EXT-X-STREAM-INF:AUDIO="aac",AVERAGE-BANDWIDTH=1133000,BANDWIDTH=1203000,CLOSED-CAPTIONS="cc1",CODECS="avc1.4d401e,mp4a.40.2",FRAME-RATE=29.97,RESOLUTION=640x360
placeholder3.m3u8

#EXT-X-STREAM-INF:AUDIO="aac",AVERAGE-BANDWIDTH=1933000,BANDWIDTH=2057000,CLOSED-CAPTIONS="cc1",CODECS="avc1.4d401f,mp4a.40.2",FRAME-RATE=29.97,RESOLUTION=768x432
placeholder4.m3u8

#EXT-X-STREAM-INF:AUDIO="aac",AVERAGE-BANDWIDTH=2633000,BANDWIDTH=2825000,CLOSED-CAPTIONS="cc1",CODECS="avc1.4d401f,mp4a.40.2",FRAME-RATE=29.97,RESOLUTION=960x540
placeholder5.m3u8

#EXT-X-STREAM-INF:AUDIO="aac",AVERAGE-BANDWIDTH=5134000,BANDWIDTH=5525000,CLOSED-CAPTIONS="cc1",CODECS="avc1.4d401f,mp4a.40.2",FRAME-RATE=29.97,RESOLUTION=1280x720
placeholder6.m3u8

#EXT-X-STREAM-INF:AUDIO="aac",AVERAGE-BANDWIDTH=8135000,BANDWIDTH=9052000,CLOSED-CAPTIONS="cc1",CODECS="avc1.640028,mp4a.40.2",FRAME-RATE=29.97,RESOLUTION=1920x1080
placeholder7.m3u8

#EXT-X-STREAM-INF:AUDIO="aac",AVERAGE-BANDWIDTH=129000,BANDWIDTH=130000,CLOSED-CAPTIONS="cc1",CODECS="mp4a.40.2"
placeholder8.m3u8

#EXT-X-MEDIA:AUTOSELECT=YES,CHANNELS="2",DEFAULT=YES,GROUP-ID="aac",LANGUAGE="en",NAME="English",TYPE=AUDIO,URI="placeholder8.m3u8"
#EXT-X-MEDIA:AUTOSELECT=YES,DEFAULT=YES,GROUP-ID="cc1",INSTREAM-ID="CC1",LANGUAGE="en",NAME="English",TYPE=CLOSED-CAPTIONS


    


    Underlying playlist clips should be *.mp4 not *.m4s or anything like that. Audio must be on a single channel by itself, closed captions are handled by a remote server and aren't a concern.

    


    as mentioned above :

    


      

    1. I have tried transcoding separately and then combining manually or later. Here is an example of that.
    2. 


    


    #!/bin/bash
set -e

# Input file
INPUT_FILE="bbb_30.mp4"

# Output directory
OUTPUT_DIR="hls_output"
mkdir -p "$OUTPUT_DIR"

# First, extract exact duration from master.m3u8 (if it exists)
MASTER_M3U8="master.m3u8"  # Change if needed

echo "Extracting exact duration from the source MP4..."
EXACT_DURATION=$(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "$INPUT_FILE")
echo "Using exact duration: $EXACT_DURATION seconds"
# Create a reference file with exact duration from the source
echo "Creating reference file with exact duration..."
ffmpeg -y -i "$INPUT_FILE" -c copy -t "$EXACT_DURATION" "$OUTPUT_DIR/exact_reference.mp4"

# Calculate exact GOP size for segment alignment (for 6-second segments at 29.97fps)
FPS=29.97
SEGMENT_DURATION=6
GOP_SIZE=$(echo "$FPS * $SEGMENT_DURATION" | bc | awk '{print int($1)}')
echo "Using GOP size of $GOP_SIZE frames for $SEGMENT_DURATION-second segments at $FPS fps"

# Function to encode a variant with exact duration
encode_variant() {
  local resolution="$1"
  local bitrate="$2"
  local maxrate="$3"
  local bufsize="$4"
  local profile="$5"
  local level="$6"
  local audiorate="$7"
  local name_suffix="$8"
  
  echo "Encoding $resolution variant with video bitrate $bitrate kbps and audio bitrate ${audiorate}k..."
  
  # Step 1: Create an intermediate file with exact duration and GOP alignment
  ffmpeg -y -i "$OUTPUT_DIR/exact_reference.mp4" \
    -c:v libx264 -profile:v "$profile" -level "$level" \
    -x264-params "bitrate=$bitrate:vbv-maxrate=$maxrate:vbv-bufsize=$bufsize:keyint=$GOP_SIZE:min-keyint=$GOP_SIZE:no-scenecut=1" \
    -s "$resolution" -r "$FPS" \
    -c:a aac -b:a "${audiorate}k" \
    -vsync cfr -start_at_zero -reset_timestamps 1 \
    -map 0:v:0 -map 0:a:0 \
    -t "$EXACT_DURATION" \
    -force_key_frames "expr:gte(t,n_forced*6)" \
    "$OUTPUT_DIR/temp_${name_suffix}.mp4"
  
  # Step 2: Create HLS segments with exact boundaries from the intermediate file.
  ffmpeg -y -i "$OUTPUT_DIR/temp_${name_suffix}.mp4" \
    -c copy \
    -f hls \
    -hls_time "$SEGMENT_DURATION" \
    -hls_playlist_type vod \
    -hls_segment_filename "$OUTPUT_DIR/layer-${name_suffix}-segment-%03d.mp4" \
    -hls_flags independent_segments+program_date_time+round_durations \
    -hls_list_size 0 \
    "$OUTPUT_DIR/layer-${name_suffix}.m3u8"
  
  # Verify duration
  VARIANT_DURATION=$(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "$OUTPUT_DIR/temp_${name_suffix}.mp4")
  echo "Variant $name_suffix duration: $VARIANT_DURATION (target: $EXACT_DURATION, diff: $(echo "$VARIANT_DURATION - $EXACT_DURATION" | bc))"
  
  # Clean up temporary file
  rm "$OUTPUT_DIR/temp_${name_suffix}.mp4"
}

# Process each variant with exact duration matching
# Format: resolution, bitrate, maxrate, bufsize, profile, level, audio bitrate, name suffix
encode_variant "416x234" "333" "361" "722" "baseline" "3.0" "64" "416x234-200k"
encode_variant "416x234" "632" "677" "1354" "baseline" "3.0" "64" "416x234-500k"
encode_variant "640x360" "1133" "1203" "2406" "main" "3.0" "96" "640x360-1000k"
encode_variant "768x432" "1933" "2057" "4114" "main" "3.1" "96" "768x432-1800k"
encode_variant "960x540" "2633" "2825" "5650" "main" "3.1" "128" "960x540-2500k"
encode_variant "1280x720" "5134" "5525" "11050" "main" "3.1" "128" "1280x720-5000k"
encode_variant "1920x1080" "8135" "9052" "18104" "high" "4.0" "128" "1920x1080-8000k"

# 8. Audio-only variant
echo "Creating audio-only variant..."


# ffmpeg -y -i "$INPUT_FILE" \
#   -vn -map 0:a \
#   -c:a aac -b:a 128k -ac 2 \ 
#   -t "$EXACT_DURATION" \
#   -f hls \
#   -hls_time "$SEGMENT_DURATION" \
#   -hls_playlist_type vod \
#   -hls_flags independent_segments+program_date_time+round_durations \
#   -hls_segment_filename "$OUTPUT_DIR/layer-audio-128k-segment-%03d.ts" \
#   -hls_list_size 0 \
#   "$OUTPUT_DIR/layer-audio-128k.m3u8"

ffmpeg -y -i "$INPUT_FILE" \
  -vn \
  -map 0:a \
  -c:a aac -b:a 128k \
  -t "$EXACT_DURATION" \
  -f hls \
  -hls_time "$SEGMENT_DURATION" \
  -hls_playlist_type vod \
  -hls_segment_type fmp4 \
  -hls_flags independent_segments+program_date_time+round_durations \
  -hls_list_size 0 \
  -hls_segment_filename "$OUTPUT_DIR/layer-audio-128k-segment-%03d.m4s" \
  "$OUTPUT_DIR/layer-audio-128k.m3u8"


# Create master playlist
cat > "$OUTPUT_DIR/master.m3u8" << EOF
#EXTM3U
#EXT-X-VERSION:7
#EXT-X-INDEPENDENT-SEGMENTS

#EXT-X-STREAM-INF:BANDWIDTH=361000,AVERAGE-BANDWIDTH=333000,CODECS="avc1.4d400d,mp4a.40.2",RESOLUTION=416x234,FRAME-RATE=29.97
layer-416x234-200k.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=677000,AVERAGE-BANDWIDTH=632000,CODECS="avc1.4d400d,mp4a.40.2",RESOLUTION=416x234,FRAME-RATE=29.97
layer-416x234-500k.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1203000,AVERAGE-BANDWIDTH=1133000,CODECS="avc1.4d401e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.97
layer-640x360-1000k.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2057000,AVERAGE-BANDWIDTH=1933000,CODECS="avc1.4d401f,mp4a.40.2",RESOLUTION=768x432,FRAME-RATE=29.97
layer-768x432-1800k.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2825000,AVERAGE-BANDWIDTH=2633000,CODECS="avc1.4d401f,mp4a.40.2",RESOLUTION=960x540,FRAME-RATE=29.97
layer-960x540-2500k.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=5525000,AVERAGE-BANDWIDTH=5134000,CODECS="avc1.4d401f,mp4a.40.2",RESOLUTION=1280x720,FRAME-RATE=29.97
layer-1280x720-5000k.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=9052000,AVERAGE-BANDWIDTH=8135000,CODECS="avc1.640028,mp4a.40.2",RESOLUTION=1920x1080,FRAME-RATE=29.97
layer-1920x1080-8000k.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=130000,AVERAGE-BANDWIDTH=129000,CODECS="mp4a.40.2"
layer-audio-128k.m3u8
EOF

# Verify all durations match
cat > "$OUTPUT_DIR/verify_all.sh" << 'EOF'
#!/bin/bash

# Get exact reference duration from the exact reference file
REFERENCE_DURATION=$(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "exact_reference.mp4")
echo "Reference duration: $REFERENCE_DURATION seconds"

# Check each segment's duration
echo -e "\nChecking individual segments..."
for seg in layer-*-segment-*.mp4 layer-audio-128k-segment-*.ts; do
  dur=$(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "$seg")
  echo "$seg: $dur seconds"
done

# Get total duration for each variant by summing segment EXTINF durations from each playlist
echo -e "\nChecking combined variant durations..."
for variant in layer-*.m3u8; do
  total=0
  while read -r line; do
    if [[ $line == "#EXTINF:"* ]]; then
      dur=$(echo "$line" | sed 's/#EXTINF:\([0-9.]*\).*/\1/')
      total=$(echo "$total + $dur" | bc)
    fi
  done < "$variant"
  echo "$variant: $total seconds (reference: $REFERENCE_DURATION, diff: $(echo "$total - $REFERENCE_DURATION" | bc))"
done
EOF

chmod +x "$OUTPUT_DIR/verify_all.sh"

echo "HLS packaging complete with exact duration matching."
echo "Master playlist available at: $OUTPUT_DIR/master.m3u8"
echo "Run $OUTPUT_DIR/verify_all.sh to verify durations."
rm "$OUTPUT_DIR/exact_reference.mp4"



    


    I end up with weird audio in vlc which can't be right, and I also end up with variants being longer than the master.m3u8 playlist which is wonky.

    


    I tried using AI to fix the audio sync issue, and honestly I'm more confused than when I started.

    


  • Google Analytics 4 (GA4) vs Universal Analytics (UA)

    24 janvier 2022, par Erin — Analytics Tips

    March 2022 Update : It’s official ! Google announced that Universal Analytics will no longer process any new data as of 1 July 2023. Google is now pushing Universal Analytics users to switch to the latest version of GA – Google Analytics 4. 

    Currently, Google Analytics 4 is unable to accept historical data from Universal Analytics. Users need to take action before July 2022, to ensure they have 12 months of data built up before the sunset of Universal Analytics

    So how do Universal Analytics and Google Analytics 4 compare ? And what alternative options do you have ? Let’s dive in. 

    In this blog, we’ll cover :

    What is Google Analytics 4 ? 

    In October 2020, Google launched Google Analytics 4, a completely redesigned analytics platform. This follows on from the previous version known as Universal Analytics (or UA).

    Amongst its touted benefits, GA4 promises a completely new way to model data and even the ability to predict future revenue. 

    However, the reception of GA4 has been largely negative. In fact, some users from the digital marketing community have said that GA4 is awful, unusable and so bad it can bring you to tears.

    Gill Andrews via Twitter

    Google Analytics 4 vs Universal Analytics

    There are some pretty big differences between Google Analytics 4 and Universal Analytics but for this blog, we’ll cover the top three.

    1. Redesigned user interface (UI)

    GA4 features a completely redesigned UI to Universal Analytics’ popular interface. This dramatic change has left many users in confusion and fuelled some users to declare that “most of the time you are going round in circles to find what you’re looking for.”

    Google Analytics 4 missing features
    Mike Huggard via Twitter

    2. Event-based tracking

    Google Analytics 4 also brings with it a new data model which is purely event-based. This event-based model moves away from the typical “pageview” metric that underpins Universal Analytics.

    3. Machine learning insights

    Google Analytics 4 promises to “predict the future behavior of your users” with their machine-learning-powered predictive metrics. This feature can “use shared aggregated and anonymous data to improve model quality”. Sounds powerful, right ?

    Unfortunately, it only works if at least 1,000 returning users triggered the relevant predictive condition over a seven-day period. Also, if the model isn’t sustained over a “period of time” then it won’t work. And according to Google, if “the model quality for your property falls below the minimum threshold, then Analytics will stop updating the corresponding predictions”.

    This means GA4’s machine learning insights probably won’t work for the majority of analytics users.

    Ultimately, GA4 is just not ready to replace Google’s Universal Analytics for most users. There are too many missing features.

    What’s missing in Google Analytics 4 ?

    Quite a lot. Even though it offers a completely new approach to analytics, there are a lot of key features and functions missing in GA4.

    Behavior Flow

    The Behavior Flow report in Universal Analytics helps to visualise the path users take from one page or Event to the next. It’s extremely useful when you’re looking for quick and clear insight. But it no longer exists in Google Analytics 4, and instead, two new overcomplicated reports have been introduced to replace it – funnel exploration report and path exploration report.

    The decision to remove this critical report will leave many users feeling disappointed and frustrated. 

    Limitations on custom dimensions

    You can create custom dimensions in Google Analytics 4 to capture advanced information. For example, if a user reads a blog post you can supplement that data with custom dimensions like author name or blog post length. But, you can only use up to 50, and for some that will make functionality like this almost pointless.

    Machine learning (ML) limitations

    Google Analytics 4 promises powerful ML insights to predict the likelihood of users converting based on their behaviors. The problem ? You need 1,000 returning users in one week. For most small-medium businesses this just isn’t possible.

    And if you do get this level of traffic in a week, there’s another hurdle. According to Google, if “the model quality for your property falls below the minimum threshold, then GA will stop updating the corresponding predictions.” To add insult to injury Google suggests that this might make all ML insights unavailable. But they can’t say for certain… 

    Views

    One cornerstone of Universal Analytics is the ability to configure views. Views allow you to set certain analytics environments for testing or cleaning up data by filtering out internal traffic, for example. 

    Views are great for quickly and easily filtering data. Preset views that contain just the information you want to see are the ideal analytics setup for smaller businesses, casual users, and do-it-yourself marketing departments.

    Via Reddit

    There are a few workarounds but they’re “messy [,] annoying and clunky,” says a disenfranchised Redditor.

    Another helpful Reddit user stumbled upon an unhelpful statement from Google. Google says that they “do not offer [the views] feature in Google Analytics 4 but are planning similar functionality in the future.” There’s no specific date yet though.

    Bounce rate

    Those that rely on bounce rate to understand their site’s performance will be disappointed to find out that bounce rate is also not available in GA4. Instead, Google is pushing a new metric known as “Engagement Rate”. With this metric, Google now uses their own formula to establish if a visitor is engaged with a site.

    Lack of integration

    Currently, GA4 isn’t ready to integrate with many core digital marketing tools and doesn’t accept non-Google data imports. This makes it difficult for users to analyse ROI and ROAS for campaigns measured in other tools. 

    Content Grouping

    Yet another key feature that Google has done away with is Content Grouping. However, as with some of the other missing features in GA4, there is a workaround, but it’s not simple for casual users to implement. In order to keep using Content Grouping, you’ll need to create event-scoped custom dimensions.

    Annotations 

    A key feature of Universal Analytics is the ability to add custom Annotations in views. Annotations are useful for marking dates that site changes were made for analysis in the future. However, Google has removed the Annotations feature and offered no alternative or workaround.

    Historical data imports are not available

    The new approach to data modelling in GA4 adds new functionality that UA can’t match. However, it also means that you can’t import historical UA data into GA4. 

    Google’s suggestion for this one ? Keep running UA with GA4 and duplicate events for your GA4 property. Now you will have two different implementations running alongside each other and doing slightly different things. Which doesn’t sound like a particularly streamlined solution, and adds another level of complexity.

    Should you switch to Google Analytics 4 ?

    So the burning question is, should you switch from Universal Analytics to Google Analytics 4 ? It really depends on whether you have the available resources and if you believe this tool is still right for your organisation. At the time of writing, GA4 is not ready for day-to-day use in most organisations.

    If you’re a casual user or someone looking for quick, clear insights then you will likely struggle with the switch to GA4. It appears that the new Google Analytics 4 has been designed for enterprise-scale businesses with large internal teams of analysts.

    Google Analytics 4 UX changes
    Micah Fisher-Kirshner via Twitter

    Unfortunately, for most casual users, business owners and do-it-yourself marketers there are complex workarounds and time-consuming implementations to handle. Ultimately, it’s up to you to decide if the effort to migrate and relearn GA is worth it.

    Right now is the best time to draw the line and make a decision to either switch to GA4 or look for a better alternative to Google Analytics.

    Google Analytics alternative

    Matomo is one of the best Google Analytics alternatives offering an easy to use design with enhanced insights on our Cloud, On-Premise and on Matomo for WordPress solutions. 

    Google Analytics 4 Switch to Matomo
    Mark Samber via Twitter

    Matomo is an open-source analytics solution that provides a comprehensive, user-friendly and compliance-focused alternative to both Google Analytics 4 and Universal Analytics.

    The key benefits of using Matomo include :

    Plus, unlike GA4, Matomo will accept your historical data from UA so you don’t have to start all over again. Check out our 7 step guide to migrating from Google Analytics to find out how.

    Getting started with Matomo is easy. Check out our live demo and start your free 21-day trial. No credit card required.

    In addition to the limitations and complexities of GA4, there are many other significant drawbacks to using Google Analytics.

    Google’s data ethics are a growing concern of many and it is often discussed in the mainstream media. In addition, GA is not GDPR compliant by default and has resulted in 200k+ data protection cases against websites using GA.

    What’s more, the data that Google Analytics actually provides its end-users is extrapolated from samples. GA’s data sampling model means that once you’ve collected a certain amount of data Google Analytics will make educated guesses rather than use up its server space collecting your actual data. 

    The reasons to switch from Google Analytics are rising each day. 

    Wrap up

    The now required update to GA4 will add new layers of complexity, which will leave many casual web analytics users and marketers wondering if there’s a better way. Luckily there is. Get clear insights quickly and easily with Matomo – start your 21-day free trial now.

  • IPython.display Video giving an unplayable "empty" video when trying to run an animation from previous plots (Using ffmpeg)

    17 novembre 2023, par drhode

    I am working on a crater simulation project for a class and am running into a problem when it comes to creating a video. The general project is for us to simulate a surface being hit by craters until it becomes saturated. The code works, however, if I print out every graph in the simulation it would be thousands of graphs until sat is reached and then I would have to manually clip them all together. To circumvent this, I would like to take all the graphs and put them into an animation. I however, have no idea where to even start.

    


    for reference, here is main code block :

    


    import matplotlib.pyplot as plt
import numpy as np
import math
import os
import matplotlib.animation as ani

#I have removed the definitions and class implementation for sake of simplicity and space

ani.writers.list()
FFMpegWriter = ani.writers['ffmpeg']
writer = FFMpegWriter(fps = 10)
fig = plt.gcf()
figure = plt.figure()
fig.patch.set_alpha(1.0)

with writer.saving(figure, "sine.mp4", 150):
    while sat_counter !=1:#while loop that will introduce new crater each iteration

        new_crater = generate_crater()
        new_crater.age = sat_counter
        random_crater_list.append(new_crater)

        i =0

        while i < len(random_crater_list):#looping through the crater list and comparing new crater to all others


            old_crater = random_crater_list[i]


            overlap = square_overlap(old_crater, new_crater)#checks if old crater should be covered/removed by new crater
          

            if overlap == True:
                    random_crater_list.remove(old_crater)
                    i=i-1

                    
            else:
                pass

            i=i+1

        sat = Saturation(random_crater_list)# checks the saturation of the graph and returns a a number between 0 and 100
        if sat > 90:
            sat_counter = 1#base condition used to break the while loop

        writer.grab_frame()
plot_craters(random_crater_list)                   



    


    Here is what the final graph looks like
saturated surface

    


    I have tried to use the IPython.display video :

    


    
Video("sine.mp4", embed = True, width = 320, height = 320)


    


    This however loads an empty video that is unplayable.
empty video