
Recherche avancée
Médias (3)
-
Elephants Dream - Cover of the soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (90)
-
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 ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)
Sur d’autres sites (11886)
-
avr32 : remove explicit support
9 juin 2024, par Rémi Denis-Courmontavr32 : remove explicit support
The vendor has long since switched to Arm, with the last product
reaching their official end-of-life over 11 years ago. Linux support for
the ISA was dropped 7 years ago. More importantly, this architecture was
never supported by upstream GCC, and the vendor fork is stuck at version
4.2, which FFmpeg no longer supports (as per C11 requirement).Presumably, this is still the case given the lack of vendor support.
Indeed all of the code being removed here consisted of inline assembler
scalar optimisations. A sane C compiler should be able to perform those
automatically nowadays (with the sole exception of fast CLZ detection),
but this is moot as this architecture is evidently dead. -
FFMPEG remove metadata from audio Libav AVStream
23 décembre 2019, par M_a_t_TWhen attempting to decode audio files using the Libav API I am experiencing issues with what I believe is metadata in the audio AVStream.
I am using this code to try and achieve this :
#include
#include
#include
#include <iostream>
extern "C" {
#include <libavformat></libavformat>avformat.h>
}
#define AUDIO_INBUF_SIZE 20480
#define AUDIO_REFILL_THRESH 4096
using namespace std;
int main(void)
{
AVFormatContext *formatContext = nullptr;
AVPacket avpkt;
uint8_t inbuf[AUDIO_INBUF_SIZE + AV_INPUT_BUFFER_PADDING_SIZE];
if(avformat_open_input(&formatContext, path_to_file, nullptr, nullptr) < 0){
cout << "Error opening file" << endl;
}
if (avformat_find_stream_info(formatContext, nullptr) != 0){
cout << "Error finding stream info" << endl;
}
av_dump_format(formatContext, 0, path_to_file, 0);
// Find the stream and its codec
AVCodec* audioCodec = nullptr;
int audioStreamIndex = av_find_best_stream(
formatContext, // The media stream
AVMEDIA_TYPE_AUDIO, // The type of stream we are looking for - audio for example
-1, // Desired stream number, -1 for any
-1, // Number of related stream, -1 for none
&audioCodec, // Gets the codec associated with the stream, can be NULL
0 // Flags - not used currently
);
cout << "Stream start time: " << std::to_string(formatContext->start_time) << endl;
if(audioStreamIndex == AVERROR_STREAM_NOT_FOUND) {
cout << "Error finding audio stream" << endl;
}
else if (!audioCodec) {
cout << "Error finding audio codec" << endl;
}
AVCodecContext *codecContext = avcodec_alloc_context3(audioCodec);
if (!codecContext){
// Out of memory
avformat_close_input(&formatContext);
}
// Set the parameters of the codec context from the stream
int result = avcodec_parameters_to_context(
codecContext,
formatContext->streams[audioStreamIndex]->codecpar
);
if(result < 0){
cout << "Failed to set parameters" << endl;
avformat_close_input(&formatContext);
avcodec_free_context(&codecContext);
}
// Ready to open stream based on previous parameters
// Third parameter (NULL) is optional dictionary settings
if (avcodec_open2(codecContext, audioCodec, NULL) < 0){
cout << "Error cannot open codec" << endl;
codecContext = nullptr;
}
av_init_packet(&avpkt); // set fields of avpkt to default.
if(av_read_frame(formatContext, &avpkt) < 0){
cout << "Error nothing read" << endl;
}
cout << "decoding..." << endl;
int sendPacketResult = avcodec_send_packet(codecContext, &avpkt);
if (sendPacketResult == AVERROR(EAGAIN)){
// Decoder can't take packets right now. Make sure you are draining it.
cout << "Decoder can not take packets rn" << endl;
} else if (sendPacketResult < 0){
// Failed to send the avpkt to the decoder
cout << "Failed to send the avpkt to the decoder" << endl;
}
AVFrame *frame = av_frame_alloc();
// Get decoded frame from decoder
int decodeFrame = avcodec_receive_frame(codecContext, frame);
if (decodeFrame == AVERROR(EAGAIN)){
// The decoder doesn't have enough data to produce a frame
// Not an error unless we reached the end of the stream
// Just pass more packets until it has enough to produce a frame
cout << "Frame not produced from decoder" << endl;
av_frame_unref(frame);
av_freep(frame);
}else if (decodeFrame < 0){
// Failed to get a frame from the decoder4
cout << "Error no frame from decoder" << endl;
av_frame_unref(frame);
av_freep(frame);
}
</iostream>Build using :
g++ test.cpp -lswscale -lavdevice -lavformat -lavcodec -lavutil -lswscale -lswresample -lpthread -lbz2 -lm -lz -lmp3lame -lx264 -lfaad -o test
Note I have constructed this from examples and looking through the ffmpeg sourcecode (4.2.1) to try and decode a single packet from an audio file.
Running this on a mp3 file which contains metadata yields the error
[mp3float @ 0x557450f9cec0] Header missing
, which I believe is due toavpkt
containing stream metadata. When running this on a mp3 file which has been stripped of metadata the packet is decoded successfully.My question is whether this is due to the metadata and if so, how to use the API so that
av_read_frame
ignores metadata and only constructs AVPackets containing legal audio data, irrespective of the encoding format of the audio file. -
On WebP and Academic Exercises
2 octobre 2010, par Multimedia Mike — GeneralYesterday, Google released a new still image format called WebP. To those skilled in the art, this new format will be recognizable as a single VP8 golden frame with a 20-byte header slapped on the front (and maybe a little metadata thrown in for good measure). We have a MultimediaWiki page and a sample ready to go.
Further, I submitted a patch to ffmpeg-devel for FFmpeg’s img2 handling system to decode these files. FFmpeg should support processing these files soon… if anyone cares. This leads into…
The Point, or Lack Thereof
Since yesterday’s release, I have read a whirlwind of commentary about this format, much of it critical and of the “what’s the point ?” variety. For my part, I can respect academic exercises, a.k.a., just trying random stuff to see if you can make it work. That’s pretty much this blog’s entire raison d’être. But WebP transcends mere academic exercise ; Google seems to be trying to push it as a new web standard. I don’t see how the format can go anywhere based on criticisms raised elsewhere — e.g., see Dark Shikari’s thoughtful write-up — which basically boil down to WebP not solving any real problems, technical, legal, or otherwise.How did WebP come to be ? I strongly suspect some engineers noticed that JPEG is roughly the same as an MPEG-1 intraframe, so why not create a new still frame format based on VP8 intraframes ? Again, I can respect that thinking– I have pondered how a still image format would perform if based on VP3/Theora or Sorenson Video 1.
Technically
Google claims a significant size savings for WebP vs. standard JPEG. Assuming that’s true (and there will be no shortage of blog posts to the contrary), it will still be some time before WebP support will find its way into the majority of the web browser population.But this got me thinking about possible interim solutions. A website could store images compressed in both formats if it so chose. Then it could serve up a WebM image if the browser could support it, as indicated by the ‘Accept’ header in the HTTP request. It seems that a website might have to reference a generic image name such as
<img src="some-picture.image">
; the web server would have to recognize the .image extension and map it to either a .jpg or a .webp image depending on what the browser claims it is capable of displaying.Leftovers
I appreciate that Dark Shikari has once again stuck his neck out and made a valiant — though often futile — effort to educate the internet’s masses. I long ago resigned myself to the fact that many people aren’t going to understand many of the most basic issues surrounding multimedia technology (i.e., moving pictures synchronized with audio). But apparently, this extends to still image formats as well. It was simultaneously humorous and disheartening to see commenters who don’t even understand the application of, e.g., PNG vs. JPEG : Ahem, “We already have a great replacement for jpg : .PNG”. Coupled with the typical accusations of MPEG tribalism, I remain impressed D. Shikari finds the will to bother.Still, I appreciate that the discussion has introduced me to some new image formats of which I was previously unaware, such as PGF and JPEG XR.