Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (58)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

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

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (9519)

  • How to use web analytics to acquire new customers

    2 septembre 2020, par Joselyn Khor — Analytics Tips, Marketing

    Are you investing time and money into marketing your business and unsure if it’s paying off ? Web analytics provides the tools and insights to help you know which marketing channels to target and focus on. Without it you might be going in blind and missing opportunities that might’ve been easily found in your metrics.

    Attracting the right visitors to your website

    To help acquire new customer on your website, you firstly need to attract the right visitors to your website. Then capturing their attention and engaging them in your content. Finally you’ll want to convert by driving them through a streamlined funnel/buyer’s journey on your website all backed up by data.

    So, how do you attract audiences to your site with a web analytics tool like Matomo ?

    1. Figure out who your audience is through the Visitor Profiles feature. 
    2. Calculate the Cost of Customer Acquisition (CAC) to plan for growth. To grow and make your business/website sustainable, you’ll need to earn more money from a customer than you spend on acquiring them. How to calculate : Divide marketing spend by the number of customers acquired. 
    3. Figure out which marketing channels e.g., social media, PPC, SEO, content marketing, etc., you should invest more in and which of those you should focus less on.

    How Matomo helps businesses acquire new customers 

    1. Use the Acquisitions feature
    2. Use funnels
    3. Study Visitor Profiles
    4. Focus on SEO efforts
    5. Look at the Multi Attribution feature
    6. Set goals
    7. Set Advanced eCommerce reporting

    1. Use the Acquisitions feature

    Matomo Analytics has a dedicated Acquisition feature to help with some of the heavy-lifting, making it easy for you to formulate targeted acquisition plans.

    Acquisitions feature

    This feature helps you learn who your potential customers are and figure out what marketing channels are converting the best for these visitors.

    • Learn what traffic you get from external websites : Knowing who’s helping you succeed from external websites is a crucial step to be able to focus your attention. Paid sponsorships, guest blog posts or even spending more on advertising on the particular website could result in greater traffic.
    • Social Networks : See which social media channels are connecting with the audiences you want. Take the guesswork out by using only the ones you need. By finding out which social channels your ideal audience prefers, you can generate shareable, convincing and engaging content to drive shares and traffic through to your site.
    • Campaigns : Your marketing team may have spent precious time and resource coming up with campaigns that are designed to succeed, but how can you be so sure ? With Campaigns you can understand what marketing campaigns are working, what aren’t, and shift your marketing efforts accordingly to gain more visitors, more effectively, with less costs. Keep track of every ad and content piece you display across internal and external channels to see which is having the biggest impact on your business objectives. Learn more

    Watch this video to learn about the Acquisitions feature

    2. Use funnels

    Creating conversion funnels gives you the big picture on whether your acquisition plans are paying off and where they may be falling short.

    Funnels feature

    If the ultimate goal of your site is to drive conversions, then each funnel can tell you how effectively you’re driving traffic through to your desired outcome.

    By integrating this with Visitor Profiles, you can view historic visitor profiles of any individual user at any stage of the conversion funnel. You see the full user journey at an individual level, including where they entered the funnel from and where they exited. Learn more

    How to amplify acquisition strategies with Funnels : Use conversion funnels to guide acquisition as you can tell which entry point is bringing the most success and which one needs more attention. Tailor your strategies to zone in on areas that have the most potential. You can identify where your visitors are encountering obstacles from the start, that are stopping them from progressing through their journey on your site.

    3. Study Visitor Profiles

    Visitor Profiles helps you understand visitors on a user-by-user basis, detailing each visitors’ history into a profile which summarises every visit, action and purchase made.

    Visitor Profiles feature

    Better understand :

    • Why your visitors viewed your website.

    • Why your returning visitors continue to view your website.

    • What specifically your visitors are looking for and whether they found it on your website.

    The benefit is being able to see how a combination of acquisition channels play a part in a single buyer’s journey.

    How Visitor Profiles helps with acquisition : By understanding the full behavioural patterns of any individual user coming through from external channels, you’ll see the path that led them to take action, where they may have gotten lost, and how engaged they are with your business over time. This gives you an indication of what kinds of visitors you’re attracting and helps you craft a buyer persona that more accurately reflects the audience most interested in you.

    4. Focus on SEO efforts

    Every acquisition plan needs a focus on maximising your Search Engine Optimization (SEO) efforts. When it comes to getting conclusive search engine referrer metrics, you need to be sure you’re getting ALL the insights to drive your SEO strategy.

    Integrate Google, Bing and Yahoo search consoles directly into your Matomo Analytics. This helps kickstart your acquisition goals as you rank highly for keywords that get the most traffic to your website.

    As another major SEO benefit, you can see how the most important search keywords to your business increased and decreased in ranking over time. 

    How to amplify acquisitions strategies with search engines and keywords : By staying on top of your competitors across ALL search engines, you may uncover traffic converting highly from one search engine, or find you could be losing traffic and business opportunities to your competitors across others.

    5. Look at the Multi Attribution feature

    Multi Attribution lets you measure the success of every touchpoint in the customer journey.

    Multi Attribution feature

    Accurately measure (and assign value to) channels where visitors first engaged with your business, where they came from after that, as well as the final channel they came from before purchasing your product or service.

    No longer falsely over-estimate any marketing channel and make smarter decisions when determining acquisition spend to accurately calculate the Customer Acquisition Cost (CAC). Learn more

    6. Set your Goals

    What are the acquisition goals you want to achieve the most ? The Goals feature lets you measure the most important metrics you need to grow your business.

    Goals feature

    Goals are crucial for building your marketing strategy and acquiring new customers. The more goals you track, the more you can learn about behavioural changes as you implement and modify paths that impact acquisition and conversions over time. You’ll understand which channels are converting the best for your business, which cities/countries are most popular, what devices will attract the most visitors and how engaged your visitors are before converting.

    This way you can see if your campaigns (SEO, PPC, signups, blogs etc.) or optimising efforts (A/B Testing, Funnels) have made an impact with the time and investment you have put in. Learn more

    7. Set Advanced Ecommence reporting

    If your website’s overall purpose is to generate revenue whether it be from an online store, asking for donations or from an online paid membership site ; the Ecommerce feature gives you comprehensive insights into your customers’ purchasing behaviours.

    Ecommerce feature

    When you use Ecommerce analytics, you heavily reduce risk when marketing your products to potential customers because you will understand who to target, what to target them with and where further opportunities exist to have the greatest impact for your business. Learn more

    Key takeaway

    Having the tools to ensure you’re creating a well planned acquisition strategy is key to attracting and capturing the attention of potential visitors/leads, and then driving them through a funnel/buyer’s journey on your website. Because of Matomo’s reputation as a trusted analytics platform, the features above can be used to assist you in making smarter data-driven decisions. You can pursue different acquisition avenues with confidence and create a strategy that’s agile and ready for success, all while respecting user privacy.

    Want to learn how to increase engagement with Matomo ? Click here. We’ll go through how you can boost engagement on your website via web analytics.

  • Audio to Video Conversion using FFmpeg in React

    6 octobre 2024, par Yuri

    Upon running my code, the audio successfully gets converted into a video and saved in the bucket, however, the video size is just 9 bytes.

    


    Here's my utility.

    


    import { FFmpeg } from '@ffmpeg/ffmpeg';
import { fetchFile } from '@ffmpeg/util';
import { ref, uploadBytes, getDownloadURL } from 'firebase/storage';
import { storage } from '../firebase'; 

export async function generateAndStoreVideo(audioPath, imagePath, userId) {
  try {
    const ffmpeg = new FFmpeg({ log: true });
    await ffmpeg.load();

    console.log('Fetching audio and image...');
    ffmpeg.writeFile( 'input.mp3', await fetchFile(audioPath));
    ffmpeg.writeFile('input.jpg', await fetchFile(imagePath));
    
    console.log('Running FFmpeg...');
    await ffmpeg.exec(['-i', 'sound.mp3', '-i', 'image.png', 'output.mp4']
    );

    console.log('FFmpeg completed!');
    
    const data = ffmpeg.readFile( 'output.mp4');
    const videoBlob = new Blob([data.buffer], { type: 'video/mp4' });

    console.log('Uploading video to Firebase...');
    const videoRef = ref(storage, `videos/${userId}/${Date.now()}_generated_video.mp4`);
    const uploadSnapshot = await uploadBytes(videoRef, videoBlob);

    const videoURL = await getDownloadURL(uploadSnapshot.ref);

    console.log('Video uploaded successfully! URL:', videoURL);

    return videoURL;
  } catch (error) {
    console.error('Error generating or uploading video:', error);
    throw new Error('Video generation or upload failed.');
  }
}



    


    After uploading, I also got this error :

    


    ErrnoError: FS error
    at handleError (http://localhost:3000/static/js/bundle.js:98427:58)
    at http://localhost:3000/static/js/bundle.js:98450:7


    


    I've made sure I'm using the new FFMPEG version and syntax, but the issues persist.

    


  • FFMPEG Concatenating videos with same 25fps results in output file with 3.554fps

    5 juin 2024, par Kendra Broom

    I created an AWS Lambda function in node.js 18 that is using a static, ver 7 build of FFmpeg located in a lambda layer. Unfortunately it's just the ffmpeg build and doesn't include ffprobe.

    


    I have an mp4 audio file in one S3 bucket and a wav audio file in a second S3 bucket. I'm uploading the output file to a third S3 bucket.

    


    Specs on the files (please let me know if any more info is needed)

    


    Audio :
wav, 13kbps, aac (LC), 6:28 duration

    


    Video :
mp4, 1280x720 resolution, 25 frame rate, h264 codec, 3:27 duration

    


    Goal :
Create blank video to fill in the duration gaps so the full audio is covered before and after the mp4 video (using timestamps and duration). Strip the mp4 audio and use the wav audio only. Output should be an mp4 video with the wav audio playing over it and blank video for 27 seconds (based on timestamp) until mp4 video plays for 3:27, and then blank video to cover the rest of the audio until 6:28.

    


    Actual Result :
An mp4 file with 3.554 frame rate and 10:06 duration.

    


    import { S3Client, GetObjectCommand, PutObjectCommand } from "@aws-sdk/client-s3";
import { createWriteStream, createReadStream, promises as fsPromises } from 'fs';
import { exec } from 'child_process';
import { promisify } from 'util';
import { basename } from 'path';

const execAsync = promisify(exec);

const s3 = new S3Client({ region: 'us-east-1' });

async function downloadFileFromS3(bucket, key, downloadPath) {
    const getObjectParams = { Bucket: bucket, Key: key };
    const command = new GetObjectCommand(getObjectParams);
    const { Body } = await s3.send(command);
    return new Promise((resolve, reject) => {
        const fileStream = createWriteStream(downloadPath);
        Body.pipe(fileStream);
        Body.on('error', reject);
        fileStream.on('finish', resolve);
    });
}

async function uploadFileToS3(bucket, key, filePath) {
    const fileStream = createReadStream(filePath);
    const uploadParams = { Bucket: bucket, Key: key, Body: fileStream };
    try {
        await s3.send(new PutObjectCommand(uploadParams));
        console.log(`File uploaded successfully to ${bucket}/${key}`);
    } catch (err) {
        console.error("Error uploading file: ", err);
        throw new Error('Failed to upload file to S3');
    }
}

function parseDuration(durationStr) {
    const parts = durationStr.split(':');
    return parseInt(parts[0]) * 3600 + parseInt(parts[1]) * 60 + parseFloat(parts[2]);
}

export async function handler(event) {
    const videoBucket = "video-interaction-content";
    const videoKey = event.videoKey;
    const audioBucket = "audio-call-recordings";
    const audioKey = event.audioKey;
    const outputBucket = "synched-audio-video";
    const outputKey = `combined_${basename(videoKey, '.mp4')}.mp4`;

    const audioStartSeconds = new Date(event.audioStart).getTime() / 1000;
    const videoStartSeconds = new Date(event.videoStart).getTime() / 1000;
    const audioDurationSeconds = event.audioDuration / 1000;
    const timeDifference = audioStartSeconds - videoStartSeconds;

    try {
        const videoPath = `/tmp/${basename(videoKey)}`;
        const audioPath = `/tmp/${basename(audioKey)}`;
        await downloadFileFromS3(videoBucket, videoKey, videoPath);
        await downloadFileFromS3(audioBucket, audioKey, audioPath);

        //Initialize file list with video
        let filelist = [`file '${videoPath}'`];
        let totalVideoDuration = 0; // Initialize total video duration

        // Create first blank video if needed
        if (timeDifference < 0) {
            const blankVideoDuration = Math.abs(timeDifference);
            const blankVideoPath = `/tmp/blank_video.mp4`;
            await execAsync(`/opt/bin/ffmpeg -f lavfi -i color=c=black:s=1280x720:r=25 -c:v libx264 -t ${blankVideoDuration} ${blankVideoPath}`);
            //Add first blank video first in file list
            filelist.unshift(`file '${blankVideoPath}'`);
            totalVideoDuration += blankVideoDuration;
            console.log(`First blank video created with duration: ${blankVideoDuration} seconds`);
        }
        
        const videoInfo = await execAsync(`/opt/bin/ffmpeg -i ${videoPath} -f null -`);
        const videoDurationMatch = videoInfo.stderr.match(/Duration: ([\d:.]+)/);
        const videoDuration = videoDurationMatch ? parseDuration(videoDurationMatch[1]) : 0;
        totalVideoDuration += videoDuration;

        // Calculate additional blank video duration
        const additionalBlankVideoDuration = audioDurationSeconds - totalVideoDuration;
        if (additionalBlankVideoDuration > 0) {
            const additionalBlankVideoPath = `/tmp/additional_blank_video.mp4`;
            await execAsync(`/opt/bin/ffmpeg -f lavfi -i color=c=black:s=1280x720:r=25 -c:v libx264 -t ${additionalBlankVideoDuration} ${additionalBlankVideoPath}`);
            //Add to the end of the file list
            filelist.push(`file '${additionalBlankVideoPath}'`);
            console.log(`Additional blank video created with duration: ${additionalBlankVideoDuration} seconds`);
        }

        // Create and write the file list to disk
        const concatFilePath = '/tmp/filelist.txt';
        await fsPromises.writeFile('/tmp/filelist.txt', filelist.join('\n'));

        const extendedVideoPath = `/tmp/extended_${basename(videoKey)}`;
        //await execAsync(`/opt/bin/ffmpeg -f concat -safe 0 -i /tmp/filelist.txt -c copy ${extendedVideoPath}`);
        
        // Use -vsync vfr to adjust frame timing without full re-encoding
        await execAsync(`/opt/bin/ffmpeg -f concat -safe 0 -i ${concatFilePath} -c copy -vsync vfr ${extendedVideoPath}`);

        const outputPath = `/tmp/output_${basename(videoKey, '.mp4')}.mp4`;
        //await execAsync(`/opt/bin/ffmpeg -i ${extendedVideoPath} -i ${audioPath} -map 0:v:0 -map 1:a:0 -c:v copy -c:a aac -b:a 192k -shortest ${outputPath}`);

        await execAsync(`/opt/bin/ffmpeg -i ${extendedVideoPath} -i ${audioPath} -map 0:v:0 -map 1:a:0 -c:v copy -c:a aac -b:a 192k -shortest -r 25 ${outputPath}`);
        console.log('Video and audio have been merged successfully');

        await uploadFileToS3(outputBucket, outputKey, outputPath);
        console.log('File upload complete.');

        return { statusCode: 200, body: JSON.stringify('Video and audio have been merged successfully.') };
    } catch (error) {
        console.error('Error in Lambda function:', error);
        return { statusCode: 500, body: JSON.stringify('Failed to process video and audio.') };
    }
}


    


    Attempts :
I've tried re-encoding the concatenated file but the lambda function times out. I hoped that by creating blank video with a 25fps and all the other specs from the original mp4, I wouldn't have to re-encode the concatenated file. Obviously something is wrong, though. In the commented out code you can see I tried specifying 25 or not, and also tried -vsync and no -vsync. I'm new to FFmpeg so all tips are appreciated !