Recherche avancée

Médias (91)

Autres articles (71)

  • MediaSPIP Player : les contrôles

    26 mai 2010, par

    Les contrôles à la souris du lecteur
    En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...)

  • L’agrémenter visuellement

    10 avril 2011

    MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
    Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté.

  • Ecrire une actualité

    21 juin 2013, par

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

Sur d’autres sites (5449)

  • FFmpegAudio object has no attribute _process

    28 janvier 2023, par Benjamin Tsoumagas

    I'm trying to make a Discord music bot that is remotely hosted and to do that I need ffmpeg to work. I was able to add it using my Dockerfile but upon trying to play music with the bot I get the following errors. For context, I am hosting on Fly.io and using python with the Nextcord library. Below is my relevant code and the error message. Please let me know if any more information is required.

    


    import nextcord, os, json, re, youtube_dl
from nextcord import Interaction, application_checks
from nextcord.ext import commands

youtube_dl.utils.bug_reports_message = lambda: ''

ytdl_format_options = {
    "format": "bestaudio/best",
    'outtmpl': '%(extractor)s-%(id)s-%(title)s.%(ext)s',
    'restrictfilenames': True,
    'noplaylist': True,
    'nocheckcertificate': True,
    'ignoreerrors': False,
    'logtostderr': False,
    'quiet': True,
    'no_warnings': True,
    'default_search': 'auto',
    'source_address': '0.0.0.0',
}

ffmpeg_options = {"options": "-vn"}

ytdl = youtube_dl.YoutubeDL(ytdl_format_options)

class YTDLSource(nextcord.PCMVolumeTransformer):
    def __init__(self, source, *, data, volume=0.5):
        super().__init__(source, volume)
        self.data = data
        self.title = data.get("title")
        self.url = data.get("url")

    @classmethod
    async def from_url(cls, url, *, loop=None, stream=False):
        loop = loop or asyncio.get_event_loop()
        data = await loop.run_in_executor(None, lambda: ytdl.extract_info(url, download=not stream))

        if "entries" in data:
            data = data["entries"][0]
        
        filename = data["url"] if stream else ytdl.prepare_filename(data)
        return cls(nextcord.FFmpegAudio(filename, *ffmpeg_options), data=data)

async def ensure_voice(interaction: Interaction):
    if interaction.guild.voice_client is None:
        if interaction.user.voice:
            await interaction.user.voice.channel.connect()
        else:
            await interaction.send("You are not connected to a voice channel.")
            raise commands.CommandError("Author not connected to a voice channel.")
    elif interaction.guild.voice_client.is_playing():
        interaction.guild.voice_client.stop()

class Music(commands.Cog, name="Music"):
    """Commands for playing music in voice channels"""

    COG_EMOJI = "🎵"

    def __init__(self, bot):
        self.bot = bot
    
    @application_checks.application_command_before_invoke(ensure_voice)
    @nextcord.slash_command()
    async def play(self, interaction: Interaction, *, query):
        """Plays a file from the local filesystem"""

        source = nextcord.PCMVolumeTransformer(nextcord.FFmpegPCMAudio(query))
        interaction.guild.voice_client.play(source, after=lambda e: print(f"Player error: {e}") if e else None)

        await interaction.send(f"Now playing: {query}")

    @application_checks.application_command_before_invoke(ensure_voice)
    @nextcord.slash_command()
    async def yt(self, interaction: Interaction, *, url):
        """Plays from a URL (almost anything youtube_dl supports)"""

        async with interaction.channel.typing():
            player = await YTDLSource.from_url(url, loop=self.bot.loop)
            interaction.guild.voice_client.play(
                player, after=lambda e: print(f"Player error: {e}") if e else None
            )

        await interaction.send(f"Now playing: {player.title}")

    @application_checks.application_command_before_invoke(ensure_voice)
    @nextcord.slash_command()
    async def stream(self, interaction: Interaction, *, url):
        """Streams from a URL (same as yt, but doesn't predownload)"""

        async with interaction.channel.typing():
            player = await YTDLSource.from_url(url, loop=self.bot.loop, stream=True)
            interaction.voice_client.play(
                player, after=lambda e: print(f"Player error: {e}") if e else None
            )

        await interaction.send(f"Now playing: {player.title}")

def setup(bot):
    bot.add_cog(Music(bot))


    


    2023-01-28T23:16:15Z app[7d3b734a] yyz [info]Exception ignored in: <function at="at" 0x7fa78ea61fc0="0x7fa78ea61fc0">&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]Traceback (most recent call last):&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]  File "/usr/local/lib/python3.10/site-packages/nextcord/player.py", line 116, in __del__&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]    self.cleanup()&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]  File "/usr/local/lib/python3.10/site-packages/nextcord/player.py", line 235, in cleanup&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]    self._kill_process()&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]  File "/usr/local/lib/python3.10/site-packages/nextcord/player.py", line 191, in _kill_process&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]AttributeError: &#x27;FFmpegA&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]AttributeError: &#x27;FFmpegA&#xA;dio&#x27; object has no attribute &#x27;_process&#x27;&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]Ignoring exception in command :&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]Traceback (most recent call last):&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]  File "/usr/local/lib/python3.10/site-packages/nextcord/application_command.py", line 863, in invoke_callback_with_hooks&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]    await self(interaction, *args, **kwargs)&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]  File "/main/cogs/music.py", line 153, in yt&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]    player = await YTDLSource.from_url(url, loop=self.bot.loop)&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]  File "/main/cogs/music.py", line 71, in from_url    &#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]    return cls(nextcord.FFmpegAudio(filename, *ffmpeg_options), data=data)&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]&#xA;The above exception was the direct cause of the following exception:&#xA;&#xA;re given&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]The above exception was the direct cause of the following exception:&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]nextcord.errors.ApplicationInvokeError: Command raised an exception: TypeError: FFmpegAudio.__init__() takes 2 positional arguments but 3 were given     &#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]Exception ignored in: <function at="at" 0x7fa78ea61fc0="0x7fa78ea61fc0">&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]Traceback (most recent call last):&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]  File "/usr/local/lib/python3.10/site-packages/nextcord/player.py", line 116, in __del__&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]    self.cleanup()&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]  File "/usr/local/lib/python3.10/site-packages/nextcord/player.py", line 235, in cleanup&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]    self._kill_process()&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]  File "/usr/local/lib/python3.10/site-packages/nextcord/player.py", line 191, in _kill_process&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]    proc = self._process&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]AttributeError: &#x27;FFmpegAudio&#x27; object has no attribute &#xA;&#x27;_process&#x27;&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]Ignoring exception in command :&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]Traceback (most recent call last):&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]  File "/usr/local/lib/python3.10/site-packages/nextcord/application_command.py", line 863, in invoke_callback_with_hooks&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]    await self(interaction, *args, **kwargs)&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]  File "/main/cogs/music.py", line 153, in yt&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]    player = await YTDLSource.from_url(url, loop=self.bot.loop)&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]  File "/main/cogs/music.py", line 71, in from_url    &#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]    return cls(nextcord.FFmpegAudio(filename, *ffmpeg_options), data=data)&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]TypeError: FFmpegAudio.__init__() takes 2 positional arguments but 3 were given&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]The above exception was the direct cause of the following exception:&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]nextcord.errors.ApplicationInvokeError: Command raised an exception: TypeError: FFmpegAudio.__init__() takes 2 positional arguments but 3 were given&#xA;</function></function>

    &#xA;

    Similar posts have been made but their issues were typos in changing 'option' : '-vn' to 'options' : '-vn'. I've combed through for any other errors but I can't find any. I was hoping to see I made a similar mistake, but this is the template I was following from the Nextcord developers and I had no luck :

    &#xA;

  • ffmpeg realtime bad quality variable fps cams inputs to constant framerate problem

    23 janvier 2023, par BloodMan
        ../ffmpeg/ffmpeg -err_detect ignore_err -nostdin -threads 0 -y -strict experimental -thread_queue_size 10M -max_delay 20M -rtbufsize 20M -fflags &#x2B;discardcorrupt \&#xA;        -i "${cam1}" -i "${cam2}" -i "${cam3}" -i "${cam4}" \&#xA;        -filter_complex " \&#xA;        nullsrc=size=3840x2160:rate=30 [main1]; \&#xA;        anullsrc=channel_layout=stereo:sample_rate=44100 [a]; \&#xA;        [0:v] scale=1920:1080 [overlay1]; \&#xA;        [1:v] scale=1920:1080 [overlay2]; \&#xA;        [2:v] scale=1920:1080 [overlay3]; \&#xA;        [3:v] scale=1920:1080 [overlay4]; \&#xA;        [main1][overlay1] overlay=0:0 [main2]; \&#xA;        [main2][overlay2] overlay=1920:0 [main3]; \&#xA;        [main3][overlay3] overlay=0:1080 [main4]; \&#xA;        [main4][overlay4] overlay=1920:1080 [v] " \&#xA;        -t 10 -r 30 -g 60 -map "[v]" -map "[a]" \&#xA;        -shortest -video_size 3840x2160 -pix_fmt yuv420p -vcodec libx264 -preset ultrafast -tune zerolatency -minrate 2M -maxrate 2M -bufsize 20M -c:a aac -b:a 96k -ac 2 -ar 48000 -copytb 1 \&#xA;        -f flv -y -fflags &#x2B;genpts rtmp://b.rtmp.youtube.com/live2/${key}?backup=1&#xA;

    &#xA;

    ffmpeg version N-109650-g9d5e66942c Copyright (c) 2000-2023 the FFmpeg developers&#xA;  built with gcc 10 (Debian 10.2.1-6)&#xA;  configuration: --prefix=/home/bloodman/ffmpeg --pkg-config-flags=--static --extra-cflags=&#x27;-I/home/bloodman/ffmpeg/include -march=native&#x27; --extra-ldflags=-L/home/bloodman/ffmpeg/lib --extra-libs=&#x27;-lpthread -lm&#x27; --bindir=/home/bloodman/ffmpeg --enable-gpl --enable-nonfree --enable-libx264 --enable-libfdk-aac --enable-libmp3lame --enable-libfreetype --enable-hardcoded-tables&#xA;  libavutil      57. 44.100 / 57. 44.100&#xA;  libavcodec     59. 56.100 / 59. 56.100&#xA;  libavformat    59. 35.100 / 59. 35.100&#xA;  libavdevice    59.  8.101 / 59.  8.101&#xA;  libavfilter     8. 54.100 /  8. 54.100&#xA;  libswscale      6.  8.112 /  6.  8.112&#xA;  libswresample   4.  9.100 /  4.  9.100&#xA;  libpostproc    56.  7.100 / 56.  7.100&#xA;[hls @ 0x56019db77780] Skip (&#x27;#EXT-X-VERSION:3&#x27;)&#xA;[hls @ 0x56019db77780] Opening &#x27;cams/stream1_113.ts&#x27; for reading&#xA;Input #0, hls, from &#x27;cams/stream1.m3u8&#x27;:&#xA;  Duration: N/A, start: 1122.341667, bitrate: N/A&#xA;  Program 0&#xA;    Metadata:&#xA;      variant_bitrate : 0&#xA;  Stream #0:0: Video: h264 (Baseline) ([27][0][0][0] / 0x001B), yuv420p, 2048x1536, 15 fps, 15 tbr, 90k tbn&#xA;    Metadata:&#xA;      variant_bitrate : 0&#xA;[hls @ 0x56019db9e980] Skip (&#x27;#EXT-X-VERSION:3&#x27;)&#xA;[hls @ 0x56019db9e980] Opening &#x27;cams/stream2_105.ts&#x27; for reading&#xA;Input #1, hls, from &#x27;cams/stream2.m3u8&#x27;:&#xA;  Duration: N/A, start: 1042.633000, bitrate: N/A&#xA;  Program 0&#xA;    Metadata:&#xA;      variant_bitrate : 0&#xA;  Stream #1:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuvj420p(pc, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 100 tbr, 90k tbn&#xA;    Metadata:&#xA;      variant_bitrate : 0&#xA;[hls @ 0x56019dccdbc0] Skip (&#x27;#EXT-X-VERSION:3&#x27;)&#xA;[hls @ 0x56019dccdbc0] Opening &#x27;cams/stream3_14.ts&#x27; for reading&#xA;Input #2, hls, from &#x27;cams/stream3.m3u8&#x27;:&#xA;  Duration: N/A, start: 132.469000, bitrate: N/A&#xA;  Program 0&#xA;    Metadata:&#xA;      variant_bitrate : 0&#xA;  Stream #2:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 2688x1520, 25 fps, 100 tbr, 90k tbn&#xA;    Metadata:&#xA;      variant_bitrate : 0&#xA;[hls @ 0x56019f0ec980] Skip (&#x27;#EXT-X-VERSION:3&#x27;)&#xA;[hls @ 0x56019f0ec980] Opening &#x27;cams/stream4_26.ts&#x27; for reading&#xA;Input #3, hls, from &#x27;cams/stream4.m3u8&#x27;:&#xA;  Duration: N/A, start: 253.389000, bitrate: N/A&#xA;  Program 0&#xA;    Metadata:&#xA;      variant_bitrate : 0&#xA;  Stream #3:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuvj420p(pc, bt709), 1920x1080, 90k tbr, 90k tbn&#xA;    Metadata:&#xA;      variant_bitrate : 0&#xA;Stream mapping:&#xA;  Stream #0:0 (h264) -> scale:default&#xA;  Stream #1:0 (h264) -> scale:default&#xA;  Stream #2:0 (h264) -> scale:default&#xA;  Stream #3:0 (h264) -> scale:default&#xA;  overlay:default -> Stream #0:0 (libx264)&#xA;  anullsrc:default -> Stream #0:1 (aac)&#xA;[hls @ 0x56019db77780] Opening &#x27;cams/stream1_114.ts&#x27; for reading&#xA;[hls @ 0x56019db77780] Opening &#x27;cams/stream1_115.ts&#x27; for reading&#xA;[swscaler @ 0x5601a2c78e40] deprecated pixel format used, make sure you did set range correctly&#xA;[swscaler @ 0x5601a332c940] deprecated pixel format used, make sure you did set range correctly&#xA;[swscaler @ 0x5601a2c78e40] deprecated pixel format used, make sure you did set range correctly&#xA;    Last message repeated 2 times&#xA;[swscaler @ 0x5601a332c940] deprecated pixel format used, make sure you did set range correctly&#xA;[swscaler @ 0x5601a361fc00] deprecated pixel format used, make sure you did set range correctly&#xA;    Last message repeated 1 times&#xA;[libx264 @ 0x56019e5212c0] using SAR=1/1&#xA;[libx264 @ 0x56019e5212c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2&#xA;[libx264 @ 0x56019e5212c0] profile Constrained Baseline, level 5.1, 4:2:0, 8-bit&#xA;[libx264 @ 0x56019e5212c0] 264 - core 160 r3011 cde9a93 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=8 lookahead_threads=8 sliced_threads=1 slices=8 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=60 keyint_min=6 scenecut=0 intra_refresh=0 rc_lookahead=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=2000 vbv_bufsize=20000 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=0&#xA;Output #0, flv, to &#x27;rtmp://b.rtmp.youtube.com/live2/XXXX-XXXX-XXXX-XXXX-XXXX?backup=1&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf59.35.100&#xA;  Stream #0:0: Video: h264 ([7][0][0][0] / 0x0007), yuv420p(progressive), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 30 fps, 1k tbn&#xA;    Metadata:&#xA;      encoder         : Lavc59.56.100 libx264&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 2000000/0/0 buffer size: 20000000 vbv_delay: N/A&#xA;  Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 48000 Hz, stereo, fltp, 96 kb/s&#xA;    Metadata:&#xA;      encoder         : Lavc59.56.100 aac&#xA;[hls @ 0x56019db77780] Skip (&#x27;#EXT-X-VERSION:3&#x27;)00:00:03.22 bitrate=7519.6kbits/s speed=0.359x&#xA;[hls @ 0x56019db77780] Opening &#x27;cams/stream1_116.ts&#x27; for reading&#xA;[hls @ 0x56019db77780] Skip (&#x27;#EXT-X-VERSION:3&#x27;)00:00:07.23 bitrate=4470.2kbits/s speed=0.383x&#xA;[hls @ 0x56019db77780] Opening &#x27;cams/stream1_117.ts&#x27; for reading&#xA;[hls @ 0x56019f0ec980] Skip (&#x27;#EXT-X-VERSION:3&#x27;)00:00:09.04 bitrate=3978.1kbits/s speed=0.384x&#xA;[hls @ 0x56019f0ec980] Opening &#x27;cams/stream4_27.ts&#x27; for reading&#xA;[hls @ 0x56019dccdbc0] Skip (&#x27;#EXT-X-VERSION:3&#x27;)&#xA;[hls @ 0x56019dccdbc0] Opening &#x27;cams/stream3_15.ts&#x27; for reading&#xA;[hls @ 0x56019db9e980] Skip (&#x27;#EXT-X-VERSION:3&#x27;)&#xA;[hls @ 0x56019db9e980] Opening &#x27;cams/stream2_106.ts&#x27; for reading&#xA;[flv @ 0x56019e639a00] Failed to update header with correct duration.811.6kbits/s speed=0.385x&#xA;[flv @ 0x56019e639a00] Failed to update header with correct filesize.&#xA;frame=  299 fps= 12 q=34.0 Lsize=    4622kB time=00:00:09.98 bitrate=3792.7kbits/s speed=0.386x&#xA;video:4603kB audio:3kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.349536%&#xA;[libx264 @ 0x56019e5212c0] frame I:5     Avg QP:45.60  size:275880&#xA;[libx264 @ 0x56019e5212c0] frame P:294   Avg QP:38.77  size: 11340&#xA;[libx264 @ 0x56019e5212c0] mb I  I16..4: 100.0%  0.0%  0.0%&#xA;[libx264 @ 0x56019e5212c0] mb P  I16..4:  1.4%  0.0%  0.0%  P16..4:  4.7%  0.0%  0.0%  0.0%  0.0%    skip:93.9%&#xA;[libx264 @ 0x56019e5212c0] coded y,uvDC,uvAC intra: 16.2% 8.9% 1.2% inter: 1.8% 0.6% 0.0%&#xA;[libx264 @ 0x56019e5212c0] i16 v,h,dc,p: 64% 17% 15%  5%&#xA;[libx264 @ 0x56019e5212c0] i8c dc,h,v,p: 90%  6%  3%  1%&#xA;[libx264 @ 0x56019e5212c0] kb/s:3783.23&#xA;[aac @ 0x56019e63a700] Qavg: 65511.207&#xA;[hls @ 0x56019db77780] Skip (&#x27;#EXT-X-VERSION:3&#x27;)&#xA;[hls @ 0x56019db77780] Opening &#x27;cams/stream1_118.ts&#x27; for reading&#xA;

    &#xA;

    NOTES : sources are cams streamed first to hls/m3u8. -t 10 only for testing purposes.

    &#xA;

    The problem is variable output fps= 12 (sometimes 2, 5, 10, maybe 13) where I expect 30. Machine is 10 times greater (encode uses up to 5% cpu).

    &#xA;

    Im trying adding -re, -r 30, -r 15 to sources, convert sources via stream_filter (,fps=30), vsync (old versions of ffmpeg), wallclock time, etc. and reading stackoverflow of course. And... nothing.

    &#xA;

    Where is the problem ?

    &#xA;

  • Introducing the Data Warehouse Connector feature

    30 janvier, par Matomo Core Team

    Matomo is built on a simple truth : your data belongs to you, and you should have complete control over it. That’s why we’re excited to launch our new Data Warehouse Connector feature for Matomo Cloud, giving you even more ways to work with your analytics data. 

    Until now, getting raw data from Matomo Cloud required APIs and custom scripts, or waiting for engineering help.  

    Our new Data Warehouse Connector feature removes those barriers. You can now access your raw, unaggregated data and schedule regular exports straight to your data warehouse. 

    The feature works with all major data warehouses including (but not limited to) : 

    • Google BigQuery 
    • Amazon Redshift 
    • Snowflake 
    • Azure Synapse Analytics 
    • Apache Hive 
    • Teradata 

    You can schedule exports, combine your Matomo data with other data sources in your data warehouse, and easily query data with SQL-like queries. 

    Direct raw data access for greater data portability 

    Waiting for engineering support can delay your work. Managing API connections and writing scripts can be time-consuming. This keeps you from focusing on what you do best—analysing data. 

    BigQuery create-table-menu

    With the Data Warehouse Connector feature, you get direct access to your raw Matomo data without the technical setup. So, you can spend more time analysing data and finding insights that matter. 

    Bringing your data together 

    Answering business questions often requires data from multiple sources. A single customer interaction might span your CRM, web analytics, sales systems, and more. Piecing this data together manually is time-consuming—what starts as a seemingly simple question from stakeholders can turn into hours of work collecting and comparing data across different tools. 

    This feature lets you combine your Matomo data with data from other business systems in your data warehouse. Instead of switching between tools or manually comparing spreadsheets, you can analyse all your data in one place to better understand how customers interact with your business. 

    Easy, custom analysis with SQL-like queries 

    Standard, pre-built reports often don’t address the specific, detailed questions that analysts need to answer.  

    When you use the Data Warehouse Connector feature, you can use SQL-like queries in your data warehouse to do detailed, customised analysis. This flexibility allows you to explore your data in depth and uncover specific insights that aren’t possible with pre-built reports. 

    Here is an example of how you might use SQL-like query to compare the behaviours of paying vs. non-paying users : 

    				
                                            <xmp>SELECT  

    custom_dimension_value AS user_type, -- Assuming 'user_type' is stored in a custom dimension

    COUNT(*) AS total_visits,  

    AVG(visit_total_time) AS avg_duration,

    SUM(conversion.revenue) AS total_spent  

    FROM  

    `your_project.your_dataset.matomo_log_visit` AS visit

    LEFT JOIN  

    `your_project.your_dataset.matomo_log_conversion` AS conversion  

    ON  

    visit.idvisit = conversion.idvisit  

    GROUP BY  

    custom_dimension_value; </xmp>
                                   

    This query helps you compare metrics such as the number of visits, average session duration, and total amount spent between paying and non-paying users. It provides a full view of behavioural differences between these groups. 

    Advanced data manipulation and visualisation 

    When you need to create detailed reports or dive deep into data analysis, working within the constraints of a fixed user interface (UI) can limit your ability to draw insights. 

    Exporting your Matomo data to a data warehouse like BigQuery provides greater flexibility for in-depth manipulation and advanced visualisations, enabling you to uncover deeper insights and tailor your reports more effectively. 

    Getting started 

    To set up data warehouse exports in your Matomo : 

    1. Go to System Admin (cog icon in the top right corner) 
    2. Select ‘Export’ from the left-hand menu 
    3. Choose ‘Data Warehouse Connector’ 

    You’ll find detailed instructions in our data warehouse exports guide 

    Please note, enabling this feature will cost an additional 10% of your current subscription. You can view the exact cost by following the steps above. 

    New to Matomo ? Start your 21-day free trial now (no credit card required), or request a demo.