Recherche avancée

Médias (91)

Autres articles (86)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Configuration spécifique pour PHP5

    4 février 2011, par

    PHP5 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 (5989)

  • FFMpeg crop a portrait (vertical) video square 1:1

    1er avril 2022, par hugger

    SOLVED... It was a UI issue... Not an FFpeg issue.

    


    I am new to FFMpeg. I am stuck on cropping a portrait video taken from a portrait device square.

    


    I would like my video output to be 1080x1080.

    


    First, I tried this.

    


    FFmpegKit.execute(`-y -i ${media.path} -vf "crop=1080:1080:exact=1" ${path}`)


    


    As I hoped, this worked for photos. (but strangely rotates the photo) - looking into that...

    


    BUT, for videos it does not work. instead it turns the video landscape.

    


    I then tried to add scale :

    


    FFmpegKit.execute(`-y -i ${media.path} -vf "crop=1080:1080:exact=1, scale=1080:1080" ${path}`)


    


    But this left me with the same result.

    


    Here are the console logs for some more information :

    


     LOG  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file:///private/var/mobile/Containers/Data/Application/71E462FC-4824-41FE-B28D-57AF7B6078C3/tmp/ReactNative/329ACC6F-42B6-4B12-A289-889DADE1BC3A.mov':
 LOG    Metadata:
 LOG      major_brand     :
 LOG  qt
 LOG  
 LOG      minor_version   :
 LOG  0
 LOG  
 LOG      compatible_brands:
 LOG  qt
 LOG  
 LOG      creation_time   :
 LOG  2022-04-01T03:41:12.000000Z
 LOG  
 LOG    Duration:
 LOG  00:00:02.35
 LOG  , start:
 LOG  0.000000
 LOG  , bitrate:
 LOG  21200 kb/s
 LOG  
 LOG    Stream #0:0
 LOG  [0x1]
 LOG  (und)
 LOG  : Video: hevc (hvc1 / 0x31637668), yuv420p(tv, bt709), 1080x1920, 21140 kb/s
 LOG  ,
 LOG  59.96 fps,
 LOG  59.94 tbr,
 LOG  600 tbn
 LOG   (default)
 LOG  
 LOG      Metadata:
 LOG        creation_time   :
 LOG  2022-04-01T03:41:13.000000Z
 LOG  
 LOG        handler_name    :
 LOG  Core Media Video
 LOG  
 LOG        vendor_id       :
 LOG  [0][0][0][0]
 LOG  
 LOG        encoder         :
 LOG  HEVC
 LOG  
 LOG    Stream #0:1
 LOG  [0x2]
 LOG  (und)
 LOG  : Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 61 kb/s
 LOG   (default)
 LOG  
 LOG      Metadata:
 LOG        creation_time   :
 LOG  2022-04-01T03:41:13.000000Z
 LOG  
 LOG        handler_name    :
 LOG  Core Media Audio
 LOG  
 LOG        vendor_id       :
 LOG  [0][0][0][0]
 LOG  
 LOG  [hevc @ 0x118ce07d0] The "sub_text_format" option is deprecated: Deprecated, does nothing
 LOG  [aac @ 0x10d30e190] The "sub_text_format" option is deprecated: Deprecated, does nothing
 LOG  Stream mapping:
 LOG    Stream #0:0 -> #0:0
 LOG   (hevc (native) -> mpeg4 (native))
 LOG  
 LOG    Stream #0:1 -> #0:1
 LOG   (aac (native) -> aac (native))
 LOG  
 LOG  Press [q] to stop, [?] for help
 LOG  Output #0, mp4, to '/var/mobile/Containers/Data/Application/71E462FC-4824-41FE-B28D-57AF7B6078C3/Documents/after.mp4':
 LOG    Metadata:
 LOG      major_brand     :
 LOG  qt
 LOG  
 LOG      minor_version   :
 LOG  0
 LOG  
 LOG      compatible_brands:
 LOG  qt
 LOG  
 LOG      encoder         :
 LOG  Lavf59.10.100
 LOG  
 LOG    Stream #0:0
 LOG  (und)
 LOG  : Video: mpeg4 (mp4v / 0x7634706D), yuv420p(tv, bt709, progressive), 1080x1080, q=2-31, 10000 kb/s
 LOG  ,
 LOG  59.94 fps,
 LOG  60k tbn
 LOG   (default)
 LOG  
 LOG      Metadata:
 LOG        creation_time   :
 LOG  2022-04-01T03:41:13.000000Z
 LOG  
 LOG        handler_name    :
 LOG  Core Media Video
 LOG  
 LOG        vendor_id       :
 LOG  [0][0][0][0]
 LOG  
 LOG        encoder         :
 LOG  Lavc59.15.102 mpeg4
 LOG  
 LOG      Side data:
 LOG  
 LOG  cpb:
 LOG  bitrate max/min/avg: 0/0/10000000 buffer size: 0
 LOG  vbv_delay: N/A
 LOG  
 LOG    Stream #0:1
 LOG  (und)
 LOG  : Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 69 kb/s
 LOG   (default)
 LOG  
 LOG      Metadata:
 LOG        creation_time   :
 LOG  2022-04-01T03:41:13.000000Z
 LOG  
 LOG        handler_name    :
 LOG  Core Media Audio
 LOG  
 LOG        vendor_id       :
 LOG  [0][0][0][0]
 LOG  
 LOG        encoder         :
 LOG  Lavc59.15.102 aac
 LOG  
 LOG  frame=    1 fps=0.0 q=3.6 size=       0kB time=00:00:01.06 bitrate=   0.3kbits/s speed=9.23x
 LOG  frame=   47 fps=0.0 q=2.0 size=     768kB time=00:00:01.85 bitrate=3390.0kbits/s speed=3.01x
 LOG  frame=   95 fps= 81 q=2.2 size=    1792kB time=00:00:02.32 bitrate=6313.3kbits/s speed=1.99x
 LOG  frame=  129 fps= 77 q=2.5 size=    2560kB time=00:00:02.32 bitrate=9018.9kbits/s speed=1.39x
 LOG  frame=  139 fps= 78 q=2.6 Lsize=    2953kB time=00:00:02.38 bitrate=10124.6kbits/s speed=1.34x
 LOG  video:2929kB audio:20kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead:
 LOG  0.136336%
 LOG  
 LOG  [aac @ 0x112820f50] Qavg: 113.412
 LOG  COMPLETED
 LOG  {}


    


    This is the result, when i replace
-i {media} with
-f lavfi -i smptebars=r=60000/1001:s=1080x1920:d=1

    


    enter image description here

    


    ALMOST but not 1:1...

    


    I have not had any luck online trying to find a solution for this so I have decided to post on here.

    


    I hope I can get some guidance here !

    


    Cheers.

    


  • How correctly show video with transparency in Qt with OpenCV + FFMpeg

    11 avril 2022, par TheEnigmist

    I'm trying to show a video with transparency in a Qt6 application using OpenCV + FFMPEG.
Actually those are tool versions :

    


      

    • Win 11
    • 


    • Qt 6.3.0
    • 


    • OpenCV 4.5.5 (built with CMake)
    • 


    • FFMPEG 2022-04-03-git-1291568c98-full_build-www.gyan.dev
    • 


    


    I've used a base .mov video with transparency as test (link provided below).
First of all I've converted .mov video to .webm video (VP9) and I see in output text that alpha channel remains

    


    


    ffmpeg -i '.\Retro Bars.mov' -c:v libvpx-vp9 -crf 30 -b:v 0 output.webm

    


    


    Input #0, mov,mp4,m4a,3gp,3g2,mj2,
    ...
    Stream #0:0[0x1](eng): Video: qtrle (rle  / 0x20656C72), argb(progressive),
    ...

Output #0, webm, 
   ...
   Stream #0:0(eng): Video: vp9, yuva420p(tv, progressive),
   ...


    


    But when I show info of output file with ffmpeg it loses alpha channel :

    


    


    ffmpeg -i .\output.webm

    


    


    Input #0, matroska,webm,
    ...
    Stream #0:0(eng): Video: vp9 (Profile 0), yuv420p(tv, progressive),
    ...


    


    If I open output.webm with OBS it is shown correctly without a background, as shown in picture :
obs_load

    


    If I try to open it with OpenCV + FFMPEG it shows a black background under bars, as shown in picture :
Qt_out

    


    This is how I load video in Qt :

    


    cv::VideoCapture capture;
capture.open(filename, cv::CAP_FFMPEG);
capture.set(cv::CAP_PROP_CONVERT_RGB, false); // try forcing load alpha channel
... //in a thread
while (capture.read(frame)) {
    qDebug() << "c" << frame.channels() << "t" <<  frame.type() << "d" <<  frame.depth(); // output: c 3 t 16 d 0
    cv::cvtColor(frame, frame, cv::COLOR_BGR2RGBA); //useless since no alpha channel is detected
    img = QImage(frame.data, frame.cols, frame.rows, QImage::Format_RGBA8888);
    emit processedImage(img); // to show image in a QLabel with QPixmap::fromImage(img)
}


    


    I think the problem is when I load the video with OpenCV, it doens't detect alpha channel, since I can load correctly in other player (obs, html5, etc.)

    


    What I'm wrong with all process to show this video in Qt with transparency ?

    


    EDIT : Added dropbox link with test video + ffmpeg outputs :
sample items

    


  • Data Privacy in Business : A Risk Leading to Major Opportunities

    9 août 2022, par Erin — Privacy

    Data privacy in business is a contentious issue. 

    Claims that “big data is the new oil of the digital economy” and strong links between “data-driven personalisation and customer experience” encourage leaders to set up massive data collection programmes.

    However, many of these conversations downplay the magnitude of security, compliance and ethical risks companies face when betting too much on customer data collection. 

    In this post, we discuss the double-edged nature of privacy issues in business — the risk-ridden and the opportunity-driven. ​​

    3 Major Risks of Ignoring Data Privacy in Business

    As the old adage goes : Just because everyone else is doing it doesn’t make it right.

    Easy data accessibility and ubiquity of analytics tools make data consumer collection and processing sound like a “given”. But the decision to do so opens your business to a spectrum of risks. 

    1. Compliance and Legal Risks 

    Data collection and customer privacy are protected by a host of international laws including GDPR, CCPA, and regional regulations. Only 15% of countries (mostly developing ones) don’t have dedicated laws for protecting consumer privacy. 

    State of global data protection legislature via The UN

    Global legislature includes provisions on : 

    • Collectible data types
    • Allowed uses of obtained data 
    • Consent to data collection and online tracking 
    • Rights to request data removal 

    Personally identifiable information (PII) processing is prohibited or strictly regulated in most jurisdictions. Yet businesses repeatedly circumnavigate existing rules and break them on occasion.

    In Australia, for example, only 2% of brands use logos, icons or messages to transparently call out online tracking, data sharing or other specific uses of data at the sign-up stage. In Europe, around half of small businesses are still not fully GDPR-compliant — and Big Tech companies like Google, Amazon and Facebook can’t get a grip on their data collection practices even when pressed with horrendous fines. 

    Although the media mostly reports on compliance fines for “big names”, smaller businesses are increasingly receiving more scrutiny. 

    As Max Schrems, an Austrian privacy activist and founder of noyb NGO, explained in a Matomo webinar :

    “In Austria, my home country, there are a lot of €5,000 fines going out there as well [to smaller businesses]. Most of the time, they are just not reported. They just happen below the surface. [GDPR fines] are already a reality.”​

    In April 2022, the EU Court of Justice ruled that consumer groups can autonomously sue businesses for breaches of data protection — and nonprofit organisations like noyb enable more people to do so. 

    Finally, new data privacy legislation is underway across the globe. In the US, Colorado, Connecticut, Virginia and Utah have data protection acts at different stages of approval. South African authorities are working on the Protection of Personal Information Act (POPI) act and Brazil is working on a local General Data Protection Law (LGPD).

    Re-thinking your stance on user privacy and data protection now can significantly reduce the compliance burden in the future. 

    2. Security Risks 

    Data collection also mandates data protection for businesses. Yet, many organisations focus on the former and forget about the latter. 

    Lenient attitudes to consumer data protection resulted in a major spike in data breaches.

    Check Point research found that cyberattacks increased 50% year-over-year, with each organisation facing 925 cyberattacks per week globally.

    Many of these attacks end up being successful due to poor data security in place. As a result, billions of stolen consumer records become publicly available or get sold on dark web marketplaces.

    What’s even more troublesome is that stolen consumer records are often purchased by marketing firms or companies, specialising in spam campaigns. Buyers can also use stolen emails to distribute malware, stage phishing and other social engineering attacks – and harvest even more data for sale. 

    One business’s negligence creates a snowball effect of negative changes down the line with customers carrying the brunt of it all. 

    In 2020, hackers successfully targeted a Finnish psychotherapy practice. They managed to steal hundreds of patient records — and then demanded a ransom both from the firm and its patients for not exposing information about their mental health issues. Many patients refused to pay hackers and some 300 records ended up being posted online as Associated Press reported.

    Not only did the practice have to deal with the cyber-breach aftermath, but it also faced vocal regulatory and patient criticisms for failing to properly protect such sensitive information.

    Security negligence can carry both direct (heavy data breach fines) and indirect losses in the form of reputational damages. An overwhelming 90% of consumers say they wouldn’t buy from a business if it doesn’t adequately protect their data. This brings us to the last point. 

    3. Reputational Risks 

    Trust is the new currency. Data negligence and consumer privacy violations are the two fastest ways to lose it. 

    Globally, consumers are concerned about how businesses collect, use, and protect their data. 

    Consumer data sharing attitudes
    • According to Forrester, 47% of UK adults actively limit the amount of data they share with websites and apps. 49% of Italians express willingness to ask companies to delete their personal data. 36% of Germans use privacy and security tools to minimise online tracking of their activities. 
    • A GDMA survey also notes that globally, 82% of consumers want more control over their personal information, shared with companies. 77% also expect brands to be transparent about how their data is collected and used. 

    When businesses fail to hold their end of the bargain — collect just the right amount of data and use it with integrity — consumers are fast to cut ties. 

    Once the information about privacy violations becomes public, companies lose : 

    • Brand equity 
    • Market share 
    • Competitive positioning 

    An AON report estimates that post-data breach companies can lose as much as 25% of their initial value. In some cases, the losses can be even higher. 

    In 2015, British telecom TalkTalk suffered from a major data breach. Over 150,000 customer records were stolen by hackers. To contain the issue, TalkTalk had to throw between $60-$70 million into containment efforts. Still, they lost over 100,000 customers in a matter of months and one-third of their company value, equivalent to $1.4 billion, by the end of the year. 

    Fresher data from Infosys gives the following maximum cost estimates of brand damage, companies could experience after a data breach (accidental or malicious).

    Estimated cost of brand damage due to a data breach

    3 Major Advantages of Privacy in Business 

    Despite all the industry mishaps, a reassuring 77% of CEOs now recognise that their companies must fundamentally change their approaches to customer engagement, in particular when it comes to ensuring data privacy. 

    Many organisations take proactive steps to cultivate a privacy-centred culture and implement transparent data collection policies. 

    Here’s why gaining the “privacy advantage” pays off.

    1. Market Competitiveness 

    There’s a reason why privacy-focused companies are booming. 

    Consumers’ mounting concerns and frustrations over the lack of online privacy, prompt many to look for alternative privacy-centred products and services

    The following B2C and B2B products are moving from the industry margins to the mainstream : 

    Across the board, consumers express greater trust towards companies, protective of their privacy : 

    And as we well know : trust translates to higher engagement, loyalty, and – ultimately revenue. 

    By embedding privacy into the core of your product, you give users more reasons to select, stay and support your business. 

    2. Higher Operational Efficiency

    Customer data protection isn’t just a policy – it’s a culture of collecting “just enough” data, protecting it and using it responsibly. 

    Sadly, that’s the area where most organisations trail behind. At present, some 90% of businesses admit to having amassed massive data silos. 

    Siloed data is expensive to maintain and operationalise. Moreover, when left unattended, it can evolve into a pressing compliance issue. 

    A recently leaked document from Facebook says the company has no idea where all of its first-party, third-party and sensitive categories data goes or how it is processed. Because of this, Facebook struggles to achieve GDPR compliance and remains under regulatory pressure. 

    Similarly, Google Analytics is riddled with privacy issues. Other company products were found to be collecting and operationalising consumer data without users’ knowledge or consent. Again, this creates valid grounds for regulatory investigations. 

    Smaller companies have a better chance of making things right at the onset. 

    By curbing customer data collection, you can : 

    • Reduce data hosting and Cloud computation costs (aka trim your Cloud bill) 
    • Improve data security practices (since you would have fewer assets to protect) 
    • Make your staff more productive by consolidating essential data and making it easy and safe to access

    Privacy-mindful companies also have an easier time when it comes to compliance and can meet new data regulations faster. 

    3. Better Marketing Campaigns 

    The biggest counter-argument to reducing customer data collection is marketing. 

    How can we effectively sell our products if we know nothing about our customers ? – your team might be asking. 

    This might sound counterintuitive, but minimising data collection and usage can lead to better marketing outcomes. 

    Limiting the types of data that can be used encourages your people to become more creative and productive by focusing on fewer metrics that are more important.

    Think of it this way : Every other business uses the same targeting parameters on Facebook or Google for running paid ad campaigns on Facebook. As a result, we see ads everywhere — and people grow unresponsive to them or choose to limit exposure by using ad blocking software, private browsers and VPNs. Your ad budgets get wasted on chasing mirage metrics instead of actual prospects. 

    Case in point : In 2017 Marc Pritchard of Procter & Gamble decided to first cut the company’s digital advertising budget by 6% (or $200 million). Unilever made an even bolder move and reduced its ad budget by 30% in 2018. 

    Guess what happened ?

    P&G saw a 7.5% increase in organic sales and Unilever had a 3.8% gain as HBR reports. So how come both companies became more successful by spending less on advertising ? 

    They found that overexposure to online ads led to diminishing returns and annoyances among loyal customers. By minimising ad exposure and adopting alternative marketing strategies, the two companies managed to market better to new and existing customers. 

    The takeaway : There are more ways to engage consumers aside from pestering them with repetitive retargeting messages or creepy personalisation. 

    You can collect first-party data with consent to incrementally improve your product — and educate them on the benefits of your solution in transparent terms.

    Final Thoughts 

    The definitive advantage of privacy is consumers’ trust. 

    You can’t buy it, you can’t fake it, you can only cultivate it by aligning your external appearances with internal practices. 

    Because when you fail to address privacy internally, your mishaps will quickly become apparent either as social media call-outs or worse — as a security incident, a data breach or a legal investigation. 

    By choosing to treat consumer data with respect, you build an extra layer of protection around your business, plus draw in some banging benefits too. 

    Get one step closer to becoming a privacy-centred company by choosing Matomo as your web analytics solution. We offer robust privacy controls for ensuring ethical, compliant, privacy-friendly and secure website tracking.