
Recherche avancée
Autres articles (54)
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)
Sur d’autres sites (11481)
-
Receiving UDP streams on my web server
25 novembre 2013, par user3032143I have a Winform C# Desktop application.
This is my overall aim :
I have a constant stream of images from which I acquire using a VLC wrapper receiving a RTSP stream from my IP camera.
I am doing image processing on these separate jpegs and at the same time I am wanting to upload these jpegs to my web server so my User can view these streaming jpegs live a video.
Now, I have accomplished this so far by uploading each jpeg to my server using a [Web method]. But, I am trying to push my knowledge to make it more efficient.
Now, i know if I use a video encoder - like OGG (used because it is Open Source) I can use ffmpeg called from my client code using the Process class so to convert images to that video format.
Doing this saves a lot of memory when comparing that 1 ogg file to the separate bytes added up in total from all the individual jpegs.
These are the arguments I pass to ffmpeg to achieve that :
-f image2 -r 10 -i {location of jpegs}+"\img%05d.jpg -crf 23 -y -r 10 -f outputfile.ogg
Now, I could take this a step further and not output to a physical file but instead to the base stream of the Process class. I would use these arguments to accomplish that :
-f image2 -r 10 -i {location of jpegs}+"\img%05d.jpg -crf 23 -y -r 10 -f ogg -
and in my code I would get the memory stream like so :
mStandardOutput = serverBuild.StandardOutput.BaseStream;
mStandardOutput.BeginRead(mReadBuffer, 0, mReadBuffer.Length, StandardOutputReadCallback, null);
serverBuild.WaitForExit();
data = mStandardOutputMs.ToArray();
mStandardOutput.Close();Now ultimately, I would like to replace :
-i {location of jpegs}+"\img%05d.jpg
with a constant flow of jpegs in a memory stream like so :
ffmpeg -f mjpeg -i - -r 10 -c:v libtheora -q:v 7 -f ogg -
.. by over-writing the stdin...
But I have not done this yet because I want to 1st try getting the ogg to be received within my web server.
From there I would extract the jpegs to be accessible somehow via my web application written in asp.net 4.0.
But first thing is first I want to just see if I can receive the UDP stream from my client.
So, I create a test C# application to open and listen write from the client stream..
this is my code :Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
public Form1()
{
InitializeComponent();
socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);
string ip = "My Server IP Address";
int port = 3000;
socket.Bind(new IPEndPoint(IPAddress.Parse(ip), port));
}
private void button1_Click(object sender, EventArgs e)
{
try
{
var buffer = new byte[1024];
while (true)
{
Application.DoEvents();
int numBytesReceived = socket.Receive(buffer);
if (numBytesReceived > 0)
{
File.WriteAllBytes("c:\\udp\\test.ogg", buffer);
}
}
}
catch (Exception _ex)
{
MessageBox.Show(_ex.ToString());
}
}But, I get this error :
A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram into was smaller than the datagram itself.
What am I doing wrong please ?
Thanks
-
Streaming jpegs to a video on my server
2 décembre 2013, par Andrew SimpsonI found a solution to my problem IF I was using a Linux/UNIX machine. It is FFServer from the tools from FFMPEG.
I had been using FFMPEG on my client Winform Desktop C# to convert jpegs into an OGG video file for playback.
I have now been tasked with uploading the jpegs to my server and rendering it as a video.
Optimum, I would start an FFMPEG process on my client PC and supply its stdin with jpegs in byte array format. I have achieved this (I have looked around) but is there a way to redirect the stdoutput to my server that can be picked up by my code on the server and render in real-time to my web User ?
I have looked on the ffmpeg web site but I am unsure how to 'fit' it in with my process.
This is my code so far :
public byte[] EncodeAndUploadImages(string _args1, string _fn)
{
byte[] _data = null;
try
{
clientBuild = new Process();
clientBuild.StartInfo.WorkingDirectory = Environment.CurrentDirectory;
clientBuild.StartInfo.Arguments = " -f mjpeg -r 30 -i - -c:v libtheora -q:v 7 -r 30 -f ogg -";
clientBuild.StartInfo.FileName = Environment.CurrentDirectory + @"\ffmpeg.exe";
clientBuild.StartInfo.UseShellExecute = false;
clientBuild.StartInfo.RedirectStandardOutput = true;
clientBuild.StartInfo.RedirectStandardError = true;
clientBuild.StartInfo.RedirectStandardInput = true;
clientBuild.StartInfo.CreateNoWindow = true;
clientBuild.StartInfo.LoadUserProfile = false;
clientBuild.EnableRaisingEvents = true;
clientBuild.Start();
using (BinaryWriter bw = new BinaryWriter(clientBuild.StandardInput.BaseStream))
{
//I am simulating a stream of jpegs coming in////////////////
for (int i = 1; i < 20; i++)
{
using (MemoryStream ms = new MemoryStream())
{
System.Diagnostics.Debug.Write(i.ToString("00000"));
Bitmap bmp = new Bitmap("h:\\streamin\\" + i.ToString("00000") + ".jpg");
bmp.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
bw.Write(ms.ToArray());
bmp.Dispose();
ms.Close();
}
}
bw.Close();
}
// I need some in my ffmpeg arguments to do something here//////
mStandardOutput = clientBuild.StandardOutput.BaseStream;
mStandardOutput.BeginRead(mReadBuffer, 0, mReadBuffer.Length, StandardOutputReadCallback, null);
clientBuild.WaitForExit();
_data = mStandardOutputMs.ToArray();
mStandardOutput.Close();
}
catch (Exception _ex)
{
}
finally
{
clientBuild.Dispose();
}
return _data;
}Thanks
-
Is it possible to record video/audio without xuggler and ffmpeg in java applet without server side
9 janvier 2014, par user2406481I have made Java Screen recorder applet like screenr.com
Is it possible to record video/audio without xuggler and ffmpeg in java applet without server side
I cannot use xuggler as it has 40 mb and takes tool long time for loading
I need .mp4 videos export only