Recherche avancée

Médias (1)

Mot : - Tags -/net art

Autres articles (66)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • Création définitive du canal

    12 mars 2010, par

    Lorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
    A la validation, vous recevez un email vous invitant donc à créer votre canal.
    Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
    A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (8138)

  • Burning subtitles into video with ffmpeg with specific margin not working

    17 mai 2024, par Anthony

    I am trying to build a tool where people can position their subtitles on an HTML5 video and then I will burn the subtitles into the video for them.

    


    I can easily get the position of the subtitles, in whatever format I need, that's easy. However, no combination of values that I feed to ffmpeg are working.

    


    My holy grail is an x and y offest (aka offset 5% from the left, 10% from the bottom, in terms of video height/width).

    


    To achieve this, I would like the subtitles to start in the very bottom-left corner.

    


    ffmpeg -y -i english.mp4 -vf "subtitles=english.srt:force_style='Alignment=1,OutlineColour=&H100000000,BorderStyle=3,Outline=1,Shadow=0,FontName=Arial,FontSize=24,MarginL=140,MarginV=0'"  -c:v libx264 -crf 23 -c:a copy output_video.mp4


    


    Here is something that is approaching working, but it's behaving very strangely. The video is 850x480 but when I do a margin of 140 it goes way past the midway point of the video.

    


    Am I missing something ? How can I start the margin in the bottom left, and then apply the margin I want to push it away from the left and away from the bottom ? I can do it either as a percentage of the video height/width if that API is supported or just pixels is fine too (but clearly doesn't seem to be working)

    


  • Can not add images after add background to audio

    16 mars 2017, par Thanh Dao

    I use below command to concat background to an audio file :

    "ffmpeg" -i /path/to/image.png -i /path/to/audio.mp3 -vsync vfr -pix_fmt yuv420p /path/to/video-1.mp4 2>&1

    Next, I use that command to add other images to created video :

    "ffmpeg" -f concat -safe 0 -i /path/to/text.txt -i /path/to/video-1.mp4 /path/to/video-2.mp4 2>&1

    Content of my text.txt file :

    /path/to/img1.jpg
    duration 6
    /path/to/img2.jpg
    duration 6
    /path/to/img3.jpg
    duration 6
    /path/to/img4.jpg
    duration 6

    Obtained video display only background image. Other images have not been shown.

    What are my wrong in these commands ? And how to set the display position of other images in video ? To display images by position, I use below command, but after it ran, my machine was crashed :

    "ffmpeg" -f concat -safe 0 -i /path/to/text.txt -i /path/to/video-1.mp4 -filter_complex "overlay=0:0, scale=640:640" /path/to/video-2.mp4 2>&1

    Update :

    I do follow order by below steps and got video with text and images, but the position is incorrect. I can’t find any solution for custom :

    "ffmpeg" -f concat -safe 0 -i /path/to/text.txt -i /path/to/audio.mp3 -vsync vfr -pix_fmt yuv420p /path/to/tmp-video-1.mp4 2>&1

    "ffmpeg" -i /path/to/background.png -i /path/to/tmp-video-1.mp4 -filter_complex "overlay=0:0" /path/to/tmp-video-2.mp4 2>&1

    "ffmpeg" -i /path/to/tmp-video-2.mp4 -vf "[in]<define texts="texts" and="and" duration="duration">[out]" -codec:a copy /path/to/endvideo.mp4 2>&amp;1
    </define>

    Please take a look my video : http://184.171.170.45/cron/tmp/funny-1489648654.mp4
    I tried to set overlay property in second command : -640:0, let images in horizontal center of background, but its not working

  • How can I add a random watermark to a video during processing in Node.js and Express.js using FFmpeg ?

    3 avril 2023, par Ariful islam

    I want to add a watermark to a video that changes randomly during processing. I am using Node.js and Express.js with FFmpeg. Currently, I am able to add a static watermark to the video using the drawtext filter. However, I want to change the watermark text randomly every few seconds.

    &#xA;

    How can I achieve this using FFmpeg in my Node.js and Express.js app ? Here's my current code :

    &#xA;

    const email = &#x27;name@gmail.com&#x27;;&#xA;app.post(&#x27;/addwatermark&#x27;, upload.single(&#x27;video&#x27;), (req, res) => {&#xA;const fileName = path.basename(req.file.path) &#x2B; &#x27;.mp4&#x27;;&#xA;const outputPath = `public/reduceSize/${fileName}`;&#xA;const outputPathWithWatermark = `public/reduceSize/${fileName}-wm.mp4`;&#xA;let watermarkPosition = { x: 10, y: 650 };&#xA;&#xA;// Create the directory if it doesn&#x27;t exist&#xA;const outputDir = path.dirname(outputPathWithWatermark);&#xA;if (!fs.existsSync(outputDir)) {&#xA;    fs.mkdirSync(outputDir, { recursive: true });&#xA;}&#xA;&#xA;// Send a comment to keep the connection alive&#xA;res.write(&#x27;: ping\n\n&#x27;);&#xA;&#xA;// Function to randomly generate watermark position&#xA;const changeWatermarkPosition = () => {&#xA;    watermarkPosition = { x: Math.floor(Math.random() * 100), y: Math.floor(Math.random() * 100) };&#xA;};&#xA;&#xA;// Change watermark position every 5 seconds &#xA;setInterval(changeWatermarkPosition, 5000);&#xA;const watermarkStyle = `-vf drawtext=text=&#x27;${email}&#x27;:x=(w-text_w-10):y=(h-text_h-10):fontcolor=white:fontsize=24:shadowcolor=black:shadowx=1:shadowy=1:box=1:y=${watermarkPosition.y}:fontcolor=red:fontsize=24:shadowcolor=black:shadowx=1:shadowy=1:box=1:boxcolor=black@0.5`&#xA;&#xA;ffmpeg(req.file.path)&#xA;    .addOption(watermarkStyle)&#xA;    .output(outputPathWithWatermark)&#xA;    .videoCodec(&#x27;libx264&#x27;)&#xA;    .audioCodec(&#x27;aac&#x27;)&#xA;    .size(&#x27;50%&#x27;)&#xA;    .on(&#x27;error&#x27;, (err) => {&#xA;        console.error(`FFmpeg error: ${err.message}`);&#xA;        res.status(500).json({ message: err.message });&#xA;    })&#xA;    .on(&#x27;progress&#x27;, (progress) => {&#xA;        // Set the watermark position every 5 seconds randomly&#xA;        changeWatermarkPosition();&#xA;&#xA;        const mb = progress.targetSize / 1024;&#xA;        const data = {&#xA;            message: `Processing: ${mb.toFixed(2)} MB converted`,&#xA;            watermark: `Adding watermark to video: ${progress.framesProcessed} frames processed`&#xA;        };&#xA;        console.log(data.message);&#xA;        res.write(`data: ${JSON.stringify(data)}\n\n`);&#xA;&#xA;    })&#xA;    .on(&#x27;end&#x27;, () => {&#xA;        console.log(`Video successfully converted to ${outputPathWithWatermark}`);&#xA;        // Remove the temporary file&#xA;    })&#xA;    .run();&#xA; });&#xA;

    &#xA;

    I want to secure my video from unauthorized person by using email in a video and the email will be move around the video randomly every 5 seconds.

    &#xA;

    I have read this (Add dynamic watermark that randomly changes position over video React/Node) document but didn't get any solution.

    &#xA;