
Recherche avancée
Autres articles (103)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.
Sur d’autres sites (11419)
-
Sending video stream from NodeJS to python in real time [closed]
17 juin 2021, par Tristan DelortI'm using a NodeJS server to catch a video stream through a WebRTC PeerConnection and I need to send it to a python script.


I use NodeJS mainly because it's easy to use WebRTC in it and the package 'wrtc' supports RTCVideoSink and python's aiortc doesn't.


I was thinking of using a named pipe with ffmpeg to stream the video stream but 3 questions arose :


- 

-
Should I use python instead of NodeJS and completely avoid the stream through a named pipe part ? (This means there is a way to extract individual frames from a MediaStreamTrack in python)


-
If I stick with the "NodeJS - Python" approach, how do I send the stream from one script to the other ? Named pipe ? Unix domain sockets ? And with FFMpeg ?


-
Finally, for performance purpose I think that sending a stream and not each individual frames is better and simpler but is this true ?










Thanks all !


-
-
How can I encode a real-time video from dynamically spaced frames ?
7 mai 2019, par Ujuf66I’m trying to create a video from a series of screenshots. The screenshots are in a database and have dynamic FPS (1-3 FPS). How can I create a video file with constant FPS ?
Before performing
av_packet_rescale_ts
I tried to change thest^.codec.time_base.den
value on the fly between 1 and 3.This is the basic cycle of encoding of one picture :
repeat
fillchar(pkt, sizeof(TAVPacket), #0);
av_init_packet(@pkt);
(* encode the image *)
ret := avcodec_encode_video2(st^.codec, @pkt, frame, got_packet);
if (ret < 0) then
begin
writeln(format('Error encoding video frame: %s', [av_err2str(ret)]));
exit;
end;
if (got_packet > 0) then
begin
(* rescale output packet timestamp values from codec to stream timebase *)
av_packet_rescale_ts(@pkt, st^.codec.time_base, st^.time_base);
pkt.stream_index := st^.index;
log_packet(oc, @pkt);
(* Write the compressed frame to the media file. *)
av_interleaved_write_frame(oc, @pkt);
end;
inc(frame.pts);
until (av_compare_ts(frame.pts, st^.codec^.time_base, 1, av_make_q(1, 1)) >= 0);Changing the FPS on the fly causes the video output to fail. If I don’t change the
st^.codec.time_base.den
value the video speeds up and slows down. -
FFmpeg with Pipe - how can I periodically grab real-time frames out of live streams in C# ?
2 mars 2020, par BByI am new to FFmpeg and C# and I want grab frames to do image processing with IP Camera.
I have made the following C# class and I could get a single frame from IP Camera.
class FFmpegHandler
{
public Process ffmpeg = new Process();
public Image image;
public Image init()
{
ffmpeg = new Process()
{
StartInfo =
{
FileName = @"./ffmpeg/ffmpeg.exe",
//Arguments = "-i http://admin:@192.168.10.1/videostream.asf -an -f image2pipe -preset ultrafast -tune zerolatency -s 320x240 pipe:1", // Hangs
Arguments = "-i http://admin:@192.168.10.1/videostream.asf -vframes 1 -an -f image2pipe -preset ultrafast -tune zerolatency -s 320x240 pipe:1",
UseShellExecute = false,
RedirectStandardOutput = true,
RedirectStandardError = true,
CreateNoWindow = true,
WorkingDirectory = "./ffmpeg/"
}
};
ffmpeg.EnableRaisingEvents = true;
ffmpeg.Start();
var stream = ffmpeg.StandardOutput.BaseStream;
var img = Image.FromStream(stream);
//ffmpeg.WaitForExit();
return img;
}
}The problem is that I want to grab real-time (latest) images when I request.
If I run FFmpegHandler.init(), it will take 2 seconds to give me delayed image output.
I have tried removing argument -vframes 1, then it will hang after image = Image.FromStream(stream) ;.
When I check the ffmpeg output directly, it looks like ffmpeg is keep building the stream
frame= 6 fps=0.0 q=2.2 size= 25kB time=00:00:00.24 bitrate= 861.9kbits/s dup=4 drop=0 speed=0.435x
frame= 65 fps= 60 q=24.8 size= 140kB time=00:00:02.60 bitrate= 440.9kbits/s dup=4 drop=0 speed=2.41x
frame= 77 fps= 49 q=24.8 size= 161kB time=00:00:03.08 bitrate= 428.0kbits/s dup=4 drop=0 speed=1.95x
frame= 89 fps= 43 q=24.8 size= 182kB time=00:00:03.56 bitrate= 418.6kbits/s dup=4 drop=0 speed= 1.7x
frame= 102 fps= 39 q=24.8 size= 205kB time=00:00:04.08 bitrate= 410.7kbits/s dup=4 drop=0 speed=1.57x
frame= 116 fps= 37 q=24.8 size= 229kB time=00:00:04.64 bitrate= 404.2kbits/s dup=4 drop=0 speed=1.49x
frame= 128 fps= 35 q=24.8 size= 250kB time=00:00:05.12 bitrate= 399.8kbits/s dup=4 drop=0 speed=1.41x
frame= 142 fps= 34 q=24.8 size= 274kB time=00:00:05.68 bitrate= 395.7kbits/s dup=4 drop=0 speed=1.36x
frame= 156 fps= 33 q=24.8 size= 299kB time=00:00:06.24 bitrate= 392.3kbits/s dup=4 drop=0 speed=1.32x
frame= 169 fps= 32 q=24.8 size= 322kB time=00:00:06.76 bitrate= 389.7kbits/s dup=4 drop=0 speed=1.29x
frame= 182 fps= 32 q=24.8 size= 344kB time=00:00:07.28 bitrate= 387.4kbits/s dup=4 drop=0 speed=1.26x
frame= 195 fps= 31 q=24.8 size= 367kB time=00:00:07.80 bitrate= 385.5kbits/s dup=4 drop=0 speed=1.24x
frame= 208 fps= 31 q=24.8 size= 390kB time=00:00:08.32 bitrate= 383.8kbits/s dup=4 drop=0 speed=1.22x
frame= 221 fps= 30 q=24.8 size= 413kB time=00:00:08.84 bitrate= 382.3kbits/s dup=4 drop=0 speed=1.21xHow can I grab the latest frames out of this live-stream image ? (OR is there a thread-safe way to clean the stream and only get the latest frame when I request ?)