
Recherche avancée
Médias (91)
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Lights in the Sky
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Head Down
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Echoplex
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Discipline
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Letting You
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (77)
-
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
Automated installation script of MediaSPIP
25 avril 2011, parTo 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 (...)
Sur d’autres sites (12105)
-
How do I add text and watermark to each image using FFmpeg ?
14 novembre 2023, par OlehI wrote a small code that converts several images to video using
com.arthenica:ffmpeg-kit-full:6.0-2
and everything works, but I need to add text to each image and place a watermarked photo on it and I can't implement it. Could you please help me with this ?

Here is the code that converts an array of images into a video :


public void ImagesToVideo(ArrayList<string> pathList) {
 String outputVideoPath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + "/" + Calendar.getInstance().getTimeInMillis() + ".mp4";
 try {
 StringBuilder strCommand = new StringBuilder();

 int size = pathList.size();

 for (int i = 0; i < size; i++) {
 strCommand.append("-framerate 8 -i '")
 .append(pathList.get(i))
 .append("' ");
 }

 strCommand.append("-filter_complex \"");

 for (int i = 0; i < size; i++) {
 strCommand.append("[")
 .append(i)
 .append(":v]setpts=PTS-STARTPTS+1[v")
 .append(i)
 .append("];");
 }


 for (int i = 0; i < size; i++) {
 strCommand.append("[v")
 .append(i)
 .append("]");
 }
 strCommand.append("concat=n=")
 .append(size)
 .append(":v=1:a=0,format=yuv420p\" -r 30 -b:v 4M -preset veryfast '")
 .append(outputVideoPath)
 .append("'");
 
 FFmpegKit.executeAsync(strCommand.toString(), new FFmpegSessionCompleteCallback() {
 @Override
 public void apply(FFmpegSession session) {
 SessionState state = session.getState();
 ReturnCode returnCode = session.getReturnCode();

 // CALLED WHEN SESSION IS EXECUTED
 Log.d("IPRIPR", String.format("FFmpeg process exited with state %s and rc %s.%s", state, returnCode, session.getFailStackTrace()));
 }
 }, new LogCallback() {
 @Override
 public void apply(com.arthenica.ffmpegkit.Log log) {

 // CALLED WHEN SESSION PRINTS LOGS

 }
 }, new StatisticsCallback() {
 @Override
 public void apply(Statistics statistics) {

 }
 });

 } catch (Exception e) {
 }
 }
</string>


-
ffplay : how does it calculate the fps for playback ?
21 octobre 2020, par DanielI'm trying to playback a live media (h264) which is produced by a hardware encoder.


The actual desired FPS on the encoder is set to 20, and when checking the logs of the encoder it prints "FPS statistics" every minute :


2020-10-21 17:26:54.787 [ info] video_stream_thread(),video chn 0, fps: 19.989270
2020-10-21 17:27:54.836 [ info] video_stream_thread(),video chn 0, fps: 19.989270
2020-10-21 17:28:54.837 [ info] video_stream_thread(),video chn 0, fps: 20.005924
2020-10-21 17:29:54.837 [ info] video_stream_thread(),video chn 0, fps: 19.989270
2020-10-21 17:30:54.888 [ info] video_stream_thread(),video chn 0, fps: 19.989274
2020-10-21 17:31:54.918 [ info] video_stream_thread(),video chn 0, fps: 19.989264



You can see it's varying, but not too much around 20.


Question1 : Is this normal ? Or it should be exactly 20 every time ? To avoid confusion : I'd like to know if by the standard of H264, can this be accepted as a valid stream or this violates some
rule ?


I'm trying to playback this stream with
ffplay
:

$ ffplay rtsp://this_stream
Input #0, rtsp, from 'xyz'
 Metadata:
 title : 
 comment : substream
 Duration: N/A, start: 0.040000, bitrate: N/A
 Stream #0:0: Video: h264 (Constrained Baseline), yuv420p(progressive), 640x360, 25 fps, 25 tbr, 90k tbn, 180k tbc



The thing is that ffplay thinks this is a stream with 25fps. And it also plays 25 frames each sec, causing the stream to stall and buffer in every few seconds.


I believe the fps is calculated by some pts/dts values in the stream itself, and it's not hardcoded. Am I wrong here ?


If I'm not wrong, why does ffplay thinks this stream runs at 25fps, whereas it only runs at (around) 20 ?


-
FFmpeg 5 C api codec end of stream situation
11 mars 2023, par Guanyuming HeI'm new to FFmpeg api programming (I'm using version 5.1) and am learning from the documentation and official examples.


In the documentation page about send/receive encoding and decoding API overview, end of stream situation is discussed briefly :




End of stream situations. These require "flushing" (aka draining) the codec, as the codec might buffer multiple frames or packets internally for performance or out of necessity (consider B-frames). This is handled as follows :






Instead of valid input, send
NULL
to theavcodec_send_packet()
(decoding) oravcodec_send_frame()
(encoding) functions. This will enter draining mode.
Callavcodec_receive_frame()
(decoding)
oravcodec_receive_packet()
(encoding) in a loop untilAVERROR_EOF
is returned. The functions will not returnAVERROR(EAGAIN)
, unless you forgot to enter draining mode.
Before decoding can be resumed again, the codec has to be reset withavcodec_flush_buffers()
.



As I understand it, when I get
AVERROR_EOF
, I have reached a special point where I need to drain buffered data from the codec and finally reset the codec withavcodec_flush_buffers()
. Without doing it, I cannot continue decoding/encoding.

Then I have some questions :


- 

- If I received EOF when I already finished sending data (e.g. when after EOF is returned by
av_read_frame()
), how should I tell if it's really finished ? - The data returned from the
receive_...
functions during draining, should I take them as valid ?






I might have found answers to those in the official examples, but I'm not sure if the answer is universally true. I noticed that in some official examples, like in transcode_aac.c, draining is only done for the first EOF reached, and then after the second one is received, it is regarded that there are really nothing left. Any data received during draining is also written to the final output.


I just wonder, Is it true for all multimedia files in ffmpeg ?


I appreciate your response and time in advance. :)


- If I received EOF when I already finished sending data (e.g. when after EOF is returned by