Recherche avancée

Médias (0)

Mot : - Tags -/presse-papier

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

Autres articles (99)

  • Qu’est ce qu’un éditorial

    21 juin 2013, par

    Ecrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
    Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
    Vous pouvez personnaliser le formulaire de création d’un éditorial.
    Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)

  • Formulaire personnalisable

    21 juin 2013, par

    Cette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
    Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire. (...)

  • Qu’est ce qu’un masque de formulaire

    13 juin 2013, par

    Un masque de formulaire consiste en la personnalisation du formulaire de mise en ligne des médias, rubriques, actualités, éditoriaux et liens vers des sites.
    Chaque formulaire de publication d’objet peut donc être personnalisé.
    Pour accéder à la personnalisation des champs de formulaires, il est nécessaire d’aller dans l’administration de votre MediaSPIP puis de sélectionner "Configuration des masques de formulaires".
    Sélectionnez ensuite le formulaire à modifier en cliquant sur sont type d’objet. (...)

Sur d’autres sites (7418)

  • Recalculate the position of a larger object to re-align two different sized objects after rotation

    26 août 2022, par CRAIG

    I have 2 images I am placing on top of a 1080X1920 canvas.

    


    One is a rectangle that is 800x400 and it is sitting on the 1080X1920 canvas with top left coordinates of x=140 and y=1200

    


    enter image description here

    


    Then I have another image that is the same size of the canvas 1080X1920, but also has a rectangle on it at the exact same coordinates as the first rectangle. I am overlaying this 1080X1920 image at x=0 and y=0 on the canvas so that the rectangle already in this image lines up perfectly with the rectangle that is already placed on the canvas.

    


    enter image description here

    


    My problem is, I need to apply a rotation to both of these and the black and red rectangles need to match up in positioning AFTER the rotation is applied. Could be any rotation, but let's say it is a 15 degree rotation.

    


    When each element is placed on the canvas and then the 15 degree rotation is applied, the rectangles no longer align because of the difference in image size and the offset in rotation as they both rotate around the center point which looks to be my only option in this case.

    


    enter image description here

    


    So I am hoping to sort out a formula I can use that would rectify the positioning of the 1080X1920 image so that the object already embedded in that image lines up with separately overlaid image.

    


    There are of course other ways to deal with this problem, but right now, they would make things quite a bit more difficult, so I wanted to see if this was possible to calculate first.

    


    I have tried several ways to calculate this, but am not super mathematically proficient, so I am grasping at straws at best.

    


    Oh and because I am not extremely mathematically proficient, any dumbing-down of mathematical terms is appreciated. ;)

    


    Oh and possibly this post answers this question, but I can't wrap my head around whether or not it does, so if someone can let me know if it does, I will try harder to understand and apply it to my particular case.

    


    How to recalculate the coordinates of a point after scaling and rotation ?

    


  • ffmpeg segment naming - Moving to superuser (with apologies)

    21 juillet 2022, par kenneth558

    Maybe I am misinterpreting the downvote, but I conclude this question should go on superuser instead. Moving now and will delete this copy soon....

    


    I need to ensure unique segment names : Apparent POE cable defects, etc. around campus cause HikVision camera streams to require their ffmpeg daemons re-started once or twice or more times/day. (I am miles away from this campus for the most part, so I prefer a command line fix until the hardware fixes get applied.) When ffmpeg has to be restarted for a camera (by background bash script), I need the names of the new .mp4 segments positively not to be the same as any previous names.

    


    Background bash process currently does fine to specify an acceptable ddHHMM style new starting name for the first segment after ffmpeg restart BUT after the first or sometime second or third segment is made, ffmpeg insists on future naming to default to an unacceptable YYYmmdd style and thus start to overwrite previous segments. I use "$(date +%d%H%M)" to obtain my acceptable date style.

    


    I've tried a lot of different combinations of date codes and date embedding and both ssegment and segment muxers ; also I know very little of the very complex realm that ffmpeg is normally used in outside of simple rtsp stream copy to .mp4 files.

    


    ffmpeg command that is launched from inside bash script :
bash -c 'nohup ffmpeg -nostdin -stimeout 10000000 -rtsp_transport udp -i "rtsp://192.168.0.11:6554/Streaming/channels/101" -reconnect 1 -reconnect_at_eof 1 -reconnect_streamed 1 -c:v libx264 -f ssegment -strftime 0 -segment_time 180 -segment_format_options movflags=+faststart -reset_timestamps 0 -increment_tc 1 -avoid_negative_ts 1 -c copy -flags +global_header /var/www/camera_streams/camera_east_driveway/"$(date +%d%H%M)"_%3d.mp4 > /dev/null 2>/dev/null & '

    


    Can the segment naming pattern be carried forward indefinitely like I want ? Honestly, I wonder if ffmpeg does not allow for my specific use case naming need ?

    


    (Yes, I know changing from udp to tcp can help, but I don't consider it to be the specific solid naming fix I'm hoping for right now. And I mention HikVision in case there is known frame encoding differences for them than other cameras)

    


  • Inconsistent crop and overflay ffmpeg result with drawImage canvas

    21 juin 2022, par yuno saga

    i try to encode the video block frame to specific pattern order, then in front-end it decode back to normal. I test it in back-end by decode back with same function, it back to normal. but in front-end with canvas the order of block not in right position. if you look into front-end function. it have same pattern. i try to check output from for generate, it equal to for in backend overlay builder command.
    
whats wrong with this ?

    


    ffmpeg config

    


    const { spawn } = require('child_process');

function hflip(width) {
    const sizeBlock = 16;
    let filterCommands = '';
    const length = Math.floor(width / sizeBlock);

    for (let i=0; i < length; i++) { 
        filterCommands += `[0]crop=${sizeBlock}:480:${(i*sizeBlock)}:0[c${i}];`;
    }
    
    for (let i=0; i < length; i++) {
        if (i == 0) filterCommands += '[0]';
        if (i != 0) filterCommands += `[o${i}]`;
    
        filterCommands += `[c${i}]overlay=x=${(width - sizeBlock)-(i*sizeBlock)}:y=0`;
    
        if (i != (length - 1)) filterCommands += `[o${i+1}];`;
    }

    return filterCommands;
}

const crops = spawn('ffmpeg', [
    '-i',
    'C:/Software Development/project/blackpink.mp4',
    '-filter_complex',
    hflip(854),
    '-c:a',
    'copy',
    '-c:v',
    'libx264',
    '-crf',
    '30',
    '-preset',
    'ultrafast',
    '-pix_fmt',
    'yuv420p',
    'C:/Software Development/project/hflip.mp4',
    '-y'
], {
    cwd: 'C:/Software Development/ffmpeg'
})


    


    front-end

    


    

    

    &#xA;&#xA;    &#xA;    &#xA;        <button>play</button>&#xA;        <code class="echappe-js">&lt;script&gt;&amp;#xA;            const canvas = document.createElement(&amp;#x27;canvas&amp;#x27;);&amp;#xA;            document.body.appendChild(canvas)&amp;#xA;            const context = canvas.getContext(&amp;#x27;2d&amp;#x27;);&amp;#xA;            const video = document.createElement(&amp;#x27;video&amp;#x27;);&amp;#xA;            video.src = &amp;#x27;https://drive.google.com/uc?export=download&amp;amp;id=1Z0aFg_N3kP0SUO_xOFB0UBjTRH6_mSmb&amp;amp;confirm=t&amp;#x27;&amp;#xA;&amp;#xA;&amp;#xA;            function hflip(video) {&amp;#xA;                const widthBlock = 16;&amp;#xA;                const heightBlock = 480;&amp;#xA;                const length = Math.floor(video.videoWidth / widthBlock);&amp;#xA;&amp;#xA;                for (let i=0; i &lt; length; i&amp;#x2B;&amp;#x2B;) {&amp;#xA;                    console.log({&amp;#xA;                        cX: (i*widthBlock),&amp;#xA;                        oX: (video.videoWidth - widthBlock) - (i*widthBlock)&amp;#xA;                    });&amp;#xA;&amp;#xA;                    context.drawImage(video, (i*widthBlock), 0, widthBlock, heightBlock,  (video.videoWidth - widthBlock) - (i*widthBlock), 0, widthBlock, heightBlock)&amp;#xA;                }&amp;#xA;            }&amp;#xA;&amp;#xA;            video.onloadedmetadata = () =&gt; {&amp;#xA;                context.canvas.width = video.videoWidth;&amp;#xA;                context.canvas.height = video.videoHeight;&amp;#xA;            }&amp;#xA;&amp;#xA;            video.onplay = () =&gt; {&amp;#xA;                const updateCanvas = () =&gt; {&amp;#xA;                    hflip(video);            &amp;#xA;&amp;#xA;                    video.requestVideoFrameCallback(updateCanvas);&amp;#xA;                }&amp;#xA;&amp;#xA;                updateCanvas();&amp;#xA;            }&amp;#xA;&amp;#xA;            function play() { video.play() }&amp;#xA;        &lt;/script&gt;&#xA;    &#xA;

    &#xD;&#xA;

    &#xD;&#xA;

    &#xD;&#xA;&#xA;