Recherche avancée

Médias (0)

Mot : - Tags -/upload

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (63)

  • 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 (7913)

  • 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
  • How to take screenshots of streamers using the Twitch API

    10 décembre 2020, par oo92

    My goal is to create a dataset of gameplays on Twitch using the API. How I want to do it is this :

    


      

    1. Get a list of live streams using the API.
    2. 


    3. Use streamlink and ffmpeg on Python to take the screenshots through the Stream source
    4. 


    


    To get the streams, I have the following code thanks to a SO user :

    


    from twitch import TwitchClient&#xA;&#xA;client = TwitchClient(client_id=&#x27;<my client="client">&#x27;)&#xA;streams = client.streams.get_live_streams(limit=100)&#xA;&#xA;print(streams)&#xA;</my>

    &#xA;

    The output is this. Its a lot larger, I just made it shorter... :

    &#xA;

    [{&#x27;id&#x27;: 40889579422, &#x27;game&#x27;: &#x27;Among Us&#x27;, &#x27;broadcast_platform&#x27;: &#x27;live&#x27;, &#x27;community_id&#x27;: &#x27;&#x27;, &#x27;community_ids&#x27;: [], &#x27;viewers&#x27;: 74594, &#x27;video_height&#x27;: 1080, &#x27;average_fps&#x27;: 60, &#x27;delay&#x27;: 0, &#x27;created_at&#x27;: datetime.datetime(2020, 12, 9, 23, 53, 34), &#x27;is_playlist&#x27;: False, &#x27;stream_type&#x27;: &#x27;live&#x27;, &#x27;preview&#x27;: {&#x27;small&#x27;: &#x27;https://static-cdn.jtvnw.net/previews-ttv/live_user_sykkuno-80x45.jpg&#x27;, &#x27;medium&#x27;: &#x27;https://static-cdn.jtvnw.net/previews-ttv/live_user_sykkuno-320x180.jpg&#x27;, &#x27;large&#x27;: &#x27;https://static-cdn.jtvnw.net/previews-ttv/live_user_sykkuno-640x360.jpg&#x27;, &#x27;template&#x27;: &#x27;https://static-cdn.jtvnw.net/previews-ttv/live_user_sykkuno-{width}x{height}.jpg&#x27;}, &#x27;channel&#x27;: {&#x27;mature&#x27;: False, &#x27;status&#x27;: &#x27;amongus at 4 !!&#x27;, &#x27;broadcaster_language&#x27;: &#x27;en&#x27;, &#x27;broadcaster_software&#x27;: &#x27;&#x27;, &#x27;display_name&#x27;: &#x27;Sykkuno&#x27;, &#x27;game&#x27;: &#x27;Among Us&#x27;, &#x27;language&#x27;: &#x27;en&#x27;, &#x27;id&#x27;: 26154978, &#x27;name&#x27;: &#x27;sykkuno&#x27;, &#x27;created_at&#x27;: datetime.datetime(2011, 11, 15, 1, 29, 29, 140794), &#x27;updated_at&#x27;: datetime.datetime(2020, 12, 10, 0, 35, 50, 916363), &#x27;partner&#x27;: True, &#x27;logo&#x27;: &#x27;https://static-cdn.jtvnw.net/jtv_user_pictures/sykkuno-profile_image-6ab1e70e07e29e9b-300x300.jpeg&#x27;, &#x27;video_banner&#x27;: &#x27;https://static-cdn.jtvnw.net/jtv_user_pictures/4b654ce5-58dc-4fa6-b77c-7250bb2d5269-channel_offline_image-1920x1080.png&#x27;, &#x27;profile_banner&#x27;: &#x27;https://static-cdn.jtvnw.net/jtv_user_pictures/1caee146-3323-4d45-9907-96c20c224d3e-profile_banner-480.png&#x27;, &#x27;profile_banner_background_color&#x27;: &#x27;&#x27;, &#x27;url&#x27;: &#x27;https://www.twitch.tv/sykkuno&#x27;, &#x27;views&#x27;: 23590965, &#x27;followers&#x27;: 1928724, &#x27;broadcaster_type&#x27;: &#x27;&#x27;, &#x27;description&#x27;: &#x27;Hi ! &#x27;, &#x27;private_video&#x27;: False, &#x27;privacy_options_enabled&#x27;: False}}, ... &#xA;

    &#xA;

    First, I want to know how I can iterate through the JSON to get the channel name using the id. I tried to do it on my own but it said that it isn't subscriptable.

    &#xA;

    Second, I have the following code that tries to use ffmpeg to get a screenshot of the stream through its source :

    &#xA;

    import streamlink, os&#xA;&#xA;# This code connects to the streamer&#x27;s source&#xA;# Get the Twitch API to work so you can add the streamer&#x27;s name at the end of the link&#xA;username = &#x27;Sykkuno&#x27;&#xA;streams = streamlink.streams(&#x27;http://twitch.tv/&#x27; &#x2B; username)&#xA;&#xA;# Stream source&#xA;stream = streams["best"].url&#xA;&#xA;# Directory where the screenshots will be saved&#xA;dir_path = os.getcwd() &#x2B; &#x27;/&#x27; &#x2B; username&#xA;&#xA;# number of streamers&#xA;streamers = 1&#xA;&#xA;os.system(&#x27;ffmpeg -i &#x27; &#x2B; stream &#x2B;&#x27; -r 0.5 -f image2 ${dir}/output_%09d.jpg&#x27;)&#xA;

    &#xA;

    But that is throwing the following error :

    &#xA;

    ffmpeg version 4.1.3-0ppa1~18.04 Copyright (c) 2000-2019 the FFmpeg developers&#xA;  built with gcc 7 (Ubuntu 7.3.0-27ubuntu1~18.04)&#xA;  configuration: --prefix=/usr --extra-version=&#x27;0ppa1~18.04&#x27; --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-nonfree --enable-libfdk-aac --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared&#xA;  libavutil      56. 22.100 / 56. 22.100&#xA;  libavcodec     58. 35.100 / 58. 35.100&#xA;  libavformat    58. 20.100 / 58. 20.100&#xA;  libavdevice    58.  5.100 / 58.  5.100&#xA;  libavfilter     7. 40.101 /  7. 40.101&#xA;  libavresample   4.  0.  0 /  4.  0.  0&#xA;  libswscale      5.  3.100 /  5.  3.100&#xA;  libswresample   3.  3.100 /  3.  3.100&#xA;  libpostproc    55.  3.100 / 55.  3.100&#xA;[hls,applehttp @ 0x557212854940] Opening &#x27;https://video-edge-c2a360.yto01.abs.hls.ttvnw.net/v1/segment/CuAErHgNDEVK3cqjkRZLcz4El99YD2ZSy9tgtjc3ZTrPuN4584-GY3DKYO3MFCBt9M3v8_7IfHAlLvHeUn2wq4d-VC7u4Zv2-k1Bee9IPmIXbFQLZFKrYiT98OTzFMDaElsEZ9Sr4MXz6FoAC1yXhhZ0MYahZVnZa1Tuqnn217nN_rN8wr7kdScBIir_Uo1s2C_I8_54mi2uzdgxB9AYj0a0kG2UtdPkUVA6Qc7XIZ0nUhEeObEf80N0uW9ZU6WHpO3V6G9RD0VkmwUexDWk9MaLy1NJuvLSzRaMfOmKxhrzn3UDoY4CrQN11KOnHYCiCOfvhZmMKzSqtiA8YP0Q9iS03eZZhPQ3WxBHWhd6VeZ0btNeeoudGX73EBIj4ujZnKWKfPiN8K_HLj5FZWqQ5m_4Q1llQlnSAfmhzXR9PHAkz8nxRVcFR-tFokGzFEfkZGHngPNz9boLmo4KHx6404rocPUcXbTHkYsWXZwFC356AhfrNn6x0JYHGfcDpRsEFebLQljEpCyhnNOHFEf9b7Ipeiy521cCupzoEz1uMrzW77h9FJwn0GwvY3jp2KwRXJMvArYwiUHccBmfW7ZDLO9vH7eJGUnAzoy586KMSPLVeLxWMWRDfKkAcI8vYXOIuxNb_MZKm2O_dcoFrDDta5TZn-MLjFquT47P9NbXxlTTJfimlYyMG17SPoW3KJVtAJmjoj0GZ1ehftLJWz1Qgd8zmg40u4g8fz867eCHW_Tiv65yd6qJZD-_bD3G916fm3KeA9bPyhalTD99CWhQL7f0apCfX_6IiQElgPT6kOrFI-ISEG4GdhIpFi4ubzSx29pm7H4aDIXx6BAI5ziHVMPbrg.ts&#x27; for reading&#xA;[hls,applehttp @ 0x557212854940] Opening &#x27;https://video-edge-c2a360.yto01.abs.hls.ttvnw.net/v1/segment/CuIECWLarz2I5hNCtGLSTDXbCIgahI91KOHXVmPHddzZediyiVbcicZpGakO99CJp1cK_6OnmOKBzZ3sn3KogNyPVRqSy32IpanlyPPUTz23TojfR5DTmJa3zampOzVMfETvvPEpj58-kGhQeQQGtK1zLV2h465RElCLkmc7SeWbXEZ5j6IQ38OVFZ0vdcMHVTNPtJaY7509bE196-9-5YYFiET_-kdkS2X6_lhVQBZrq45PBxApTzeLkDx9ZtGQx78dLr_tZepww_uVnJTwxI_TA3tU8z5_w8ml6rh0GK1W6lTlvuDkPKAwIDLvG736MtbPGz9cFPoRAFQxD3QSwAM-bO1grvWlNsOUDUYLXLNjuejmz8xmRpeE0pqJYxUboRZpxrPXTi52HcX8lpGT4Lx2z6hJcoi9npQttK58HDSHQ3cYH3rlNsYV_RlZ3F-u-fZSn8Em67-vAYeXAMaBe9xxv0Zu2n1TrdPICMyGmk-VgLK788IeDhxqM441GONGLxo6AF8RE5_OawTf9n_MVzImsX4LMn0oN8e8w6mjk7YDuNdA4mEl99Erg8xMdX6Q3fDYTdStaC-zQwXgMctfGpIsUpp91BtRBPMynFCxZ8fZB7NvGFNZTYWDvCZjisiwzs0N1pDdDM_Fkj3i46_Ou105z348PLHRA28Dt1qgn_NjzwRNoaowFx7PxQ-X2zRpAhwNcqaTOHYh5NYZHToVE16WiOe9HzVs_I_3Wqu44bypEsGrhxYhgXSGfvO757iTbErZHmkidsBF2BET5j3JeIifr4fJooalAKc_5uiSPMCGSTtV9hIQX5mQWJudg9UsMRp1AWVrnBoMQPAhy1UwBDtAOrBs.ts&#x27; for reading&#xA;Input #0, hls,applehttp, from &#x27;https://video-weaver.yto01.hls.ttvnw.net/v1/playlist/CvADco9ZO_szpL7RVLVI3U6zl4IMo2uaUBvZTWAyEOKETN-SxI3m3hLLxpmCfz06rlyCGCPimEbk28kKPSbVYtMThiZFRtLxnrdpLr5DWBQwbpIStPQwMetU4Z04Mkm3nEWplL8hpn69Cmd_eWSdI1yHubK_sRL-n1ml5akAEWWGkS0OgVRQTTsYv4RpkbeWc8wrr3DsDBDfyrxciGSZevnStZOLwg-tNuNu3VNugLigNG1HMsNdxoJGO6wLyO-6FL5EQidOiSw2THSibAvADAWMVOxNX2z39d-nJwbVprbWFnox_lDlh-y88uhjj_MpU6OwkXP9vgrBDEmKjtRbYsIN5N94-8pDFEB3yIYk10vUiuod1yfqztVCqWo5m9r48uINP1CD-Bwgybo6K7Oko-TUjMj43GqAu0mmPtkgPFO69LpQQMifZTn_XbVQ5UUfoCwyl-ljObfRE51aCvZP_dOTsUyqi_JRE8h-C3306aW1ISXwCs3YpnjDxJv6yKyWTktBvsN5NWMVzJg-_-MAtTmoy-w2ppbbOozLzyrGF4zfCetaHLmHtbsKe1Ed1nndJg9b6T7v-87ExrI0eQwRjH3gmBTgqu_peS5oQGBaDOe4QSGMNFgf8lQfuqvFH-miXgpk8RytdorzT7wB05iX7c3bhBIQ3FvvjNIal3IgvyxKatZs4BoMW_P_CuyZOUJs2_Yr.m3u8&#x27;:&#xA;  Duration: N/A, start: 60.000000, bitrate: N/A&#xA;  Program 0 &#xA;    Metadata:&#xA;      variant_bitrate : 0&#xA;    Stream #0:0: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp&#xA;    Metadata:&#xA;      variant_bitrate : 0&#xA;    Stream #0:1: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, unknown/bt709/unknown), 1920x1080, 29.97 tbr, 90k tbn, 2k tbc&#xA;    Metadata:&#xA;      variant_bitrate : 0&#xA;    Stream #0:2: Data: timed_id3 (ID3  / 0x20334449)&#xA;    Metadata:&#xA;      variant_bitrate : 0&#xA;Stream mapping:&#xA;  Stream #0:1 -> #0:0 (h264 (native) -> mjpeg (native))&#xA;Press [q] to stop, [?] for help&#xA;[swscaler @ 0x557213e262c0] deprecated pixel format used, make sure you did set range correctly&#xA;Output #0, image2, to &#x27;/output_%09d.jpg&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf58.20.100&#xA;    Stream #0:0: Video: mjpeg, yuvj420p(pc), 1920x1080, q=2-31, 200 kb/s, 0.50 fps, 0.50 tbn, 0.50 tbc&#xA;    Metadata:&#xA;      variant_bitrate : 0&#xA;      encoder         : Lavc58.35.100 mjpeg&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1&#xA;[image2 @ 0x557213012040] Could not open file : /output_000000001.jpg&#xA;av_interleaved_write_frame(): Input/output error&#xA;frame=    1 fps=0.0 q=7.5 Lsize=N/A time=00:00:02.00 bitrate=N/A speed=27.7x    &#xA;video:46kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown&#xA;Conversion failed!&#xA;

    &#xA;

  • iOS 17’s Impact on Marketing : Navigating Privacy Changes

    22 septembre 2023, par Erin — Analytics Tips, Marketing

    In the ever-evolving landscape of digital marketing, staying up-to-date with the latest changes is paramount. One such significant change came on 18 September 2023, in the form of iOS 17, Apple’s latest operating system update. With iOS 17, Apple has introduced new privacy features that are set to have a profound impact on marketers and how they track and analyse user behaviour. 

    In this blog, we will explore what iOS 17 is, how it affects tracking, which tracking parameters are impacted, what remains unaffected, and most importantly, how marketers can future-proof their campaign tracking URLs.

    What is iOS 17 ?

    iOS 17 is the latest update to Apple’s mobile operating system, used on millions of iPhones worldwide. While iOS updates often bring new features and improvements, iOS 17 has made waves in the digital marketing community due to its emphasis on user privacy.

    How does iOS 17 affect tracking ?

    One of the key features of iOS 17 that concerns marketers is its impact on tracking. Apple’s new update aims to enhance user privacy by limiting the information that can be tracked and collected by third-party entities, particularly through query parameters in URLs. This means that certain tracking mechanisms that marketers have relied on for years are now rendered ineffective on iOS 17 devices.

    Campaign tracking URLs, also known as tracking parameters or UTM parameters, are special codes added to the end of URLs. They are used by marketers to track various aspects of a user’s interaction with a digital marketing campaign. These parameters provide valuable data, such as the source of traffic, the medium through which users arrived and specific campaign details.

    For example, with Matomo (mtm) tracking parameters, a campaign tracking URL might look like this :

    https://www.example.com/products/example_product?mtm_campaign=summer-sale

    Generated Campaign URL

    Understanding the impact of iOS 17 on campaign tracking URLs is essential for marketers who rely on this data to measure the effectiveness of their marketing campaigns.

    Which campaign tracking parameters are affected by iOS 17 ?

    Several tracking parameters commonly used by marketers will no longer work as expected on iOS 17. Some of these include :

    • Facebook (fbclid) : Employed for tracking Facebook advertising campaigns. 
    • Instagram (igshid) : Used to track user interactions with Instagram ads.
    • Google Ads (gclid) : Used to track Google Ads campaigns. 
    • Twitter (twclid) : Used to track user interactions with Twitter ads. 
    • Microsoft Ads (msclkid) : Employed for tracking Microsoft Ads campaigns. 
    • Mailchimp (mc_eid) : Used by Mailchimp for email campaign tracking. 

    These changes are significant, as they disrupt many of the common tracking methods that marketers rely on to measure the effectiveness of their campaigns.

    Which campaign tracking parameters are not affected by iOS 17 ?

    While many tracking parameters have been impacted, there are still some that remain unaffected on iOS 17. However, it’s important to note that the status of these parameters might change in the future as Apple continues to prioritise user privacy. Some of the tracking parameters that are still working as of now include :

    • Matomo (mtm) : Matomo campaign tracking parameters. 
    • Google Analytics (UTMs) : Google Analytics campaign tracking parameters.
    • Pinterest (epik) : Used for tracking Pinterest campaigns. 
    • Klaviyo (_kx) : Klaviyo for email marketing tracking. 
    • TikTok (tt-) : Used for tracking TikTok ad interactions. 
    • Hubspot (hsa) : Used for tracking Hubspot campaigns. 

    While these parameters offer some reprieve for marketers, it’s essential to keep a close eye on any potential changes in their functionality as Apple continues to roll out privacy-friendly features.

    How are Matomo users impacted ?

    Fortunately, Matomo, as a leading privacy-friendly web analytics solution, remains unaffected by the changes introduced by iOS 17. Specifically :

    For Matomo users who rely on mtm or UTMs

    If you’re using Matomo or GA tracking parameters, you can rest assured that iOS 17’s changes won’t affect your tracking capabilities in Matomo.

    Attention to gclids (Google Ads) and msclkid (Bing Ads)

    If you use Google Ads or Bing Ads tracking parameters with Matomo’s Advertising Conversion Export feature for tracking, iOS 17 presents a challenge. Your gclids and msclkids may not provide the same level of tracking accuracy on Apple mobile devices. This is a critical consideration, especially if your ad campaigns target mobile users.

    To stay informed about changes in the digital marketing landscape, including updates related to iOS 17, sign up for our newsletter where we regularly provide updates and insights on adapting your tracking and marketing strategies to ensure compliance and respect user privacy.

    How to future-proof your campaign tracking

    Given the impact of iOS 17 on tracking, it’s crucial for marketers to adapt and future-proof their campaign tracking strategies. Here are some steps you can take to mitigate the affects of iOS 17 on your marketing campaigns :

    Monitor platform updates

    Expect updates from advertising and analytics platforms in response to Apple’s privacy changes. These platforms are likely to develop alternative tracking methods or adapt existing ones to comply with iOS 17’s restrictions. Stay informed about these updates and incorporate them into your tracking strategy.

    Prioritise privacy-friendly tech stacks

    In the ever-evolving digital marketing landscape, it’s crucial to prioritise privacy-friendly tech stacks. Privacy-friendly tracking tools like Matomo are essential for maintaining trust and respecting user privacy.

    Matomo ensures the privacy of your users and analytics data. When using Matomo, you retain control of your data ; nobody else does. This commitment to user privacy aligns with the changing digital marketing landscape, where privacy is taking centre stage.

    Transition from affected campaign tracking parameters

    If you’ve been using tools like Mailchimp, whose campaign tracking URLs have been affected by iOS 17, consider transitioning to the campaign tracking URL parameters of your analytics solution. Whether you choose Matomo or Google Analytics, these solutions can help you understand how your email marketing campaigns are performing.

    Focus on data privacy compliance

    Embrace data privacy compliance practices. As privacy regulations evolve, it’s essential to prioritise transparency in data collection. Ensure that your tracking methods align with privacy standards to maintain trust with your audience.

    Regularly review and adapt

    The digital marketing landscape is dynamic, and iOS 17 is just one example of how quickly things can change. Regularly review your tracking methods and adapt to new developments in the industry. Staying agile and informed is key to long-term success.

    Marketers’ path forward

    iOS 17 has reshaped mobile user privacy, challenging marketers to adapt. While some tracking parameters are affected, savvy marketers can still thrive by embracing unique tracking solutions, staying informed about platform updates, and prioritising data privacy. 

    Explore Matomo for privacy-friendly analytics and navigate this evolving landscape successfully with our 21-day free trial – no credit card required.