
Recherche avancée
Médias (91)
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
-
USGS Real-time Earthquakes
8 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
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
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
-
Creativecommons informational flyer
16 mai 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (112)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains 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, parThe 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, parFormulaire 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 AdilCurrently 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 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.