
Recherche avancée
Médias (91)
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
-
USGS Real-time Earthquakes
8 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
-
Creativecommons informational flyer
16 mai 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (66)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, 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 (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)
Sur d’autres sites (5249)
-
Stream with ffmpeg over LAN ?
5 septembre 2018, par KalpitI’m trying to stream a mpegts file over LAN, with the command
ffmpeg -re -i in.ts -vcodec copy -acodec copy -f mpegts "udp://localhost:5000/live/stream"
And trying to capture 10s chunks of it over LAN(at server) at
ffmpeg -i udp://192.168.xx.xx:5000/live/stream -c copy -f segment -segment_time 10 -strftime 1 "in /%Y-%m-%d_%H-%M-%S.mp4"
This isn’t working. I tested the stream in VLC, and there’s nothing to play.
Now, I suspect this is a port issue, since FFMPEG doesnt seem to write/listen over the 5000 port specified. I used netstat to check, and there are no PID including ffmpeg on the port. However, the command
ffmpeg -i udp://127.0.0.1:5000/live/stream -c copy -f segment -segment_time 10 -strftime 1 "in/%Y-%m-%d_%H-%M-%S.mp4"
generates the desired output on my machine(localhost), as does ffplay. Can anyone help ?
-
Video encoded by ffmpeg.exe giving me a garbage video in c# .net
10 septembre 2018, par Amit YadavI want to record video through webcam and file to be saved in
.mp4
format. So for recording i am usingAforgeNet.dll
for recording and formp4
format i am encoding raw video intomp4
usingffmpeg.exe
usingNamedPipeStreamServer
as i receive frame i push into the named pipe buffer. this process works fine i have checked inProcessTheErrorData
event but when i stop recording the output file play garbage video shown in the image belowHere is Code for this
Process Process;
NamedPipeServerStream _ffmpegIn;
byte[] _videoBuffer ;
const string PipePrefix = @"\\.\pipe\";
public void ffmpegWriter()
{
if(File.Exists("outputencoded.mp4"))
{
File.Delete("outputencoded.mp4");
}
_videoBuffer = new byte[widht * heigth * 4];
var audioPipeName = GetPipeName();
var videoPipeName = GetPipeName();
var videoInArgs = $@" -thread_queue_size 512 -use_wallclock_as_timestamps 1 -f rawvideo -pix_fmt rgb32 -video_size 640x480 -i \\.\pipe\{videoPipeName}";
var videoOutArgs = $"-vcodec libx264 -crf 15 -pix_fmt yuv420p -preset ultrafast -r 10";
_ffmpegIn = new NamedPipeServerStream(videoPipeName, PipeDirection.Out, 1, PipeTransmissionMode.Byte, PipeOptions.Asynchronous, 0, _videoBuffer.Length);
Process=StartFFmpeg($"{videoInArgs} {videoOutArgs} \"{"outputencoded.mp4"}\"", "outputencoded.mp4");
}
bool WaitForConnection(NamedPipeServerStream ServerStream, int Timeout)
{
var asyncResult = ServerStream.BeginWaitForConnection(Ar => { }, null);
if (asyncResult.AsyncWaitHandle.WaitOne(Timeout))
{
ServerStream.EndWaitForConnection(asyncResult);
return ServerStream.IsConnected;
}
return false;
}
static string GetPipeName() => $"record-{Guid.NewGuid()}";
public static Process StartFFmpeg(string Arguments, string OutputFileName)
{
var process = new Process
{
StartInfo =
{
FileName = "ffmpeg.exe",
Arguments = Arguments,
UseShellExecute = false,
CreateNoWindow = true,
RedirectStandardError = true,
RedirectStandardInput = true,
},
EnableRaisingEvents = true
};
// var logItem = ServiceProvider.Get<ffmpeglog>().CreateNew(Path.GetFileName(OutputFileName));
process.ErrorDataReceived += (s, e) => ProcessTheErrorData(s,e);
process.Start();
process.BeginErrorReadLine();
return process;
}
</ffmpeglog>and Writing each frame like this.
private void video_NewFrame(object sender, NewFrameEventArgs eventArgs)
{
try
{
if (_recording)
{
using (var bitmap = (Bitmap) eventArgs.Frame.Clone())
{
var _videoBuffers = ImageToByte(bitmap);
if (_firstFrameTime != null)
{
bitmap.Save("image/" + DateTime.Now.ToString("ddMMyyyyHHmmssfftt")+".bmp");
_lastFrameTask?.Wait();
_lastFrameTask = _ffmpegIn.WriteAsync(_videoBuffers, 0, _videoBuffers.Length);
}
else
{
if (_firstFrame)
{
if (!WaitForConnection(_ffmpegIn, 5000))
{
throw new Exception("Cannot connect Video pipe to FFmpeg");
}
_firstFrame = false;
}
_firstFrameTime = DateTime.Now;
_lastFrameTask?.Wait();
_lastFrameTask = _ffmpegIn.WriteAsync(_videoBuffers, 0, _videoBuffers.Length);
}
}
}
using (var bitmap = (Bitmap) eventArgs.Frame.Clone())
{
var bi = bitmap.ToBitmapImage();
bi.Freeze();
Dispatcher.CurrentDispatcher.Invoke(() => Image = bi);
}
}
catch (Exception exc)
{
MessageBox.Show("Error on _videoSource_NewFrame:\n" + exc.Message, "Error", MessageBoxButton.OK,
MessageBoxImage.Error);
StopCamera();
}
}Even i have written each frame to disk as bitmap .bmp and frames are correct but i don’t know what’s i am missing here ? please help thanks in advance.
-
How do I set ffmpeg pipe output ?
5 décembre 2019, par mr_blondI need to read ffmpeg output as pipe.
There is a code example :public static void PipeTest()
{
Process proc = new Process();
proc.StartInfo.FileName = Path.Combine(WorkingFolder, "ffmpeg");
proc.StartInfo.Arguments = String.Format("$ ffmpeg -i input.mp3 pipe:1");
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardInput = true;
proc.StartInfo.RedirectStandardOutput = true;
proc.Start();
FileStream baseStream = proc.StandardOutput.BaseStream as FileStream;
byte[] audioData;
int lastRead = 0;
using (MemoryStream ms = new MemoryStream())
{
byte[] buffer = new byte[5000];
do
{
lastRead = baseStream.Read(buffer, 0, buffer.Length);
ms.Write(buffer, 0, lastRead);
} while (lastRead > 0);
audioData = ms.ToArray();
}
using(FileStream s = new FileStream(Path.Combine(WorkingFolder, "pipe_output_01.mp3"), FileMode.Create))
{
s.Write(audioData, 0, audioData.Length);
}
}It’s log from ffmpeg, the first file is readed :
Input #0, mp3, from ’norm.mp3’ :
Metadata :
encoder : Lavf58.17.103
Duration : 00:01:36.22, start : 0.023021, bitrate : 128 kb/s
Stream #0:0 : Audio : mp3, 48000 Hz, stereo, fltp, 128 kb/s
Metadata :
encoder : Lavc58.27Then pipe :
[NULL @ 0x7fd58a001e00] Unable to find a suitable output format for ’$’
$ : Invalid argumentIf I run "-i input.mp3 pipe:1", the log is :
Unable to find a suitable output format for ’pipe:1’ pipe:1 : Invalid
argumentHow do I set correct output ? And how should ffmpeg know what the output format is at all ?