
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (38)
-
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...) -
Taille des images et des logos définissables
9 février 2011, parDans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...) -
Que fait exactement ce script ?
18 janvier 2011, parCe script est écrit en bash. Il est donc facilement utilisable sur n’importe quel serveur.
Il n’est compatible qu’avec une liste de distributions précises (voir Liste des distributions compatibles).
Installation de dépendances de MediaSPIP
Son rôle principal est d’installer l’ensemble des dépendances logicielles nécessaires coté serveur à savoir :
Les outils de base pour pouvoir installer le reste des dépendances Les outils de développements : build-essential (via APT depuis les dépôts officiels) ; (...)
Sur d’autres sites (5572)
-
avutil/timestamp : introduce av_ts_make_time_string2 for better precision
17 mars 2024, par Marton Balintavutil/timestamp : introduce av_ts_make_time_string2 for better precision
av_ts_make_time_string() used "%.6g" format, but this format was losing
precision even when the timestamp to be printed was not that large. For example
for 3 hours (10800) seconds, only 1 decimal digit was printed, which made this
format inaccurate when it was used in e.g. the silencedetect filter. Other
detection filters printing timestamps had similar issues. Also time base
parameter of the function was *AVRational instead of AVRational.Resolve these problems by introducing a new function, av_ts_make_time_string2().
We change the used format to "%.*f", use a precision of 6, except when printing
values near 0, in which case we calculate the precision dynamically to aim for
a similar precision in normal form as with %.6g. No longer using scientific
representation can make parsing the timestamp easier for the users, we can
safely do this because the theoretical maximum of INT64_MAX*INT32_MAX still
fits into the string buffer in normal form.We somewhat imitate %g by trimming ending zeroes and the potential decimal
point characters. In order not to trim "inf" as well, we assume that the
decimal point string does not contain the letter "f". Note that depending on
printf %f implementation, we might trim "infinity" to "inf".Thanks for Allan Cady for bringing up this issue.
Signed-off-by : Marton Balint <cus@passwd.hu>
-
Nextjs/React/JS How compress video file uploaded by user through input (client side preferred)
1er novembre 2022, par vana22I 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 'next/head'
import styles from '../styles/Home.module.css'
import { useState, useEffect } from 'react'

export default function Home() {

 const [videofile, setVideo] = useState("")
 const [viddur, setviddur] = useState("")


 useEffect(() => {
 // only run this if videofile exists
 if (videofile != "") {
 console.log("compress video now ")
 console.log(videofile.type)


 // get duration of video by creating a theoretical video component
 var video = document.createElement('video');
 video.preload = 'metadata';
 video.onloadedmetadata = function() {
 window.URL.revokeObjectURL(video.src);
 // here now can check if video is too long
 setviddur(video.duration)
 }
 video.src = URL.createObjectURL(videofile)
 
 }
 }, [videofile]);

 const clickedvideo = () => {
 console.log("clicked video")
 }

 const compressvid = () => {
 // here need to compress the video so that the size is smaller: preferred client-side; if that's not possible howis it posssible server side or with a cheap api
 }

 return (
 <div classname="{styles.container}">
 
 
 
 
 

 <main classname="{styles.main}">
 <h1 classname="{styles.title}">
 Video compressor
 </h1>
 <p>Size of video before: {videofile.size}</p>
 <p>Duration of video: {viddur}</p>
 <p>Size of video after: { }</p>
 <input classname="{styles.videoinput}" type="file" accept="video/mp4,video/x-m4v,video/*" />> setVideo(e.target.files[0])}>
 <div>
 {(videofile != "") ? <video autoplay="autoplay" loop="loop" src="{URL.createObjectURL(videofile)}" width="300px" height="300px"></video> : null}
 </div>
 </main>
 </div>
 )
}



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


-
Revision 35436 : Petites pétouilles en passant par là (écriture aux dernières normes ...
22 février 2010, par marcimat@… — LogPetites pétouilles en passant par là (écriture aux dernières normes ISO)…