Recherche avancée

Médias (91)

Autres articles (41)

  • MediaSPIP v0.2

    21 juin 2013, par

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

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (4480)

  • MediaCodec hardware decoder much slower with different server configuration ?

    19 octobre 2013, par mathieujofis

    I've been using the Android MediaCodec in order to (hardware) decode H.264 frames on my Galaxy S4 coming from a Live 555 RTSP live (real-time) stream. After changing my Live 555 server configuration from using ffmpeg (with x264) to encode frames, to using strictly x264 to encode frames, the time to decode frames with MediaCodec takes much longer. Basically, MediaCodec can't keep up with the stream, and displays the video in slow motion, getting slower and slower as time goes on. Going back to ffmpeg isn't a solution for me, because I need the ability to encode into discrete NAL units, rather than a whole frame like ffmpeg does.

    I was wondering if this was either : A) An issue with the way my server is encoding NAL units, or B) An issue with my Android client, specifically the way it is receiving and decoding NAL units.

    My encoding configuration with x264 is :

    x264_param_default_preset(&param,"ultrafast", "zerolatency:fastdecode");
    param.i_threads = 1;
    param.i_bframe = 1;
    param.i_width = image_width;
    param.i_height = image_height;
    param.i_fps_num = 60;
    param.i_fps_den = 1;
    param.i_keyint_max = 10;

    param.rc.i_rc_method = X264_RC_ABR;
    param.rc.i.bitrate = 6000;
    param.i_sps_id = 7;
    param.b_repeat_headers = 1;
    param.b_annexb = 0;

    My Android MediaCodec client is set up as follows :

    I receive each individual NAL unit on a separate Live 555 RTSP client thread. Each NAL is put into a queue along with its size and presentation time. A separate decoder thread grabs NALs from this queue, and if there are none available, waits until there are.

    Some notes :

    What I generally see happen is the queue starts filling up with NALs, instead of staying close to empty. So, I know that the decoder thread is not working fast enough. I don't think this is an inherent problem with decoding on an Android phone (for example, processing limitations) because it does the same thing for very low bitrates— also again, it DID work when I was using ffmpeg to encode. If I omit certain NAL units, the decoder can start to keep up. Since I'm using Cyanogenmod 10.1, bumping up the minimum CPU frequency helps, too.

    Edit :

    Here is a log of the Android client, as well as a log highlighting the garbage collector specifically—

    Entire Logcat :

    10-15 16:40:03.955: D/DecodeActivity(18859): INFO_OUTPUT_BUFFERS_CHANGED
    10-15 16:40:03.995: E/OMX-VDEC-1080P(288): Sync frame received
    10-15 16:40:03.995: E/OMX-VDEC-1080P(288):  No color conversion required
    10-15 16:40:03.995: E/OMX-VDEC-1080P(288): Get_parameter: OMX_IndexParamPortDefinition: nPortIndex (1), nFrameWidth (1280), nFrameHeight (720), nStride (1280), nSliceHeight (736), nBitrate (-1073741824), xFramerate (0x1e), nBufferSize (1433600), nBufferCountMin (4), nBufferCountActual (8), bBuffersContiguous (1918394328), nBufferAlignment (1075643347), bEnabled (1), bPopulated (1), eCompressionFormat (0x0), eColorFormat (0x7fa30c03)
    10-15 16:40:03.995: D/DecodeActivity(18859): New format {height=720, what=1869968451, color-format=2141391875, slice-height=736, crop-left=0, width=1280, crop-bottom=719, crop-top=0, mime=video/raw, stride=1280, crop-right=1279}
    10-15 16:40:04.005: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4966) fps(201.369308)
    10-15 16:40:04.015: W/IInputConnectionWrapper(1069): showStatusIcon on inactive InputConnection
    10-15 16:40:04.025: I/ActivityManager(698): Displayed com.mathieu.alloclient.javadecoder/.MainActivity: +617ms
    10-15 16:40:04.025: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4766) fps(209.819550)
    10-15 16:40:04.125: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4733) fps(211.282486)
    10-15 16:40:04.445: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4711) fps(212.269150)
    10-15 16:40:04.495: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4700) fps(212.765961)
    10-15 16:40:05.676: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4688) fps(213.310577)
    10-15 16:40:06.087: D/dalvikvm(698): WAIT_FOR_CONCURRENT_GC blocked 1ms
    10-15 16:40:06.207: D/dalvikvm(698): GC_EXPLICIT freed 4120K, 39% free 24216K/39664K, paused 7ms+9ms, total 117ms
    10-15 16:40:06.537: D/ALSADevice(288): standby: handle 0x40024450 h 0x0
    10-15 16:40:06.577: D/alsa_ucm(288): snd_use_case_set(): uc_mgr 0x400fbfb0 identifier _verb value Inactive
    10-15 16:40:06.577: D/alsa_ucm(288): Set mixer controls for HiFi Lowlatency enable 0
    10-15 16:40:06.577: D/alsa_ucm(288): Setting mixer control: SLIMBUS_0_RX Audio Mixer MultiMedia5, value: 0
    10-15 16:40:06.577: D/alsa_ucm(288): snd_use_case_set(): uc_mgr 0x400fbfb0 identifier _disdev value Line
    10-15 16:40:06.577: D/alsa_ucm(288): disdev: device Line not enabled, no need to disable
    10-15 16:40:06.577: D/alsa_ucm(288): snd_use_case_set(): uc_mgr 0x400fbfb0 identifier _disdev value Speaker
    10-15 16:40:06.577: D/alsa_ucm(288): Set mixer controls for Speaker enable 0
    10-15 16:40:06.577: D/alsa_ucm(288): Setting mixer control: RX5 MIX1 INP1, value: ZERO
    10-15 16:40:06.587: D/alsa_ucm(288): Setting mixer control: RX5 MIX1 INP2, value: ZERO
    10-15 16:40:06.587: D/alsa_ucm(288): Setting mixer control: LINEOUT2 Volume, value: 0
    10-15 16:40:06.587: D/alsa_ucm(288): Setting mixer control: LINEOUT4 Volume, value: 0
    10-15 16:40:06.587: D/alsa_ucm(288): Setting mixer control: RX5 Digital Volume, value: 0
    10-15 16:40:06.587: D/AudioUsbALSA(288): exitPlaybackThread, mproxypfdPlayback: -1
    10-15 16:40:06.587: D/AudioUsbALSA(288): closeDevice handle 0x0
    10-15 16:40:06.587: D/AudioUsbALSA(288): closeDevice handle 0x0
    10-15 16:40:17.638: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4677) fps(213.812271)
    10-15 16:40:17.698: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4644) fps(215.331604)
    10-15 16:40:20.681: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4633) fps(215.842865)
    10-15 16:40:21.111: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4611) fps(216.872696)
    10-15 16:40:25.746: D/dalvikvm(698): GC_CONCURRENT freed 5829K, 41% free 23778K/39664K, paused 10ms+24ms, total 165ms
    10-15 16:40:28.448: E/MP-Decision(1385): num online cores: 4 reqd : 3 available : 4 rq_depth:2.800000 hotplug_avg_load_dw: 74
    10-15 16:40:28.448: E/MP-Decision(1385): DOWN cpu:3 core_idx:3 Ns:3.100000 Ts:240 total_time_down:243.000000
    10-15 16:40:30.841: W/SystemClock(698): time going backwards: prev 16555345563411(ioctl) vs now 16555345441341(ioctl), tid=764
    10-15 16:40:44.684: D/dalvikvm(698): GC_CONCURRENT freed 5302K, 41% free 23774K/39664K, paused 6ms+9ms, total 107ms
    10-15 16:40:57.467: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4577) fps(218.483719)
    10-15 16:41:14.383: D/dalvikvm(698): GC_CONCURRENT freed 5371K, 41% free 23768K/39664K, paused 7ms+8ms, total 146ms
    10-15 16:41:14.403: E/MP-Decision(1385): num online cores: 3 reqd : 4 available : 4 rq_depth:4.500000 hotplug_avg_load_dw: 89
    10-15 16:41:14.403: E/MP-Decision(1385): UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000
    10-15 16:41:14.403: E/MP-Decision(1385): UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:0.000000
    10-15 16:41:14.403: E/MP-Decision(1385): UP cpu:3 core_idx:3 Nw:3.500000 Tw:90 total_time_up:922.000000
    10-15 16:41:27.466: E/kickstart(862): Total bytes received so far: 48
    10-15 16:41:27.466: E/kickstart(862): EVENT: RECEIVED <-- SAHARA_HELLO
    10-15 16:41:27.466: E/kickstart(862): EVENT: SENDING --> SAHARA_HELLO_RESPONSE
    10-15 16:41:27.466: E/kickstart(862): EVENT: sahara_mode                         = 2
    10-15 16:41:27.466: E/kickstart(862): EVENT: m_comm->sahara_hello_packet_rx.mode = 2
    10-15 16:41:27.466: E/kickstart(862): EVENT: helloRx.mode                        = 2
    10-15 16:41:27.466: E/kickstart(862): Total bytes received so far: 64
    10-15 16:41:27.466: E/kickstart(862): EVENT: RECEIVED <-- SAHARA_MEMORY_DEBUG
    10-15 16:41:27.466: E/kickstart(862): Total bytes received so far: 116
    10-15 16:41:27.466: E/kickstart(862): EVENT: 0x46980000, len=000C0000, "m9kefs1", ""
    10-15 16:41:27.466: E/kickstart(862): EVENT: STATE <-- SAHARA_WAIT_MEMORY_REGION
    10-15 16:41:27.466: E/kickstart(862): EVENT: Saving "/dev/block/platform/msm_sdcc.1/by-name/m9kefs1"
    10-15 16:41:27.526: E/kickstart(862): Total bytes received so far: 786548
    10-15 16:41:27.526: E/kickstart(862): EVENT: Received: 786432 bytes
    10-15 16:41:27.526: E/kickstart(862): EVENT: Writing to disk
    10-15 16:41:27.526: E/kickstart(862): EVENT: Successfully wrote to disk
    10-15 16:41:27.526: E/kickstart(862): Received file "m9kefs1"
    10-15 16:41:27.576: E/kickstart(862): Sync finish Received file "m9kefs1"
    10-15 16:41:27.576: E/kickstart(862): 786432 bytes transferred in 0.106s (7.10 MBps)
    10-15 16:41:27.576: E/kickstart(862): EVENT: num_debug_entries not >=0
    10-15 16:41:27.576: E/kickstart(862): Successfully downloaded files from target
    10-15 16:41:27.576: E/kickstart(862): EVENT: SENDING --> SAHARA_RESET
    10-15 16:41:27.576: E/kickstart(862): Total bytes received so far: 786556
    10-15 16:41:27.576: E/kickstart(862): EVENT: RECEIVED <-- SAHARA_RESET_RESP
    10-15 16:41:27.576: E/kickstart(862): Sahara protocol completed
    10-15 16:41:27.576: E/kickstart(862): EVENT: STATE <-- SAHARA_WAIT_HELLO
    10-15 16:41:27.746: E/MP-Decision(1385): num online cores: 4 reqd : 3 available : 4 rq_depth:2.100000 hotplug_avg_load_dw: 79
    10-15 16:41:27.746: E/MP-Decision(1385): DOWN cpu:3 core_idx:3 Ns:3.100000 Ts:240 total_time_down:244.000000
    10-15 16:41:49.598: D/dalvikvm(698): GC_CONCURRENT freed 5339K, 41% free 23775K/39664K, paused 10ms+7ms, total 134ms
    10-15 16:42:17.225: I/ActivityManager(698): Start proc com.cyanogenmod.lockclock for service com.cyanogenmod.lockclock/.weather.WeatherUpdateService: pid=18954 uid=10028 gids={50028, 3003, 1028}
    10-15 16:42:17.865: D/WeatherXmlParser(18954): Weather updated: WeatherInfo for Santa Barbara@ Tue Oct 15 16:42:17 PDT 2013: Fair(34), temperature 29°C, low 11°, high 27°, humidity 14%, wind 11km/h at W
    10-15 16:42:17.945: I/ActivityManager(698): No longer want com.google.android.apps.uploader (pid 13565): empty #17
    10-15 16:42:24.021: D/dalvikvm(698): GC_CONCURRENT freed 5277K, 41% free 23770K/39664K, paused 8ms+11ms, total 106ms
    10-15 16:42:35.983: W/ThrottleService(698): unable to find stats for iface rmnet0
    10-15 16:42:59.476: D/dalvikvm(698): GC_CONCURRENT freed 5345K, 41% free 23770K/39664K, paused 6ms+13ms, total 168ms
    10-15 16:43:02.098: E/kickstart(862): Total bytes received so far: 48
    10-15 16:43:02.098: E/kickstart(862): EVENT: RECEIVED <-- SAHARA_HELLO
    10-15 16:43:02.098: E/kickstart(862): EVENT: SENDING --> SAHARA_HELLO_RESPONSE
    10-15 16:43:02.098: E/kickstart(862): EVENT: sahara_mode                         = 2
    10-15 16:43:02.098: E/kickstart(862): EVENT: m_comm->sahara_hello_packet_rx.mode = 2
    10-15 16:43:02.098: E/kickstart(862): EVENT: helloRx.mode                        = 2
    10-15 16:43:02.098: E/kickstart(862): Total bytes received so far: 64
    10-15 16:43:02.098: E/kickstart(862): EVENT: RECEIVED <-- SAHARA_MEMORY_DEBUG
    10-15 16:43:02.108: E/kickstart(862): Total bytes received so far: 116
    10-15 16:43:02.108: E/kickstart(862): EVENT: 0x46980000, len=000C0000, "m9kefs2", ""
    10-15 16:43:02.108: E/kickstart(862): EVENT: STATE <-- SAHARA_WAIT_MEMORY_REGION
    10-15 16:43:02.108: E/kickstart(862): EVENT: Saving "/dev/block/platform/msm_sdcc.1/by-name/m9kefs2"
    10-15 16:43:02.158: E/kickstart(862): Total bytes received so far: 786548
    10-15 16:43:02.158: E/kickstart(862): EVENT: Received: 786432 bytes
    10-15 16:43:02.158: E/kickstart(862): EVENT: Writing to disk
    10-15 16:43:02.168: E/kickstart(862): EVENT: Successfully wrote to disk
    10-15 16:43:02.168: E/kickstart(862): Received file "m9kefs2"
    10-15 16:43:02.218: E/kickstart(862): Sync finish Received file "m9kefs2"
    10-15 16:43:02.218: E/kickstart(862): 786432 bytes transferred in 0.113s (6.65 MBps)
    10-15 16:43:02.218: E/kickstart(862): EVENT: num_debug_entries not >=0
    10-15 16:43:02.218: E/kickstart(862): Successfully downloaded files from target
    10-15 16:43:02.218: E/kickstart(862): EVENT: SENDING --> SAHARA_RESET
    10-15 16:43:02.218: E/kickstart(862): Total bytes received so far: 786556
    10-15 16:43:02.218: E/kickstart(862): EVENT: RECEIVED <-- SAHARA_RESET_RESP
    10-15 16:43:02.218: E/kickstart(862): Sahara protocol completed
    10-15 16:43:02.218: E/kickstart(862): EVENT: STATE <-- SAHARA_WAIT_HELLO
    10-15 16:43:17.563: W/SystemClock(698): time going backwards: prev 16722067121029(ioctl) vs now 16722066968441(ioctl), tid=764
    10-15 16:43:34.610: D/dalvikvm(698): GC_CONCURRENT freed 5359K, 41% free 23772K/39664K, paused 9ms+9ms, total 113ms
    10-15 16:43:36.452: E/MP-Decision(1385): num online cores: 3 reqd : 4 available : 4 rq_depth:3.900000 hotplug_avg_load_dw: 100
    10-15 16:43:36.452: E/MP-Decision(1385): UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000
    10-15 16:43:36.452: E/MP-Decision(1385): UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:0.000000
    10-15 16:43:36.452: E/MP-Decision(1385): UP cpu:3 core_idx:3 Nw:3.500000 Tw:90 total_time_up:194.000000
    10-15 16:44:09.965: D/dalvikvm(698): GC_CONCURRENT freed 5369K, 41% free 23779K/39664K, paused 8ms+8ms, total 103ms
    10-15 16:44:09.965: D/dalvikvm(698): WAIT_FOR_CONCURRENT_GC blocked 30ms
    10-15 16:44:10.605: E/MP-Decision(1385): num online cores: 4 reqd : 3 available : 4 rq_depth:2.800000 hotplug_avg_load_dw: 133
    10-15 16:44:10.605: E/MP-Decision(1385): DOWN cpu:3 core_idx:3 Ns:3.100000 Ts:240 total_time_down:244.000000
    10-15 16:44:12.707: E/MP-Decision(1385): num online cores: 3 reqd : 4 available : 4 rq_depth:4.100000 hotplug_avg_load_dw: 116
    10-15 16:44:12.707: E/MP-Decision(1385): UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000
    10-15 16:44:12.707: E/MP-Decision(1385): UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:0.000000
    10-15 16:44:12.707: E/MP-Decision(1385): UP cpu:3 core_idx:3 Nw:3.500000 Tw:90 total_time_up:97.000000
    10-15 16:44:14.008: E/MP-Decision(1385): num online cores: 4 reqd : 3 available : 4 rq_depth:1.700000 hotplug_avg_load_dw: 140
    10-15 16:44:14.008: E/MP-Decision(1385): DOWN cpu:3 core_idx:3 Ns:3.100000 Ts:240 total_time_down:240.000000
    10-15 16:44:14.759: E/MP-Decision(1385): num online cores: 3 reqd : 4 available : 4 rq_depth:4.900000 hotplug_avg_load_dw: 132
    10-15 16:44:14.759: E/MP-Decision(1385): UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000
    10-15 16:44:14.759: E/MP-Decision(1385): UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:0.000000
    10-15 16:44:14.759: E/MP-Decision(1385): UP cpu:3 core_idx:3 Nw:3.500000 Tw:90 total_time_up:97.000000
    10-15 16:44:15.360: E/MP-Decision(1385): num online cores: 4 reqd : 3 available : 4 rq_depth:2.300000 hotplug_avg_load_dw: 139
    10-15 16:44:15.360: E/MP-Decision(1385): DOWN cpu:3 core_idx:3 Ns:3.100000 Ts:240 total_time_down:243.000000
    10-15 16:44:15.560: E/MP-Decision(1385): num online cores: 3 reqd : 4 available : 4 rq_depth:3.900000 hotplug_avg_load_dw: 133
    10-15 16:44:15.560: E/MP-Decision(1385): UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000
    10-15 16:44:15.560: E/MP-Decision(1385): UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:0.000000
    10-15 16:44:15.560: E/MP-Decision(1385): UP cpu:3 core_idx:3 Nw:3.500000 Tw:90 total_time_up:95.000000
    10-15 16:44:16.361: E/MP-Decision(1385): num online cores: 4 reqd : 3 available : 4 rq_depth:2.500000 hotplug_avg_load_dw: 132
    10-15 16:44:16.361: E/MP-Decision(1385): DOWN cpu:3 core_idx:3 Ns:3.100000 Ts:240 total_time_down:242.000000
    10-15 16:44:16.661: E/MP-Decision(1385): num online cores: 3 reqd : 4 available : 4 rq_depth:3.700000 hotplug_avg_load_dw: 127
    10-15 16:44:16.661: E/MP-Decision(1385): UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000
    10-15 16:44:16.661: E/MP-Decision(1385): UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:0.000000
    10-15 16:44:16.661: E/MP-Decision(1385): UP cpu:3 core_idx:3 Nw:3.500000 Tw:90 total_time_up:97.000000
    10-15 16:44:20.605: E/MP-Decision(1385): num online cores: 4 reqd : 3 available : 4 rq_depth:1.700000 hotplug_avg_load_dw: 122
    10-15 16:44:20.605: E/MP-Decision(1385): DOWN cpu:3 core_idx:3 Ns:3.100000 Ts:240 total_time_down:244.000000
    10-15 16:44:20.615: W/ProcessStats(698): Skipping unknown process pid 19038
    10-15 16:44:20.615: W/ProcessStats(698): Skipping unknown process pid 19041

    Garbage collector entries in Logcat :

    10-15 16:40:06.087: D/dalvikvm(698): WAIT_FOR_CONCURRENT_GC blocked 1ms
    10-15 16:40:06.207: D/dalvikvm(698): GC_EXPLICIT freed 4120K, 39% free 24216K/39664K,   paused 7ms+9ms, total 117ms
    10-15 16:40:25.746: D/dalvikvm(698): GC_CONCURRENT freed 5829K, 41% free 23778K/39664K, paused 10ms+24ms, total 165ms
    10-15 16:40:44.684: D/dalvikvm(698): GC_CONCURRENT freed 5302K, 41% free 23774K/39664K, paused 6ms+9ms, total 107ms
    10-15 16:41:14.383: D/dalvikvm(698): GC_CONCURRENT freed 5371K, 41% free 23768K/39664K, paused 7ms+8ms, total 146ms
    10-15 16:41:49.598: D/dalvikvm(698): GC_CONCURRENT freed 5339K, 41% free 23775K/39664K, paused 10ms+7ms, total 134ms
    10-15 16:42:24.021: D/dalvikvm(698): GC_CONCURRENT freed 5277K, 41% free 23770K/39664K, paused 8ms+11ms, total 106ms
    10-15 16:42:59.476: D/dalvikvm(698): GC_CONCURRENT freed 5345K, 41% free 23770K/39664K, paused 6ms+13ms, total 168ms
    10-15 16:43:34.610: D/dalvikvm(698): GC_CONCURRENT freed 5359K, 41% free 23772K/39664K, paused 9ms+9ms, total 113ms
    10-15 16:44:09.965: D/dalvikvm(698): GC_CONCURRENT freed 5369K, 41% free 23779K/39664K, paused 8ms+8ms, total 103ms
    10-15 16:44:09.965: D/dalvikvm(698): WAIT_FOR_CONCURRENT_GC blocked 30ms
    10-15 16:44:24.389: D/dalvikvm(698): GC_EXPLICIT freed 3618K, 41% free 23768K/39664K, paused 12ms+11ms, total 123ms
  • MediaCodec hardware decoder much slower with different server configuration ?

    19 octobre 2013, par mathieujofis

    I've been using the Android MediaCodec in order to (hardware) decode H.264 frames on my Galaxy S4 coming from a Live 555 RTSP live (real-time) stream. After changing my Live 555 server configuration from using ffmpeg (with x264) to encode frames, to using strictly x264 to encode frames, the time to decode frames with MediaCodec takes much longer. Basically, MediaCodec can't keep up with the stream, and displays the video in slow motion, getting slower and slower as time goes on. Going back to ffmpeg isn't a solution for me, because I need the ability to encode into discrete NAL units, rather than a whole frame like ffmpeg does.

    I was wondering if this was either : A) An issue with the way my server is encoding NAL units, or B) An issue with my Android client, specifically the way it is receiving and decoding NAL units.

    My encoding configuration with x264 is :

    x264_param_default_preset(&param,"ultrafast", "zerolatency:fastdecode");
    param.i_threads = 1;
    param.i_bframe = 1;
    param.i_width = image_width;
    param.i_height = image_height;
    param.i_fps_num = 60;
    param.i_fps_den = 1;
    param.i_keyint_max = 10;

    param.rc.i_rc_method = X264_RC_ABR;
    param.rc.i.bitrate = 6000;
    param.i_sps_id = 7;
    param.b_repeat_headers = 1;
    param.b_annexb = 0;

    My Android MediaCodec client is set up as follows :

    I receive each individual NAL unit on a separate Live 555 RTSP client thread. Each NAL is put into a queue along with its size and presentation time. A separate decoder thread grabs NALs from this queue, and if there are none available, waits until there are.

    Some notes :

    What I generally see happen is the queue starts filling up with NALs, instead of staying close to empty. So, I know that the decoder thread is not working fast enough. I don't think this is an inherent problem with decoding on an Android phone (for example, processing limitations) because it does the same thing for very low bitrates— also again, it DID work when I was using ffmpeg to encode. If I omit certain NAL units, the decoder can start to keep up. Since I'm using Cyanogenmod 10.1, bumping up the minimum CPU frequency helps, too.

    Edit :

    Here is a log of the Android client, as well as a log highlighting the garbage collector specifically—

    Entire Logcat :

    10-15 16:40:03.955: D/DecodeActivity(18859): INFO_OUTPUT_BUFFERS_CHANGED
    10-15 16:40:03.995: E/OMX-VDEC-1080P(288): Sync frame received
    10-15 16:40:03.995: E/OMX-VDEC-1080P(288):  No color conversion required
    10-15 16:40:03.995: E/OMX-VDEC-1080P(288): Get_parameter: OMX_IndexParamPortDefinition: nPortIndex (1), nFrameWidth (1280), nFrameHeight (720), nStride (1280), nSliceHeight (736), nBitrate (-1073741824), xFramerate (0x1e), nBufferSize (1433600), nBufferCountMin (4), nBufferCountActual (8), bBuffersContiguous (1918394328), nBufferAlignment (1075643347), bEnabled (1), bPopulated (1), eCompressionFormat (0x0), eColorFormat (0x7fa30c03)
    10-15 16:40:03.995: D/DecodeActivity(18859): New format {height=720, what=1869968451, color-format=2141391875, slice-height=736, crop-left=0, width=1280, crop-bottom=719, crop-top=0, mime=video/raw, stride=1280, crop-right=1279}
    10-15 16:40:04.005: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4966) fps(201.369308)
    10-15 16:40:04.015: W/IInputConnectionWrapper(1069): showStatusIcon on inactive InputConnection
    10-15 16:40:04.025: I/ActivityManager(698): Displayed com.mathieu.alloclient.javadecoder/.MainActivity: +617ms
    10-15 16:40:04.025: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4766) fps(209.819550)
    10-15 16:40:04.125: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4733) fps(211.282486)
    10-15 16:40:04.445: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4711) fps(212.269150)
    10-15 16:40:04.495: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4700) fps(212.765961)
    10-15 16:40:05.676: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4688) fps(213.310577)
    10-15 16:40:06.087: D/dalvikvm(698): WAIT_FOR_CONCURRENT_GC blocked 1ms
    10-15 16:40:06.207: D/dalvikvm(698): GC_EXPLICIT freed 4120K, 39% free 24216K/39664K, paused 7ms+9ms, total 117ms
    10-15 16:40:06.537: D/ALSADevice(288): standby: handle 0x40024450 h 0x0
    10-15 16:40:06.577: D/alsa_ucm(288): snd_use_case_set(): uc_mgr 0x400fbfb0 identifier _verb value Inactive
    10-15 16:40:06.577: D/alsa_ucm(288): Set mixer controls for HiFi Lowlatency enable 0
    10-15 16:40:06.577: D/alsa_ucm(288): Setting mixer control: SLIMBUS_0_RX Audio Mixer MultiMedia5, value: 0
    10-15 16:40:06.577: D/alsa_ucm(288): snd_use_case_set(): uc_mgr 0x400fbfb0 identifier _disdev value Line
    10-15 16:40:06.577: D/alsa_ucm(288): disdev: device Line not enabled, no need to disable
    10-15 16:40:06.577: D/alsa_ucm(288): snd_use_case_set(): uc_mgr 0x400fbfb0 identifier _disdev value Speaker
    10-15 16:40:06.577: D/alsa_ucm(288): Set mixer controls for Speaker enable 0
    10-15 16:40:06.577: D/alsa_ucm(288): Setting mixer control: RX5 MIX1 INP1, value: ZERO
    10-15 16:40:06.587: D/alsa_ucm(288): Setting mixer control: RX5 MIX1 INP2, value: ZERO
    10-15 16:40:06.587: D/alsa_ucm(288): Setting mixer control: LINEOUT2 Volume, value: 0
    10-15 16:40:06.587: D/alsa_ucm(288): Setting mixer control: LINEOUT4 Volume, value: 0
    10-15 16:40:06.587: D/alsa_ucm(288): Setting mixer control: RX5 Digital Volume, value: 0
    10-15 16:40:06.587: D/AudioUsbALSA(288): exitPlaybackThread, mproxypfdPlayback: -1
    10-15 16:40:06.587: D/AudioUsbALSA(288): closeDevice handle 0x0
    10-15 16:40:06.587: D/AudioUsbALSA(288): closeDevice handle 0x0
    10-15 16:40:17.638: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4677) fps(213.812271)
    10-15 16:40:17.698: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4644) fps(215.331604)
    10-15 16:40:20.681: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4633) fps(215.842865)
    10-15 16:40:21.111: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4611) fps(216.872696)
    10-15 16:40:25.746: D/dalvikvm(698): GC_CONCURRENT freed 5829K, 41% free 23778K/39664K, paused 10ms+24ms, total 165ms
    10-15 16:40:28.448: E/MP-Decision(1385): num online cores: 4 reqd : 3 available : 4 rq_depth:2.800000 hotplug_avg_load_dw: 74
    10-15 16:40:28.448: E/MP-Decision(1385): DOWN cpu:3 core_idx:3 Ns:3.100000 Ts:240 total_time_down:243.000000
    10-15 16:40:30.841: W/SystemClock(698): time going backwards: prev 16555345563411(ioctl) vs now 16555345441341(ioctl), tid=764
    10-15 16:40:44.684: D/dalvikvm(698): GC_CONCURRENT freed 5302K, 41% free 23774K/39664K, paused 6ms+9ms, total 107ms
    10-15 16:40:57.467: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4577) fps(218.483719)
    10-15 16:41:14.383: D/dalvikvm(698): GC_CONCURRENT freed 5371K, 41% free 23768K/39664K, paused 7ms+8ms, total 146ms
    10-15 16:41:14.403: E/MP-Decision(1385): num online cores: 3 reqd : 4 available : 4 rq_depth:4.500000 hotplug_avg_load_dw: 89
    10-15 16:41:14.403: E/MP-Decision(1385): UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000
    10-15 16:41:14.403: E/MP-Decision(1385): UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:0.000000
    10-15 16:41:14.403: E/MP-Decision(1385): UP cpu:3 core_idx:3 Nw:3.500000 Tw:90 total_time_up:922.000000
    10-15 16:41:27.466: E/kickstart(862): Total bytes received so far: 48
    10-15 16:41:27.466: E/kickstart(862): EVENT: RECEIVED <-- SAHARA_HELLO
    10-15 16:41:27.466: E/kickstart(862): EVENT: SENDING --> SAHARA_HELLO_RESPONSE
    10-15 16:41:27.466: E/kickstart(862): EVENT: sahara_mode                         = 2
    10-15 16:41:27.466: E/kickstart(862): EVENT: m_comm->sahara_hello_packet_rx.mode = 2
    10-15 16:41:27.466: E/kickstart(862): EVENT: helloRx.mode                        = 2
    10-15 16:41:27.466: E/kickstart(862): Total bytes received so far: 64
    10-15 16:41:27.466: E/kickstart(862): EVENT: RECEIVED <-- SAHARA_MEMORY_DEBUG
    10-15 16:41:27.466: E/kickstart(862): Total bytes received so far: 116
    10-15 16:41:27.466: E/kickstart(862): EVENT: 0x46980000, len=000C0000, "m9kefs1", ""
    10-15 16:41:27.466: E/kickstart(862): EVENT: STATE <-- SAHARA_WAIT_MEMORY_REGION
    10-15 16:41:27.466: E/kickstart(862): EVENT: Saving "/dev/block/platform/msm_sdcc.1/by-name/m9kefs1"
    10-15 16:41:27.526: E/kickstart(862): Total bytes received so far: 786548
    10-15 16:41:27.526: E/kickstart(862): EVENT: Received: 786432 bytes
    10-15 16:41:27.526: E/kickstart(862): EVENT: Writing to disk
    10-15 16:41:27.526: E/kickstart(862): EVENT: Successfully wrote to disk
    10-15 16:41:27.526: E/kickstart(862): Received file "m9kefs1"
    10-15 16:41:27.576: E/kickstart(862): Sync finish Received file "m9kefs1"
    10-15 16:41:27.576: E/kickstart(862): 786432 bytes transferred in 0.106s (7.10 MBps)
    10-15 16:41:27.576: E/kickstart(862): EVENT: num_debug_entries not >=0
    10-15 16:41:27.576: E/kickstart(862): Successfully downloaded files from target
    10-15 16:41:27.576: E/kickstart(862): EVENT: SENDING --> SAHARA_RESET
    10-15 16:41:27.576: E/kickstart(862): Total bytes received so far: 786556
    10-15 16:41:27.576: E/kickstart(862): EVENT: RECEIVED <-- SAHARA_RESET_RESP
    10-15 16:41:27.576: E/kickstart(862): Sahara protocol completed
    10-15 16:41:27.576: E/kickstart(862): EVENT: STATE <-- SAHARA_WAIT_HELLO
    10-15 16:41:27.746: E/MP-Decision(1385): num online cores: 4 reqd : 3 available : 4 rq_depth:2.100000 hotplug_avg_load_dw: 79
    10-15 16:41:27.746: E/MP-Decision(1385): DOWN cpu:3 core_idx:3 Ns:3.100000 Ts:240 total_time_down:244.000000
    10-15 16:41:49.598: D/dalvikvm(698): GC_CONCURRENT freed 5339K, 41% free 23775K/39664K, paused 10ms+7ms, total 134ms
    10-15 16:42:17.225: I/ActivityManager(698): Start proc com.cyanogenmod.lockclock for service com.cyanogenmod.lockclock/.weather.WeatherUpdateService: pid=18954 uid=10028 gids={50028, 3003, 1028}
    10-15 16:42:17.865: D/WeatherXmlParser(18954): Weather updated: WeatherInfo for Santa Barbara@ Tue Oct 15 16:42:17 PDT 2013: Fair(34), temperature 29°C, low 11°, high 27°, humidity 14%, wind 11km/h at W
    10-15 16:42:17.945: I/ActivityManager(698): No longer want com.google.android.apps.uploader (pid 13565): empty #17
    10-15 16:42:24.021: D/dalvikvm(698): GC_CONCURRENT freed 5277K, 41% free 23770K/39664K, paused 8ms+11ms, total 106ms
    10-15 16:42:35.983: W/ThrottleService(698): unable to find stats for iface rmnet0
    10-15 16:42:59.476: D/dalvikvm(698): GC_CONCURRENT freed 5345K, 41% free 23770K/39664K, paused 6ms+13ms, total 168ms
    10-15 16:43:02.098: E/kickstart(862): Total bytes received so far: 48
    10-15 16:43:02.098: E/kickstart(862): EVENT: RECEIVED <-- SAHARA_HELLO
    10-15 16:43:02.098: E/kickstart(862): EVENT: SENDING --> SAHARA_HELLO_RESPONSE
    10-15 16:43:02.098: E/kickstart(862): EVENT: sahara_mode                         = 2
    10-15 16:43:02.098: E/kickstart(862): EVENT: m_comm->sahara_hello_packet_rx.mode = 2
    10-15 16:43:02.098: E/kickstart(862): EVENT: helloRx.mode                        = 2
    10-15 16:43:02.098: E/kickstart(862): Total bytes received so far: 64
    10-15 16:43:02.098: E/kickstart(862): EVENT: RECEIVED <-- SAHARA_MEMORY_DEBUG
    10-15 16:43:02.108: E/kickstart(862): Total bytes received so far: 116
    10-15 16:43:02.108: E/kickstart(862): EVENT: 0x46980000, len=000C0000, "m9kefs2", ""
    10-15 16:43:02.108: E/kickstart(862): EVENT: STATE <-- SAHARA_WAIT_MEMORY_REGION
    10-15 16:43:02.108: E/kickstart(862): EVENT: Saving "/dev/block/platform/msm_sdcc.1/by-name/m9kefs2"
    10-15 16:43:02.158: E/kickstart(862): Total bytes received so far: 786548
    10-15 16:43:02.158: E/kickstart(862): EVENT: Received: 786432 bytes
    10-15 16:43:02.158: E/kickstart(862): EVENT: Writing to disk
    10-15 16:43:02.168: E/kickstart(862): EVENT: Successfully wrote to disk
    10-15 16:43:02.168: E/kickstart(862): Received file "m9kefs2"
    10-15 16:43:02.218: E/kickstart(862): Sync finish Received file "m9kefs2"
    10-15 16:43:02.218: E/kickstart(862): 786432 bytes transferred in 0.113s (6.65 MBps)
    10-15 16:43:02.218: E/kickstart(862): EVENT: num_debug_entries not >=0
    10-15 16:43:02.218: E/kickstart(862): Successfully downloaded files from target
    10-15 16:43:02.218: E/kickstart(862): EVENT: SENDING --> SAHARA_RESET
    10-15 16:43:02.218: E/kickstart(862): Total bytes received so far: 786556
    10-15 16:43:02.218: E/kickstart(862): EVENT: RECEIVED <-- SAHARA_RESET_RESP
    10-15 16:43:02.218: E/kickstart(862): Sahara protocol completed
    10-15 16:43:02.218: E/kickstart(862): EVENT: STATE <-- SAHARA_WAIT_HELLO
    10-15 16:43:17.563: W/SystemClock(698): time going backwards: prev 16722067121029(ioctl) vs now 16722066968441(ioctl), tid=764
    10-15 16:43:34.610: D/dalvikvm(698): GC_CONCURRENT freed 5359K, 41% free 23772K/39664K, paused 9ms+9ms, total 113ms
    10-15 16:43:36.452: E/MP-Decision(1385): num online cores: 3 reqd : 4 available : 4 rq_depth:3.900000 hotplug_avg_load_dw: 100
    10-15 16:43:36.452: E/MP-Decision(1385): UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000
    10-15 16:43:36.452: E/MP-Decision(1385): UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:0.000000
    10-15 16:43:36.452: E/MP-Decision(1385): UP cpu:3 core_idx:3 Nw:3.500000 Tw:90 total_time_up:194.000000
    10-15 16:44:09.965: D/dalvikvm(698): GC_CONCURRENT freed 5369K, 41% free 23779K/39664K, paused 8ms+8ms, total 103ms
    10-15 16:44:09.965: D/dalvikvm(698): WAIT_FOR_CONCURRENT_GC blocked 30ms
    10-15 16:44:10.605: E/MP-Decision(1385): num online cores: 4 reqd : 3 available : 4 rq_depth:2.800000 hotplug_avg_load_dw: 133
    10-15 16:44:10.605: E/MP-Decision(1385): DOWN cpu:3 core_idx:3 Ns:3.100000 Ts:240 total_time_down:244.000000
    10-15 16:44:12.707: E/MP-Decision(1385): num online cores: 3 reqd : 4 available : 4 rq_depth:4.100000 hotplug_avg_load_dw: 116
    10-15 16:44:12.707: E/MP-Decision(1385): UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000
    10-15 16:44:12.707: E/MP-Decision(1385): UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:0.000000
    10-15 16:44:12.707: E/MP-Decision(1385): UP cpu:3 core_idx:3 Nw:3.500000 Tw:90 total_time_up:97.000000
    10-15 16:44:14.008: E/MP-Decision(1385): num online cores: 4 reqd : 3 available : 4 rq_depth:1.700000 hotplug_avg_load_dw: 140
    10-15 16:44:14.008: E/MP-Decision(1385): DOWN cpu:3 core_idx:3 Ns:3.100000 Ts:240 total_time_down:240.000000
    10-15 16:44:14.759: E/MP-Decision(1385): num online cores: 3 reqd : 4 available : 4 rq_depth:4.900000 hotplug_avg_load_dw: 132
    10-15 16:44:14.759: E/MP-Decision(1385): UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000
    10-15 16:44:14.759: E/MP-Decision(1385): UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:0.000000
    10-15 16:44:14.759: E/MP-Decision(1385): UP cpu:3 core_idx:3 Nw:3.500000 Tw:90 total_time_up:97.000000
    10-15 16:44:15.360: E/MP-Decision(1385): num online cores: 4 reqd : 3 available : 4 rq_depth:2.300000 hotplug_avg_load_dw: 139
    10-15 16:44:15.360: E/MP-Decision(1385): DOWN cpu:3 core_idx:3 Ns:3.100000 Ts:240 total_time_down:243.000000
    10-15 16:44:15.560: E/MP-Decision(1385): num online cores: 3 reqd : 4 available : 4 rq_depth:3.900000 hotplug_avg_load_dw: 133
    10-15 16:44:15.560: E/MP-Decision(1385): UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000
    10-15 16:44:15.560: E/MP-Decision(1385): UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:0.000000
    10-15 16:44:15.560: E/MP-Decision(1385): UP cpu:3 core_idx:3 Nw:3.500000 Tw:90 total_time_up:95.000000
    10-15 16:44:16.361: E/MP-Decision(1385): num online cores: 4 reqd : 3 available : 4 rq_depth:2.500000 hotplug_avg_load_dw: 132
    10-15 16:44:16.361: E/MP-Decision(1385): DOWN cpu:3 core_idx:3 Ns:3.100000 Ts:240 total_time_down:242.000000
    10-15 16:44:16.661: E/MP-Decision(1385): num online cores: 3 reqd : 4 available : 4 rq_depth:3.700000 hotplug_avg_load_dw: 127
    10-15 16:44:16.661: E/MP-Decision(1385): UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000
    10-15 16:44:16.661: E/MP-Decision(1385): UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:0.000000
    10-15 16:44:16.661: E/MP-Decision(1385): UP cpu:3 core_idx:3 Nw:3.500000 Tw:90 total_time_up:97.000000
    10-15 16:44:20.605: E/MP-Decision(1385): num online cores: 4 reqd : 3 available : 4 rq_depth:1.700000 hotplug_avg_load_dw: 122
    10-15 16:44:20.605: E/MP-Decision(1385): DOWN cpu:3 core_idx:3 Ns:3.100000 Ts:240 total_time_down:244.000000
    10-15 16:44:20.615: W/ProcessStats(698): Skipping unknown process pid 19038
    10-15 16:44:20.615: W/ProcessStats(698): Skipping unknown process pid 19041

    Garbage collector entries in Logcat :

    10-15 16:40:06.087: D/dalvikvm(698): WAIT_FOR_CONCURRENT_GC blocked 1ms
    10-15 16:40:06.207: D/dalvikvm(698): GC_EXPLICIT freed 4120K, 39% free 24216K/39664K,   paused 7ms+9ms, total 117ms
    10-15 16:40:25.746: D/dalvikvm(698): GC_CONCURRENT freed 5829K, 41% free 23778K/39664K, paused 10ms+24ms, total 165ms
    10-15 16:40:44.684: D/dalvikvm(698): GC_CONCURRENT freed 5302K, 41% free 23774K/39664K, paused 6ms+9ms, total 107ms
    10-15 16:41:14.383: D/dalvikvm(698): GC_CONCURRENT freed 5371K, 41% free 23768K/39664K, paused 7ms+8ms, total 146ms
    10-15 16:41:49.598: D/dalvikvm(698): GC_CONCURRENT freed 5339K, 41% free 23775K/39664K, paused 10ms+7ms, total 134ms
    10-15 16:42:24.021: D/dalvikvm(698): GC_CONCURRENT freed 5277K, 41% free 23770K/39664K, paused 8ms+11ms, total 106ms
    10-15 16:42:59.476: D/dalvikvm(698): GC_CONCURRENT freed 5345K, 41% free 23770K/39664K, paused 6ms+13ms, total 168ms
    10-15 16:43:34.610: D/dalvikvm(698): GC_CONCURRENT freed 5359K, 41% free 23772K/39664K, paused 9ms+9ms, total 113ms
    10-15 16:44:09.965: D/dalvikvm(698): GC_CONCURRENT freed 5369K, 41% free 23779K/39664K, paused 8ms+8ms, total 103ms
    10-15 16:44:09.965: D/dalvikvm(698): WAIT_FOR_CONCURRENT_GC blocked 30ms
    10-15 16:44:24.389: D/dalvikvm(698): GC_EXPLICIT freed 3618K, 41% free 23768K/39664K, paused 12ms+11ms, total 123ms
  • Unveiling GA4 Issues : 8 Questions from a Marketer That GA4 Can’t Answer

    8 janvier 2024, par Alex

    It’s hard to believe, but Universal Analytics had a lifespan of 11 years, from its announcement in March 2012. Despite occasional criticism, this service established standards for the entire web analytics industry. Many metrics and reports became benchmarks for a whole generation of marketers. It truly was an era.

    For instance, a lot of marketers got used to starting each workday by inspecting dashboards and standard traffic reports in the Universal Analytics web interface. There were so, so many of those days. They became so accustomed to Universal Analytics that they would enter reports, manipulate numbers, and play with metrics almost on autopilot, without much thought.

    However, six months have passed since the sunset of Universal Analytics – precisely on July 1, 2023, when Google stopped processing requests for resources using the previous version of Google Analytics. The time when data about visitors and their interactions with the website were more clearly structured within the UA paradigm is now in the past. GA4 has brought a plethora of opportunities to marketers, but along with those opportunities came a series of complexities.

    GA4 issues

    Since its initial announcement in 2020, GA4 has been plagued with errors and inconsistencies. It still has poor and sometimes illogical documentation, numerous restrictions, and peculiar interface solutions. But more importantly, the barrier to entry into web analytics has significantly increased.

    If you diligently follow GA4 updates, read the documentation, and possess skills in working with data (SQL and basic statistics), you probably won’t feel any problems – you know how to set up a convenient and efficient environment for your product and marketing data. But what if you’re not that proficient ? That’s when issues arise.

    In this article, we try to address a series of straightforward questions that less experienced users – marketers, project managers, SEO specialists, and others – want answers to. They have no time to delve into the intricacies of GA4 but seek access to the fundamentals crucial for their functionality.

    Previously, in Universal Analytics, they could quickly and conveniently address their issues. Now, the situation has become, to put it mildly, more complex. We’ve identified 8 such questions for which the current version of GA4 either fails to provide answers or implies that answers would require significant enhancements. So, let’s dive into them one by one.

    Question 1 : What are the most popular traffic sources on my website ?

    Seemingly a straightforward question. What does GA4 tell us ? It responds with a question : “Which traffic source parameter are you interested in ?”

    GA4 traffic source

    Wait, what ?

    People just want to know which resources bring them the most traffic. Is that really an issue ?

    Unfortunately, yes. In GA4, there are not one, not two, but three traffic source parameters :

    1. Session source.
    2. First User Source – the source of the first session for each user.
    3. Just the source – determined at the event or conversion level.

    If you wanted to open a report and draw conclusions quickly, we have bad news for you. Before you start ranking your traffic sources by popularity, you need to do some mental work on which parameter and in what context you will look. And even when you decide, you’ll need to make a choice in the selection of standard reports : work with the User Acquisition Report or Traffic Acquisition.

    Yes, there is a difference between them : the first uses the First User Source parameter, and the second uses the session source. And you need to figure that out too.

    Question 2 : What is my conversion rate ?

    This question concerns everyone, and it should be simple, implying a straightforward answer. But no.

    GA4 conversion rate

    In GA4, there are three conversion metrics (yes, three) :

    1. Session conversion – the percentage of sessions with a conversion.
    2. User conversion – the percentage of users who completed a conversion.
    3. First-time Purchaser Conversion – the share of active users who made their first purchase.

    If the last metric doesn’t interest us much, GA4 users can still choose something from the remaining two. But what’s next ? Which parameters to use for comparison ? Session source or user source ? What if you want to see the conversion rate for a specific event ? And how do you do this in analyses rather than in standard reports ?

    In the end, instead of an answer to a simple question, marketers get a bunch of new questions.

    Question 3. Can I trust user and session metrics ?

    Unfortunately, no. This may boggle the mind of those not well-versed in the mechanics of calculating user and session metrics, but it’s the plain truth : the numbers in GA4 and those in reality may and will differ.

    GA4 confidence levels

    The reason is that GA4 uses the HyperLogLog++ statistical algorithm to count unique values. Without delving into details, it’s a mechanism for approximate estimation of a metric with a certain level of error.

    This error level is quite well-documented. For instance, for the Total Users metric, the error level is 1.63% (for a 95% confidence interval). In simple terms, this means that 100,000 users in the GA4 interface equate to 100,000 1.63% in reality.

    Furthermore – but this is no surprise to anyone – GA4 samples data. This means that with too large a sample size or when using a large number of parameters, the application will assess your metrics based on a partial sample – let’s say 5, 10, or 30% of the entire population.

    It’s a reasonable assumption, but it can (and probably will) surprise marketers – the metrics will deviate from reality. All end-users can do (excluding delving into raw data methodologies) is to take this error level into account in their conclusions.

    Question 4. How do I calculate First Click attribution ?

    You can’t. Unfortunately, as of late, GA4 offers only three attribution models available in the Attribution tab : Last Click, Last Click For Google Ads, and Data Driven. First Click attribution is essential for understanding where and when demand is generated. In the previous version of Google Analytics (and until recently, in the current one), users could quickly apply First Click and other attribution models, compare them, and gain insights. Now, this capability is gone.

    GA4 attribution model

    Certainly, you can look at the conversion distribution considering the First User Source parameter – this will be some proxy for First Click attribution. However, comparing it with others in the Model Comparison tab won’t be possible. In the context of the GA4 interface, it makes sense to forget about non-standard attribution models.

    Question 5. How do I account for intra-session traffic ?

    Intra-session traffic essentially refers to a change in traffic sources within a session. Imagine a scenario where a user comes to your site organically from Google and, within a minute, comes from an email campaign. In the previous version of Google Analytics, a new session with the traffic source “e-mail” would be created in such a case. But now, the situation has changed.

    A session now only ends in the case of a timeout – say, 30 minutes without interaction. This means a session will always have a source from which it started. If a user changes the source within a session (clicks on an ad, from email campaigns, and so on), you won’t know anything about it until they convert. This is a significant blow to intra-session traffic since their contribution to traffic remains virtually unnoticed. 

    Question 6. How can I account for users who have not consented to the use of third-party cookies ?

    You can’t. Google Consent Mode settings imply several options when a user rejects the use of 3rd party cookies. In GA4 and BigQuery, depersonalized cookieless pings will be sent. These pings do not contain specific client_id, session_id, or other custom dimensions. As a result, you won’t be able to consider them as users or link the actions of such users together.

    Question 7. How can I compare data in explorations with the previous year ?

    The maximum data retention period for a free GA4 account is 14 months. This means that if the date range is wider, you can only use standard reports. You won’t be able to compare or view cohorts or funnels for periods more than 14 months ago. This makes the product functionality less rich because various report formats in explorations are very convenient for comparing specific metrics in easily digestible reports.

    GA4 data retention

    Of course, you always have the option to connect BigQuery and store raw data without limitations, but this process usually requires the involvement of an advanced analyst. And precisely this option is unavailable to most marketers in small teams.

    Question 8. Is the data for yesterday accurate ?

    Unknown. Google declares that data processing in GA4 takes up to 48 hours. And although this process is faster, most users still have room for frustration. And they can be understood.

    Data processing time in GA4

    What does “data processing takes 24-48 hours” mean ? When will the data in reports be complete ? For yesterday ? Or the day before yesterday ? Or for all days that were more than two days ago ? Unclear. What should marketers tell their managers when they were asked if all the data is in this report ? Well, probably all of it… or maybe not… Let’s wait for 48 hours…

    Undoubtedly, computational resources and time are needed for data preprocessing and aggregation. It’s okay that data for today will not be up-to-date. And probably not for yesterday either. But people just want to know when they can trust their data. Are they asking for too much : just a note that this report contains all the data sent and processed by Google Analytics ?

    What should you do ?

    Credit should be given to the Google team – they have done a lot to enable users to answer these questions in one form or another. For example, you can use data streaming in BigQuery and work with raw data. The entry threshold for this functionality has been significantly lowered. In fact, if you are dissatisfied with the GA4 interface, you can organize your export to BigQuery and create your own reports without (almost) any restrictions.

    Another strong option is the widespread launch of GTM Server Side. This allows you to quite freely modify the event model and essentially enrich each hit with various parameters, doing this in a first-party context. This, of course, reduces the harmful impact of most of the limitations described in this text.

    But this is not a solution.

    The users in question – marketers, managers, developers – they do not want or do not have the time for a deep dive into the issue. And they want simple answers to simple (it seemed) questions. And for now, unfortunately, GA4 is more of a professional tool for analysts than a convenient instrument for generating insights for not very advanced users.

    Why is this such a serious issue ?

    The thing is – and this is crucial – over the past 10 years, Google has managed to create a sort of GA-bubble for marketers. Many of them have become so accustomed to Google Analytics that when faced with another issue, they don’t venture to explore alternative solutions but attempt to solve it on their own. And almost always, this turns out to be expensive and inconvenient.

    However, with the latest updates to GA4, it is becoming increasingly evident that this application is struggling to address even the most basic questions from users. And these questions are not fantastically complex. Much of what was described in this article is not an unsolvable mystery and is successfully addressed by other analytics services.

    Let’s try to answer some of the questions described from the perspective of Matomo.

    Question 1 : What are the most popular traffic sources ? [Solved]

    In the Acquisition panel, you will find at least three easily identifiable reports – for traffic channels (All Channels), sources (Websites), and campaigns (Campaigns). 

    Channel Type Table

    With these, you can quickly and easily answer the question about the most popular traffic sources, and if needed, delve into more detailed information, such as landing pages.

    Question 2 : What is my conversion rate ? [Solved]

    Under Goals in Matomo, you’ll easily find the overall conversion rate for your site. Below that you’ll have access to the conversion rate of each goal you’ve set in your Matomo instance.

    Question 3 : Can I trust user and session metrics ? [Solved]

    Yes. With Matomo, you’re guaranteed 100% accurate data. Matomo does not apply sampling, does not employ specific statistical algorithms, or any analogs of threshold values. Yes, it is possible, and it’s perfectly normal. If you see a metric in the visits or users field, it accurately represents reality by 100%.

    Try Matomo for Free

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

    No credit card required

    Question 4 : How do I calculate First Click attribution ? [Solved]

    You can do this in the same section where the other 5 attribution models, available in Matomo, are calculated – in the Multi Attribution section.

    Multi Attribution feature

    You can choose a specific conversion and, in a few clicks, calculate and compare up to 3 marketing attribution models. This means you don’t have to spend several days digging through documentation trying to understand how a particular model is calculated. Have a question – get an answer.

    Question 5 : How do I account for intra-session traffic ? [Solved]

    Matomo creates a new visit when a user changes a campaign. This means that you will accurately capture all relevant traffic if it is adequately tagged. No campaigns will be lost within a visit, as they will have a new utm_campaign parameter.

    This is a crucial point because when the Referrer changes, a new visit is not created, but the key lies in something else – accounting for all available traffic becomes your responsibility and depends on how you tag it.

    Try Matomo for Free

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

    No credit card required

    Question 6 : How can I account for users who have not consented to the use of third-party cookies ? [Solved]

    Google Analytics requires users to accept a cookie consent banner with “analytics_storage=granted” to track them. If users reject cookie consent banners, however, then Google Analytics can’t track these visitors at all. They simply won’t show up in your traffic reports. 

    Matomo doesn’t require cookie consent banners (apart from in the United Kingdom and Germany) and can therefore continue to track visitors even after they have rejected a cookie consent screen. This is achieved through a config_id variable (the user identifier equivalent which is updating once a day). 

    Matomo doesn't need cookie consent, so you see a complete view of your traffic

    This means that virtually all of your website traffic will be tracked regardless of whether users accept a cookie consent banner or not.

    Question 7 : How can I compare data in explorations with the previous year ? [Solved]

    There is no limitation on data retention for your aggregated reports in Matomo. The essence of Matomo experience lies in the reporting data, and consequently, retaining reports indefinitely is a viable option. So you can compare data for any timeframe. 7

    Date Comparison Selector