
Recherche avancée
Médias (1)
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (54)
-
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 -
L’utiliser, en parler, le critiquer
10 avril 2011La première attitude à adopter est d’en parler, soit directement avec les personnes impliquées dans son développement, soit autour de vous pour convaincre de nouvelles personnes à l’utiliser.
Plus la communauté sera nombreuse et plus les évolutions seront rapides ...
Une liste de discussion est disponible pour tout échange entre utilisateurs. -
Contribute to translation
13 avril 2011You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
MediaSPIP is currently available in French and English (...)
Sur d’autres sites (9469)
-
How to improve the fluency of rtsp streaming through ffmpeg (processing 16 pictures at the same time)
21 décembre 2024, par Ling YunWhen the button is clicked, I create 16 threads in Qt, and then pass the rtsp data address and the label to be rendered to the process, and then the process does this :
run :



void rtspthread::run()
{

 while(!shouldStop){
 openRtspStream(rtspUrl.toUtf8().constData(),index);
 }

 qDebug() << "RTSP stream stopped.";
 emit finished(); 
}




open input stream :


void rtspthread::openRtspStream(const char* rtspUrl,int index)

{

 AVDictionary *options = nullptr;
 AVFrame *pFrameRGB = nullptr;
 uint8_t *pOutBuffer = nullptr;
 struct SwsContext *swsContext;
 AVFormatContext *pFormatCtx = nullptr;
 pFormatCtx = avformat_alloc_context();
 av_dict_set(&options, "rtsp_transport", "tcp", 0);
 av_dict_set(&options, "maxrate", "4000k", 0);
 if (avformat_open_input(&pFormatCtx, rtspUrl, nullptr, &options) != 0) {
 printf("Couldn't open stream file.\n");
 return;
 }

 if (avformat_find_stream_info(pFormatCtx, NULL)<0)
 {
 printf("Couldn't find stream information.\n");
 return;
 }
 int videoStreamIndex = -1;
 for (int i = 0; i < pFormatCtx->nb_streams; i++) {
 if (pFormatCtx->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
 videoStreamIndex = i;
 break;
 }
 }
 if (videoStreamIndex!=-1){
 AVStream* videoStream = pFormatCtx->streams[videoStreamIndex];
 
 AVCodecParameters* codecpar = videoStream->codecpar;
 const AVCodec* videoCodec = avcodec_find_decoder(codecpar->codec_id);

 AVCodecContext* videoCodecContext = avcodec_alloc_context3(videoCodec);

 avcodec_parameters_to_context(videoCodecContext,codecpar);

 avcodec_open2(videoCodecContext,videoCodec,nullptr);

 AVPixelFormat srcPixFmt = videoCodecContext->pix_fmt;
 QLabel* label = this->parentWidget->findChild("videoLabel");
 int targetWidth = label->width();
 int targetHeight = label->height();
 
 pOutBuffer = (uint8_t*)av_malloc(av_image_get_buffer_size(AV_PIX_FMT_RGB32,
 videoCodecContext->width,
 videoCodecContext->height, 1));

 
 pFrameRGB = av_frame_alloc();
 av_image_fill_arrays(pFrameRGB->data, pFrameRGB->linesize, pOutBuffer,
 AV_PIX_FMT_RGB32, videoCodecContext->width, videoCodecContext->height, 1);


 swsContext= sws_getContext(
 videoCodecContext->width,videoCodecContext->height,srcPixFmt,
 targetWidth, targetHeight,AV_PIX_FMT_RGB32,
 SWS_BICUBIC,nullptr,nullptr,nullptr
 );
 
 AVPacket packet;
 AVFrame* frame = av_frame_alloc();
 int frameCounter = 0;
 while (av_read_frame(pFormatCtx, &packet) >= 0) {
 if (shouldStop) {
 break;
 }
 if (packet.stream_index == videoStreamIndex) {
 
 int ret = avcodec_send_packet(videoCodecContext,&packet);
 int rets = avcodec_receive_frame(videoCodecContext, frame);
 if (rets < 0) {
 qDebug() << "Error receiving frame from codec context";
 }
 
 sws_scale(swsContext, frame->data, frame->linesize, 0, videoCodecContext->height,
 pFrameRGB->data, pFrameRGB->linesize);

 
 QImage img(pFrameRGB->data[0], targetWidth, targetHeight,
 pFrameRGB->linesize[0], QImage::Format_RGB32);
 
 qDebug() << index;

 emit frameReady(img.copy(),index);


 QThread::msleep(30); // 控制帧率
 }
 av_packet_unref(&packet);

 }
 av_frame_free(&frame);
 av_frame_free(&pFrameRGB);
 sws_freeContext(swsContext);
 avcodec_free_context(&videoCodecContext);
 avformat_close_input(&pFormatCtx);
 avformat_free_context(pFormatCtx);

 }


}




The video is stuck and has snow screen. I want to lower the resolution and reduce the snow screen. The server cannot change the resolution.


-
avcodec/mpegvideo_dec : Add NULL pointer checks to MPV_motion_lowres()
8 juin 2023, par Michael Niedermayeravcodec/mpegvideo_dec : Add NULL pointer checks to MPV_motion_lowres()
This makes the null pointer checks match mpv_motion_internal()
Fixes : NULL pointer dereference
Fixes : 59671/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG1VIDEO_fuzzer-4993004566609920
Fixes : 59678/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEGVIDEO_fuzzer-4893168991338496Found-by : continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by : Michael Niedermayer <michael@niedermayer.cc> -
Revision b5c4520101 : Calculating dst pointer only once per transform block. Change-Id : I23fea0a2e85b
19 novembre 2013, par Dmitry KovalevChanged Paths :
Modify /vp9/decoder/vp9_decodeframe.c
Calculating dst pointer only once per transform block.Change-Id : I23fea0a2e85be8373600e3e2dae98d36acde389c