Recherche avancée

Médias (91)

Autres articles (40)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (7748)

  • 5 Key Benefits of Using a Tag Manager

    12 décembre 2021, par erin — Analytics Tips, Marketing

    Websites today have become very complex to manage, and as you continue to look for ways to optimise your website, you’ll want to consider using a Tag Manager

    A Tag Manager will help your marketing team seamlessly track how your visitors are engaging with your website’s elements. Without a Tag Manager, you are missing out on business-altering insights.

    In this blog, we’ll cover :

    Tag Manager overview 

    A Tag Manager (AKA Tag Management System or TMS) is a centralised system for implementing, managing and tracking events. A tag is just another word for a piece of code on a website that tracks a specific event. 

    An example of a tag tracking code might be Facebook pixels, ad conversions and other website activities such as signing up to a newsletter or PDF download. 

    Triggers are the actual actions that website visitors take that activate the tag. Examples of triggers are things like : 

    • A thank you page view to show that a visitor has completed a conversion action
    • Clicking a download or sign up button 
    • Scroll depth or how far down users are scrolling on your webpage 

    Each of these will give you insights into how your website is performing and how your users are engaging with your content. Going back to the scroll depth trigger example, this would be particularly helpful for validating bounce rate and finding out where users are dropping off on a page. Discover other ways to take advantage of tags and event tracking

    Tag Manager

    5 key benefits of a Tag Manager

    1. Removes the risks of website downtime 

    Tags are powerful for in-depth web analytics. However, tagging opens up the potential for non-technical team members to break the front-end of your website in a couple of clicks. 

    A Tag Manager reduces that risk. For example, Matomo Tag Manager lets you preview tags to see if they are firing before pushing them live. You can also give specific users restricted access so you can approve any tagging before it goes live. 

    Tag Managers protect the functionality of your website and ensure that there is no downtime.

    2. Your website will load faster 

    When it comes to the success of your website, page speed is one of the most important factors. 

    Each time you add a tag to your site, you run the risk of slowing down the page speed. This can quickly build up to a poor performing site and frustrate your visitors.

    You can’t track tags if visitors won’t even stay long enough for your site to load. In fact, 1 in 4 visitors would abandon a website that takes more than 4 seconds to load. According to Deloitte, just a 0.1 second difference in loading speed can affect every step of your customer journey. 

    A Tag Manager, on the other hand, is a lightweight option only requiring one single tag. Using a Tag Manager to track events can make all the difference to your website’s performance and user experience.

    3. Greater efficiency for marketing

    Time is critical in marketing. The longer it takes for a campaign to launch, the greater the chances are that you’re missing out on sales opportunities.

    Waiting for the IT team to tag a thank you page before setting an ad live is inefficient and impacts your bottom line.

    Equipping marketing with a Tag Manager means that they’ll be able to launch campaigns faster and more effectively.

    Check out our Marketer’s Guide to Successful Website Event Tracking for more.

    4. Control all of your tracking and marketing tags in one place 

    Keeping track of what tags are on your site and where they’re located is a complicated task if you aren’t using a Tag Manager. Unmanaged tags can quickly pile up and result in errors with your analytics, like counting conversions twice. 

    Using a Tag Manager to centralise your tags in one easy to manage place reduces the chances of human errors. Instead, your team will be able to quickly see what tags are already in place so they aren’t doubling up on tracking.

    5. Reduce work for the IT team 

    Let’s face it, the IT team has more critical tasks at hand than adding tags to the website. Freeing up your IT team to focus on higher priority tasks should always be a goal.

    Tagging, while crucial for marketing, has the potential to create a lot of extra work for your website developers. Inserting code for each individual tag is time-consuming and means you aren’t collecting data in the meantime.

    Rather than overloading your IT team, empower your marketing team with the ability to add tags with a few clicks. 

    How to choose a Tag Management System

    There are many tools to choose from and the default option tends to be Google Tag Manager (GTM). But before you implement GTM or any other Tag Management Solution, we highly recommend asking these questions :

    1. What are my goals for a Tag Manager ? Before purchasing a Tag Manager, or any tool for that matter, understanding your goals upfront is best practice.
    2. Does the solution offer Tag Manager training resources ? If online Tag Manager training and educational resources are available for the tool, then you’ll be able to hit the ground running and start to see an ROI instantly.
    3. Can I get online support ? In case you need any help with the tool, having access to online support is a big bonus. 
    4. Is it compliant with privacy regulations ? If your business is already compliant, in the process of becoming compliant or future-proofing your tech stack for looming privacy regulations, then researching this is crucial. 
    5. How much does it cost ? If it’s “free”, find out how and why. In most cases, free solutions are just vehicles for collecting data to advertise to your users. 
    6. What do others think about the Tag Manager ? Check out reviews on sites like Capterra or G2 to find out how other businesses rate the tool. 

    Google Tag Manager alternative

    As privacy becomes a greater concern globally for end-users and governments, many businesses are looking for alternatives to the world’s largest advertising company – Google.

    Matomo Tag Manager is more than a Google Tag Manager alternative. With Matomo Tag Manager, you get a GDPR, HIPAA, CCPA and PECR compliant, open source Tag Manager and your data is 100% yours to own.

    Plus, with Matomo Tag Manager you only need one single tracking code for all of your website and tag analytics. No matter what you are tracking (scrolls, clicks, downloads, Heatmaps, visits, etc.), you will only ever need one piece of code on your website and one tool to manage it all. 

    The takeaway 

    Tagging is powerful but can quickly become complicated, risky and time-consuming. Tag Managers reduce these obstacles allowing you to set tags and triggers effortlessly. It empowers marketing teams, streamlines processes and removes the reliance on IT.

    Ready to try Matomo Tag Manager ? Start your 21-day free trial now – no credit card required. 

  • Laravel FFMpeg encoding failed [on hold]

    18 février 2019, par Diego Fernández

    I’m using Laravel FFMpeg to encode videos and create thumbnails, but none of them are working. Whenever I try to create a thumbnail or encode a video I get following error :

    ffmpeg failed to execute command '/usr/local/bin/ffmpeg' '-y' '-i' '/home/diego/dynamic4/bg/storage/app/public/activity/4942/cLCbKyLiGqbOb0M5JDtvNXUdzSxFGj9ts6sDZb4D.mp4' '-threads' '12' '-vcodec' 'libx264' '-acodec' 'libfaac' '-b:v' '1000k' '-refs' '6' '-coder' '1' '-sc_threshold' '40' '-flags' '+loop' '-me_range' '16' '-subq' '7' '-i_qfactor' '0.71' '-qcomp' '0.6' '-qdiff' '4' '-trellis' '1' '-b:a' '128k' '-pass' '1' '-passlogfile' '/tmp/ffmpeg-passes5c6378517cace4u1cg/pass-5c6378517cb33' '/home/diego/dynamic4/bg/storage/app/public/1234.mp4'

    If I check that error on console I get this :

    ffmpeg failed to execute command '/usr/local/bin/ffmpeg' '-y' '-i' '/home/diego/dynamic4/bg/storage/app/public/activity/4942/cLCbKyLiGqbOb0M5JDtvNXUdzSxFGj9ts6sDZb4D.mp4' '-threads' '12' '-vcodec' 'libx264' '-acodec' 'libfaac' '-b:v' '1000k' '-refs' '6' '-coder' '1' '-sc_threshold' '40' '-flags' '+loop' '-me_range' '16' '-subq' '7' '-i_qfactor' '0.71' '-qcomp' '0.6' '-qdiff' '4' '-trellis' '1' '-b:a' '128k' '-pass' '1' '-passlogfile' '/tmp/ffmpeg-passes5c6377a214b41rk6ao/pass-5c6377a214b7b' '/tmp/laravel-ffmpegObuaI1.mp4'
    ffmpeg version 4.1-1~18.04.york1 Copyright (c) 2000-2018 the FFmpeg developers
     built with gcc 7 (Ubuntu 7.3.0-27ubuntu1~18.04)
     configuration: --prefix=/usr --extra-version='1~18.04.york1' --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
     libavutil      56. 22.100 / 56. 22.100
     libavcodec     58. 35.100 / 58. 35.100
     libavformat    58. 20.100 / 58. 20.100
     libavdevice    58.  5.100 / 58.  5.100
     libavfilter     7. 40.101 /  7. 40.101
     libavresample   4.  0.  0 /  4.  0.  0
     libswscale      5.  3.100 /  5.  3.100
     libswresample   3.  3.100 /  3.  3.100
     libpostproc    55.  3.100 / 55.  3.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/diego/dynamic4/bg/storage/app/public/activity/4942/cLCbKyLiGqbOb0M5JDtvNXUdzSxFGj9ts6sDZb4D.mp4':
     Metadata:
       major_brand     : mp42
       minor_version   : 1
       compatible_brands: mp41mp42isom
       creation_time   : 2018-10-22T15:38:46.000000Z
     Duration: 00:00:58.36, start: 0.000000, bitrate: 1400 kb/s
       Stream #0:0(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 848x480, 1334 kb/s, 30.01 fps, 30 tbr, 600 tbn, 1200 tbc (default)
       Metadata:
         creation_time   : 2018-10-22T15:38:46.000000Z
         handler_name    : Core Media Video
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 62 kb/s (default)
       Metadata:
         creation_time   : 2018-10-22T15:38:46.000000Z
         handler_name    : Core Media Audio
    [NULL @ 0x55fecc7a0280] Unable to find a suitable output format for 'failed'
    failed: Invalid argument

    I have checked permissions and everything looks ok. I have also checked the video I’m trying to encode exists. It does, and apparently it get properly loaded. It seems to fail when trying to save encoded file.
    I spent one day doing research, I tried with different audio & video encoding, different routes and filesystems, but I couldn’t make it work.
    I have also tried to check that passlogfile (/tmp/ffmpeg-passes5c6377a214b41rk6ao/pass-5c6377a214b7b) but as it gets stored under /tmp I can’t gain access to it.

    This is the code I’m using to encode videos in my controller :

    $folder = 'activity/4942';
    $filename = 'cLCbKyLiGqbOb0M5JDtvNXUdzSxFGj9ts6sDZb4D.mp4';
    $new_filename = 'storage/activity/4942/1234.mp4';
    $format = new FFMpeg\Format\Video\X264();
    $video = FFMpeg::fromDisk('public')->open($folder . '/' . $filename);
    $video->export()->toDisk('public')->inFormat($format)->save($new_filename);

    I have debugged that piece of code and video seems to get loaded properly. It crashes when tries to save the final video, in last lane of code.

    This is the configuration in filesystems.php :

       'disks' => [

           'local' => [
               'driver' => 'local',
               'root' => storage_path('app'),
           ],

           'public' => [
               'driver' => 'local',
               'root' => storage_path('app/public'),
               'visibility' => 'public',
           ],

       ],

    Any help much appreciated, thanks !

  • How to write UI tests for your plugin – Introducing the Piwik Platform

    18 février 2015, par Thomas Steur — Development

    This is the next post of our blog series where we introduce the capabilities of the Piwik platform (our previous post was How to write unit tests for your plugin). This time you’ll learn how to write UI tests in Piwik. For this tutorial you will need to have basic knowledge of JavaScript and the Piwik platform.

    What is a UI test ?

    Some might know a UI test under the term ‘CSS test’ or ‘screenshot test’. When we speak of UI tests we mean automated tests that capture a screenshot of a URL and then compare the result with an expected image. If the images are not exactly the same the test will fail. For more information read our blog post about UI Testing.

    What is a UI test good for ?

    We use them to test our PHP Controllers, Twig templates, CSS, and indirectly test our JavaScript. We do usually not write Unit or Integration tests for our controllers. For example we use UI tests to ensure that the installation, the login and the update process works as expected. We also have tests for most pages, reports, settings, etc. This increases the quality of our product and saves us a lot of time as it is easy to write and maintain such tests. All UI tests are executed on Travis after each commit and compared with our expected screenshots.

    Getting started

    In this post, we assume that you have already installed Piwik 2.11.0 or later via git, set up your development environment and created a plugin. If not, visit the Piwik Developer Zone where you’ll find the tutorial Setting up Piwik and other Guides that help you to develop a plugin.

    Next you need to install the needed packages to execute UI tests.

    Let’s create a UI test

    We start by using the Piwik Console to create a new UI test :

    ./console generate:test --testtype ui

    The command will ask you to enter the name of the plugin the created test should belong to. I will use the plugin name “Widgetize”. Next it will ask you for the name of the test. Here you usually enter the name of the page or report you want to test. I will use the name “WidgetizePage” in this example. There should now be a file plugins/Widgetize/tests/UI/WidgetizePage_spec.js which contains already an example to get you started easily :

    describe("WidgetizePage", function () {
       var generalParams = 'idSite=1&period=day&date=2010-01-03';

       it('should load a simple page by its module and action', function (done) {
           var screenshotName = 'simplePage';
           // will save image in "processed-ui-screenshots/WidgetizePageTest_simplePage.png"

           expect.screenshot(screenshotName).to.be.capture(function (page) {
               var urlToTest = "?" + generalParams + "&module=Widgetize&action=index";
               page.load(urlToTest);
           }, done);
       });
    });

    What is happening here ?

    This example declares a new set of specs by calling the method describe(name, callback) and within that a new spec by calling the method it(description, func). Within the spec we load a URL and once loaded capture a screenshot of the whole page. The captured screenshot will be saved under the defined screenshotName. You might have noticed we write our UI tests in BDD style.

    Capturing only a part of the page

    It is good practice to not always capture the full page. For example many pages contain a menu and if you change that menu, all your screenshot tests would fail. To avoid this you would instead have a separate test for your menu. To capture only a part of the page simply specify a jQuery selector and call the method captureSelector instead of capture :

    var contentSelector = '#selector1, .selector2 .selector3';
    // Only the content of both selectors will be in visible in the captured screenshot
    expect.screenshot('page_partial').to.be.captureSelector(contentSelector, function (page) {
       page.load(urlToTest);
    }, done);

    Hiding content

    There is a known issue with sparklines that can fail tests randomly. Also version numbers or a date that changes from time to time can fail tests without actually having an error. To avoid this you can prevent elements from being visible in the captured screenshot via CSS as we add a CSS class called uiTest to the HTML element while tests are running.

    .uiTest .version { visibility:hidden }

    Running a test

    To run the previously generated tests we will use the command tests:run-ui :

    ./console tests:run-ui WidgetizePage

    After running the tests for the first time you will notice a new folder plugins/PLUGINNAME/tests/UI/processed-ui-screenshots in your plugin. If everything worked, there will be an image for every captured screenshot. If you’re happy with the result it is time to copy the file over to the expected-ui-screenshots folder, otherwise you have to adjust your test until you get the result you want. From now on, the newly captured screenshots will be compared with the expected images whenever you execute the tests.

    Fixing a test

    At some point your UI test will fail, for example due to expected CSS changes. To fix a test all you have to do is to copy the captured screenshot from the folder processed-ui-screenshots to the folder expected-ui-screenshots.

    Executing the UI tests on Travis

    In case you have not generated a .travis.yml file for your plugin yet you can do this by executing the following command :

    ./console generate:travis-yml --plugin PLUGINNAME

    Next you have to activate Travis for your repository.

    Advanced features

    Isn’t it easy to create a UI test ? We never even created a file ! Of course you can accomplish even more if you want. For example you can specify a fixture to be inserted before running the tests which is useful when your plugin requires custom data. You can also control the browser as it was a human by clicking, moving the mouse, typing text, etc. If you want to discover more features have a look at our existing test cases.

    If you have any feedback regarding our APIs or our guides in the Developer Zone feel free to send it to us.