
Recherche avancée
Médias (91)
-
Spitfire Parade - Crisis
15 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Wired NextMusic
14 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (111)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
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 (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)
Sur d’autres sites (13093)
-
avcodec/vqcdec : Check init_get_bits8() for failure
18 mai 2024, par Michael Niedermayer -
avcodec/mpegvideo_enc : Fix potential overflow in RD
11 mai 2024, par Michael Niedermayer -
Why is image loading from ffmpeg using stdout slow ?
23 octobre 2017, par Jirka ŠádaI was just experimenting with FFMPEG, and wrote this testing piece of code, that is reading frames from FFMPEG and displaying them :
public partial class MainWindow : Window
{
private WriteableBitmap wbm = new WriteableBitmap(1920, 1080, 96, 96, PixelFormats.Rgb24, null);
private IntPtr backBuffer;
private int totalFrames = 0;
private bool drawing = false;
public MainWindow()
{
InitializeComponent();
backBuffer = wbm.BackBuffer;
Thread t = new Thread(new ThreadStart(RunFFMPEG));
t.Start();
Thread measurer = new Thread(new ThreadStart(Measure));
measurer.Start();
}
private void Measure()
{
while(true)
{
Thread.Sleep(1000);
Console.Title = "FPS: " + totalFrames;
totalFrames = 0;
}
}
private void UpdateBitmap()
{
drawing = true;
wbm.Lock();
wbm.AddDirtyRect(new Int32Rect(0, 0, 1920, 1080));
wbm.Unlock();
mainImage.Source = wbm;
drawing = false;
}
private void RunFFMPEG()
{
totalFrames = 0;
int length = 1920 * 1080 * 3;
// start FFMPEG process and pipe standart output
ProcessStartInfo info = new ProcessStartInfo("ffmpeg.exe", "-f dshow -vcodec mjpeg -video_size 1920x1080 -framerate 30 -i video=\"A4 TECH HD PC Camera\" -y -pix_fmt rgb24 -f rawvideo -framerate 30 pipe:1");
info.WindowStyle = ProcessWindowStyle.Hidden;
info.UseShellExecute = false;
info.CreateNoWindow = true;
info.RedirectStandardOutput = true;
Process p = new Process();
p.StartInfo = info;
p.Start();
while (true) // read frames from standart output
{
byte[] data = new byte[length];
for (int i = 0; i < length; i++) // read byte by byte, if we call normal Read(), the returned array is always mostly empty
data[i] = (byte)p.StandardOutput.BaseStream.ReadByte();
if (!drawing)
{
Marshal.Copy(data, 0, backBuffer, length);
Dispatcher.Invoke(() => UpdateBitmap()); // we are not in UI thread
}
totalFrames++;
}
}
}The problem is, although I get around 17-20 FPS reported, the Image is redrawing very very slowly (once or twice per a second) and even though the
mainImage.Source =...
line takes always similar amount of time, the speed at which the Image visually updates itself is getting progressively slower. What could be the cause ?? Thanks for any tipsPS : I know the code is ugly and not following MVVM pattern, but it’s just and only for testing, please don’t hate me :-)
Edit : The problem is not speed at which I’m reading from stdout, that’s fine (20 FPS), the problem is, that WPF Image is visually updating very slowly