
Advanced search
Medias (3)
-
Exemple de boutons d’action pour une collection collaborative
27 February 2013, by
Updated: March 2013
Language: français
Type: Picture
-
Exemple de boutons d’action pour une collection personnelle
27 February 2013, by
Updated: February 2013
Language: English
Type: Picture
-
Collections - Formulaire de création rapide
19 February 2013, by
Updated: February 2013
Language: français
Type: Picture
Other articles (40)
-
La sauvegarde automatique de canaux SPIP
1 April 2010, byDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
Script d’installation automatique de MediaSPIP
25 April 2011, byAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
Automated installation script of MediaSPIP
25 April 2011, byTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...)
On other websites (4503)
-
Raw Audio from NAudio
20 February 2017, by KenI want to record raw audio from WASAPI loopback by NAudio and pipe to FFmpeg for streaming via memory stream. As from this document, FFmpeg can get input as Raw However, I got result speed at 8 10x!
Here is my code:waveInput = new WasapiLoopbackCapture();
waveInput.DataAvailable += new EventHandler<waveineventargs>((object sender, WaveInEventArgs e) =>
{
lock (e.Buffer)
{
if (waveInput == null)
return;
try
{
using (System.IO.MemoryStream memoryStream = new System.IO.MemoryStream())
{
memoryStream.Write(e.Buffer, 0, e.Buffer.Length);
memoryStream.WriteTo(ffmpeg.StandardInput.BaseStream);
}
}
catch (Exception)
{
throw;
}
}
});
waveInput.StartRecording();
</waveineventargs>FFmpeg Arguments:
ffmpegProcess.StartInfo.Arguments = String.Format("-f s16le -i pipe:0 -y output.wav");
1. Can someone please explain this situation and give me a solution?
2. Should I add Wav header to the Memory Stream then pipe to FFmpeg as Wav format?The Working Solution
waveInput = new WasapiLoopbackCapture();
waveInput.DataAvailable += new EventHandler<waveineventargs>((object sender, WaveInEventArgs e) =>
{
lock (e.Buffer)
{
if (waveInput == null)
return;
try
{
using (System.IO.MemoryStream memoryStream = new System.IO.MemoryStream())
{
memoryStream.Write(e.Buffer, 0, e.BytesRecorded);
memoryStream.WriteTo(ffmpeg.StandardInput.BaseStream);
}
}
catch (Exception)
{
throw;
}
}
});
waveInput.StartRecording();
</waveineventargs>FFMpeg Arguments:
ffmpegProcess.StartInfo.Arguments = string.Format("-f f32le -ac 2 -ar 44.1k -i pipe:0 -c:a copy -y output.wav");
-
How to fetch live video frame and its timestamp from ffmpeg to python
15 February 2017, by vijiboySearching for an alternative as OpenCV would not provide timestamps for live camera stream, which are required in my computer vision algorithm, I found this excellent article https://zulko.github.io/blog/2013/09/27/read-and-write-video-frames-in-python-using-ffmpeg/
Working up the code on windows I still could’nt get the frame timestamps.
I recollected seeing on ffmpeg forum somewhere that the video filters like showinfo are bypassed when redirected. Is this why the following code does not work as expected?Expected: It should write video frames to disk as well as print timestamp details.
Actual: It writes video files but does not get the timestamp (showinfo) details.Here’s the code I tried:
import subprocess as sp
import numpy
import cv2
command = [ 'ffmpeg',
'-i', 'e:\sample.wmv',
'-pix_fmt', 'rgb24',
'-vcodec', 'rawvideo',
'-vf', 'showinfo', # video filter - showinfo will provide frame timestamps
'-an','-sn', #-an, -sn disables audio and sub-title processing respectively
'-f', 'image2pipe', '-'] # we need to output to a pipe
pipe = sp.Popen(command, stdout = sp.PIPE, stderr = sp.STDOUT) # TODO someone on ffmpeg forum said video filters (e.g. showinfo) are bypassed when stdout is redirected to pipes???
for i in range(10):
raw_image = pipe.stdout.read(1280*720*3)
img_info = pipe.stdout.read(244) # 244 characters is the current output of showinfo video filter
print "showinfo output", img_info
image1 = numpy.fromstring(raw_image, dtype='uint8')
image2 = image1.reshape((720,1280,3))
# write video frame to file just to verify
videoFrameName = 'Video_Frame{0}.png'.format(i)
cv2.imwrite(videoFrameName,image2)
# throw away the data in the pipe's buffer.
pipe.stdout.flush()So how to still get the frame timestamps from ffmpeg into python code so that it can be used in my computer vision algorithm...
-
How to fetch video frame and its timestamp from ffmpeg to python code
14 February 2017, by vijiboySearching for an alternative as OpenCV would not provide timestamps which were required in my computer vision algorithm, I found this excellent article https://zulko.github.io/blog/2013/09/27/read-and-write-video-frames-in-python-using-ffmpeg/
Working up the code on windows I still could’nt get the frame timestamps.
I recollected seeing on ffmpeg forum somewhere that the video filters like showinfo are bypassed when redirected.Here’s what I tried:
import subprocess as sp
import numpy
import cv2
command = [ 'ffmpeg',
'-i', 'e:\sample.wmv',
'-pix_fmt', 'rgb24',
'-vcodec', 'rawvideo',
'-vf', 'showinfo', # video filter - showinfo will provide frame timestamps
'-an','-sn', #-an, -sn disables audio and sub-title processing respectively
'-f', 'image2pipe', '-'] # we need to output to a pipe
pipe = sp.Popen(command, stdout = sp.PIPE, stderr = sp.STDOUT) # TODO someone on ffmpeg forum said video filters (e.g. showinfo) are bypassed when stdout is redirected to pipes???
for i in range(10):
raw_image = pipe.stdout.read(1280*720*3)
img_info = pipe.stdout.read(244) # 244 characters is the current output of showinfo video filter
print "showinfo output", img_info
image1 = numpy.fromstring(raw_image, dtype='uint8')
image2 = image1.reshape((720,1280,3))
# write video frame to file just to verify
videoFrameName = 'Video_Frame{0}.png'.format(i)
cv2.imwrite(videoFrameName,image2)
# throw away the data in the pipe's buffer.
pipe.stdout.flush()So how to still get the frame timestamps from ffmpeg into python code so that it can be used in my computer vision algorithm ...