
Recherche avancée
Autres articles (41)
-
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) (...)
-
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)
Sur d’autres sites (11424)
-
avformat/sccdec : Don't use uninitialized data, fix crash, simplify logic
1er octobre 2021, par Andreas Rheinhardtavformat/sccdec : Don't use uninitialized data, fix crash, simplify logic
Up until now, the scc demuxer not only read the line that it intends
to process, but also the next line, in order to be able to calculate
the duration of the current line. This approach leads to unnecessary
complexity and also to bugs : For the last line, the timing of the
next subtitle is not only logically indeterminate, but also
uninitialized and the same applies to the duration of the last packet
derived from it.* Worse yet, in case of e.g. an empty file, it is not
only the duration that is uninitialized, but the whole timing as well
as the line buffer itself.** The latter is used in av_strtok(), which
could lead to crashes. Furthermore, the current code always outputs
at least one packet, even for empty files.This commit fixes all of this : It stops using two lines at a time ;
instead only the current line is dealt with and in case there is
a packet after that, the duration of the last packet is fixed up
after having already parsed it ; consequently the duration of the
last packet is left in its default state (meaning "unknown/up until
the next subtitle"). If no further line could be read, processing
is stopped ; in particular, no packet is output for an empty file.* : Due to stack reuse it seems to be zero quite often ; for the same
reason Valgrind does not report any errors for a normal input file.
** : While ff_subtitles_read_line() claims to always zero-terminate
the buffer like snprintf(), it doesn't do so if it didn't read anything.
And even if it did, it would not necessarily help here : The current
code jumps over 12 bytes that it deems to have read even when it
hasn't.Reviewed-by : Paul B Mahol <onemda@gmail.com>
Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com> -
Problem in access "libavcodec/avcodec.h" in CPP [duplicate]
14 septembre 2021, par SujayNote : Not full working code but part of the code.
Problem is when trying to compile it shows the below output.
FFMPEG have installed.
No flag in VS code but error occurred on compile time.
Thanks in Advance.


#include<bits></bits>stdc++.h>
#include<opencv2></opencv2>opencv.hpp>

extern "C" {
 #include "libavcodec/avcodec.h"
 #include "libavformat/avformat.h"
 #include "libavutil/mathematics.h"
 #include "libavutil/pixfmt.h"
 #include "libswscale/swscale.h"
}

using namespace std;
using namespace cv;

int main(){



 AVPacket avpkt; int err, frame_decoded = 0;
 AVCodec *codec = avcodec_find_decoder ( AV_CODEC_ID_H264 );
 AVCodecContext *codecCtx = avcodec_alloc_context3 ( codec );
 avcodec_open2 ( codecCtx, codec, NULL );
 // Set avpkt data and size here
 // err = avcodec_decode_video2 ( codecCtx, avframe, &frame_decoded, &avpkt );
 return EXIT_SUCCESS;
}




Output :


h264.cpp:(.text+0x15): undefined reference to `avcodec_find_decoder'
h264.cpp:(.text+0x25): undefined reference to `avcodec_alloc_context3'
h264.cpp:(.text+0x41): undefined reference to `avcodec_open2'
collect2: error: ld returned 1 exit status 



-
How to "stream" images to ffmpeg to construct a video in .NET 6
13 septembre 2021, par alkaselI'm using FFMPEG command line tool to create a video. As of now I retrive images from memory, but I'd like to avoid writing them to memory in first place and feed FFMPEG directly from memory.


I tried accord-framework.net and it works very well, but now I've switched to .NET 6 and it is not supported (the functionality I used is based on AForge.Video.FFMPEG, an archived project not supporting recent frameworks).


Now as I understand it is possible to have FFMPEG to work on streams instead of images saved on disk. In this post there is a very nice example of doing it in Python.


However I don't know how to do this on .NET 6 using System.Diagnostics.Process : From this post I undestand that I could have FFMPEG take images from standard input using the syntax


-i -



The problem is that I cannot write on standard input before the System.IO.Process (cmd.exe ... \C ffmpeg.exe .... ) has started (I get System.InvalidOperationException : "StandardIn has not been redirected"). However, as soon as such process start, since it find standard input empty, it ends immediately, so I cannot make it in time to fill standard input.


My code looks like this :


MemoryStream memStream = new MemoryStream();

 // Data acquisition
 [...]
 bitmap.Save(memStream, System.Drawing.Imaging.ImageFormat.Bmp);
 [...]

 string ffmpegArgument = "/C ffmpeg.exe -y -i - -c:v libx264 -crf 12 -pix_fmt yuv420p -c:a libvo_aacenc -b:a 128k [...];

 Process cmd = new Process();
 cmd.StartInfo.FileName = "cmd.exe";
 cmd.StartInfo.Arguments = ffmpegArgument;
 cmd.StartInfo.UseShellExecute = false;
 cmd.StartInfo.RedirectStandardInput = true;
 cmd.Start();
 cmd.StandardInput.Write(memStream);



Thanks to everyone who will answer.