
Recherche avancée
Médias (2)
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (5)
-
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 (...) -
Other interesting software
13 avril 2011, parWe don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
We don’t know them, we didn’t try them, but you can take a peek.
Videopress
Website : http://videopress.com/
License : GNU/GPL v2
Source code : (...) -
D’autres logiciels intéressants
12 avril 2011, parOn ne revendique pas d’être les seuls à faire ce que l’on fait ... et on ne revendique surtout pas d’être les meilleurs non plus ... Ce que l’on fait, on essaie juste de le faire bien, et de mieux en mieux...
La liste suivante correspond à des logiciels qui tendent peu ou prou à faire comme MediaSPIP ou que MediaSPIP tente peu ou prou à faire pareil, peu importe ...
On ne les connais pas, on ne les a pas essayé, mais vous pouvez peut être y jeter un coup d’oeil.
Videopress
Site Internet : (...)
Sur d’autres sites (2992)
-
How to make FFMPEG video grayscale ?
15 octobre 2018, par AangIn my program I am using the subprocess Python module in my script to call on FFMPEG to turn a sequence of images into a video (grayscale). It works and a video is created, but upon further inspection I see that the video itself has encoded the different intensities incorrectly.
Here is my code :
subprocess.call(['/usr/local/bin/ffmpeg', '-framerate', \
framerate, '-f', 'image2','-pattern_type', \
'glob', '-i', self.directory + '/orbit_*.png', \
'-r', '10', '-s', '620x380', '-flags', 'gray', self.directory +
".avi"])Here is a link to the video that’s created : https://drive.google.com/open?id=0Bxt1siua2KQma0JaMVBMcE9TOEE
If you’ll look at the scale bar on the right in the video, which normally looks like this
in color, you’ll see that the same color shows up twice on the scale bar. I think it’s because FFMPEG is reading colors with the same intensities (for example, yellow and blue) the same way and therefore when the photo is encoded into grayscale it looks like this.What can I do ? Is this a matter of changing the "-flags", "gray" parameters of my subprocess call ?
-
Issues with video frame dropout using Accord.NET VideoFileWriter and FFMPEG
9 janvier 2018, par DavidI am testing out writing video files using the Accord.Video library. I have a WPF project created in Visual Studio 2017, and I have installed Accord.Video.FFMPEG as well as Accord.Video.VFW using Nuget, as well as their dependencies.
I have created a very simple video to test basic file output. However, I am running into some issues. My goal is to be able to output videos with a variable frame rate, because in the future I will be using this code to input images from a webcam device that will then be saved to a video file, and video from webcams typically has variable frame rates.
For now, in this example, I am not inputting video from a webcam, but rather I am generating a simple "moving box" image and outputting the frames to a video file. The box changes color every 20 frames : red, green, blue, yellow, and finally white. I also set the frame rate to be 20 fps.
When I use Accord.Video.VFW, the frame rate is correctly set, and all the frames are correctly outputted to the video file. The resulting video looks like this (see the YouTube link) : https://youtu.be/K8E9O7bJIbg
This is just a reference, however. I don’t intend on using Accord.Video.VFW because it outputs uncompressed data to an AVI file, and it doesn’t support variable frame rates. I would like to use Accord.Video.FFMPEG because it is supposed to support variable frame rates.
When I attempt to use the Accord.Video.FFMPEG library, however, the video does not result in how I would expect it to look. Here is a YouTube link : https://youtu.be/cW19yQFUsLI
As you can see, in that example, the box remains the first color for a longer amount of time than the other colors. It also never reaches the final color (white). When I inspect the video file, 100 frames were not outputted to the file. There are 69 or 73 frames typically. And the expected frame rate and duration obviously do not match up.
Here is the code that generates both these videos :
public MainWindow()
{
InitializeComponent();
Accord.Video.VFW.AVIWriter avi_writer = new Accord.Video.VFW.AVIWriter();
avi_writer.FrameRate = 20;
avi_writer.Open("test2.avi", 640, 480);
Accord.Video.FFMPEG.VideoFileWriter k = new Accord.Video.FFMPEG.VideoFileWriter();
k.FrameRate = 20;
k.Width = 640;
k.Height = 480;
k.Open("test.mp4");
for (int i = 0; i < 100; i++)
{
TimeSpan t = new TimeSpan(0, 0, 0, 0, 50 * i);
var b = new System.Drawing.Bitmap(640, 480);
var g = Graphics.FromImage(b);
var br = System.Drawing.Brushes.Blue;
if (t.TotalMilliseconds < 1000)
br = System.Drawing.Brushes.Red;
else if (t.TotalMilliseconds < 2000)
br = System.Drawing.Brushes.Green;
else if (t.TotalMilliseconds < 3000)
br = System.Drawing.Brushes.Blue;
else if (t.TotalMilliseconds < 4000)
br = System.Drawing.Brushes.Yellow;
else
br = System.Drawing.Brushes.White;
g.FillRectangle(br, 50 + i, 50, 100, 100);
System.Console.WriteLine("Frame: " + (i + 1).ToString() + ", Millis: " + t.TotalMilliseconds.ToString());
#region This is the code in question
k.WriteVideoFrame(b, t);
avi_writer.AddFrame(b);
#endregion
}
avi_writer.Close();
k.Close();
System.Console.WriteLine("Finished writing video");
}I have tried changing a few things under the assumption that maybe the "WriteVideoFrame" function isn’t able to finish in time, and so I need to slow down the program so it can complete itself. Under that assumption, I have replaced the "WriteVideoFrame" call with the following code :
Task taskA = new Task(() => k.WriteVideoFrame(b, t));
taskA.Start();
taskA.Wait();And I have tried the following code :
Task.WaitAll(
Task.Run( () =>
{
lock(syncObj)
{
k.WriteVideoFrame(b, t);
}
}
));And even just a standard call where I don’t specify a timestamp :
k.WriteVideoFrame(b);
None of these work. They all result in something similar.
Any suggestions on getting the WriteVideoFrame function to work that is a part of the Accord.Video.FFMPEG.VideoFileWriter class ?
Thanks for any and all help !
[edits below]
I have done some more investigating. I still haven’t found a good solution, but here is what I have found so far. After declaring my VideoFileWriter object, I have tried setting up some options for the video.
When I use an H264 codec with the following options, it correctly saves 100 frames at a frame-rate of 20 fps, however any normal media player (both VLC and Windows Media Player) end up playing a 10-second video instead of a 5-second video. Essentially, it seems like they play it at half-speed. Here is the code that gives that result :
k.VideoCodec = Accord.Video.FFMPEG.VideoCodec.H264;
k.VideoOptions["crf"] = "18";
k.VideoOptions["preset"] = "veryfast";
k.VideoOptions["tune"] = "zerolatency";
k.VideoOptions["x264opts"] = "no-mbtree:sliced-threads:sync-lookahead=0";Additionally, if I use an Mpeg4 codec, I get the same "half-speed" result :
k.VideoCodec = Accord.Video.FFMPEG.VideoCodec.Mpeg4;
However, if I use a WMV codec, then it correctly results in 100 frames at 20 fps, and a 5 second video that is correctly played by both media players :
k.VideoCodec = Accord.Video.FFMPEG.VideoCodec.Wmv1;
Although this is good news, this still doesn’t solve the problem because WMV doesn’t support variable frame rates. Also, this still doesn’t answer the question as to why the problem is happening in the first place.
As always, any help would be appreciated !
-
aacenc_pred : rework the way prediction is done
29 août 2015, par Rostislav Pehlivanovaacenc_pred : rework the way prediction is done
This commit completely alters the algorithm of prediction.
The original commit which introduced prediction was completely
incorrect to even remotely care about what the actual coefficients
contain or whether any options were enabled. Not my actual fault.This commit treats prediction the way the decoder does and expects
to do : like lossy encryption. Everything related to prediction now
happens at the very end but just before quantization and encoding
of coefficients. On the decoder side, prediction happens before
anything has had a chance to even access the coefficients.Also the original implementation had problems because it actually
touched the band_type of special bands which already had their
scalefactor indices marked and it’s a wonder the asserion wasn’t
triggered when transmitting those.Overall, this now drastically increases audio quality and you should
think about enabling it if you don’t plan on playing anything encoded
on really old low power ultra-embedded devices since they might not
support decoding of prediction or AAC-Main. Though the specifications
were written ages ago and as times change so do the FLOPS.Signed-off-by : Rostislav Pehlivanov <atomnuker@gmail.com>