
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (67)
-
Modifier la date de publication
21 juin 2013, parComment changer la date de publication d’un média ?
Il faut au préalable rajouter un champ "Date de publication" dans le masque de formulaire adéquat :
Administrer > Configuration des masques de formulaires > Sélectionner "Un média"
Dans la rubrique "Champs à ajouter, cocher "Date de publication "
Cliquer en bas de la page sur Enregistrer -
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
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 (12429)
-
Révision 22351 : Fix #3386 : gerer le host reel vs le host vu par PHP en cas de reverse proxy a l’...
27 juillet 2015, par cedric - -
.NET Process - Redirect stdin and stdout without causing deadlock
21 juillet 2017, par user1150856I’m trying to encode a video file with FFmpeg from frames generated by my program and then redirect the output of FFmpeg back to my program to avoid having an intermediate video file.
However, I’ve run into what seems to be a rather common problem when redirecting outputs in System.Diagnostic.Process, mentioned in the remarks of the documentation here, which is that it causes a deadlock if run synchronously.
After tearing my hair out over this for a day, and trying several proposed solutions found online, I still cannot find a way to make it work. I get some data out, but the process always freezes before it finishes.
Here is a code snippet that produces said problem :
static void Main(string[] args)
{
Process proc = new Process();
proc.StartInfo.FileName = @"ffmpeg.exe";
proc.StartInfo.Arguments = String.Format("-f rawvideo -vcodec rawvideo -s {0}x{1} -pix_fmt rgb24 -r {2} -i - -an -codec:v libx264 -preset veryfast -f mp4 -movflags frag_keyframe+empty_moov -",
16, 9, 30);
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardInput = true;
proc.StartInfo.RedirectStandardOutput = true;
FileStream fs = new FileStream(@"out.mp4", FileMode.Create, FileAccess.Write);
//read output asynchronously
using (AutoResetEvent outputWaitHandle = new AutoResetEvent(false))
{
proc.OutputDataReceived += (sender, e) =>
{
if (e.Data == null)
{
outputWaitHandle.Set();
}
else
{
string str = e.Data;
byte[] bytes = new byte[str.Length * sizeof(char)];
System.Buffer.BlockCopy(str.ToCharArray(), 0, bytes, 0, bytes.Length);
fs.Write(bytes, 0, bytes.Length);
}
};
}
proc.Start();
proc.BeginOutputReadLine();
//Generate frames and write to stdin
for (int i = 0; i < 30*60*60; i++)
{
byte[] myArray = Enumerable.Repeat((byte)Math.Min(i,255), 9*16*3).ToArray();
proc.StandardInput.BaseStream.Write(myArray, 0, myArray.Length);
}
proc.WaitForExit();
fs.Close();
Console.WriteLine("Done!");
Console.ReadKey();
}Currently i’m trying to write the output to a file anyway for debugging purposes, but this is not how the data will eventually be used.
If anyone knows a solution it would be very much appreciated.
-
Impossible to redirect video stream after conversion (mkv to mp4)
17 décembre 2019, par elgruskoI’m currently realising a school project which aims a streaming video website (like Netflix) using torrent-stream (with the magnet link). I am using NodeJS for the stream part.
My problem is : I can’t redirect the stream to the HTML 5 player while i’m trying to stream and converting (with ffmpeg) video at the same time. I think it’s because I just can’t know what’s will be the final size of the converted file.
In browser’s console I have this message :net::ERR_CONTENT_LENGTH_MISMATCH 200 (OK)
I tried to put this in the header :
Transfer-Encoding: chunked
instead of Content-Length
I specify that the stream (before conversion) works perfectlyThis is my code :
getTorrentFile.then(function (file) {
res.setHeader('Content-Type', 'video/mp4');
res.setHeader('Content-Length', file.length);
const ranges = parseRange(file.length, '15' /* variable à comprendre */, { combine: true });
console.log(ranges);
if (ranges === -1) {
// 416 Requested Range Not Satisfiable
console.log('416')
res.statusCode = 416;
return res.end();
} else if (ranges === -2 || ranges.type !== 'bytes' || ranges.length > 1) {
// 200 OK requested range malformed or multiple ranges requested, stream ent'ire video
if (req.method !== 'GET') return res.end();
console.log('200')
stream = file.createReadStream()
ffmpeg(stream)
.videoCodec('libx264')
.audioCodec('aac')
.output(res)
.output('./video/' + film + '_s' + season + '_e' + episode + '.mp4')
.outputFormat('mp4')
.outputOptions('-movflags frag_keyframe+empty_moov')
.on('error', function(err) {
console.log('An error occurred: ' + err.message);
})
.on('progress', function(progress) {
console.log('Processing: ' + progress.targetSize + 'kb done');
})
.on('end', function() {
console.log('Processing finished !');
})
.addOutputOption('-acodec')
.run()Sorry if i’m not really clear, ask me some questions if you need more informations :)
Thanks for your help, bye :)