Recherche avancée

Médias (91)

Autres articles (41)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

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

Sur d’autres sites (3538)

  • How to compile ffmpeg to get only mp3 and mp4 support

    19 février 2019, par Enis Jasarovic

    I’m building Electron app and I use ffmpeg to convert m4a or webm files to mp3, and also to merge video only mp4 with m4a audio file to mp4.

    I am able to achieve this using [media-autobuild-suite] (https://github.com/jb-alvarado/media-autobuild_suite), using light build option, but the size of static files is arround 20mb and I’would like to shrink it a little bit more. I’ve compiled ffmpeg and ffprobe with this configuration.

    --disable-libaom
    --disable-version3
    # Full
    --disable-chromaprint
    --disable-cuda-sdk
    --disable-decklink
    --disable-frei0r
    --disable-libbs2b
    --disable-libcaca
    --disable-libcdio
    --disable-libfdk-aac
    --disable-libflite
    --disable-libfribidi
    --disable-libgme
    --disable-libgsm
    --disable-libilbc
    --disable-libkvazaar
    --disable-libmodplug
    --disable-libnpp
    --disable-libopenh264
    --disable-libopenmpt
    --disable-librtmp
    --disable-librubberband
    --disable-libssh
    --disable-libtesseract
    --disable-libxavs
    --disable-libzmq
    --disable-libzvbi
    --disable-opencl
    --disable-opengl
    --disable-libvmaf
    --disable-libcodec2
    --disable-libsrt
    --disable-ladspa
    --disable-ffplay
    #--enable-vapoursynth
    #--enable-liblensfun
    --disable-libndi_newtek

    --enable-demuxer=mp3
    --enable-demuxer=mov
    --enable-demuxer=opus

    --enable-parser=ac3
    --enable-parser=mpegaudio
    --enable-parser=h264
    --enable-parser=opus

    --enable-protocol=file
    --enable-protocol=pipe

    --enable-decoder=mp3
    --enable-decoder=mp4
    --enable-decoder=opus

    --enable-encoder=mp3
    --enable-encoder=mp4
    --enable-encoder=opus

    With this configuration I’m getting ffmpeg static file arround 2mb and ffprobe static file arround 2mb but with this error.

    C:\Users\Admin\Desktop\ffmpeg compilations\2mb\local64>ffmpeg -i simple.m4a simple.mp3
    ffmpeg version N-93147-g9326117bf6 Copyright (c) 2000-2019 the FFmpeg developers built with gcc 8.2.1 (Rev1, Built by MSYS2 project) 20181214
    configuration:  .... //here comes configuration as described above
    libavutil      56. 26.100 / 56. 26.100
    libavcodec     58. 47.102 / 58. 47.102
    libavformat    58. 26.101 / 58. 26.101
    libavdevice    58.  6.101 / 58.  6.101
    libavfilter     7. 48.100 /  7. 48.100
    libswscale      5.  4.100 /  5.  4.100
    libswresample   3.  4.100 /  3.  4.100
    libpostproc    55.  4.100 / 55.  4.100
    Guessed Channel Layout for Input Stream #0.0 : stereo
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'simple.m4a':
    Metadata:
     major_brand     : dash
     minor_version   : 0
     compatible_brands: iso6mp41
     creation_time   : 2018-10-31T19:47:32.000000Z
    Duration: 00:02:38.92, start: 0.000000, bitrate: 127 kb/s
    Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, 7 kb/s (default)
    Metadata:
     creation_time   : 2018-10-31T19:47:32.000000Z
     handler_name    : SoundHandler
    [NULL @ 0000000000486200] Unable to find a suitable output format for 'simple.mp3'
    simple.mp3: Invalid argument

    Any ideas what else should I include into this static file ?

  • FFMPEG not found (and i can't install it)

    30 juin 2022, par Chara1111

    I'm creating music commands for my discord bot written or discord.js. But FFMPEG problem won't let me launch one of them.

    



    I have installed these needed packages : ytdl, ffmpeg-binaries, discord.js, opusscript (maybe could forgot about some)
I can't also install node-opus (error below), but also not sure if it really needed (someone told me it is)

    



    Also don't judge me, I am really new to JavaScript

    



    C:\Users\Игорь\Desktop\Bot>npm i ffmpeg
npm ERR! path C:\Users\Игорь\Desktop\Bot\node_modules\FFMPEG\package.json
npm ERR! code ELOOP
npm ERR! errno -4067
npm ERR! syscall open
npm ERR! ELOOP: too many symbolic links encountered, open 'C:\Users\Игорь\Desktop\Bot\node_modules\FFMPEG\package.json'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Игорь\AppData\Roaming\npm-cache\_logs\2019-05-27T18_05_01_338Z-debug.log


    



    node-opus error

    



    > ref@1.3.5 install C:\Users\Игорь\Desktop\Bot\node_modules\ref&#xA;> node-gyp rebuild&#xA;&#xA;&#xA;C:\Users\Игорь\Desktop\Bot\node_modules\ref>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )&#xA;Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation&#xA;Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation&#xA;Traceback (most recent call last):&#xA;  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 16, in <module>&#xA;    sys.exit(gyp.script_main())&#xA;  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 545, in script_main&#xA;    return main(sys.argv[1:])&#xA;  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 538, in main&#xA;    return gyp_main(args)&#xA;  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 523, in gyp_main&#xA;    generator.GenerateOutput(flat_list, targets, data, params)&#xA;  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 2004, in GenerateOutput&#xA;    generator_flags))&#xA;  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 943, in _GenerateProject&#xA;    return _GenerateMSVSProject(project, options, version, generator_flags)&#xA;  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1047, in _GenerateMSVSProject&#xA;    p.WriteIfChanged()&#xA;  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSProject.py", line 208, in WriteIfChanged&#xA;    encoding="Windows-1252")&#xA;  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\easy_xml.py", line 122, in WriteXmlIfChanged&#xA;    xml_string = xml_string.decode(default_encoding).encode(encoding)&#xA;  File "C:\Python27\lib\encodings\cp1252.py", line 12, in encode&#xA;    return codecs.charmap_encode(input,errors,encoding_table)&#xA;UnicodeEncodeError: &#x27;charmap&#x27; codec can&#x27;t encode characters in position 509-513: character maps to <undefined>&#xA;gyp ERR! configure error&#xA;gyp ERR! stack Error: `gyp` failed with exit code: 1&#xA;gyp ERR! stack     at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:345:16)&#xA;gyp ERR! stack     at ChildProcess.emit (events.js:196:13)&#xA;gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:257:12)&#xA;gyp ERR! System Windows_NT 10.0.17134&#xA;gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"&#xA;gyp ERR! cwd C:\Users\Игорь\Desktop\Bot\node_modules\ref&#xA;gyp ERR! node -v v12.2.0&#xA;gyp ERR! node-gyp -v v3.8.0&#xA;gyp ERR! not ok&#xA;&#xA;> node-opus@0.3.2 install C:\Users\Игорь\Desktop\Bot\node_modules\node-opus&#xA;> node-gyp rebuild&#xA;&#xA;&#xA;C:\Users\Игорь\Desktop\Bot\node_modules\node-opus>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )&#xA;Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation&#xA;Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation&#xA;Traceback (most recent call last):&#xA;  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 16, in <module>&#xA;    sys.exit(gyp.script_main())&#xA;  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 545, in script_main&#xA;    return main(sys.argv[1:])&#xA;  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 538, in main&#xA;    return gyp_main(args)&#xA;  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 523, in gyp_main&#xA;    generator.GenerateOutput(flat_list, targets, data, params)&#xA;  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 2004, in GenerateOutput&#xA;    generator_flags))&#xA;  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 943, in _GenerateProject&#xA;    return _GenerateMSVSProject(project, options, version, generator_flags)&#xA;  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1047, in _GenerateMSVSProject&#xA;    p.WriteIfChanged()&#xA;  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSProject.py", line 208, in WriteIfChanged&#xA;    encoding="Windows-1252")&#xA;  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\easy_xml.py", line 122, in WriteXmlIfChanged&#xA;    xml_string = xml_string.decode(default_encoding).encode(encoding)&#xA;  File "C:\Python27\lib\encodings\cp1252.py", line 12, in encode&#xA;    return codecs.charmap_encode(input,errors,encoding_table)&#xA;UnicodeEncodeError: &#x27;charmap&#x27; codec can&#x27;t encode characters in position 509-513: character maps to <undefined>&#xA;gyp ERR! configure error&#xA;gyp ERR! stack Error: `gyp` failed with exit code: 1&#xA;gyp ERR! stack     at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:345:16)&#xA;gyp ERR! stack     at ChildProcess.emit (events.js:196:13)&#xA;gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:257:12)&#xA;gyp ERR! System Windows_NT 10.0.17134&#xA;gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"&#xA;gyp ERR! cwd C:\Users\Игорь\Desktop\Bot\node_modules\node-opus&#xA;gyp ERR! node -v v12.2.0&#xA;gyp ERR! node-gyp -v v3.8.0&#xA;gyp ERR! not ok&#xA;npm WARN discord.js@11.5.0 requires a peer of bufferutil@^4.0.0 but none is installed. You must install peer dependencies yourself.&#xA;npm WARN discord.js@11.5.0 requires a peer of erlpack@discordapp/erlpack but none is installed. You must install peer dependencies yourself.&#xA;npm WARN discord.js@11.5.0 requires a peer of libsodium-wrappers@^0.7.3 but none is installed. You must install peer dependencies yourself.&#xA;npm WARN discord.js@11.5.0 requires a peer of node-opus@^0.2.7 but none is installed. You must install peer dependencies yourself.&#xA;npm WARN discord.js@11.5.0 requires a peer of sodium@^2.0.3 but none is installed. You must install peer dependencies yourself.&#xA;npm WARN discord.js@11.5.0 requires a peer of @discordjs/uws@^10.149.0 but none is installed. You must install peer dependencies yourself.&#xA;npm WARN No-u@0.0.1 No repository field.&#xA;npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @ffmpeg-installer/darwin-x64@4.1.0 (node_modules\@ffmpeg-installer\darwin-x64):&#xA;npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @ffmpeg-installer/darwin-x64@4.1.0: wanted {"os":"darwin","arch":"x64"} (current: {"os":"win32","arch":"x64"})&#xA;npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @ffmpeg-installer/linux-ia32@4.1.0 (node_modules\@ffmpeg-installer\linux-ia32):&#xA;npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @ffmpeg-installer/linux-ia32@4.1.0: wanted {"os":"linux","arch":"ia32"} (current: {"os":"win32","arch":"x64"})&#xA;npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @ffmpeg-installer/linux-x64@4.1.0 (node_modules\@ffmpeg-installer\linux-x64):&#xA;npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @ffmpeg-installer/linux-x64@4.1.0: wanted {"os":"linux","arch":"x64"} (current: {"os":"win32","arch":"x64"})&#xA;npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @ffmpeg-installer/win32-ia32@4.1.0 (node_modules\@ffmpeg-installer\win32-ia32):&#xA;npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @ffmpeg-installer/win32-ia32@4.1.0: wanted {"os":"win32","arch":"ia32"} (current: {"os":"win32","arch":"x64"})&#xA;npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ref@1.3.5 (node_modules\ref):&#xA;npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ref@1.3.5 install: `node-gyp rebuild`&#xA;npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1&#xA;&#xA;npm ERR! code ELIFECYCLE&#xA;npm ERR! errno 1&#xA;npm ERR! node-opus@0.3.2 install: `node-gyp rebuild`&#xA;npm ERR! Exit status 1&#xA;npm ERR!&#xA;npm ERR! Failed at the node-opus@0.3.2 install script.&#xA;npm ERR! This is probably not a problem with npm. There is likely additional logging output above.&#xA;&#xA;npm ERR! A complete log of this run can be found in:&#xA;npm ERR!     C:\Users\Игорь\AppData\Roaming\npm-cache\_logs\2019-05-27T18_03_29_880Z-debug.log&#xA;</undefined></module></undefined></module>

    &#xA;

  • Easily track Events within Matomo Analytics thanks to Matomo Tag Manager

    7 juin 2019, par Matomo Core Team — Analytics Tips

    Easily track Events within Matomo Analytics thanks to Matomo Tag Manager

    Introduction

    In this article we’ll cover what events in Matomo Analytics are ; and how you can easily set them up thanks to Matomo Tag Manager.

    Key concepts within this article

    • Events
    • Quick definition of the Tag Management System
    • Matomo config
    • Creating triggers
    • Variables

    What are events in Matomo Analytics and why are they useful ?

    Events allow you to measure interactions on your website which are not defined by default. With them you can measure clicks on some elements of a page, such as, how visitors are interacting with dropdown menus, media players, scrolling behaviours etc. You can also use them to define goals which make them a key feature in Matomo Analytics. Learn more about tracking events in Matomo.

    You can easily access the Events report in Matomo Analytics by clicking on the Behaviour category :

    Matomo tag manager event tracking

    And you may read the following message and feel a bit frustrated :

    Matomo tag manager event tracking

    “There is no data for this report” is a nice way to say, “Hey, you are tracking just a tiny part of what Matomo Analytics can do for you.”

    Matomo is a great software, but it can’t guess what you want to track.

    In order for Matomo to register those event tracking interactions, you’ll need to explain it by adding a line of code similar to this one when the interaction happens :

     

    _paq.push(['trackEvent', 'Here you enter whatever you want', 'Here too', 'and here also']);

     

    Let’s imagine you want to track a click on an HTML button, your code will look something similar to this at the moment of the interaction :

    As you can imagine, two main challenges will arise for non developers :

    1. How to access the source code ?
    2. How to define the interaction ?

    Luckily, Matomo Tag Manager makes those steps easy for you. Let’s see how the same tracking is implemented with Matomo Tag Manager.

    A quick definition of what Matomo Tag Manager is

    Matomo Tag Manager lets you manage all your tracking and marketing tags in one easy-to-access place. Please visit this page to learn more about Matomo Tag Manager. In order to start using it, you’ll need to copy/paste a tracking code, named a “container”, within the section of your pages.

    Once the container is on your website, all you need to do is to follow these simple steps :

    1. Add a Matomo Tag.
    2. Assign the condition to fire the tag (what we call the trigger).
    3. Publish your work.
    4. And enjoy

    1 – Add a Matomo Event tracking code

    All you have to do here is click on “CREATE NEW TAG”

    Matomo tag manager event tracking

    Once selected, just mention how you’d like this tag to be named (it is for your internal purpose here so always use an explicit tag name) and the Matomo configuration (the default configuration setting will be fine in most of the cases) :

    Matomo tag manager event tracking

    Then Matomo Tag Manager will ask you the type of tracking you’d like to deploy, in this case, this is an event so select “Event” :

    Matomo tag manager event tracking

    Then all you need is to indicate the values you’d like to push through your event :

    Matomo tag manager event tracking

    To put it in perspective, all we did here through Matomo Tag Manager was implement the equivalent of the following line of code :

    _paq.push(['trackEvent', 'Element interactions', 'Click button', 'Click Me']);

    Let’s now see how can we do this on click code part which we call a trigger.

    2 – Assign the condition to fire the tag

    In order to execute the event we’ll need to define when it will happen. You do this by clicking on Create a new trigger now :

    Matomo tag manager event tracking

    As the interaction we’d like to track is happening when a click occurs, it will be a click trigger, and as our button is not a link, we’ll select All Elements Click :

    Matomo tag manager event tracking

    Once selected you’ll need to be precise on the condition in which the event will be triggered. In this case we do not want to have events pushed every time someone is clicking on something on our website. We only want to track when they click on this specific button. That’s the reason why our trigger is set to fire only when the click occurs on an element which has an id and has the value “cta” :

    Once you click on the green button named CREATE NEW TRIGGER, you validate the tag by clicking on CREATE NEW TAG :

    Matomo tag manager event tracking
    Matomo tag manager event tracking

    Then you can move to the last part.

    3 – Publish your work

    Tag Managers are very powerful as they allow you to easily execute any JavaScript code, CSS or even text content on your websites.

    That’s why when you create your tag it doesn’t go live straight away on your website. In order to do this you need to publish your tag and this is what the “Publish” category is designed for :

    Matomo tag manager event tracking

    After that, click on the second button if you’re confident your tag and trigger are both ready to go live :

    Matomo event tracking tag manager

    4 – Enjoy

    Well done. As your tag is now live, every click made on this button will now be pushed to your Matomo Analytics account within :

    1. The visitor log report :

    Matomo event tracking tag manager

    2. The events report :

    Matomo event tracking tag manager

    You may now be asking, “That’s great, but can I collect something more exciting than clicks ?” 

    Of course you can ! This is what the Matomo Tag Manager is all about.

    As long as you can express it through a trigger you can really push whatever you want to Matomo Analytics. You can track scrolling patterns, an element visible on the page like an image, an ad or the time spent on the page. The options are now open to you with Tag Manager.

    Give them a try ! Change the triggers, start playing around with variables and discover that the possibilities are endless.

    Happy analytics,
    Matomo team