Recherche avancée

Médias (1)

Mot : - Tags -/ticket

Autres articles (31)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

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

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

  • L’utiliser, en parler, le critiquer

    10 avril 2011

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

Sur d’autres sites (5624)

  • 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,

    


    


  • Concatenate multiple video php ffmpeg

    3 mai 2017, par Angus Simons

    I have multiple files that are already been encoded (they have the same format and size) I would like to concatenate on a single video (that already exist and has to be overwritten).

    Following the official FAQ Documentation I should use demuxer

    FFmpeg has a concat demuxer which you can use when you want to avoid a
    re-encode and your format doesn’t support file level concatenation.

    The problem is that I should use a .txt file with a list of files using this command line

    ffmpeg -f concat -safe 0 -i mylist.txt -c copy output

    where mylist.txt should be :

    file '/path/to/file1'
    file '/path/to/file2'
    file '/path/to/file3'

    How can I do with PHP ?


    Also tried with concat protocol

    I tried using also the concat protocol that re-encode videos with these lines of code :

    $cli = FFMPEG.' -y -i \'concat:';

    foreach ($data as $key => $media) {
     $tmpFilename = $media['id'];
     $tmpPath = $storePath.'/tmp/'.$tmpFilename.'.mp4';

     if ($key != ($dataLenght - 1)) {
       $cli .= $tmpPath.'|';
     } else {
       $cli .= $tmpPath.'\'';
     }
    }

    $cli .= ' -c copy '.$export;
    exec($cli);

    that generate this command line :

    /usr/local/bin/ffmpeg -i 'concat:/USER/storage/app/public/video/sessions/590916f0d122b/tmp/1493768472144.mp4|/USER/storage/app/public/video/sessions/590916f0d122b/tmp/1493767926114.mp4|/USER/storage/app/public/video/sessions/590916f0d122b/tmp/1493771107551.mp4|/USER/storage/app/public/video/sessions/590916f0d122b/tmp/1493771114598.mp4' -c:v libx264  /USER/storage/app/public/video/sessions/590916f0d122b/tmp_video_session.mp4

    but I got this error :

    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc8aa800000] Found duplicated MOOV Atom. Skipped it

  • fate/webp : add test for lossy compression.

    26 juin 2016, par Martin Vignali
    fate/webp : add test for lossy compression.
    

    the result of ffmpeg decoding is binary exact with the yuv output of
    official decoder (dwebp)

    Signed-off-by : James Almer <jamrial@gmail.com>

    • [DH] tests/fate/image.mak
    • [DH] tests/ref/fate/webp-rgb-lossy-q80
    • [DH] tests/ref/fate/webp-rgba-lossy-q80