
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 (54)
-
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
Problèmes fréquents
10 mars 2010, parPHP et safe_mode activé
Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (5052)
-
How to make a nonstreamable mp4 streamable from a JS browser client ?
14 mai 2020, par Daniel KobeFor 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



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


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

-
Adjust client implementations for new demo file size restrictions.
24 mai 2015, par blueimpAdjust client implementations for new demo file size restrictions.
-
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.