
Recherche avancée
Autres articles (90)
-
Qualité du média après traitement
21 juin 2013, parLe bon réglage du logiciel qui traite les média est important pour un équilibre entre les partis ( bande passante de l’hébergeur, qualité du média pour le rédacteur et le visiteur, accessibilité pour le visiteur ). Comment régler la qualité de son média ?
Plus la qualité du média est importante, plus la bande passante sera utilisée. Le visiteur avec une connexion internet à petit débit devra attendre plus longtemps. Inversement plus, la qualité du média est pauvre et donc le média devient dégradé voire (...) -
Les images
15 mai 2013 -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;
Sur d’autres sites (9519)
-
g++ Linking Error on Mac while compiling FFMPEG
7 mai 2013, par Saptarshi Biswasg++ on Snow Leopard is throwing linking errors on the following piece of code
test.cpp
#include <iostream>
using namespace std;
#include <libavcodec></libavcodec>avcodec.h> // required headers
#include <libavformat></libavformat>avformat.h>
int main(int argc, char**argv) {
av_register_all(); // offending library call
return 0;
}
</iostream>When I try to compile this using the following command
g++ test.cpp -I/usr/local/include -L/usr/local/lib \
-lavcodec -lavformat -lavutil -lz -lm -o testI get the error
Undefined symbols :
"av_register_all()", referenced from :
_main in ccUD1ueX.o
ld : symbol(s) not found
collect2 : ld returned 1 exit statusInterestingly, if I have an equivalent c code,
test.c#include
#include <libavcodec></libavcodec>avcodec.h>
#include <libavformat></libavformat>avformat.h>
int main(int argc, char**argv) {
av_register_all();
return 0;
}gcc compiles it just fine
gcc test.c -I/usr/local/include -L/usr/local/lib \
-lavcodec -lavformat -lavutil -lz -lm -o testI am using Mac OS X 10.6.5
$ g++ --version
i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664)
$ gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664)FFMPEG's libavcodec, libavformat etc. are C libraries and I have built them on my machine like thus :
./configure --enable-gpl --enable-pthreads --enable-shared \
--disable-doc --enable-libx264
make && sudo make installAs one would expect, libavformat indeed contains the symbol av_register_all
$ nm /usr/local/lib/libavformat.a | grep av_register_all
0000000000000000 T _av_register_all
00000000000089b0 S _av_register_all.ehI am inclined to believe g++ and gcc have different views of the libraries on my machine. g++ is not able to pick up the right libraries. Any clue ?
-
Python SWIG bindings with SomeType ** as function argument
2 mai 2013, par vericuleI couldn't find any working Python bindings for ffmpeg, so I decided to generate one with SWIG. Generation was quick and easy (no customization, just default SWIG interface), but these a problem using some functions like
int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputFormat *fmt, AVDictionary **options);
from libavformat/avformat.h. Using C this can be run simply by :AVFormatContext *pFormatCtx = NULL;
int status;
status = avformat_open_input(&pFormatCtx, '/path/to/my/file.ext', NULL, NULL);In Python I try following :
>>> from ppmpeg import *
>>> av_register_all()
>>> FormatCtx = AVFormatContext()
>>> FormatCtx
>
>>> avformat_open_input(FormatCtx, '/path/to/my/file.ext', None, None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: in method 'avformat_open_input', argument 1 of type 'AVFormatContext **'
</module></stdin>Problem is that Python do not have & equivalent. I tried to use
cpointer.i
and itspointer_class
(%pointer_class(AVFormatContext, new_ctx)
), butnew_ctx()
returns pointer and this is not I want definitely.%pointer_class(AVFormatContext *, new_ctx)
is illegal and gives syntax error. I would be grateful for any help. Thanks.EDIT :
I forgot to mention I tried to use typemaps, but don't know how to write custom typemap for struct and documentation has only examples for basic types like int or float... -
Revision 33458 : retablir le pied de la dist
1er décembre 2009, par cedric@… — Logretablir le pied de la dist