
Recherche avancée
Autres articles (48)
-
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...) -
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
Configuration spécifique d’Apache
4 février 2011, parModules spécifiques
Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel ; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel ;
Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
Création d’un (...)
Sur d’autres sites (5817)
-
Multiple definition of 'ff_log2_tab'
16 mai 2016, par scoobyI am trying to build ffmpeg for Android, which is an LGPL version. At the end, when I try to combine the *.so to form the libFFmpeg.so it is giving the following error :
/home/kganlite/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld : error : libavcodec/log2_tab.o : multiple definition of ’ff_log2_tab’
/home/kganlite/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld : libavutil/log2_tab.o : previous definition here/home/kganlite/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld : error : libavcodec/reverse.o : multiple definition of ’ff_reverse’
/home/kganlite/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld : libavutil/reverse.o : previous definition here
....linux-androideabi/bin/ld : fatal error : /libffmpeg.so : open : Permission denied
collect2 : ld returned 1 exit statusI am using the following command to build the libFFMpeg.so
arm-linux-androideabi-gcc -lm -lz -shared --sysroot=$SYSROOT -Wl,--no-undefined -Wl,-z,noexecstack $EXTRA_LDFLAGS libavutil/*.o libavutil/arm/*.o libavcodec/*.o libavcodec/arm/*.o libavformat/*.o libswresample/*.o libswscale/*.o -o $PREFIX/libffmpeg.so
I know there are discussions regarding this issue in a few links but none of them helped for me. e.g. I tried to follow
Unable to port FFmpeg C library into android
but still the issue persists.How can I fix this ?
-
How to convert cv::Mat to AVFrame in ffmpeg
22 avril 2016, par Sagar- I have one cv::Mat image.Now i want to convert this mat to AVFrame in ffmpeg.
-
I have trie below code,
void matToAVFrame(cv::Mat frame)
{
AVFrame *dst, *yuv422_final_frame;
cv::Size frameSize = frame.size();
AVCodec *encoder = avcodec_find_encoder(AV_CODEC_ID_H264);
AVFormatContext* outContainer = avformat_alloc_context();
AVStream *outStream = avformat_new_stream(outContainer, encoder);
avcodec_get_context_defaults3(outStream->codec, encoder);
dst = av_frame_alloc();
outStream->codec->pix_fmt = AV_PIX_FMT_YUV420P;
outStream->codec->width = frame.cols;
outStream->codec->height = frame.rows;
avpicture_fill((AVPicture*)dst, frame.data, AV_PIX_FMT_BGR24, outStream->codec->width, outStream->codec->height);
dst->width = frameSize.width;
dst->height = frameSize.height;
// av_image_alloc((uint8_t**)frame.data, dst->linesize,dst->width, dst->height,
// AV_PIX_FMT_BGR24, 32);
yuv422_final_frame = av_frame_alloc();
int yuv422_num_bytes = avpicture_get_size( AV_PIX_FMT_YUV420P, dst->width, dst->height );
uint8_t* final_frame2_buffer = (uint8_t *)av_malloc(yuv422_num_bytes*sizeof(uint8_t));
yuv422_final_frame->width = frameSize.width;
yuv422_final_frame->height = frameSize.height;
avpicture_fill((AVPicture*)yuv422_final_frame, (uchar*)dst->data, AV_PIX_FMT_YUV420P, dst->width, dst->height);
SwsContext *final_sws_ctx = sws_getContext(dst->width , dst->height,
AV_PIX_FMT_BGR24, dst->width, dst->height,
AV_PIX_FMT_YUV420P, SWS_FAST_BILINEAR, 0, 0, 0);
// avpicture_fill((AVPicture*)dst, frame.data, AV_PIX_FMT_RGB24, dst->width, dst->height);
sws_scale(final_sws_ctx, dst->data,
dst->linesize,
0, dst->height,
yuv422_final_frame->data,
yuv422_final_frame->linesize);
Mat cvmImage = cv::Mat( yuv422_final_frame->height, yuv422_final_frame->width, CV_8UC3, yuv422_final_frame->data[2],
yuv422_final_frame->linesize[2]);
imwrite("/home/radix/Desktop/OpenCV/cvmImage.png", cvmImage);
}
int main()
{
av_register_all();
Mat frame = imread("path to image");
matToAVFrame(frame);
}
but it is giving me some bad image, and in some cases it is not giving any image.
* So please anybody tell me where i am doing wrong.Thanks !!- EDIT :
-
Sometimes it gives me error like
[swscaler @ 0x1c9a6e0] bad src image pointers
-
So i am getting this type of output from above code.
-
Input Image :
- output image :
-
How to convert AVFrame to cv::Mat in ffmpeg
21 avril 2016, par Sagar- I have one cv::Mat image.Now i want to convert this mat to AVFrame in ffmpeg.
-
I have trie below code,
void matToAVFrame(cv::Mat frame)
{
AVFrame *dst, *yuv422_final_frame;
cv::Size frameSize = frame.size();
AVCodec *encoder = avcodec_find_encoder(AV_CODEC_ID_H264);
AVFormatContext* outContainer = avformat_alloc_context();
AVStream *outStream = avformat_new_stream(outContainer, encoder);
avcodec_get_context_defaults3(outStream->codec, encoder);
dst = av_frame_alloc();
outStream->codec->pix_fmt = AV_PIX_FMT_YUV420P;
outStream->codec->width = frame.cols;
outStream->codec->height = frame.rows;
avpicture_fill((AVPicture*)dst, frame.data, AV_PIX_FMT_BGR24, outStream->codec->width, outStream->codec->height);
dst->width = frameSize.width;
dst->height = frameSize.height;
// av_image_alloc((uint8_t**)frame.data, dst->linesize,dst->width, dst->height,
// AV_PIX_FMT_BGR24, 32);
yuv422_final_frame = av_frame_alloc();
int yuv422_num_bytes = avpicture_get_size( AV_PIX_FMT_YUV420P, dst->width, dst->height );
uint8_t* final_frame2_buffer = (uint8_t *)av_malloc(yuv422_num_bytes*sizeof(uint8_t));
yuv422_final_frame->width = frameSize.width;
yuv422_final_frame->height = frameSize.height;
avpicture_fill((AVPicture*)yuv422_final_frame, (uchar*)dst->data, AV_PIX_FMT_YUV420P, dst->width, dst->height);
SwsContext *final_sws_ctx = sws_getContext(dst->width , dst->height,
AV_PIX_FMT_BGR24, dst->width, dst->height,
AV_PIX_FMT_YUV420P, SWS_FAST_BILINEAR, 0, 0, 0);
// avpicture_fill((AVPicture*)dst, frame.data, AV_PIX_FMT_RGB24, dst->width, dst->height);
sws_scale(final_sws_ctx, dst->data,
dst->linesize,
0, dst->height,
yuv422_final_frame->data,
yuv422_final_frame->linesize);
Mat cvmImage = cv::Mat( yuv422_final_frame->height, yuv422_final_frame->width, CV_8UC3, yuv422_final_frame->data[2],
yuv422_final_frame->linesize[2]);
imwrite("/home/radix/Desktop/OpenCV/cvmImage.png", cvmImage);
}
int main()
{
av_register_all();
Mat frame = imread("path to image");
matToAVFrame(frame);
}
but it is giving me some bad image, and in some cases it is not giving any image.
* So please anybody tell me where i am doing wrong.Thanks !!- EDIT :
-
Sometimes it gives me error like
[swscaler @ 0x1c9a6e0] bad src image pointers
-
So i am getting this type of output from above code.
-
Input Image :
- output image :