Recherche avancée

Médias (91)

Autres articles (76)

  • List of compatible distributions

    26 avril 2011, par

    The 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 (...)

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

Sur d’autres sites (11803)

  • ffmpeg - replace all corrupted frames with a dummy

    24 août 2020, par Dmitry

    I look for a solution on how to detect and then automatically replace all corrupted (or completely broken) frames with a black one.

    


    I've already tried the following command, but the result is not quite what I actually need.

    


    ffmpeg -err_detect ignore_err -i video-with-broken-frames.avi -c copy fixed.avi


    


    This command detects and replaces all corrupted frames with the nearest good one. So that if I have 20 corrupted frames at the start of a video - they will be replaced with 21st good one. Well, what I need is to replace corrupted frames with some dummy, for instance with a black one. Or just some-how to indicate what that frame is broken and was copied.

    


  • Replace blank spaces to run command

    1er mai 2017, par ChrisBlp

    I’m using Runtime.getRuntime.exec(String) to cut some songs with ffmpeg.
    But when my song has a name with a blankspace it doesn’t work ...

    So before I cut the song, I want to replace every blank space of my songs by "\ ".

    I did that :

    String in = directory+songs.get(i);
    String out = directory+"trimed_"+songs.get(i);
    in.replaceAll(" "," \\ ");
    out.replaceAll(" ", "\\ ");
    String str = "ffmpeg -t 1 -i "+in+" -vcodec copy "+out;
    Runtime.getRuntime().exec(str);

    But it doesn’t replace anything at all when I print str, am I missing something ?

  • How to improve the fluency of rtsp streaming through ffmpeg (processing 16 pictures at the same time)

    21 décembre 2024, par Ling Yun

    When 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.