Recherche avancée

Médias (91)

Autres articles (97)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

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

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (8369)

  • How do you use Node.js to stream an MP4 file with ffmpeg ?

    27 avril 2023, par LaserJesus

    I've been trying to solve this problem for several days now and would really appreciate any help on the subject.

    



    I'm able to successfully stream an mp4 audio file stored on a Node.js server using fluent-ffmpeg by passing the location of the file as a string and transcoding it to mp3. If I create a file stream from the same file and pass that to fluent-ffmpeg instead it works for an mp3 input file, but not a mp4 file. In the case of the mp4 file no error is thrown and it claims the stream completed successfully, but nothing is playing in the browser. I'm guessing this has to do with the meta data being stored at the end of an mp4 file, but I don't know how to code around this. This is the exact same file that works correctly when it's location is passed to ffmpeg, rather than the stream. When I try and pass a stream to the mp4 file on s3, again no error is thrown, but nothing streams to the browser. This isn't surprising as ffmpeg won't work with the file locally as stream, so expecting it to handle the stream from s3 is wishful thinking.

    



    How can I stream the mp4 file from s3, without storing it locally as a file first ? How do I get ffmpeg to do this without transcoding the file too ? The following is the code I have at the moment which isn't working. Note that it attempts to pass the s3 file as a stream to ffmpeg and it's also transcoding it into an mp3, which I'd prefer not to do.

    



    .get(function(req,res) {
    aws.s3(s3Bucket).getFile(s3Path, function (err, result) {
        if (err) {
            return next(err);
        }
        var proc = new ffmpeg(result)
            .withAudioCodec('libmp3lame')
            .format('mp3')
            .on('error', function (err, stdout, stderr) {
                console.log('an error happened: ' + err.message);
                console.log('ffmpeg stdout: ' + stdout);
                console.log('ffmpeg stderr: ' + stderr);
            })
            .on('end', function () {
                console.log('Processing finished !');
            })
            .on('progress', function (progress) {
                console.log('Processing: ' + progress.percent + '% done');
            })
            .pipe(res, {end: true});
    });
});


    



    This is using the knox library when it calls aws.s3... I've also tried writing it using the standard aws sdk for Node.js, as shown below, but I get the same outcome as above.

    



    var AWS = require('aws-sdk');

var s3 = new AWS.S3({
    accessKeyId: process.env.AWS_ACCESS_KEY_ID,
    secretAccessKey: process.env.AWS_SECRET_KEY,
    region: process.env.AWS_REGION_ID
});
var fileStream = s3.getObject({
        Bucket: s3Bucket,
        Key: s3Key
    }).createReadStream();
var proc = new ffmpeg(fileStream)
    .withAudioCodec('libmp3lame')
    .format('mp3')
    .on('error', function (err, stdout, stderr) {
        console.log('an error happened: ' + err.message);
        console.log('ffmpeg stdout: ' + stdout);
        console.log('ffmpeg stderr: ' + stderr);
    })
    .on('end', function () {
        console.log('Processing finished !');
    })
    .on('progress', function (progress) {
        console.log('Processing: ' + progress.percent + '% done');
    })
    .pipe(res, {end: true});


    



    =====================================

    



    Updated

    



    I placed an mp3 file in the same s3 bucket and the code I have here worked and was able to stream the file through to the browser without storing a local copy. So the streaming issues I face have something to do with the mp4/aac container/encoder format.

    



    I'm still interested in a way to bring the m4a file down from s3 to the Node.js server in it's entirety, then pass it to ffmpeg for streaming without actually storing the file in the local file system.

    



    =====================================

    



    Updated Again

    



    I've managed to get the server streaming the file, as mp4, straight to the browser. This half answers my original question. My only issue now is that I have to download the file to a local store first, before I can stream it. I'd still like to find a way to stream from s3 without needing the temporary file.

    



    aws.s3(s3Bucket).getFile(s3Path, function(err, result){
    result.pipe(fs.createWriteStream(file_location));
    result.on('end', function() {
        console.log('File Downloaded!');
        var proc = new ffmpeg(file_location)
            .outputOptions(['-movflags isml+frag_keyframe'])
            .toFormat('mp4')
            .withAudioCodec('copy')
            .seekInput(offset)
            .on('error', function(err,stdout,stderr) {
                console.log('an error happened: ' + err.message);
                console.log('ffmpeg stdout: ' + stdout);
                console.log('ffmpeg stderr: ' + stderr);
            })
            .on('end', function() {
                console.log('Processing finished !');
            })
            .on('progress', function(progress) {
                console.log('Processing: ' + progress.percent + '% done');
            })
            .pipe(res, {end: true});
    });
});


    



    On the receiving side I just have the following javascript in an empty html page :

    



    window.AudioContext = window.AudioContext || window.webkitAudioContext;
context = new AudioContext();

function process(Data) {
    source = context.createBufferSource(); // Create Sound Source
    context.decodeAudioData(Data, function(buffer){
        source.buffer = buffer;
        source.connect(context.destination);
        source.start(context.currentTime);
    });
};

function loadSound() {
    var request = new XMLHttpRequest();
    request.open("GET", "/stream/", true);
    request.responseType = "arraybuffer";

    request.onload = function() {
        var Data = request.response;
        process(Data);
    };

    request.send();
};

loadSound()


    



    =====================================

    



    The Answer

    



    The code above under the title 'updated again' will stream an mp4 file, from s3, via a Node.js server to a browser without using flash. It does require that the file be stored temporarily on the Node.js server so that the meta data in the file is moved from the end of the file to the front. In order to stream without storing the temporary file, you need to actual modify the file on S3 first and make this meta data change. If you have changed the file in this way on S3 then you can modify the code under the title 'updated again' so that the result from S3 is piped straight into the ffmpeg constructor, rather than into a file stream on the Node.js server, then providing that file location to ffmepg, as the code does now. You can change the final 'pipe' command to 'save(location)' to get a version of the mp4 file locally with the meta data moved to the front. You can then upload that new version of the file to S3 and try out the end to end streaming. Personally I'm now going to create a task that modifies the files in this way as they are uploaded to s3 in the first place. This allows me to record and stream in mp4 without transcoding or storing a temp file on the Node.js server.

    


  • Why zoompan "pzoom - " not working on video?

    10 avril 2023, par Jim Qian

    cmd : ffmpeg -i video2.mp4 -filter_complex "[0:v]zoompan=z=pzoom-0.01:x='iw/2-iw/zoom/2':y='ih/2-ih/zoom/2':d=1" -c:v libx264 -pix_fmt yuv420p -r 24 -y video_bg.mp4

    


    no zoom in happened in the out video

    


    However, if change to pzoom+0.01, zoom out does work. Why ?

    


  • Benefits and Shortcomings of Multi-Touch Attribution

    13 mars 2023, par Erin — Analytics Tips

    Few sales happen instantly. Consumers take their time to discover, evaluate and become convinced to go with your offer. 

    Multi-channel attribution (also known as multi-touch attribution or MTA) helps businesses better understand which marketing tactics impact consumers’ decisions at different stages of their buying journey. Then double down on what’s working to secure more sales. 

    Unlike standard analytics, multi-channel modelling combines data from various channels to determine their cumulative and independent impact on your conversion rates. 

    The main benefit of multi-touch attribution is obvious : See top-performing channels, as well as those involved in assisted conversions. The drawback of multi-touch attribution : It comes with a more complex setup process. 

    If you’re on the fence about getting started with multi-touch attribution, here’s a summary of the main arguments for and against it. 

    What Are the Benefits of Multi-Touch Attribution ?

    Remember an old parable of blind men and an elephant ?

    Each one touched the elephant and drew conclusions about how it might look. The group ended up with different perceptions of the animal and thought the others were lying…until they decided to work together on establishing the truth.

    Multi-channel analytics works in a similar way : It reconciles data from various channels and campaign types into one complete picture. So that you can get aligned on the efficacy of different campaign types and gain some other benefits too. 

    Better Understanding of Customer Journeys 

    On average, it takes 8 interactions with a prospect to generate a conversion. These interactions happen in three stages : 

    • Awareness : You need to introduce your company to the target buyers and pique their interest in your solution (top-of-the-funnel). 
    • Consideration : The next step is to channel this casual interest into deliberate research and evaluation of your offer (middle-of-the-funnel). 
    • Decision : Finally, you need to get the buyer to commit to your offer and close the deal (bottom-of-the-funnel). 

    You can analyse funnels using various attribution models — last-click, fist-click, position-based attribution, etc. Each model, however, will spotlight the different element(s) of your sales funnel. 

    For example, a single-touch attribution model like last-click zooms in on the bottom-of-the-funnel stage. You can evaluate which channels (or on-site elements) sealed the deal for the prospect. For example, a site visitor arrived from an affiliate link and started a free trial. In this case, the affiliate (referral traffic) gets 100% credit for the conversion. 

    This measurement tactic, however, doesn’t show which channels brought the customer to the very bottom of your funnel. For instance, they may have interacted with a social media post, your landing pages or a banner ad before that. 

    Multi-touch attribution modelling takes funnel analysis a notch further. In this case, you map more steps in the customer journey — actions, events, and pages that triggered a visitor’s decision to convert — in your website analytics tool.

    Funnels Report Matomo

    Then, select a multi-touch attribution model, which provides more backward visibility aka allows you to track more than one channel, preceding the conversion. 

    For example, a Position Based attribution model reports back on all interactions a site visitor had between their first visit and conversion. 

    A prospect first lands at your website via search results (Search traffic), which gets a 40% credit in this model. Two days later, the same person discovers a mention of your website on another blog and visits again (Referral traffic). This time, they save the page as a bookmark and revisit it again in two more days (Direct traffic). Each of these channels will get a 10% credit. A week later, the prospect lands again on your site via Twitter (Social) and makes a request for a demo. Social would then receive a 40% credit for this conversion. Last-click would have only credited social media and first-click — search engines. 

    The bottom line : Multi-channel attribution models show how different channels (and marketing tactics) contribute to conversions at different stages of the customer journey. Without it, you get an incomplete picture.

    Improved Budget Allocation 

    Understanding causal relationships between marketing activities and conversion rates can help you optimise your budgets.

    First-click/last-click attribution models emphasise the role of one channel. This can prompt you toward the wrong conclusions. 

    For instance, your Facebook ads campaigns do great according to a first-touch model. So you decide to increase the budget. What you might be missing though is that you could have an even higher conversion rate and revenue if you fix “funnel leaks” — address high drop-off rates during checkout, improve page layout and address other possible reasons for exiting the page.

    Matomo Customisable Goal Funnels
    Funnel reports at Matomo allow you to see how many people proceed to the next conversion stage and investigate why they drop off.

    By knowing when and why people abandon their purchase journey, you can improve your marketing velocity (aka the speed of seeing the campaign results) and your marketing costs (aka the budgets you allocate toward different assets, touchpoints and campaign types). 

    Or as one of the godfathers of marketing technology, Dan McGaw, explained in a webinar :

    “Once you have a multi-touch attribution model, you [can] actually know the return on ad spend on a per-campaign basis. Sometimes, you can get it down to keywords. Sometimes, you can get down to all kinds of other information, but you start to realise, “Oh, this campaign sucks. I should shut this off.” And then really, that’s what it’s about. It’s seeing those campaigns that suck and turning them off and then taking that budget and putting it into the campaigns that are working”.

    More Accurate Measurements 

    The big boon of multi-channel marketing attribution is that you can zoom in on various elements of your funnel and gain granular data on the asset’s performance. 

    In other words : You get more accurate insights into the different elements involved in customer journeys. But for accurate analytics measurements, you must configure accurate tracking. 

    Define your objectives first : How do you want a multi-touch attribution tool to help you ? Multi-channel attribution analysis helps you answer important questions such as :

    • How many touchpoints are involved in the conversions ? 
    • How long does it take for a lead to convert on average ? 
    • When and where do different audience groups convert ? 
    • What is your average win rate for different types of campaigns ?

    Your objectives will dictate which multi-channel modelling approach will work best for your business — as well as the data you’ll need to collect. 

    At the highest level, you need to collect two data points :

    • Conversions : Desired actions from your prospects — a sale, a newsletter subscription, a form submission, etc. Record them as tracked Goals
    • Touchpoints : Specific interactions between your brand and targets — specific page visits, referral traffic from a particular marketing channel, etc. Record them as tracked Events

    Your attribution modelling software will then establish correlation patterns between actions (conversions) and assets (touchpoints), which triggered them. 

    The accuracy of these measurements, however, will depend on the quality of data and the type of attribution modelling used. 

    Data quality stands for your ability to procure accurate, complete and comprehensive information from various touchpoints. For instance, some data won’t be available if the user rejected a cookie consent banner (unless you’re using a privacy-focused web analytics tool like Matomo). 

    Different attribution modelling techniques come with inherent shortcomings too as they don’t accurately represent the average sales cycle length or track visitor-level data, which allows you to understand which customer segments convert best.

    Learn more about selecting the optimal multi-channel attribution model for your business.

    What Are the Limitations of Multi-Touch Attribution ?

    Overall, multi-touch attribution offers a more comprehensive view of the conversion paths. However, each attribution model (except for custom ones) comes with inherent assumptions about the contribution of different channels (e.g,. 25%-25%-25%-25% in linear attribution or 40%-10%-10%-40% in position-based attribution). These conversion credit allocations may not accurately represent the realities of your industry. 

    Also, most attribution models don’t reflect incremental revenue you gain from existing customers, which aren’t converting through analysed channels. For example, account upgrades to a higher tier, triggered via an in-app offer. Or warranty upsell, made via a marketing email. 

    In addition, you should keep in mind several other limitations of multi-touch attribution software.

    Limited Marketing Mix Analysis 

    Multi-touch attribution tools work in conjunction with your website analytics app (as they draw most data from it). Because of that, such models inherit the same visibility into your marketing mix — a combo of tactics you use to influence consumer decisions.

    Multi-touch attribution tools cannot evaluate the impact of :

    • Dark social channels 
    • Word-of-mouth 
    • Offline promotional events
    • TV or out-of-home ad campaigns 

    If you want to incorporate this data into your multi-attribution reporting, you’ll have to procure extra data from other systems — CRM, ad measurement partners, etc, — and create complex custom analytics models for its evaluation.

    Time-Based Constraints 

    Most analytics apps provide a maximum 90-day lookback window for attribution. This can be short for companies with longer sales cycles. 

    Source : Marketing Charts

    Marketing channels can be overlooked or underappreciated when your attribution window is too short. Because of that, you may curtail spending on brand awareness campaigns, which, in turn, will reduce the number of people entering the later stages of your funnel. 

    At the same time, many businesses would also want to track a look-forward window — the revenue you’ll get from one customer over their lifetime. In this case, not all tools may allow you to capture accurate information on repeat conversions — through re-purchases, account tier updates, add-ons, upsells, etc. 

    Again, to get an accurate picture you’ll need to understand how far into the future you should track conversions. Will you only record your first sales as a revenue number or monitor customer lifetime value (CLV) over 3, 6 or 12 months ? 

    The latter is more challenging to do. But CLV data can add another depth of dimension to your modelling accuracy. With Matomo, you set up this type of tracking by using our visitors’ tracking feature. We can help you track select visitors with known identifiers (e.g. name or email address) to discover their visiting patterns over time. 

    Visitor User IDs in Matomo

    Limited Access to Raw Data 

    In web analytics, raw data stands for unprocessed website visitor information, stripped from any filters, segmentation or sampling applied. 

    Data sampling is a practice of analysing data subsets (instead of complete records) to extrapolate findings towards the entire data set. Google Analytics 4 applies data sampling once you hit over 500k sessions at the property level. So instead of accurate, real-life reporting, you receive approximations, generated by machine learning models. Data sampling is one of the main reasons behind Google Analytics’ accuracy issues

    In multi-channel attribution modelling, usage of sampled data creates further inconsistencies between the reports and the actual state of affairs. For instance, if your website generates 5 million page views, GA multi-touch analytical reports are based on the 500K sample size aka only 90% of the collected information. This hardly represents the real effect of all marketing channels and can lead to subpar decision-making. 

    With Matomo, the above is never an issue. We don’t apply data sampling to any websites (no matter the volume of traffic) and generate all the reports, including multi-channel attribution ones, based on 100% real user data. 

    AI Application 

    On the other hand, websites with smaller traffic volumes often have limited sampling datasets for building attribution models. Some tracking data may also be not available because the visitor rejected a cookie banner, for instance. On average, less than 50% of users in Australia, France, Germany, Denmark and the US among other countries always consent to all cookies. 

    To compensate for such scenarios, some multi-touch attribution solutions apply AI algorithms to “fill in the blanks”, which impacts the reporting accuracy. Once again, you get approximate data of what probably happened. However, Matomo is legally exempt from showing a cookie consent banner in most EU markets. Meaning you can collect 100% accurate data to make data-driven decisions.

    Difficult Technical Implementation 

    Ever since attribution modelling got traction in digital marketing, more and more tools started to emerge.

    Most web analytics apps include multi-touch attribution reports. Then there are standalone multi-channel attribution platforms, offering extra features for conversion rate optimization, offline channel tracking, data-driven custom modelling, etc. 

    Most advanced solutions aren’t available out of the box. Instead, you have to install several applications, configure integrations with requested data sources, and then use the provided interfaces to code together custom data models. Such solutions are great if you have a technical marketer or a data science team. But a steep learning curve and high setup costs make them less attractive for smaller teams. 

    Conclusion 

    Multi-touch attribution modelling lifts the curtain in more steps, involved in various customer journeys. By understanding which touchpoints contribute to conversions, you can better plan your campaign types and budget allocations. 

    That said, to benefit from multi-touch attribution modelling, marketers also need to do the preliminary work : Determine the key goals, set up event and conversion tracking, and then — select the optimal attribution model type and tool. 

    Matomo combines simplicity with sophistication. We provide marketers with familiar, intuitive interfaces for setting up conversion tracking across the funnel. Then generate attribution reports, based on 100% accurate data (without any sampling or “guesstimation” applied). You can also get access to raw analytics data to create custom attribution models or plug it into another tool ! 

    Start using accurate, easy-to-use multi-channel attribution with Matomo. Start your free 21-day trial now. No credit card requried.