
Recherche avancée
Médias (91)
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
-
Les Miserables
4 juin 2012, par
Mis à jour : Février 2013
Langue : English
Type : Texte
-
Ne pas afficher certaines informations : page d’accueil
23 novembre 2011, par
Mis à jour : Novembre 2011
Langue : français
Type : Image
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
-
Richard Stallman et la révolution du logiciel libre - Une biographie autorisée (version epub)
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (28)
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
Sur d’autres sites (4368)
-
ffmpeg wasm - how to take client-side created mp4 and upload it to the same server hosting the index/js files being used
29 juillet 2022, par John FarrellOk, so Im an IT guy and kind of a noob on the dev side of the fence. But I've been able to create this ffmpeg wasm page that takes a canvas and converts it to webm / and .mp4 — what i WANT to do is take the resulting .mp4 file and upload it to the server where the page/js are being served from. is this possible ? I will include my source code which is fairly simple and straight forward, I just don't know how to manipulate the resulting mp4 file that ffmpeg spits out (i realize it is happening client side) to be able to push it up to the server (maybe with aupload.php type situation ?) the solution can be html/java/php whatever, so long as it takes the mp4 output and gets it onto the server. I'd VERY MUCH appreciate a hand here.


Going to try my best to properly insert the html and js. please bear with me if i've done something wrong, i've never had to -ask- a question on here, usually just look up existing answers.




const { createFFmpeg } = FFmpeg;
const ffmpeg = createFFmpeg({
 log: true
});

const transcode = async (webcamData) => {
 const message = document.getElementById('message');
 const name = 'record.webm';
 await ffmpeg.load();
 message.innerHTML = 'Start transcoding';
 await ffmpeg.write(name, webcamData);
 await ffmpeg.transcode(name, 'output.mp4');
 message.innerHTML = 'Complete transcoding';
 const data = ffmpeg.read('output.mp4');

 const video = document.getElementById('output-video');
 video.src = URL.createObjectURL(new Blob([data.buffer], { type: 'video/mp4' }));
 dl.href = video.src;
 dl.innerHTML = "download mp4"
}

fn().then(async ({url, blob})=>{
 transcode(new Uint8Array(await (blob).arrayBuffer()));
})

function fn() {
var recordedChunks = [];

var time = 0;
var canvas = document.getElementById("canvas");

return new Promise(function (res, rej) {
 var stream = canvas.captureStream(60);

 mediaRecorder = new MediaRecorder(stream, {
 mimeType: "video/webm; codecs=vp9"
 });

 mediaRecorder.start(time);

 mediaRecorder.ondataavailable = function (e) {
 recordedChunks.push(event.data);
 // for demo, removed stop() call to capture more than one frame
 }

 mediaRecorder.onstop = function (event) {
 var blob = new Blob(recordedChunks, {
 "type": "video/webm"
 });
 var url = URL.createObjectURL(blob);
 res({url, blob}); // resolve both blob and url in an object

 myVideo.src = url;
 // removed data url conversion for brevity
 }

// for demo, draw random lines and then stop recording
var i = 0,
tid = setInterval(()=>{
 if(i++ > 20) { // draw 20 lines
 clearInterval(tid);
 mediaRecorder.stop();
 }
 let canvas = document.querySelector("canvas");
 let cx = canvas.getContext("2d");
 cx.beginPath();
 cx.strokeStyle = 'green';
 cx.moveTo(Math.random()*100, Math.random()*100);
 cx.lineTo(Math.random()*100, Math.random()*100);
 cx.stroke();
},200)

});
}





<code class="echappe-js"><script src="https://unpkg.com/@ffmpeg/ffmpeg@0.8.1/dist/ffmpeg.min.js" defer></script>

<script src='http://stackoverflow.com/feeds/tag/canvas2mp4.js' defer></script>




here is a canvas




here is a recorded video of the canvas in webM format





here is a transcoded mp4 from the webm above CLIENT SIDE using ffmpeg














-
How to create an image using ffmpeg and PHP ?
19 décembre 2014, par webkulI’m using this script, but I’m not able to create the image.
My file is here.
-
How to make VideoCodec.Raw with Accord.Video.FFMPEG ?
13 décembre 2020, par ryanm8227I have succeeded with
VideoCodec.MPEG4
but unfortunately, the video quality is terrible :

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Accord.Video.FFMPEG;

namespace Screen_Recorder
{
 public partial class Form1 : Form
 {
 Timer timer1 = new Timer();
 VideoFileWriter vf = new VideoFileWriter();

 System.Random r = new System.Random();

 long rnd(double a, double b)
 {
 return Convert.ToInt64(a + r.NextDouble() * (b - a));
 }

 public Form1()
 {
 InitializeComponent();
 timer1.Interval = 10;
 timer1.Tick += Timer1_Tick;

 vf.Open(Convert.ToString(rnd(9999999999999999, 1000000000000000)) + ".mp4", 1920, 1080, 25, VideoCodec.MPEG4, 1000000);
 
 }

 private void Timer1_Tick(object sender, EventArgs e)
 {
 Bitmap bp = new Bitmap(1920, 1080);
 Graphics gr = Graphics.FromImage(bp);
 gr.CopyFromScreen(0, 0, 0, 0, new Size(bp.Width, bp.Height));

 pictureBox1.Image = bp;
 pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;

 vf.WriteVideoFrame(bp);
 }

 private void buttonStartRecording_Click(object sender, EventArgs e)
 {
 timer1.Start();
 }

 private void buttonStopRecording_Click(object sender, EventArgs e)
 {
 timer1.Stop();
 vf.Close();
 }
 }
}



That being said, I would like to try making the video without the MPEG4, but with RAW, which is simply a non-compressed video. I expect the size to be pretty big, but that is not an issue.