
Recherche avancée
Médias (2)
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (24)
-
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
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 (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.
Sur d’autres sites (5908)
-
Naudio produces wierd noise with ffmpeg
7 décembre 2020, par SfueHi there I was trying to make a music player in c# using the
windows form
and I ended up something like this -

var ffmpeg = Process.Start(new ProcessStartInfo
 {
 FileName = "ffmpeg",
 Arguments = $@"-loglevel panic -i ""path/to/my-music.mp3"" -ac 2 -f s16le -ar 44100 pipe:1",
 UseShellExecute = false,
 CreateNoWindow = true,
 RedirectStandardOutput = true
 }); 
 var p = new RawSourceWaveStream(ffmpeg.StandardOutput.BaseStream,new WaveFormat(44100 , 16, 1));
waveOutDevice.Init(p);
waveOutDevice.Play();



But it seems to produce some weird cracking noises , I have been trying it out since 2 days but couldn't get a fix, Any help ?


-
Recording with python librtmp RTMP shrinks
31 décembre 2022, par YojuanThe code for capturing a video stream using python librtmp is this :


import librtmp

conn = librtmp.RTMP('rtmp://some_program', live=True)
conn.connect()
stream = conn.create_stream(update_buffer=True)
 
f = open("my_program.flv", 'wb')
while True:
 try:
 data=stream.read(1024)
 if data:
 f.write(data)
 f.flush()
 except:
 print("Error during stream")



The duration of the program is of 1 hour, but when i play the video, the duration becomes in 59 min and 52 secs or 59 min and 56 secs.... but in the most cases the duration is 1 hour exactly.


I noticed that the first record always is perfect but in some cases the second shrinks (when I use the function for second time or more)


First I thought the problem was on ffmpeg because I use it to encode the video but it isn't because the video without encoding (the raw capture) shrinks anyway and i have other program that capture the same video with duration of 1 hour every time.


What happens here ? I suppose that there is a buffer that is not being emptied correctly or something like that.


-
ffmpeg.exe freezes
17 mars 2015, par Ayhan DormanI’m using Asp.Net C# Framework 4 and currently developing a video conversion application. I’m also using ffmpeg to convert from all uploaded formats to flv. I’m first converting uploaded file to mpg and after to flv due to problems I encountered while trying conversion directly to flv from mp4 sometimes. But ffmpeg freezes as soon as it’s done with conversion process to mpg file. When I run task manager and check the processes list, it just stands there using no CPU resource. When I end the ffmpeg process directly from task manager, other process take place which converts from mpg to flv and preview file (jpg) and works smoothly. Due to freezing of first process, the second process cannot start when I try to upload from my web page’s file upload form. I appreciate any response from now. Here is my code :
string duration = "00:00:00";
//converting video
Process ffmpeg;
ffmpeg = new Process();
// convert to mpg 1st
ffmpeg.StartInfo.Arguments = " -i \"" + Server.MapPath("static/user/vid/") + videolink + "\" -f mpeg -b 300k -ac 2 -ab 128k -ar 44K \"" + Server.MapPath("static/user/vid/") + mpglink + "\"";
ffmpeg.StartInfo.FileName = Page.MapPath("bin/ffmpeg.exe");
ffmpeg.StartInfo.CreateNoWindow = true;
ffmpeg.StartInfo.UseShellExecute = false;
ffmpeg.StartInfo.RedirectStandardOutput = true;
ffmpeg.StartInfo.RedirectStandardError = true;
ffmpeg.Start();
ffmpeg.WaitForExit();
ffmpeg.Close();
// mpg 2 flv
ffmpeg = new Process();
ffmpeg.StartInfo.Arguments = " -i \"" + Server.MapPath("static/user/vid/") + mpglink + "\" -f flv -s 624x352 \"" + Server.MapPath("static/user/vid/") + flvlink + "\"";
ffmpeg.StartInfo.FileName = Page.MapPath("bin/ffmpeg.exe");
ffmpeg.StartInfo.CreateNoWindow = true;
ffmpeg.StartInfo.UseShellExecute = false;
ffmpeg.StartInfo.RedirectStandardOutput = true;
ffmpeg.StartInfo.RedirectStandardError = true;
ffmpeg.Start();
ffmpeg.BeginOutputReadLine();
string error = ffmpeg.StandardError.ReadToEnd();
ffmpeg.WaitForExit();
try
{
duration = error.Substring(error.IndexOf("Duration: ") + 10, 8);
}
catch
{
}
if (ffmpeg.ExitCode != 0)
{
ltrUpload.Text = "<div class="\"resultbox-negative\"">Problem occured during upload process. Error code: " + error + "<br />" + "</div>";
return;
}
ffmpeg.Close();
// generate preview image
ffmpeg.StartInfo.Arguments = " -i \"" + Server.MapPath("static/user/vid/") + flvlink + "\" -s 624x352 -ss 00:00:03 -an -vframes 1 -f image2 -vcodec mjpeg \"" + Server.MapPath("static/user/vid/") + flvlink.Replace(".flv", ".jpg") + "\"";
ffmpeg.StartInfo.FileName = Page.MapPath("bin/ffmpeg.exe");
ffmpeg.StartInfo.CreateNoWindow = true;
ffmpeg.StartInfo.UseShellExecute = false;
ffmpeg.StartInfo.RedirectStandardOutput = true;
ffmpeg.StartInfo.RedirectStandardError = true;
ffmpeg.Start();
ffmpeg.WaitForExit();
ffmpeg.Close();
// deleting original file and mpg
FileInfo fi = new FileInfo(Server.MapPath("static/user/vid/") + videolink);
if (fi.Exists) fi.Delete();
fi = new FileInfo(Server.MapPath("static/user/vid/") + mpglink);
if (fi.Exists) fi.Delete();