
Recherche avancée
Autres articles (68)
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
XMP PHP
13 mai 2011, parDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)
Sur d’autres sites (7750)
-
How To Play Hardware Accelerated Video on A Mac
28 mai 2013, par Multimedia Mike — GeneralI have a friend who was considering purchasing a Mac Mini recently. At the time of this writing, there are 3 desktop models (and 2 more “server” models).
The cheapest one is a Core i5 2.5 GHz. Then there are 2 Core i7 models : 2.3 GHz and 2.6 GHz. The difference between the latter 2 is US$100. The only appreciable technical difference is the extra 0.3 GHz and the choice came down to those 2.
He asked me which one would be able to play HD video at full frame rate. I found this query puzzling. But then, I have been “in the biz” for a bit too long. Whether or not a computer or device can play a video well depends on a lot of factors.
Hardware Support
First of all, looking at the raw speed of the general-purpose CPU inside of a computer as a gauge of video playback performance is generally misguided in this day and age. In general, we have a video standard (H.264, which I’ll focus on for this post) and many bits of hardware are able to accelerate decoding. So, the question is not whether the CPU can decode the data in real time, but can any other hardware in the device (likely the graphics hardware) handle it ? These machines have Intel HD 4000 graphics and, per my reading of the literature, they are capable of accelerating H.264 video decoding.Great, so the hardware supports accelerated decoding. So it’s a done deal, right ? Not quite…
Operating System Support
An application can’t do anything pertaining to hardware without permission from the operating system. So the next question is : Does Mac OS X allow an application to access accelerated video decoding hardware if it’s available ? This used to be a contentious matter (notably, Adobe Flash Player was unable to accelerate H.264 playback on Mac in the absence of such an API) but then Apple released an official API detailed in Technical Note TN2267.So, does this mean that video is magically accelerated ? Nope, we’re still not there yet…
Application Support
It’s great that all of these underlying pieces are in place, but if an individual application chooses to decode the video directly on the CPU, it’s all for naught. An application needs to query the facilities and direct data through the API if it wants to leverage the acceleration. Obviously, at this point it becomes a matter of “which application ?”My friend eventually opted to get the pricier of the desktop Mac Mini models and we ran some ad-hoc tests since I was curious how widespread the acceleration support is among Mac multimedia players. Here are some programs I wanted to test, playing 1080p H.264 :
- Apple QuickTime Player
- VLC
- YouTube with Flash Player (any browser)
- YouTube with Safari/HTML5
- YouTube with Chrome/HTML5
- YouTube with Firefox/HTML5
- Netflix
I didn’t take exhaustive notes but my impromptu tests revealed QuickTime Player was, far and away, the most performant player, occupying only around 5% of the CPU according to the Mac OS X System Profiler graph (which is likely largely spent on audio decoding).
VLC consistently required 20-30% CPU, so it’s probably leveraging some acceleration facilities. I think that Flash Player and the various HTML5 elements performed similarly (their multi-process architectures can make such a trivial profiling test difficult).
The outlier was Netflix running in Firefox via Microsoft’s Silverlight plugin. Of course, the inner workings of Netflix’s technology are opaque to outsiders and we don’t even know if it uses H.264. It may very well use Microsoft’s VC-1 which is not a capability provided by the Mac OS X acceleration API (it doesn’t look like the Intel HD 4000 chip can handle it either). I have never seen any data one way or another about how Netflix encodes video. However, I was able to see that Netflix required an enormous amount of CPU muscle on the Mac platform.
Conclusion
The foregoing is a slight simplification of the video playback pipeline. There are some other considerations, most notably how the video is displayed afterwards. To circle back around to the original question : Can the Mac Mini handle full HD video playback ? As my friend found, the meager Mac Mini can do an admirable job at playing full HD video without loading down the CPU. -
FFmpeg filter config with aecho fails to configure all the links and formats - avfilter_graph_config
23 janvier 2021, par cs guyI am following the official tutorial of FFMpeg to create a filter chain. This tutorial shows how to pass data through a chain as :




The filter chain it uses is : * (input) -> abuffer -> volume ->
aformat -> abuffersink -> (output)




Here is my code - sorry for boiler code, it is just ffmpeg way :(


frame = av_frame_alloc();
 filterGraph = avfilter_graph_alloc();

 if (!frame) {
 *mediaLoadPointer = FAILED_TO_LOAD;
 LOGE("FXProcessor::FXProcessor Could not allocate memory for frame");
 return;
 }

 if (!filterGraph) {
 *mediaLoadPointer = FAILED_TO_LOAD;
 LOGE("FXProcessor::FXProcessor FXProcessor! %s", av_err2str(AVERROR(ENOMEM)));
 return;
 }

 const AVFilter *abuffer;
 const AVFilter *abuffersink;
 AVFilterContext *aformat_ctx;
 const AVFilter *aformat;
 AVFilterContext *choisen_beat_fx_ctx;
 const AVFilter *choisen_beat_fx;

 /* Create the abuffer filter;
 * it will be used for feeding the data into the graph. */
 abuffer = avfilter_get_by_name("abuffer");
 if (!abuffer) {
 *mediaLoadPointer = FAILED_TO_LOAD;
 LOGE("FXProcessor::FXProcessor Could not find the abuffer filter!");
 return;
 }
 abuffer_ctx = avfilter_graph_alloc_filter(filterGraph, abuffer, "src");
 if (!abuffer_ctx) {
 *mediaLoadPointer = FAILED_TO_LOAD;
 LOGE("FXProcessor::FXProcessor Could not allocate the abuffer_ctx instance! %s",
 av_err2str(AVERROR(ENOMEM)));
 return;
 }

 char ch_layout[64];
 /* Set the filter options through the AVOptions API. */
 av_get_channel_layout_string(ch_layout, sizeof(ch_layout), 0, AV_CH_LAYOUT_STEREO);
 av_opt_set(abuffer_ctx, "channel_layout", ch_layout, AV_OPT_SEARCH_CHILDREN);
 av_opt_set(abuffer_ctx, "sample_fmt", av_get_sample_fmt_name(AV_SAMPLE_FMT_FLT),
 AV_OPT_SEARCH_CHILDREN);
 av_opt_set_q(abuffer_ctx, "time_base", (AVRational) {1, defaultSampleRate},
 AV_OPT_SEARCH_CHILDREN);
 av_opt_set_int(abuffer_ctx, "sample_rate", defaultSampleRate, AV_OPT_SEARCH_CHILDREN);
 /* Now initialize the filter; we pass NULL options, since we have already
 * set all the options above. */

 if (avfilter_init_str(abuffer_ctx, nullptr) < 0) {
 *mediaLoadPointer = FAILED_TO_LOAD;
 LOGE("FXProcessor::FXProcessor Could not initialize the abuffer filter!");
 return;
 }

 // TODO: select FX's dynamically
 /* Create aecho filter. */
 if (true) {

 choisen_beat_fx = avfilter_get_by_name("volume");
 if (!choisen_beat_fx) {
 *mediaLoadPointer = FAILED_TO_LOAD;
 LOGE("FXProcessor::FXProcessor Could not find the aecho filter!");
 return;
 }

 choisen_beat_fx_ctx = avfilter_graph_alloc_filter(filterGraph, choisen_beat_fx, "echo");
 if (!choisen_beat_fx_ctx) {
 *mediaLoadPointer = FAILED_TO_LOAD;
 LOGE("FXProcessor::FXProcessor Could not allocate the choisen_beat_fx_ctx instance! %s",
 av_err2str(AVERROR(ENOMEM)));
 return;
 }

 av_opt_set (choisen_beat_fx_ctx, "volume", AV_STRINGIFY(0.5), AV_OPT_SEARCH_CHILDREN);

 if (avfilter_init_str(choisen_beat_fx_ctx, nullptr) < 0) {
 *mediaLoadPointer = FAILED_TO_LOAD;
 LOGE("FXProcessor::FXProcessor Could not initialize the choisen_beat_fx_ctx filter!");
 return;
 }
 }

 /* Create the aformat filter;
 * it ensures that the output is of the format we want. */
 aformat = avfilter_get_by_name("aformat");
 if (!aformat) {
 *mediaLoadPointer = FAILED_TO_LOAD;
 LOGE("FXProcessor::FXProcessor Could not find the aformat filter!");
 return;
 }
 aformat_ctx = avfilter_graph_alloc_filter(filterGraph, aformat, "aformat");
 if (!aformat_ctx) {
 *mediaLoadPointer = FAILED_TO_LOAD;
 LOGE("FXProcessor::FXProcessor Could not allocate the aformat instance!");
 return;
 }

 av_opt_set(aformat_ctx, "sample_fmts", av_get_sample_fmt_name(AV_SAMPLE_FMT_FLT),
 AV_OPT_SEARCH_CHILDREN);
 av_opt_set_int(aformat_ctx, "sample_rates", defaultSampleRate, AV_OPT_SEARCH_CHILDREN);
 av_get_channel_layout_string(ch_layout, sizeof(ch_layout), 0, AV_CH_LAYOUT_STEREO);
 av_opt_set(aformat_ctx, "channel_layouts", ch_layout, AV_OPT_SEARCH_CHILDREN);

 if (avfilter_init_str(aformat_ctx, nullptr) < 0) {
 *mediaLoadPointer = FAILED_TO_LOAD;
 LOGE("FXProcessor::FXProcessor Could not initialize the aformat filter!");
 return;
 }

 /* Finally create the abuffersink filter;
 * it will be used to get the filtered data out of the graph. */
 abuffersink = avfilter_get_by_name("abuffersink");
 if (!abuffersink) {
 *mediaLoadPointer = FAILED_TO_LOAD;
 LOGE("FXProcessor::FXProcessor Could not find the abuffersink filter!");
 return;
 }

 abuffersink_ctx = avfilter_graph_alloc_filter(filterGraph, abuffersink, "sink");
 if (!abuffersink_ctx) {
 *mediaLoadPointer = FAILED_TO_LOAD;
 LOGE("FXProcessor::FXProcessor Could not allocate the abuffersink instance!");
 return;
 }

 /* This filter takes no options. */
 if (avfilter_init_str(abuffersink_ctx, nullptr) < 0) {
 *mediaLoadPointer = FAILED_TO_LOAD;
 LOGE("FXProcessor::FXProcessor Could not initialize the abuffersink instance.!");
 return;
 }

 /* Connect the filters;
 * in this simple case the filters just form a linear chain. */
 if (avfilter_link(abuffer_ctx, 0, choisen_beat_fx_ctx, 0) != 0) {
 *mediaLoadPointer = FAILED_TO_LOAD;
 LOGE("FXProcessor::FXProcessor Error connecting filters.!");
 return;
 }
 if (avfilter_link(choisen_beat_fx_ctx, 0, aformat_ctx, 0) != 0) {
 *mediaLoadPointer = FAILED_TO_LOAD;
 LOGE("FXProcessor::FXProcessor Error connecting filters.!");
 return;
 }
 if (avfilter_link(aformat_ctx, 0, abuffersink_ctx, 0) != 0) {
 *mediaLoadPointer = FAILED_TO_LOAD;
 LOGE("FXProcessor::FXProcessor Error connecting filters.!");
 return;
 }

 /* Configure the graph. */
 if (avfilter_graph_config(filterGraph, nullptr) < 0) {
 *mediaLoadPointer = FAILED_TO_LOAD;
 LOGE("FXProcessor::FXProcessor Error configuring the filter graph!");
 return;
 }



This code works fine when the chain is




- 

- (input) -> abuffer -> aecho-> aformat -> abuffersink -> (output)






However, I would like to use
adelay
instead ofvolume
filter. So I want :



The filter chain it uses is : * (input) -> abuffer -> volume ->
aformat -> abuffersink -> (output)




I changed the code at


choisen_beat_fx = avfilter_get_by_name("volume");



to


choisen_beat_fx = avfilter_get_by_name("aecho");



and removed the line


av_opt_set (choisen_beat_fx_ctx, "volume", AV_STRINGIFY(0.5), AV_OPT_SEARCH_CHILDREN);



everything goes smooth until the last line.

avfilter_graph_config
fails and returns negative value. Functions document :



avfilter_graph_config : Check validity and configure all the links and
formats in the graph.




So my guess is I need extra links to insert aecho to my chain ? How can I insert aecho into my filter chain ?


-
The new GDPR data protection regulation and potential consequences on Piwik
GDPR is a new data protection related regulation in Europe. GDPR stands for General Data Protection Regulation.
The purpose of this European regulation is to strengthen and unify data protection for all individuals within the European Union. This also includes entities outside Europe willing to do business with European citizens. GDPR is a set of processes you need to follow within your organization to protect the privacy of European citizens.
GDPR will start to apply in May 2018. It is recognized to be dissuasive because of the potential penalty of up to 4% of the yearly turnover, in case of infringement.
Many articles have been written about GDPR including our previous article. Few of them are explaining how it will affect web analytics vendors : this is what this article is about.
Am I really impacted by GDPR if I am a Piwik user ?
As Piwik can collect personal data, the answer is yes. Piwik analytics data is impacted by the GDPR.
As GDPR is a general concept, we decided from the official guidelines to assume what will be the potential consequences on the use of Piwik.
There are 2 potential scenarios we can identify :
- 1 – You are collecting personal data with Piwik
- 2 – You are not collecting personal data with Piwik
1 – Personal data collection with Piwik
According to GDPR : IP addresses, cookies, UserID are personal data.
IP addresses are personal data, so you will have to anonymize them unless you receive explicit consent from the visitor. Please view the following article in order to learn : how can I anonymize IP addresses in Piwik ?
According to GDPR, cookies are personal data too. But as all cookies are not created equal it may be possible that some need to require user consent whereas other not. Whatever will be the final decision, you can learn about the first-party cookies created by Piwik and how to disable all tracking cookies in Piwik ?
User ID, you are impacted if the User ID you assign is specific to an individual or if you can cross the User ID data further and find back the individual personal data.
Any extra personal data you may collect with Piwik, it could be for example : first names, family names, e-mail address… You are able to collect such data using custom dimensions, custom variables…
What are the rules I have to comply with ?
By collecting personal data, you will have to respect EU citizens rights, which include :
- The possibility for them to view the data you collected on them
- The possibility to rectify some data concerning them
- The possibility to delete their data when they request about it
As you can imagine, for the first obligation, you will have to export all the data. So if a user is requesting it, you will have to export the data linked to his IP address(es). It can be easily exported as a .csv file for example.
In order to do that, just create a segment according to the IP address of the user who requested it and then export the “Visitor log” report.
If the personal data is not linked with the IP address but other attributes such as User ID or a custom dimension, you can provide the same data export by using the segment function and filtering on the personal data field.The data edit and deletion process on Piwik is a bit trickier as it currently requires administration system skills. We are planning to develop a new plugin for GDPR compliance (which will be available for free on the Marketplace). This plugin will let you edit and easily delete data of a particular user. Currently you can delete a specific user’s data by accessing the Piwik database and directly delete the different records for this specific user.
2 – You are not collecting personal data with Piwik
Unfortunately it is not because you do not collect personal data that you will not be affected by GDPR.
The details of GDPR are not confirmed yet and GDPR could involve enabling the DoNotTrack setting by default on all browsers.
Yes, you read it well, by default, unless the internet user uncheck this option, Piwik respecting DoNoTrack would not be able to track any user. If one needed to collect data anyway, Piwik Log Analytics and server-side tracking can be considered.If you need help regarding how to set up your Piwik installation in order to be GDPR compliant :
Do you have a Piwik experience you would like to share with the community ? Please share it with us by contacting Piwik core team.