Recherche avancée

Médias (33)

Mot : - Tags -/creative commons

Autres articles (39)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (7971)

  • FFmpeg decode OGG Vorbis audio as float, how to get float data from decoder

    19 novembre 2020, par cs guy

    I am trying to decode a OGG Vorbis audio file with the following :

    


    // if opening input failed
    if (avformat_open_input(&pFormatContext, filePath.c_str(), av_find_input_format("ogg"),
                            nullptr) != 0) {
        
        LOGE("FFmpegExtractor can not open the file! %s", filePath.c_str());
        return FAILED_TO_LOAD;
    }

    durationInMillis = pFormatContext->duration / AV_TIME_BASE * secondsToMilli;
    LOGD("FFmpegExtractor opened the file, Duration: %llu", durationInMillis);

    avformat_find_stream_info(pFormatContext, nullptr);

    LOGD("pFormatContext streams num: %ui", pFormatContext->nb_streams);

    int sendPacketResult = 0;
    int receiveFrameResult = 0;

    for (int i = 0; i < pFormatContext->nb_streams; i++) {
        AVCodecParameters *pLocalCodecParameters = pFormatContext->streams[i]->codecpar;

        if (pLocalCodecParameters->codec_type == AVMEDIA_TYPE_AUDIO) {
            avCodecContext = avcodec_alloc_context3(avCodec);
            if (!avCodecContext) {
                
                LOGE("FFmpegExtractor avcodec_alloc_context3 failed!");
                return FAILED_TO_LOAD;
            }

            if (avcodec_parameters_to_context(avCodecContext, pLocalCodecParameters) < 0) {
                
                LOGE("FFmpegExtractor avcodec_parameters_to_context failed!");
                return FAILED_TO_LOAD;
            }

            if (avcodec_open2(avCodecContext, avCodec, nullptr) < 0) {
                
                LOGE("FFmpegExtractor avcodec_open2 failed!");
                return FAILED_TO_LOAD;
            }
        }

        while (av_read_frame(pFormatContext, avPacket) >= 0) {
            
            sendPacketResult = avcodec_send_packet(avCodecContext, avPacket);

            
            receiveFrameResult = avcodec_receive_frame(avCodecContext, avFrame);

            // TODO: Get frames PCM data from the decoder, 
        }
    }


    


    I am stuck on the last part. I want to get the decoded data of the current frame as a float between -1 to +1 for all the channels the audio has but I have no idea how to. I looked at the official documents but I could not understand them. How can I get the data from the decoder on the line

    


    


    // TODO : Get frames PCM data from the decoder,

    


    


  • Right way to use vmaf with ffmpeg

    14 juin, par dravit

    I am trying to calculate the VMAF score of a processed video wrt the original file.

    


    Command I have used :

    


    ffmpeg -y -loglevel info -stats -i original.mp4 -i processed.mp4 -lavfi "[0]null[refdeint];[refdeint]scale=1920:1080:flags=neighbor[ref];[1]setpts=PTS+0.0/TB[b];[b]scale=1920:1080:flags=neighbor[c];[c][ref]libvmaf=log_fmt=json:phone_model=1:model_path={model_path_here}/vmaf_v0.6.1.json:n_subsample=1:log_path=log.json" -f null -


    


    Now as per the official documentation of vmaf with ffmpeg found here, it says source/reference file followed by the encoded/distorted/processed file.

    


    But almost all of the blogs I came across, they are using the other way round order of the args, i.e. processed file followed by the original file.

    


    Few examples :

    


      

    1. https://medium.com/@eyevinntechnology/keep-an-eye-on-the-video-quality-b9bcb58dd5a1 : search for "Using VMAF within FFMPEG" in it.

      


    2. 


    3. https://websites.fraunhofer.de/video-dev/calculating-vmaf-and-psnr-with-ffmpeg/ : search for "Metric Calculation with FFmpeg" in it.

      


    4. 


    


    EDIT

    


    NOTE : Changing the order does change the VMAF score.

    


  • Cannot get MediaStream from Electron app to browser via Openvidu media server

    11 juin 2021, par foxy.bunny

    I'm currently having an issue with openvidu-browser-2.17.0.js

    


    I'm trying to transfer a camera stream from RTSP to an Openvidu media server deployed on cloud and get the stream back on the browser.

    


    The RTSP stream was converted into an HLS stream using FFmpeg and played using hls.js. It was captured in an video tag in HTML and I used the HTMLMediaElement.captureStream().getVideoTrack() to generate MediaStreamTrack and passed it into the videoSource property in initPublisher. This publisher part was wrapped in electron. Then, the stream was connected to our cloud Openvidu server deployed on-premises exactly like in the Docs (https://docs.openvidu.io/en/2.18.0/deployment/deploying-on-premises/). The subscriber part is a simple HTML page displayed on the browser to get the stream from the cloud server. The subscriber is responsible for creating session and generating stream from the media server when streamCreated event occurs.

    


    The whole workflow worked nicely when we tested it with our webcam, however, when we use MediaStreamTrack of our stream video instead of webcam, the subscriber part only showed the blank video.

    


    My question is :

    


    1 : Is it possible to stream an MediaStream to Openvidu media server like that ?

    


    2 : If yes, then what am I doing wrong here ?

    


    Describe the bug

    


    Cannot get MediaStream from Electron app to browser via Openvidu media server.

    


    Expected behavior

    


    Receive the stream from the Electron app to browser via Openvidu media server.

    


    Wrong current behavior

    


    Only get blank video

    


    Client device info

    


      

    • Chrome Version 91.0.4472.77 (Official Build) (64-bit) on Windows 10 Version 10.0.19042 Build 19042
    •