
Recherche avancée
Médias (91)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
avec chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
sans chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
config chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (74)
-
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 (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...) -
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...)
Sur d’autres sites (9644)
-
avcodec/vc1_mc : move median4() to mathops.h
14 février 2015, par zhaoxiu.zeng -
Including ffmpeg in C program
20 mars 2015, par NickI’m using dranger’s ffmpeg tutorial :
http://dranger.com/ffmpeg/tutorial01.html
I’m stuck trying to compile the first tutorial. I downloaded ffmpeg using homebrew, but the compile command provided in the tutorial did not work :
gcc -o tutorial01 tutorial01.c -lavutil -lavformat -lavcodec -lz -lavutil -lm
Based on my experience with SDL, I made a separate file that simply included one of the ffmpeg headers, and changed the compile command to :
gcc main.c -I/usr/local/Cellar/ffmpeg/2.6.1/include
It was actually able to compile. But when I tried this with the tutorial file using this command :
gcc tutorial01.c -I/usr/local/Cellar/ffmpeg/2.6.1/include
I got these errors :
Undefined symbols for architecture x86_64:
"_av_dump_format", referenced from:
_main in tutorial01-9cd32b.o
"_av_frame_alloc", referenced from:
_main in tutorial01-9cd32b.o
"_av_frame_free", referenced from:
_main in tutorial01-9cd32b.o
"_av_free", referenced from:
_main in tutorial01-9cd32b.o
"_av_free_packet", referenced from:
_main in tutorial01-9cd32b.o
"_av_malloc", referenced from:
_main in tutorial01-9cd32b.o
"_av_read_frame", referenced from:
_main in tutorial01-9cd32b.o
"_av_register_all", referenced from:
_main in tutorial01-9cd32b.o
"_avcodec_alloc_context3", referenced from:
_main in tutorial01-9cd32b.o
"_avcodec_close", referenced from:
_main in tutorial01-9cd32b.o
"_avcodec_copy_context", referenced from:
_main in tutorial01-9cd32b.o
"_avcodec_decode_video2", referenced from:
_main in tutorial01-9cd32b.o
"_avcodec_find_decoder", referenced from:
_main in tutorial01-9cd32b.o
"_avcodec_open2", referenced from:
_main in tutorial01-9cd32b.o
"_avformat_close_input", referenced from:
_main in tutorial01-9cd32b.o
"_avformat_find_stream_info", referenced from:
_main in tutorial01-9cd32b.o
"_avformat_open_input", referenced from:
_main in tutorial01-9cd32b.o
"_avpicture_fill", referenced from:
_main in tutorial01-9cd32b.o
"_avpicture_get_size", referenced from:
_main in tutorial01-9cd32b.o
"_sws_getContext", referenced from:
_main in tutorial01-9cd32b.o
"_sws_scale", referenced from:
_main in tutorial01-9cd32b.oI figured I had to add the extra things from the tutorial, so I did
gcc tutorial01.c -I/usr/local/Cellar/ffmpeg/2.6.1/include -lavutil -lavformat -lavcodec -lz -lavutil -lm
But then I got this error
ld: library not found for -lavutil
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [all] Error 1I feel like the directory
/usr/local/Cellar/ffmpeg/2.6.1/lib
might be relevant, it includes the files :libavcodec.56.26.100.dylib libavresample.dylib
libavcodec.56.dylib libavutil.54.20.100.dylib
libavcodec.a libavutil.54.dylib
libavcodec.dylib libavutil.a
libavdevice.56.4.100.dylib libavutil.dylib
libavdevice.56.dylib libpostproc.53.3.100.dylib
libavdevice.a libpostproc.53.dylib
libavdevice.dylib libpostproc.a
libavfilter.5.11.102.dylib libpostproc.dylib
libavfilter.5.dylib libswresample.1.1.100.dylib
libavfilter.a libswresample.1.dylib
libavfilter.dylib libswresample.a
libavformat.56.25.101.dylib libswresample.dylib
libavformat.56.dylib libswscale.3.1.101.dylib
libavformat.a libswscale.3.dylib
libavformat.dylib libswscale.a
libavresample.2.1.0.dylib libswscale.dylib
libavresample.2.dylib pkgconfig
libavresample.aI’m often really lost trying to compile downloaded libraries (it took me a long time to get SDL to compile, and when I finally got it to work I still didn’t completely understand why).
If anyone could help me understand how these things work, and specifically help me compile this first tutorial, I would be extremely grateful.
Thank you for your time.
-
ffmpeg library performance for decoding h.264 for embedded device
2 avril 2015, par pasifusI have some confuse when tried to compile and run decode h.264 on ARM and MIPS architecture.
I have two embedded devices. I tired to run simple code that read h264 format from file and decode it to h264 in loop in maximum speed (without sleep between frames)
I found that it too slow in there devices.
I tested HD video (720p/25fps)- MIPS32® 1004K (700MHz) it was 4 fps average.
- Raspberry Pi Model B (700MHz) it also was 4 fps average. (i know that raspberry have GPU to decoding/encoding)
A also check it on my virtual machine on ubuntu i686 (1300MHz) and it was 200 fps average.
The question : why it so different preference ? Somebody know how to increase decoding preference on MIPS32® 1004K architecture ?
#include
#include
#include
#include
#include <sys></sys>time.h>
#include
#include "libavcodec/avcodec.h"
#include "libavutil/mathematics.h"
#define INBUF_SIZE 80000
static long get_time_diff(struct timeval time_now) {
struct timeval time_now2;
gettimeofday(&time_now2,0);
return time_now2.tv_sec*1.e6 - time_now.tv_sec*1.e6 + time_now2.tv_usec - time_now.tv_usec;
}
int main(int argc, char **argv)
{
AVCodec *codec;
AVCodecContext *c= NULL;
AVCodecParserContext *parser = NULL;
int frame, got_picture, len2, len;
const char *filename;
FILE *f;
AVFrame *picture;
char *arghwtf = malloc(INBUF_SIZE);
uint64_t in_len;
int pts, dts;
struct timeval t,t2;
float inv_fps = 1e6/23.98;
AVPacket avpkt;
// register all the codecs
avcodec_register_all();
// log level
av_log_set_level(AV_LOG_PANIC|AV_LOG_FATAL|AV_LOG_ERROR|AV_LOG_WARNING);
filename = argv[1];
av_init_packet(&avpkt);
printf("Decoding file %s...\n", filename);
// find the H.264 video decoder
codec = avcodec_find_decoder(CODEC_ID_H264);
if (!codec)
{
fprintf(stderr, "codec not found\n");
exit(1);
}
c = avcodec_alloc_context3(codec);
picture = avcodec_alloc_frame();
// skiploopfilter=all
c->skip_loop_filter = 48;
AVDictionary* dictionary = NULL;
if (avcodec_open2(c, codec, &dictionary) < 0)
{
fprintf(stderr, "could not open codec\n");
exit(1);
}
// the codec gives us the frame size, in samples
parser = av_parser_init(c->codec_id);
parser->flags |= PARSER_FLAG_ONCE;
f = fopen(filename, "rb");
if (!f)
{
fprintf(stderr, "could not open %s\n", filename);
exit(1);
}
frame = 0;
gettimeofday(&t, 0);
if(fread(arghwtf, 1, INBUF_SIZE, f) == 0)
{
exit(1);
}
in_len = 80000;
gettimeofday(&t2, 0);
while (in_len > 0 && !feof(f))
{
len = av_parser_parse2(parser, c, &avpkt.data, &avpkt.size, arghwtf, in_len, pts, dts, AV_NOPTS_VALUE);
len2 = avcodec_decode_video2(c, picture, &got_picture, &avpkt);
if (len2 < 0) {
fprintf(stderr, "Error while decoding frame %d\n", frame);
exit(1);
}
if (got_picture)
{
fprintf(stderr, "\rDisplaying %c %dx%d :frame %3d (%02d:%03d)...", av_get_picture_type_char(picture->pict_type), c->width, c->height, frame, (int)(get_time_diff(t)/1000000), (int)((get_time_diff(t)/1000)%1000));
fflush(stderr);
frame++;
}
memcpy(arghwtf, arghwtf + len, 80000-len);
fread(arghwtf + 80000 - len, 1, len, f);
}
fclose(f);
avcodec_close(c);
av_free(c);
av_free(picture);
printf("\n");
printf("Avarage fps: %d\n", (int)(((double)frame)/(double)(get_time_diff(t)/1000)*1000));
return 0;
}