Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (24)

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

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

Sur d’autres sites (5706)

  • Things I Have Learned About Emscripten

    1er septembre 2015, par Multimedia Mike — Cirrus Retro

    3 years ago, I released my Game Music Appreciation project, a website with a ludicrously uninspired title which allowed users a relatively frictionless method to experience a range of specialized music files related to old video games. However, the site required use of a special Chrome plugin. Ever since that initial release, my #1 most requested feature has been for a pure JavaScript version of the music player.

    “Impossible !” I exclaimed. “There’s no way JS could ever run fast enough to run these CPU emulators and audio synthesizers in real time, and allow for the visualization that I demand !” Well, I’m pleased to report that I have proved me wrong. I recently quietly launched a new site with what I hope is a catchier title, meant to evoke a cloud-based retro-music-as-a-service product : Cirrus Retro. Right now, it’s basically the same as the old site, but without the wonky Chrome-specific technology.

    Along the way, I’ve learned a few things about using Emscripten that I thought might be useful to share with other people who wish to embark on a similar journey. This is geared more towards someone who has a stronger low-level background (such as C/C++) vs. high-level (like JavaScript).

    General Goals
    Do you want to cross-compile an entire desktop application, one that relies on an extensive GUI toolkit ? That might be difficult (though I believe there is a path for porting qt code directly with Emscripten). Your better wager might be to abstract out the core logic and processes of the program and then create a new web UI to access them.

    Do you want to compile a game that basically just paints stuff to a 2D canvas ? You’re in luck ! Emscripten has a porting path for SDL. Make a version of your C/C++ software that targets SDL (generally not a tall order) and then compile that with Emscripten.

    Do you just want to cross-compile some functionality that lives in a library ? That’s what I’ve done with the Cirrus Retro project. For this, plan to compile the library into a JS file that exports some public functions that other, higher-level, native JS (i.e., JS written by a human and not a computer) will invoke.

    Memory Levels
    When porting C/C++ software to JavaScript using Emscripten, you have to think on 2 different levels. Or perhaps you need to force JavaScript into a low level C lens, especially if you want to write native JS code that will interact with Emscripten-compiled code. This often means somehow allocating chunks of memory via JS and passing them to the Emscripten-compiled functions. And you wouldn’t believe the type of gymnastics you need to execute to get native JS and Emscripten-compiled JS to cooperate.

    “Emscripten : Pointers and Pointers” is the best (and, really, ONLY) explanation I could find for understanding the basic mechanics of this process, at least when I started this journey. However, there’s a mistake in the explanation that left me confused for a little while, and I’m at a loss to contact the author (doesn’t anyone post a simple email address anymore ?).

    Per the best of my understanding, Emscripten allocates a large JS array and calls that the memory space that the compiled C/C++ code is allowed to operate in. A pointer in C/C++ code will just be an index into that mighty array. Really, that’s not too far off from how a low-level program process is supposed to view memory– as a flat array.

    Eventually, I just learned to cargo-cult my way through the memory allocation process. Here’s the JS code for allocating an Emscripten-compatible byte buffer, taken from my test harness (more on that later) :

    var musicBuffer = fs.readFileSync(testSpec[’filename’]) ;
    var musicBufferBytes = new Uint8Array(musicBuffer) ;
    var bytesMalloc = player._malloc(musicBufferBytes.length) ;
    var bytes = new Uint8Array(player.HEAPU8.buffer, bytesMalloc, musicBufferBytes.length) ;
    bytes.set(new Uint8Array(musicBufferBytes.buffer)) ;
    

    So, read the array of bytes from some input source, create a Uint8Array from the bytes, use the Emscripten _malloc() function to allocate enough bytes from the Emscripten memory array for the input bytes, then create a new array… then copy the bytes…

    You know what ? It’s late and I can’t remember how it works exactly, but it does. It has been a few months since I touched that code (been fighting with front-end website tech since then). You write that memory allocation code enough times and it begins to make sense, and then you hope you don’t have to write it too many more times.

    Multithreading
    You can’t port multithreaded code to JS via Emscripten. JavaScript has no notion of threads ! If you don’t understand the computer science behind this limitation, a more thorough explanation is beyond the scope of this post. But trust me, I’ve thought about it a lot. In fact, the official Emscripten literature states that you should be able to port most any C/C++ code as long as 1) none of the code is proprietary (i.e., all the raw source is available) ; and 2) there are no threads.

    Yes, I read about the experimental pthreads support added to Emscripten recently. Don’t get too excited ; that won’t be ready and widespread for a long time to come as it relies on a new browser API. In the meantime, figure out how to make your multithreaded C/C++ code run in a single thread if you want it to run in a browser.

    Printing Facility
    Eventually, getting software to work boils down to debugging, and the most primitive tool in many a programmer’s toolbox is the humble print statement. A print statement allows you to inspect a piece of a program’s state at key junctures. Eventually, when you try to cross-compile C/C++ code to JS using Emscripten, something is not going to work correctly in the generated JS “object code” and you need to understand what. You’ll be pleading for a method of just inspecting one variable deep in the original C/C++ code.

    I came up with this simple printf-workalike called emprintf() :

    #ifndef EMPRINTF_H
    #define EMPRINTF_H
    

    #include <stdio .h>
    #include <stdarg .h>
    #include <emscripten .h>

    #define MAX_MSG_LEN 1000

    /* NOTE : Don’t pass format strings that contain single quote (’) or newline
    * characters. */
    static void emprintf(const char *format, ...)

    char msg[MAX_MSG_LEN] ;
    char consoleMsg[MAX_MSG_LEN + 16] ;
    va_list args ;

    /* create the string */
    va_start(args, format) ;
    vsnprintf(msg, MAX_MSG_LEN, format, args) ;
    va_end(args) ;

    /* wrap the string in a console.log(’’) statement */
    snprintf(consoleMsg, MAX_MSG_LEN + 16, "console.log(’%s’)", msg) ;

    /* send the final string to the JavaScript console */
    emscripten_run_script(consoleMsg) ;

    #endif /* EMPRINTF_H */

    Put it in a file called “emprint.h”. Include it into any C/C++ file where you need debugging visibility, use emprintf() as a replacement for printf() and the output will magically show up on the browser’s JavaScript debug console. Heed the comments and don’t put any single quotes or newlines in strings, and keep it under 1000 characters. I didn’t say it was perfect, but it has helped me a lot in my Emscripten adventures.

    Optimization Levels
    Remember to turn on optimization when compiling. I have empirically found that optimizing for size (-Os) leads to the best performance all around, in addition to having the smallest size. Just be sure to specify some optimization level. If you don’t, the default is -O0 which offers horrible performance when running in JS.

    Static Compression For HTTP Delivery
    JavaScript code compresses pretty efficiently, even after it has been optimized for size using -Os. I routinely see compression ratios between 3.5:1 and 5:1 using gzip.

    Web servers in this day and age are supposed to be smart enough to detect when a requesting web browser can accept gzip-compressed data and do the compression on the fly. They’re even supposed to be smart enough to cache compressed output so the same content is not recompressed for each request. I would have to set up a series of tests to establish whether either of the foregoing assertions are correct and I can’t be bothered. Instead, I took it into my own hands. The trick is to pre-compress the JS files and then instruct the webserver to serve these files with a ‘Content-Type’ of ‘application/javascript’ and a ‘Content-Encoding’ of ‘gzip’.

    1. Compress your large Emscripten-build JS files with ‘gzip’ : ‘gzip compiled-code.js’
    2. Rename them from extension .js.gz to .jsgz
    3. Tell the webserver to deliver .jsgz files with the correct Content-Type and Content-Encoding headers

    To do that last step with Apache, specify these lines :

    AddType application/javascript jsgz
    AddEncoding gzip jsgz
    

    They belong in either a directory’s .htaccess file or in the sitewide configuration (/etc/apache2/mods-available/mime.conf works on my setup).

    Build System and Build Time Optimization
    Oh goodie, build systems ! I had a very specific manner in which I wanted to build my JS modules using Emscripten. Can I possibly coerce any of the many popular build systems to do this ? It has been a few months since I worked on this problem specifically but I seem to recall that the build systems I tried to used would freak out at the prospect of compiling stuff to a final binary target of .js.

    I had high hopes for Bazel, which Google released while I was developing Cirrus Retro. Surely, this is software that has been battle-tested in the harshest conditions of one of the most prominent software-developing companies in the world, needing to take into account the most bizarre corner cases and still build efficiently and correctly every time. And I have little doubt that it fulfills the order. Similarly, I’m confident that Google also has a team of no fewer than 100 or so people dedicated to developing and supporting the project within the organization. When you only have, at best, 1-2 hours per night to work on projects like this, you prefer not to fight with such cutting edge technology and after losing 2 or 3 nights trying to make a go of Bazel, I eventually put it aside.

    I also tried to use Autotools. It failed horribly for me, mostly for my own carelessness and lack of early-project source control.

    After that, it was strictly vanilla makefiles with no real dependency management. But you know what helps in these cases ? ccache ! Or at least, it would if it didn’t fail with Emscripten.

    Quick tip : ccache has trouble with LLVM unless you set the CCACHE_CPP2 environment variable (e.g. : “export CCACHE_CPP2=1”). I don’t remember the specifics, but it magically fixes things. Then, the lazy build process becomes “make clean && make”.

    Testing
    If you have never used Node.js, testing Emscripten-compiled JS code might be a good opportunity to start. I was able to use Node.js to great effect for testing the individually-compiled music player modules, wiring up a series of invocations using Python for a broader test suite (wouldn’t want to go too deep down the JS rabbit hole, after all).

    Be advised that Node.js doesn’t enjoy the same kind of JIT optimizations that the browser engines leverage. Thus, in the case of time critical code like, say, an audio synthesis library, the code might not run in real time. But as long as it produces the correct bitwise waveform, that’s good enough for continuous integration.

    Also, if you have largely been a low-level programmer for your whole career and are generally unfamiliar with the world of single-threaded, event-driven, callback-oriented programming, you might be in for a bit of a shock. When I wanted to learn how to read the contents of a file in Node.js, this is the first tutorial I found on the matter. I thought the code presented was a parody of bad coding style :

    var fs = require("fs") ;
    var fileName = "foo.txt" ;
    

    fs.exists(fileName, function(exists)
    if (exists)
    fs.stat(fileName, function(error, stats)
    fs.open(fileName, "r", function(error, fd)
    var buffer = new Buffer(stats.size) ;

    fs.read(fd, buffer, 0, buffer.length, null, function(error, bytesRead, buffer)
    var data = buffer.toString("utf8", 0, buffer.length) ;

    console.log(data) ;
    fs.close(fd) ;
    ) ;
    ) ;
    ) ;
    ) ;

    Apparently, this kind of thing doesn’t raise an eyebrow in the JS world.

    Now, I understand and respect the JS programming model. But this was seriously frustrating when I first encountered it because a simple script like the one I was trying to write just has an ordered list of tasks to complete. When it asks for bytes from a file, it really has nothing better to do than to wait for the answer.

    Thankfully, it turns out that Node’s fs module includes synchronous versions of the various file access functions. So it’s all good.

    Conclusion
    I’m sure I missed or underexplained some things. But if other brave souls are interested in dipping their toes in the waters of Emscripten, I hope these tips will come in handy.

  • Why Matomo is a serious alternative to Google Analytics 360

    12 décembre 2018, par Jake Thornton — Marketing

    There’s no doubt about it, the free version of Google Analytics offers great value when it comes to making data-driven decisions for your business. But as your business starts to grow, so does the need for a more powerful web analytics tool.

    Why would I need to use a different web analytics tool ? It’s because Google Analytics (free version) is very limited when it comes to meeting the needs of a fast growing business whose website plays a pivotal role in converting its customers.

    This is where the Google Analytics 360 suite comes in, which is designed to meet the needs of businesses looking to get more accurate and insightful metrics.

    So what’s holding a growing business back from using Google Analytics 360 ?

    While GA360 sounds like a great option when upgrading your web analytics platform, we have found there are three core reasons holding businesses back from taking the leap :

    • Businesses can’t bear to swallow the US$150,000+ price tag (per year !) that comes with upgrading
    • Businesses can’t rely on GA360 to give them all the insights they need
    • Businesses want more control and ownership of their data

    Thankfully there are (only a few) alternatives and as the leading open-source alternative to Google Analytics, we hope to share insights on why Matomo Analytics can be the perfect solution for anyone at this crossroads in their web analytics journey.

    First, what does Google Analytics 360 offer that Google Analytics (free) doesn’t ?

    There’s no doubt about it, the GA360 suite is designed for larger sized businesses with demanding data limits, big budgets to use across the Google Marketing Platform (Google Adwords, DoubleClick etc.) and to get more advanced reporting visualisations and options.

    Data Sampling

    Data sampling is the elephant in the room when it comes to comparing GA360 with the freemium version. This is an entire article in its own right but at a basic level, Google Analytics samples your data (makes assumptions based on patterns) once the number of traffic visiting your website reaches a certain limit.

    Google Analytics provides the following information :

    Ad-hoc queries of your data are subject to the following general thresholds for sampling :

    Analytics Standard : 500k sessions at the property level for the date range you are using

    Analytics 360 : 100M sessions at the view level for the date range you are using

    In short, sampled data means inaccurate data. This is why as businesses grow, GA360 becomes a more attractive prospect because there’s no point making data-driven business decisions based on inaccurate data. This is a key weapon Google uses when selling to large businesses, however, this may not seem as concerning if you’re a small business within the sampled data range. For small businesses though, make sure you know the full extent of how this can affect your metrics, for example, your ecommerce data could be sampled, hence your GA reporting not matching your CRM/Ecommerce store data.

    Benefit of using Matomo : There is no data sampling anywhere in Matomo Analytics, that’s why we say 100% Accurate Data reporting across all plans.

    All Matomo data is 100% accurate

    Integration with the Google Marketing Platform

    Yes ok, we’ll admit it, GA does a great job at integrating seamlessly with its own products like Google Ads, Google Optimize etc. with a touch of Salesforce integration ; while GA360 takes this to another level compared to it’s freemium version (integration with Google Search 360, Google Display & Video 360 etc.)

    But… what about non-Google advertising platforms ? Well with Google being a dominant leader as a search engine, web browser, email provider, social media channel ; sometimes Google needs to keep its best interests at heart.

    Google is an online advertising giant and a bonus of Google Search 360 is that you can integrate your Bing Ads, Baidu and Yahoo Japan Search campaigns but that’s about it when it comes to integrations from its direct competitors. 

    Benefit of using Matomo : No biased treatment. You can integrate your Google, Yahoo and Bing search consoles for accurate search engine reporting, and in early 2019, Matomo will be releasing a Google Ads, Bing Ads and Facebook Ads Manager integration feature.

    Roll-Up Reporting
    Roll-Up Reporting for Matomo Nalytics

    Roll-up reporting lets you combine multiple accounts and properties into one view. This is a great benefit when upgrading from GA freemium to GA360. For example, if you’re a digital agency with multiple clients or you manage multiple websites under the one account, the roll-up reporting feature is wonderful when you need to combine data and reporting, instantly.

    Benefit of using Matomo : Matomo’s got this covered ! Roll-up reporting is available in the Matomo Business package (starting at $29 per month) for cloud hosting or you can purchase as a Premium Feature for On-Premise starting at $99 per year.

    Staying in full control of your data

    Who would have thought that one of biggest reasons people choose Matomo isn’t because of anything that leads to a higher ROI, but for the fact that users want more control of their data.
    100% Data Ownership with Matomo

    Matomo’s philosophy around data ownership is simple, you own your data, no one else. If you choose to host Matomo Analytics On-Premise then you are in complete control because your data is stored on your own servers where no one can gain access to it in whichever country you choose.

    So what about when you cloud host Matomo ? For users who don’t have the technical knowledge to host Matomo On-Premise, you can still have 100% data ownership and fully respect your user’s privacy when choosing to host Matomo Analytics through our cloud service.

    The difference between cloud hosting Matomo Analytics vs Google Analytics is that when you choose Matomo, we acknowledge you own the data and we have no right to access it. This means we can’t on-sell it to third-parties, we can’t claim ownership of it, you can export your data at anytime (how awesome is that !) and you can migrate between cloud hosting and hosting on-premise for ultimate flexibility whenever you want.

    Matomo also prides itself in allowing its users to be GDPR compliant with ease with a powerful GDPR Manager.

    Businesses can’t rely on Google Analytics 360 to give them all the insights they need

    Unlike Google Analytics 360, Matomo blends its Premium Web Analytics platform with Conversion Optimization features to allow its users to fully evaluate the user-experience on your website.

    Matomo is designed to be a complete analytics platform, meaning you have everything you need all in the one place which gives you greater insights and better business outcomes.

    Matomo Complete Analytics
    These features include :

    Premium Web Analytics – You can still (accurately) measure all the basic metrics you love and are familiar with in Google Analytics like Location, Referrer traffic, Multi Attribution, Campaign Tracking and Ecommerce etc.

    Conversion Optimization – Eliminate the need for multiple analytics tools to get what Google Analytics doesn’t offer. These features include Heatmaps, Session Recordings, Form Analytics and more – giving you the best chance possible to convert more traffic by evaluating the user-experience.

    By having one tool for all your features you can integrate metrics, have one single view for all your data and it’s easy to use.

    Enhanced SEO – Get more insights into the performance of your search campaigns with unbiased search engine reporting, keyword ranking positions, integration with multiple search consoles and crawling stats. Google Analytics offers limited features to help with your SEO campaigns and only integrates with Google products.

    Visitor Profiles – Get a detailed life-time evaluation of every user who visits your website.

    Tag Manager – A powerful open-source Tag Manager tool to embed your third-party marketing tags. By being open-source and with our commitment to giving you 100% data ownership, you can always ensure you are in full control.

    Just putting it out there ...

    Google leads the market with its freemium tool which offers great insights for businesses (fyi – Matomo has a forever free analytics tool too !), but when it comes to upgrading to get accurate reporting (kind of a big deal), owning your own data (a huge deal !) and having a complete range of features to excel ROI for your business, Matomo Analytics is often a preferred option to the Google Analytics 360 suite.

    Matomo is designed to be easy to use, is fully flexible and gives users full peace of mind by respecting user privacy. Want to learn more about the benefits of Matomo ?

  • CJEU rules US cloud servers don’t comply with GDPR and what this means for web analytics

    17 juillet 2020, par Jake Thornton

    Breaking news : On July 16, 2020, the Court of Justice of the European Union (CJEU) has ruled that any cloud services hosted in the US are incapable of complying with the GDPR and EU privacy laws.

    In August 2016, the EU-US Privacy Shield framework came into effect, which “protects the fundamental rights of anyone in the EU whose personal data is transferred to the United States for commercial purposes. It allows the free transfer of data to companies that are certified in the US under the Privacy Shield.” – European Commission website

    However after today’s CJEU ruling, this Privacy Shield framework became invalidated due to significant differences between EU and US privacy laws.

    European privacy law activist Max Schrems summarises with “The Court clarified for a second time now that there is a clash between EU privacy law and US surveillance law. As the EU will not change its fundamental rights to please the NSA, the only way to overcome this clash is for the US to introduce solid privacy rights for all people – including foreigners. Surveillance reform thereby becomes crucial for the business interests of Silicon Valley.” – noyb website

    Today’s ruling also continues to spark concern into the legitimacy of US privacy laws which doesn’t fully protect people’s personal data when hosted on cloud servers based in the US.

    Web analytics hosted on US cloud servers don’t comply with GDPR

    How will this affect you ?

    For any business operating a website in the EU or if you have traffic coming to your website from EU visitors, you need to know what data you’re capturing and where this data is being stored.

    Here’s what Maja Smoltczyk (Berlin’s Commissioner for Data Protection and Freedom of Information) says :

    Controllers who transfer personal data to the USA, especially when using cloud-based services, are now required to switch immediately to service providers based in the European Union or a country that can
    ensure an adequate level of data protection. 
    The CJEU has made it refreshingly clear that data exports are not just financial decisions, as people’s fundamental rights must also be considered as a matter of priority. This ruling will put
    an end to the transfer of personal data to the USA
    for the sake of convenience or to cut costs.

    The controller is you (not Google) and by transferring data to the US you are at risk of being fined up to €20 million or 4% of your annual worldwide turnover for not being GDPR compliant. 

    It’s you who has to take action, not Google or other US companies. The court’s decision has immediate effect. While we assume there will be a grace period, companies should act now as finding and implementing alternatives solution can take a while. 

    Can no data be exported outside the EU anymore ?

    Data can still be exported outside the EU if an adequate level of data protection is guaranteed. This is the case for some trading partners of the EU such as New Zealand, Japan, Switzerland, and Canada. They have been certified by the EU as having a comparable level of privacy protection and therefore demonstrate adequacy at a country level.

    Necessary data can still flow to countries like the US too. This is for example the case when someone books a hotel in the US or when sending an email to someone in the US. Backups for disaster recovery and most other reasons don’t qualify as necessary.

    In all other cases you can still send data to countries like the US if you get explicit and informed consent from a user. Meaning the user has been informed about all possible risks of sending the data to the US and who can access the data (for example the US government).

    How this affects Google Analytics and Google Tag Manager users

    If your website is using Google Analytics, the safest bet is to deactivate it immediately. Otherwise, you must ask for consent from everyone who visits your website and inform them that the data will be processed in the United States under less strict privacy laws and all associated risks. If you don’t, you could be liable to privacy law infringements and face being fined for not complying with the GDPR. This also applies to Google Tag Manager as it transfers the IP address to the US which is considered personal data under the GDPR.

    Consent needs to be :

    • Freely given (the user must have a choice to not give consent and be able to opt out at any time) 
    • Informed (you need to disclose who is processing the data, what data is processed, where the data will be stored and how to opt out) 
    • Specific (consent is only valid for the specific informed purpose) 
    • Unambiguous (for example pre-ticked boxes or similar aren’t allowed)
    Web analytics that complies with GDPR

    If users don’t give you consent, you are not allowed to track them using Google Analytics or any other US based cloud solution.

    Update August 19, 2020

    A month after this ruling, over 100 complaints have been filed against websites for continuing to send data to the US via Google Analytics or Facebook, by the European privacy campaign group noyb. It’s clear Google and Facebook fall under US surveillance laws such as FISA 702 and the court clearly ruled these companies cannot rely on SCCs to transfer data to the US. Anyone still using Google Analytics is now at risk of facing fines and compensation damages

    How this affects Matomo users

    Our cloud servers are based in Germany.

    Matomo On-Premise users choose the location of their data themselves. If the servers are located in the EU nothing changes. If the servers are located outside the EU and the website targets EU users and tracks personal data, then you need to assess whether you are required to ask for tracking consent.

    If the data is stored inside the EU you can use Matomo without asking for any consent and you can continue tracking users even if they reject a consent screen which greatly increases the quality of your data.

    Want to avoid informing users about transferring their data to the US and all associated risks ?

    Try Matomo now for free ! No credit card required.