
Recherche avancée
Autres articles (72)
-
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Configuration spécifique pour PHP5
4 février 2011, parPHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
Modules spécifiques
Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...)
Sur d’autres sites (7278)
-
NumPy array of a video changes from the original after writing into the same video
29 mars 2021, par RashiqI have a video (
test.mkv
) that I have converted into a 4D NumPy array - (frame, height, width, color_channel). I have even managed to convert that array back into the same video (test_2.mkv
) without altering anything. However, after reading this new,test_2.mkv
, back into a new NumPy array, the array of the first video is different from the second video's array i.e. their hashes don't match and thenumpy.array_equal()
function returns false. I have tried using both python-ffmpeg and scikit-video but cannot get the arrays to match.

Python-ffmpeg attempt :


import ffmpeg
import numpy as np
import hashlib

file_name = 'test.mkv'

# Get video dimensions and framerate
probe = ffmpeg.probe(file_name)
video_stream = next((stream for stream in probe['streams'] if stream['codec_type'] == 'video'), None)
width = int(video_stream['width'])
height = int(video_stream['height'])
frame_rate = video_stream['avg_frame_rate']

# Read video into buffer
out, error = (
 ffmpeg
 .input(file_name, threads=120)
 .output("pipe:", format='rawvideo', pix_fmt='rgb24')
 .run(capture_stdout=True)
)

# Convert video buffer to array
video = (
 np
 .frombuffer(out, np.uint8)
 .reshape([-1, height, width, 3])
)

# Convert array to buffer
video_buffer = (
 np.ndarray
 .flatten(video)
 .tobytes()
)

# Write buffer back into a video
process = (
 ffmpeg
 .input('pipe:', format='rawvideo', s='{}x{}'.format(width, height))
 .output("test_2.mkv", r=frame_rate)
 .overwrite_output()
 .run_async(pipe_stdin=True)
)
process.communicate(input=video_buffer)

# Read the newly written video
out_2, error = (
 ffmpeg
 .input("test_2.mkv", threads=40)
 .output("pipe:", format='rawvideo', pix_fmt='rgb24')
 .run(capture_stdout=True)
)

# Convert new video into array
video_2 = (
 np
 .frombuffer(out_2, np.uint8)
 .reshape([-1, height, width, 3])
)

# Video dimesions change
print(f'{video.shape} vs {video_2.shape}') # (844, 1080, 608, 3) vs (2025, 1080, 608, 3)
print(f'{np.array_equal(video, video_2)}') # False

# Hashes don't match
print(hashlib.sha256(bytes(video_2)).digest()) # b'\x88\x00\xc8\x0ed\x84!\x01\x9e\x08 \xd0U\x9a(\x02\x0b-\xeeA\xecU\xf7\xad0xa\x9e\\\xbck\xc3'
print(hashlib.sha256(bytes(video)).digest()) # b'\x9d\xc1\x07xh\x1b\x04I\xed\x906\xe57\xba\xf3\xf1k\x08\xfa\xf1\xfaM\x9a\xcf\xa9\t8\xf0\xc9\t\xa9\xb7'



Scikit-video attempt :


import skvideo.io as sk
import numpy as np

video_data = sk.vread('test.mkv')

sk.vwrite('test_2_ski.mkv', video_data)

video_data_2 = sk.vread('test_2_ski.mkv')

# Dimensions match but...
print(video_data.shape) # (844, 1080, 608, 3)
print(video_data_2.shape) # (844, 1080, 608, 3)

# ...array elements don't
print(np.array_equal(video_data, video_data_2)) # False

# Hashes don't match either
print(hashlib.sha256(bytes(video_2)).digest()) # b'\x8b?]\x8epD:\xd9B\x14\xc7\xba\xect\x15G\xfaRP\xde\xad&EC\x15\xc3\x07\n{a[\x80'
print(hashlib.sha256(bytes(video)).digest()) # b'\x9d\xc1\x07xh\x1b\x04I\xed\x906\xe57\xba\xf3\xf1k\x08\xfa\xf1\xfaM\x9a\xcf\xa9\t8\xf0\xc9\t\xa9\xb7'



I don't understand where I'm going wrong and both the respective documentations do not highlight how to do this particular task. Any help is appreciated. Thank you.


-
FFMpeg with PHP-7.0 on Ubuntu
25 octobre 2018, par Gabriel Bueno Lemes da SilvaI have a NGINX server with PHP-7.0 and I would like to install the ffmpeg-php extension. I’ve been trying for a few days now and in many ways.
The method that worked so far was compiling ffmpeg (https://ffmpeg.org/releases/ffmpeg-4.0.2.tar.bz2) manually, but when trying to compile ffmpeg-php (https: // sourceforge. net / projects / ffmpeg-php / files / ffmpeg-php / 0.6.0 / ffmpeg-php-0.6.0.tbz2 / download) I am encountering the following error message :
root@zumbiserver-mercury : /php7-ffmpeg# make /bin/bash
/root/php7-ffmpeg/libtool —mode=compile cc -I. -I/root/php7-ffmpeg
-DPHP_ATOM_INC -I/root/php7-ffmpeg/include -I/root/php7-ffmpeg/main -I/root/php7-ffmpeg -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -I/usr/local/include/libavcodec/ -I/usr/local/include/libavformat/ -I/usr/local/include/libavutil/ -I/usr/local/include/libswscale/ -I/usr/local/include/libavfilter/ -I/usr/local/include/libavdevice/ -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /root/php7-ffmpeg/ffmpeg-php.c -o ffmpeg-php.lo libtool : compile : cc
-I. -I/root/php7-ffmpeg -DPHP_ATOM_INC -I/root/php7-ffmpeg/include -I/root/php7-ffmpeg/main -I/root/php7-ffmpeg -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -I/usr/local/include/libavcodec/ -I/usr/local/include/libavformat/ -I/usr/local/include/libavutil/ -I/usr/local/include/libswscale/ -I/usr/local/include/libavfilter/ -I/usr/local/include/libavdevice/ -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /root/php7-ffmpeg/ffmpeg-php.c -fPIC -DPIC -o .libs/ffmpeg-php.o In
file included from /usr/include/x86_64-linux-gnu/sys/stat.h:104:0,
from /usr/include/php/20151012/Zend/zend_stream.h:28,
from /usr/include/php/20151012/Zend/zend.h:41,
from /usr/include/php/20151012/main/php.h:36,
from /root/php7-ffmpeg/ffmpeg-php.c:40 : /usr/include/x86_64-linux-gnu/bits/stat.h:91:21 : error : field
‘st_atim’ has incomplete type
struct timespec st_atim ; /* Time of last access. /
^ /usr/include/x86_64-linux-gnu/bits/stat.h:92:21 : error : field
‘st_mtim’ has incomplete type
struct timespec st_mtim ; / Time of last modification. /
^ /usr/include/x86_64-linux-gnu/bits/stat.h:93:21 : error : field
‘st_ctim’ has incomplete type
struct timespec st_ctim ; / Time of last status change. /
^ /usr/include/x86_64-linux-gnu/bits/stat.h:152:21 : error : field
‘st_atim’ has incomplete type
struct timespec st_atim ; / Time of last access. /
^ /usr/include/x86_64-linux-gnu/bits/stat.h:153:21 : error : field
‘st_mtim’ has incomplete type
struct timespec st_mtim ; / Time of last modification. /
^ /usr/include/x86_64-linux-gnu/bits/stat.h:154:21 : error : field
‘st_ctim’ has incomplete type
struct timespec st_ctim ; / Time of last status change. /
^ In file included from /usr/include/php/20151012/Zend/zend_stream.h:28:0,
from /usr/include/php/20151012/Zend/zend.h:41,
from /usr/include/php/20151012/main/php.h:36,
from /root/php7-ffmpeg/ffmpeg-php.c:40 : /usr/include/x86_64-linux-gnu/sys/stat.h:364:31 : error : array type has
incomplete element type ‘struct timespec’
const struct timespec __times[2],
^ /usr/include/x86_64-linux-gnu/sys/stat.h:371:54 : error : array type has
incomplete element type ‘struct timespec’ extern int futimens (int
__fd, const struct timespec __times[2]) __THROW ;
^ In file included from /usr/include/php/20151012/main/php.h:395:0,
from /root/php7-ffmpeg/ffmpeg-php.c:40 : /usr/include/php/20151012/Zend/zend_virtual_cwd.h:218:2 : error :
unknown type name ‘time_t’ time_t expires ;
^ /usr/include/php/20151012/Zend/zend_virtual_cwd.h:248:86 : error :
unknown type name ‘time_t’ CWD_API realpath_cache_bucket
realpath_cache_lookup(const char *path, int path_len, time_t t) ;
^ /root/php7-ffmpeg/ffmpeg-php.c : In function ‘zm_startup_ffmpeg’ :
/root/php7-ffmpeg/ffmpeg-php.c:108:5 : warning : implicit declaration of
function ‘avcodec_init’ [-Wimplicit-function-declaration]
avcodec_init() ;
^ /root/php7-ffmpeg/ffmpeg-php.c:111:5 : warning : ‘av_register_all’ is deprecated [-Wdeprecated-declarations]
av_register_all() ;
^ In file included from /root/php7-ffmpeg/ffmpeg-php.c:43:0 : /usr/local/include/libavformat/avformat.h:2025:6 : note : declared here
void av_register_all(void) ;^ Makefile:194: recipe for target 'ffmpeg-php.lo' failed make: *** [ffmpeg-php.lo] Error 1
Can someone give me a light ? I do not know what else to do !
-
Making Your First-Party Data Work for You and Your Customers
11 mars, par Alex CarmonaAt last count, 162 countries had enacted data privacy policies of one kind or another. These laws or regulations, without exception, intend to eliminate the use of third-party data. That puts marketing under pressure because third-party data has been the foundation of online marketing efforts since the dawn of the Internet.
Marketers need to future-proof their operations by switching to first-party data. This will require considerable adjustment to systems and processes, but the reward will be effective marketing campaigns that satisfy privacy compliance requirements and bring the business closer to its customers.
To do that, you’ll need a coherent first-party data strategy. That’s what this article is all about. We’ll explain the different types of personal data and discuss how to use them in marketing without compromising or breaching data privacy regulations. We’ll also discuss how to build that strategy in your business.
So, let’s dive in.
The different data types
There are four distinct types of personal data used in marketing, each subject to different data privacy regulations.
Before getting into the different types, it’s essential to understand that all four may comprise one or more of the following :
Identifying data Name, email address, phone number, etc. Behavioural data Website activity, app usage, wishlist content, purchase history, etc. Transactional data Orders, payments, subscription details, etc. Account data Communication preferences, product interests, wish lists, etc. Demographic data Age, gender, income level, education, etc. Geographic Data Location-based information, such as zip codes or regional preferences. Psychographic Data Interests, hobbies and lifestyle preferences. First-party data
When businesses communicate directly with customers, any data they exchange is first-party. It doesn’t matter how the interaction occurs : on the telephone, a website, a chat session, or even in person.
Of course, the parties involved aren’t necessarily individuals. They may be companies, but people within those businesses will probably share at least some of the data with colleagues. That’s fine, so long as the data :
- Remains confidential between the original two parties involved, and
- It is handled and stored following applicable data privacy regulations.
The core characteristic of first-party data is that it’s collected directly from customer interactions. This makes it reliable, accurate and inherently compliant with privacy regulations — assuming the collecting party complies with data privacy laws.
A great example of first-party data use is in banking. Data collected from customer interactions is used to provide personalised services, detect fraud, assess credit risk and improve customer retention.
Zero-party data
There’s also a subset of first-party data, sometimes called zero-party data. It’s what users intentionally and proactively share with a business. It can be preferences, intentions, personal information, survey responses, support tickets, etc.
What makes it different is that the collection of this data depends heavily on the user’s trust. Transparency is a critical factor, too ; visitors expect to be informed about how you’ll use their data. Consumers also have the right to withdraw permission to use all or some of their information at any time.
Second-party data
This data is acquired from a separate organisation that collects it firsthand. Second-party data is someone else’s first-party data that’s later shared with or sold to other businesses. The key here is that whoever owns that data must give explicit consent and be informed of who businesses share their data with.
A good example is the cooperation between hotel chains, car rental companies, and airlines. They share joint customers’ flight data, hotel reservations, and car rental bookings, much like travel agents did before the internet undermined that business model.
Third-party data
This type of data is the arch-enemy of lawmakers and regulators trying to protect the personal data of citizens and residents in their country. It’s information collected by entities that have no direct relationship with the individuals whose data it is.
Third-party data is usually gathered, aggregated, and sold by data brokers or companies, often by using third-party cookies on popular websites. It’s an entire business model — these third-party brokers sell data for marketing, analytics, or research purposes.
Most of the time, third-party data subjects are unaware that their data has been gathered and sold. Hence the need for strong data privacy regulations.
Benefits of a first-party data strategy
First-party data is reliable, accurate, and ethically sourced. It’s an essential part of any modern digital marketing strategy.
More personalised experiences
The most important application of first-party data is customising and personalising customers’ interactions based on real behaviours and preferences. Personalised experiences aren’t restricted to websites and can extend to all customer communication.
The result is company communications and marketing messages are far more relevant to customers. It allows businesses to engage more meaningfully with them, building trust and strengthening customer relationships. Inevitably, this also results in stronger customer loyalty and better customer retention.
Greater understanding of customers
Because first-party data is more accurate and reliable, it can be used to derive valuable insights into customer needs and wants. When all the disparate first-party data points are centralised and organised, it’s possible to uncover trends and patterns in customer behaviour that might not be apparent using other data.
This helps businesses predict and respond to customer needs. It also allows marketing teams to be more deliberate when segmenting customers and prospects into like-minded groups. The data can also be used to create more precise personas for future campaigns or reveal how likely a customer would be to purchase in response to a campaign.
Build trust with customers
First-party data is unique to a business and originates from interactions with customers. It’s also data collected with consent and is “owned” by the company — if you can ever own someone else’s data. If treated like the precious resource, it can help businesses build trust with customers.
However, developing that trust requires a transparent, step-by-step approach. This gradually strengthens relationships to the point where customers are more comfortable sharing the information they’re asked for.
However, while building trust is a long and sometimes arduous process, it can be lost in an instant. That’s why first-party data must be protected like the Crown Jewels.
Components of a first-party data strategy
Security is essential to any first-party data strategy, and for good reason. As Gartner puts it, a business must find the optimal balance between business outcomes and data risk mitigation. Once security is baked in, attention can turn to the different aspects of the strategy.
Data collection
There are many ways to collect first-party data ethically, within the law and while complying with data privacy regulations, such as Europe’s General Data Protection Regulation (GDPR). Potential sources include :
Website activity forms and surveys, behavioural tracking, cookies, tracking pixels and chatbots Mobile app interactions in-app analytics, push notifications and in-app forms Email marketing newsletter sign-ups, email engagement tracking, promotions, polls and surveys Events registrations, post-event surveys and virtual event analytics Social media interaction polls and surveys, direct messages and social media analytics Previous transactions purchase history, loyalty programmes and e-receipts Customer service call centre data, live chat, chatbots and feedback forms In-person interactions in-store purchases, customer feedback and Wi-Fi sign-ins Gated content whitepapers, ebooks, podcasts, webinars and video downloads Interactive content quizzes, assessments, calculators and free tools CRM platforms customer profiles and sales data Consent management privacy policies, consent forms, preference setting Consent management
It may be the final item on the list above, but it’s also a key requirement of many data privacy laws and regulations. For example, the GDPR is very clear about consent : “Processing personal data is generally prohibited, unless it is expressly allowed by law, or the data subject has consented to the processing.”
For that reason, your first-party data strategy must incorporate various transparent consent mechanisms, such as cookie banners and opt-in forms. Crucially, you must provide customers with a mechanism to manage their preferences and revoke that consent easily if they wish to.
Data management
Effective first-party data management, mainly its security and storage, is critical. Most data privacy regimes restrict the transfer of personal data to other jurisdictions and even prohibit it in some instances. Many even specify where residents’ data must be stored.
Consider this cautionary tale : The single biggest fine levied for data privacy infringement so far was €1.2 billion. The Irish Data Protection Commission imposed a massive fine on Meta for transferring EU users’ data to the US without adequate data protection mechanisms.
Data security is critical. If first-party data is compromised, it becomes third-party data, and any customer trust developed with the business will evaporate. To add insult to injury, data regulators could come knocking. That’s why the trend is to use encryption and anonymisation techniques alongside standard access controls.
Once security is assured, the focus is on data management. Many businesses use a Customer Data Platform. This software gathers, combines and manages data from many sources to create a complete and central customer profile. Modern CRM systems can also do that job. AI tools could help find patterns and study them. But the most important thing is to keep databases clean and well-organised to make it easier to use and avoid data silos.
Data activation
Once first-party data has been collected and analysed, it needs to be activated, which means a business needs to use it for the intended purpose. This is the implementation phase where a well-constructed first-party strategy pays off.
The activation stage is where businesses use the intelligence they gather to :
- Personalise website and app experiences
- Adapt marketing campaigns
- Improve conversion rates
- Match stated preferences
- Cater to observed behaviours
- Customise recommendations based on purchase history
- Create segmented email campaigns
- Improve retargeting efforts
- Develop more impactful content
Measurement and optimisation
Because first-party data is collected directly from customers or prospects, it’s far more relevant, reliable, and specific. Your analytics and campaign tracking will be more accurate. This gives you direct and actionable insights into your audience’s behaviour, empowering you to optimise your strategies and achieve better results.
The same goes for your collection and activation efforts. An advanced web analytics platform like Matomo lets you identify key user behaviour and optimise your tracking. Heatmaps, marketing attribution tools, user behaviour analytics and custom reports allow you to segment audiences for better traction (and collect even more first-party data).
How to build a first-party data strategy
There are five important and sequential steps to building a first-party data strategy. But this isn’t a one-time process. It must be revisited regularly as operating and regulatory environments change. There are five steps :
- Audit existing data
Chances are that customers already freely provide a lot of first-party data in the normal course of business. The first step is to locate this data, and the easiest way to do that is by mapping the customer journey. This identifies all the touchpoints where first-party data might be found.
- Define objectives
Then, it’s time to step back and figure out the goals of the first-party data strategy. Consider what you’re trying to achieve. For example :
- Reduce churn
- Expand an existing loyalty programme
- Unload excess inventory
- Improve customer experiences
Whatever the objectives are, they should be clear and measurable.
- Implement tools and technology
The first two steps point to data gaps. Now, the focus turns to ethical web analytics with a tool like Matomo.
To further comply with data privacy regulations, it may also be appropriate to implement a Consent Management Platform (CMP) to help manage preferences and consent choices.
- Build trust with transparency
With the tools in place, it’s time to engage customers. To build trust, keep them informed about how their data is used and remind them of their right to withdraw their consent.
Transparency is crucial in such engagement, as outlined in the 7 GDPR principles.
- Continuously improve
Rinse and repeat. The one constant in business and life is change. As things change, they expose weaknesses or flaws in the logic behind systems and processes. That’s why a first-party data strategy needs to be continually reviewed, updated, and revised. It must adapt to changing trends, markets, regulations, etc.
Tools that can help
Looking back at the different types of data, it’s clear that some are harder and more bothersome to get than others. But capturing behaviours and interactions can be easy — especially if you use tools that follow data privacy rules.
But here’s a tip. Google Analytics 4 isn’t compliant by default, especially not with Europe’s GDPR. It may also struggle to comply with some of the newer data privacy regulations planned by different US states and other countries.
Matomo Analytics is compliant with the GDPR and many other data privacy regulations worldwide. Because it’s open source, it can be integrated with any consent manager.
Get started today by trying Matomo for free for 21 days,
no credit card required.