
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (58)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
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 (11168)
-
avformat/matroskadec : Free right buffer on error
3 mai 2020, par Andreas Rheinhardtavformat/matroskadec : Free right buffer on error
Since commit 979b5b89594c7628bd846c63198cb64ef9d81d16, reverting the
Matroska ContentCompression is no longer done inside
matroska_parse_frame() (the function that creates AVPackets out of the
parsed data (unless we are dealing with certain codecs that need special
handling)), but instead in matroska_parse_block(). As a consequence,
the data that matroska_parse_frame() receives is no longer always owned
by an AVBuffer ; it is owned by an AVBuffer iff no ContentCompression needed
to be reversed ; otherwise the data is independently allocated and needs
to be freed on error.Whether the data is owned by an AVBuffer or not is indicated by a variable
buf of type AVBufferRef * : If it is NULL, the data is independently
allocated, if not it is owned by the underlying AVBuffer (and is used to
avoid copying the data when creating the AVPackets).Because the allocation of the buffer holding the uncompressed data happens
outside of matroska_parse_frame() (if a ContentCompression needs to be
reversed), the data is passed as uint8_t ** in order to not leave any
dangling pointers behind in matroska_parse_block() should the data need to
be freed : In case of errors, said uint8_t ** would be av_freep()'ed in
case buf indicated the data to be independently allocated.Yet there is a problem with this : Some codecs (namely WavPack and
ProRes) need special handling : Their packets are only stored in
Matroska in a stripped form to save space and the demuxer reconstructs
full packets. This involved allocating a new, enlarged buffer. And if
an error happens when trying to wrap this new buffer into an AVBuffer,
this buffer needs to be freed ; yet instead the given uint8_t ** (holding
the uncompressed, yet still stripped form of the data) would be freed
(av_freep()'ed) which certainly leads to a memleak of the new buffer ;
even worse, in case the track does not use ContentCompression the given
uint8_t ** must not be freed as the actual data is owned by an AVBuffer
and the data given to matroska_parse_frame() is not the start of the
actual allocated buffer at all.Both of these issues are fixed by always freeing the current data in
case it is independently allocated. Furthermore, while it would be
possible to track whether the pointer from matroska_parse_block() needs
to be reset or not, there is no gain in doing so, as the pointer is not
used at all afterwards and the sematics are clear : If the data passed
to matroska_parse_frame() is independently allocated, then ownership
of the data passes to matroska_parse_frame(). So don't pass the data
via uint8_t **.Fixes Coverity ID 1462661 (the issue as described by Coverity is btw
a false positive : It thinks that this error can be triggered by ProRes
with a size of zero after reconstructing the original packets, but the
reconstructed packets can't have a size of zero).Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-
Blank out video frames for last two minutes of MP4 (while keeping audio intact)
13 juillet 2020, par fourells5I am trying to make a copy of one of my mp4 movies with audio intact, but blacking out video frames only on the last few minutes. Basically I want to keep the end credit music but without the artifacted video.


I found this answer : which works perfectly for an entire mp4 file (including a test fragment I made of the above ending credits sequence), but I need it applied as I stated above to just the end of the entire copied full mp4.


In this case I don't want to start blanking the video stream frames until after 2h 7m 30s. I messed around with combinations of the -ss, -start_time and -timecode 02:07:31 params, but I'm an ffmpeg noob and couldn't get it to produce anything but cut-out sections or the whole copy blanked.


Any guidance would be greatly appreciated !


-
Compiling c++ program for ffmpeg, error give undefined reference to [duplicate]
6 août 2020, par leonardltk1I have a code
read_mp3.cpp
, which usesffmpeg
to decode an mp3 file into an array.

Code for
read_mp3.cpp
is as follows :

#include 
 #include 

 // I use extern "C" as recommended here: https://blog.csdn.net/qq_18144521/article/details/79608355
 extern "C"
 {
 #include <libavutil></libavutil>opt.h>
 #include <libavcodec></libavcodec>avcodec.h>
 #include <libavformat></libavformat>avformat.h>
 #include <libswresample></libswresample>swresample.h>
 }
 using namespace std;


 int decode_audio_file(const char* path, const int sample_rate, double** data, int* size) {
 // initialize all muxers, demuxers and protocols for libavformat
 // (does nothing if called twice during the course of one program execution)
 av_register_all();

 /*
 Code for the rest of this function is found here :
 https://rodic.fr/blog/libavcodec-tutorial-decode-audio-file/
 */

 return 0;
 }

 int main (int argc, char ** argv) {
 // decode data
 int sample_rate = 44100;
 double* data;
 int size;
 if (decode_audio_file(argv[1], sample_rate, &data, &size) != 0) {
 return -1;
 }

 /*
 Do something with data ...
 */

 return 0;
 }



I tried different ways to compilations, but to no avail :


g++ -o ./read_mp3.out -Ofast -Wall -Wextra \
 -lavformat-ffmpeg -lavdevice-ffmpeg -lavcodec-ffmpeg -lavutil -lswresample \
 -std=c++11 "./read_mp3.cpp"
 
 g++ -o ./read_mp3.out -Ofast -Wall -Wextra \
 -lavformat -lavdevice -lavcodec -lavutil -lswresample \
 -std=c++11 "./read_mp3.cpp"
 
 g++ -o ./read_mp3.out -Ofast -Wall -Wextra \
 -lavformat -lavdevice -lavcodec -lavutil -pthread -ldl -lswscale -lbz2 -lz -lm \
 -std=c++11 "./read_mp3.cpp"



but i get the following error :


/tmp/ccnZzoIh.o: In function `decode_audio_file(char const*, int, double**, int*)':
 read_mp3.cpp:(.text+0x2781): undefined reference to `av_register_all'
 read_mp3.cpp:(.text+0x2786): undefined reference to `avformat_alloc_context'
 read_mp3.cpp:(.text+0x279c): undefined reference to `avformat_open_input'
 read_mp3.cpp:(.text+0x27b7): undefined reference to `avformat_find_stream_info'
 read_mp3.cpp:(.text+0x284b): undefined reference to `avcodec_find_decoder'
 read_mp3.cpp:(.text+0x2858): undefined reference to `avcodec_open2'
 read_mp3.cpp:(.text+0x2865): undefined reference to `swr_alloc'
 read_mp3.cpp:(.text+0x2880): undefined reference to `av_opt_set_int'
 read_mp3.cpp:(.text+0x2896): undefined reference to `av_opt_set_int'
 read_mp3.cpp:(.text+0x28ae): undefined reference to `av_opt_set_int'
 read_mp3.cpp:(.text+0x28c4): undefined reference to `av_opt_set_int'
 read_mp3.cpp:(.text+0x28dc): undefined reference to `av_opt_set_int'
 
 /tmp/ccnZzoIh.o:read_mp3.cpp:(.text+0x28f0): more undefined references to `av_opt_set_int' follow
 /tmp/ccnZzoIh.o: In function `decode_audio_file(char const*, int, double**, int*)':
 read_mp3.cpp:(.text+0x2907): undefined reference to `av_opt_set_sample_fmt'
 read_mp3.cpp:(.text+0x291d): undefined reference to `av_opt_set_sample_fmt'
 read_mp3.cpp:(.text+0x2927): undefined reference to `swr_init'
 read_mp3.cpp:(.text+0x2931): undefined reference to `swr_is_initialized'
 read_mp3.cpp:(.text+0x2943): undefined reference to `av_init_packet'
 read_mp3.cpp:(.text+0x2948): undefined reference to `av_frame_alloc'
 read_mp3.cpp:(.text+0x297b): undefined reference to `av_read_frame'
 read_mp3.cpp:(.text+0x299a): undefined reference to `avcodec_decode_audio4'
 read_mp3.cpp:(.text+0x29cc): undefined reference to `av_samples_alloc'
 read_mp3.cpp:(.text+0x29e6): undefined reference to `swr_convert'
 read_mp3.cpp:(.text+0x2a36): undefined reference to `av_frame_free'
 read_mp3.cpp:(.text+0x2a40): undefined reference to `swr_free'
 read_mp3.cpp:(.text+0x2a48): undefined reference to `avcodec_close'
 read_mp3.cpp:(.text+0x2a52): undefined reference to `avformat_free_context'

 collect2: error: ld returned 1 exit status