
Recherche avancée
Médias (91)
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Core Media Video
4 avril 2013, par
Mis à jour : Juin 2013
Langue : français
Type : Video
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (96)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
Sur d’autres sites (8239)
-
libav C++ sw_scale returns variable byte size of BGR24 buffer
6 mars 2021, par igorI'm trying to convert my local /dev/video0 cam to BGR24 format. It works if I resize the image (although not 100% of the time, more like 85% of the time), but I'd like to keep the same size as input video.


I initialize BGR image like so including the sws context :


AVPixelFormat outputPixFormat = AV_PIX_FMT_BGR24;

 AVFrame* pFrameBGR = av_frame_alloc();
 pFrameBGR->width = decoder->video_codec_context->width;
 pFrameBGR->height = decoder->video_codec_context->height;
 pFrameBGR->format = outputPixFormat;

 int alloRet = av_image_alloc(pFrameBGR->data, pFrameBGR->linesize, decoder->video_codec_context->width, decoder->video_codec_context->height, outputPixFormat, 1);
 if (alloRet < 0) {
 logging("failed to allocate image");
 return -1;
 }

 struct SwsContext *sws_ctx = NULL;

 sws_ctx = sws_getContext(decoder->video_codec_context->width,
 decoder->video_codec_context->height,
 decoder->video_codec_context->pix_fmt,
 decoder->video_codec_context->width,
 decoder->video_codec_context->height,
 outputPixFormat,
 SWS_DIRECT_BGR,
 0,
 0,
 0
 );



This is the portion of my decoding loop :


int response = avcodec_send_packet(pCodecContext, pPacket);
 if (response < 0) {
 logging("Error while sending a packet to decoder: %s", av_err2str(response));
 return response;
 }

 while (response >= 0) {
 response = avcodec_receive_frame(pCodecContext, pFrame);
 if (response == AVERROR(EAGAIN) || response == AVERROR_EOF) {
 break;
 } else if (response < 0) {
 logging("Error while receiving a frame from the decoder: %s", av_err2str(response));
 return response;
 }
 if (response >= 0) {

 sws_scale(sws_ctx, (uint8_t const * const *)pFrame->data, pFrame->linesize, 0, pCodecContext->height, pFrameBGR->data, pFrameBGR->linesize);




THe question is how to copy the plane of AVFrame into a buffer
:

size_t rgb_size = av_image_get_buffer_size(AV_PIX_FMT_BGR24, bgrFrame->width, bgrFrame->height, 1);

 uint8_t *dst_data;
 dst_data = (uint8_t *)(av_malloc(rgb_size));

 av_image_copy_to_buffer(dst_data, rgb_size, (const uint8_t* const *)bgrFrame->data, bgrFrame->linesize, AV_PIX_FMT_BGR24, bgrFrame->width, bgrFrame->height, 1);




If I try to save to file the BGR image is correctly copied :


char filebuf[256];
snprintf(filebuf, sizeof filebuf, "%s%d%s", "out_", pPacket->dts, ".rgb");
std::FILE *output=fopen(filebuf,"wb+"); 

fwrite(bgrFrame->data[0],(pFrame->width)*(pFrame->height)*3,1,output); 
std::fclose(output);



So it looks like my copy to buffer function is faulty, but I can figure out what's wrong with it :


uint8_t *dst_data;
 dst_data = (uint8_t *)(av_malloc(rgb_size));

 av_image_copy_to_buffer(dst_data, rgb_size, (const uint8_t* const *)bgrFrame->data, bgrFrame->linesize, AV_PIX_FMT_BGR24, bgrFrame->width, bgrFrame->height, 1);



-
ffmpeg avformat_open_input always returns "Protocol not found" rv=(-1330794744)
7 juin 2019, par bzivkovicTrying to get ffmpeg working in Visual Studio 2010. So far all ffmpeg headers and libs are loaded, no error or warning occurs.
avcodec_register_all();
AVFormatContext *pFormatCtx = NULL;
char errbuf[256];
pFormatCtx = avformat_alloc_context();
int rv = avformat_open_input(&pFormatCtx, "myfile.ext", NULL, NULL);
if (rv!=0){
av_strerror(rv, errbuf, sizeof(errbuf));
}The problem is, avformat_open_input always returning -1330794744 (errbuf="Protocol not found"). Tried x86 & x64 headers and libs on 32bit XP and 64bit W7. Whatever I put for "myfile.ext" (tried "file1.avi", "file=c :\file1.avi", "http://www.someweb.com/file1.avi", and even empty char* "") response is always "Protocol not found". Any ideas ?
-
ffmpeg returns "method SETUP failed : 404 Not Found"
1er juillet 2019, par AlexWe’re using ffmpeg (build ffmpeg-20190628-098ab93-win32-static) to take a snapshot from camera RTSP streams on a Win 10 system. On some cameras, we’re getting this error :
[rtsp @ 06813ac0] method SETUP failed: 404 Not Found
rtsp://username:password@example.com: Server returned 404 Not FoundHere’s an example command we use :
ffmpeg -y -i rtsp://username:password@example.com -vframes 1 -pix_fmt yuvj420p
-vf select='eq(pict_type\,I)' -q:v 1 _test.jpgHowever, VLC can load the same stream (we can’t use VLC, though) from the same machine. Additionally, we’ve opened the firewall to ffmpeg (it popped up the two firewall dialogs and we allowed it through).
We’ve found posts on the
DESCRIBE
error but nothing onSETUP
. Any help is appreciated. Thank you.Update : In VLC, that RTSP stream asks for credentials twice for some reason. Wondering if that’s the cause.