Recherche avancée

Médias (91)

Autres articles (112)

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

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

Sur d’autres sites (9582)

  • Anomalie #2713 : Gestion des auteurs - Bugs

    18 mai 2012, par Julien -

    ben non ! (re-testé en 19418) En fait, voir capture d’écran : auteur6.png : J’ai une ligne vide initiale : celle-ci ne pose pas de pb en effet. J’ai une autre ligne vide entre rubrique1 et rubrique2 : c’est celle-ci qui pose pb. Elle ajoute un élément vide, 1ere chose, et à l’enregistrement, (...)

  • Crop video scale square to round shape -Android

    13 septembre 2019, par Adil

    Currently I’m developing video editing app, in which i want to overlay video to image i used FFMPEG library and use overlay command and export video to video.mp4 format

    Here is done with overlay command :

    private void extractImagesVideo() {
       File moviesDir = Environment.getExternalStoragePublicDirectory(
       Environment.DIRECTORY_PICTURES
    );

    String filePrefix = "extract_picture";
    String fileExtn = ".mp4";

    File dir = new File(moviesDir, "VideoEditor");
    int fileNo = 0;
    while (dir.exists()) {
    fileNo++;
    dir = new File(moviesDir, "VideoEditor" + fileNo);

    }
    dir.mkdir();
    File dest = new File(dir, filePrefix + "%03d" + fileExtn);

    Log.d(TAG, "startTrim: dest: " + dest.getAbsolutePath());

    // String complexCommand[]={"-y","-i",mStrImagePath,"-i",mStrVideoPath,"-filter_complex","[0]scale=720:1280:force_original_aspect_ratio=decrease,drawbox=x=10:y=10:w=100:h=100:color=pink@0.5:t=max: (ow-iw)/2:(oh-ih)/2,setsar=1[backd],[backd][1] overlay=x=(main_w-overlay_w)/(main_w-overlay_w):y=(main_h-overlay_h)","-acodec","copy",dest.getAbsolutePath()};

    String complexCommand[]={"-y","-i",mStrVideoPath,"-f","lavfi","-i","color=c=black:s=1920x1080","-filter_complex","[0:v]scale=w=0.80*iw:h=0.80*ih[scaled],[1:v][scaled]overlay=x=0.10*main_w:y=0.10*main_h:eof_action=endall[out]","-acodec","copy",dest.getAbsolutePath()};


    // String complexCommand[]={"-y","-i",mStrImagePath,"-i",mStrVideoPath,"-filter_complex","[1:v] scale=200:200 [ovr1], [1:v] scale=200:200 [ovrl2], [0:v][ovr1] overlay=25:25:enable='between(t,0,20)' [temp1], [temp1][ovrl2] overlay=50:50:enable='between(t,20,40)'","-acodec","copy",dest.getAbsolutePath()};
    // String complexCommand[]={"-y","-i",mStrImagePath,"-i",mStrVideoPath,"-filter_complex","[0]scale=1024:1280:force_original_aspect_ratio=decrease,pad=1024:1280:(ow-iw)/2:(oh-ih)/2,setsar=1[backd],[backd][1] overlay=x=(main_w-overlay_w)/(main_w-overlay_w):y=(main_h-overlay_h):shortest=1","-acodec","copy",dest.getAbsolutePath()};

    /* Remove -r 1 if you want to extract all video frames as images from the specified time duration.*/
    execFFmpegBinary(complexCommand);
    }

    Issue is video showing square shape i want to crop video into rounded shape, i check almost solutions and check also FFMPEG commands , i found mask overlay on video but isn’t a proper solution

  • Nextjs/React/JS How compress video file uploaded by user through input (client side preferred)

    1er novembre 2022, par vana22

    I have made a basic app where the user can upload a video file through an input.
As you can see in the code i also retrieve the duration and the size of the initial video.

    


    Now the question is, how i can compress the video file in the function "compressvid" so that the size of the video becomes massively smaller (at later stage i want to upload these videos to firebase firestore).
I'e read something about ffmpeg but wasn't able to figure out how to use it here.
I prefer it to be client side as the videos a client can upload are at max 30sec long.
If client side is not possible how would it work server side ?

    


    import Head from &#x27;next/head&#x27;&#xA;import styles from &#x27;../styles/Home.module.css&#x27;&#xA;import { useState, useEffect } from &#x27;react&#x27;&#xA;&#xA;export default function Home() {&#xA;&#xA;  const [videofile, setVideo] = useState("")&#xA;  const [viddur, setviddur] = useState("")&#xA;&#xA;&#xA;  useEffect(() => {&#xA;    // only run this if videofile exists&#xA;    if (videofile != "") {&#xA;      console.log("compress video now ")&#xA;      console.log(videofile.type)&#xA;&#xA;&#xA;      // get duration of video by creating a theoretical video component&#xA;      var video = document.createElement(&#x27;video&#x27;);&#xA;      video.preload = &#x27;metadata&#x27;;&#xA;      video.onloadedmetadata = function() {&#xA;        window.URL.revokeObjectURL(video.src);&#xA;        // here now can check if video is too long&#xA;        setviddur(video.duration)&#xA;      }&#xA;      video.src = URL.createObjectURL(videofile)&#xA;      &#xA;    }&#xA;  }, [videofile]);&#xA;&#xA;  const clickedvideo = () => {&#xA;    console.log("clicked video")&#xA;  }&#xA;&#xA;  const compressvid = () => {&#xA;    // here need to compress the video so that the size is smaller: preferred client-side; if that&#x27;s not possible howis it posssible server side or with a cheap api&#xA;  }&#xA;&#xA;  return (&#xA;    <div classname="{styles.container}">&#xA;      &#xA;        &#xA;        &#xA;        &#xA;      &#xA;&#xA;      <main classname="{styles.main}">&#xA;        <h1 classname="{styles.title}">&#xA;          Video compressor&#xA;        </h1>&#xA;        <p>Size of video before: {videofile.size}</p>&#xA;        <p>Duration of video: {viddur}</p>&#xA;        <p>Size of video after: { }</p>&#xA;        <input classname="{styles.videoinput}" type="file" accept="video/mp4,video/x-m4v,video/*" />> setVideo(e.target.files[0])}>&#xA;        <div>&#xA;          {(videofile != "") ? <video autoplay="autoplay" loop="loop" src="{URL.createObjectURL(videofile)}" width="300px" height="300px"></video> : null}&#xA;        </div>&#xA;      </main>&#xA;    </div>&#xA;  )&#xA;}&#xA;

    &#xA;

    I tried to compress a video uploaded by a user but didn't figure out how to solve it.

    &#xA;