Recherche avancée

Médias (3)

Mot : - Tags -/collection

Autres articles (111)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

Sur d’autres sites (9290)

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

  • Adjust client implementations for new demo file size restrictions.

    24 mai 2015, par blueimp
    Adjust client implementations for new demo file size restrictions.
  • How to make a nonstreamable mp4 streamable from a JS browser client ?

    14 mai 2020, par Daniel Kobe

    For my service we are sending videos that need processing. Unfortunately some of the videos are non streamable. By that I mean the metadata information is at the end of the file and not the beginning. With ffmpeg you can make a video streamable with this command : ffmpeg -i source.mp4 -a:v copy -a:c copy -movflags faststart output.mp4

    &#xA;&#xA;

    Is there anyway I can replicate ffmpegs faststart logic from a JS client ?

    &#xA;&#xA;

    I see that there are libaries like ffmpeg.js but I was hoping to avoid having a huge library in the code.

    &#xA;