Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (47)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (4248)

  • Decoding with FFMPEG on Visual Studio 2010

    20 décembre 2018, par user2439801

    I just started using FFMPEG with C++ and try to code an audio decoder then write the decoded audio into a file.

    However i’m not sure about which data to write to the output file. As far as i know from looking at the sample codes it seems to be the AVFrame -> data[0].
    But when i try to print it on the consoles, i get some random numbers that are different each time i run the program. And when i try to write this AVFrame->data[0] into a file i keep getting an error.

    So my question is how can I write the decoded audio after I call the function av_codec_decode_audio4 ?

    Below I attached my code and I pass the argument "C :\02.mp3" which is a path for a valid mp3 file on my PC.

    Thank you for your help.

    // TestFFMPEG.cpp : Audio Decoder
    //

    #include "stdafx.h"

    #include <iostream>
    #include <fstream>
    #include <sstream>

    extern "C" {
       #include
       #include
       #include

    }

    using namespace std;


    int main(int argc, char* argv[])
    {
    int audioStream = -1;

    AVCodec         *aCodec;
    AVPacket        avPkt;
    AVFrame         *decode_frame = avcodec_alloc_frame();

    AVCodecContext  *aCodecCtxt;
    AVFormatContext *pFormatCtxt = NULL;

    if(argc != 2) {     // Checking  whether there is enough argument
       return -1;
    }

    av_register_all();  //Initialize CODEC
    avformat_network_init();
    av_init_packet (&amp;avPkt);


    if (avformat_open_input (&amp;pFormatCtxt, argv[1],NULL,NULL)!= 0 ){ //Opening File
        return -2;
    }

    if(avformat_find_stream_info (pFormatCtxt,NULL) &lt; 0){ //Get Streams Info
        return -3;
    }

    AVStream *stream = NULL;
    //av_read_play (pFormatCtxt); //open streams


    for (int i = 0;  i &lt; pFormatCtxt->nb_streams ; i++) { //Find Audio Stream
        if (pFormatCtxt->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO){
            audioStream =i;
        }
    }

    aCodecCtxt = pFormatCtxt ->streams [audioStream]->codec; // opening decoder  
    aCodec = avcodec_find_decoder( pFormatCtxt->streams [audioStream] ->codec->codec_id);

    if (!aCodec) {
        return -8;
    }

    if (avcodec_open2(aCodecCtxt,aCodec,NULL)!=0) {
        return -9;
    }

    int cnt = 0;

    while(av_read_frame(pFormatCtxt,&amp;avPkt) >= 0 ){

       if (avPkt.stream_index == audioStream){
           int check = 0;
           int result = avcodec_decode_audio4 (aCodecCtxt,decode_frame,&amp;check, &amp;avPkt);
           cout &lt;&lt; "Decoded : "&lt;&lt; (int) decode_frame->data[0] &lt;&lt;", "&lt;&lt; "Check : " &lt;&lt; check &lt;&lt; ", Format :" &lt;&lt; decode_frame->format &lt;&lt;" " &lt;&lt; decode_frame->linesize[0]&lt;&lt; " "&lt;<cnt return="return" acodec="acodec">id;  
    }
    </cnt></sstream></fstream></iostream>
  • error while linking with ffmpeg under windows using VC 2010

    15 octobre 2017, par Alienpenguin

    I am writing a project on windows that uses opencv (3.2.0 compiled from sources).

    I am trying to add ffmpeg to my project in order to use it to save a mpeg file ; since compiling ffmpeg-3.3.[34] is quite a cumbersome process on windows (i do not currently have mingw or yasm installed) i decided to give the binary packages a try. (downloaded both dev and shared packages from ffmpeg.zeranoe.com)

    Since there were not differentiated dll for "debug" and "release" mode i put them in a common path that would be picked by both visual studio compiling mode.

    When running my project in "debug" mode everything is fine, while after having compiled the "release" version i get the following error when launching the executable

    The error encountered is : (translated from italian so please bear with some imprecise wording) Impossible to find the entry point ?fastFree@cv@YAXPAX@Z of the procedure in the dll avcodec-57.dll

    Can anyone point me in the right direction ? how come the dll complains about a missing symbol only in "release" mode ? also, the signature of the symbol seems to be related to opencv library, but how on earth is this possible ? since opencv was already in the project and is not interacting with ffmpeg ?

  • Working on FFmpeg with VC++ 2010

    18 juillet 2017, par user3743908

    I am trying to use FFmpeg in VC++ 2010 so that i can use ffmpeg in to my VC++ Code , i first Install the FFmpeg in to machine by Help provided by youtube video "FFMPEG build for windows"

    while building the sample code provided by ffmpeg (muxing.c) i got following error’s

    1. error C1189 : #error : missing-D__STDC_FORMAT_MACROS /#define _STDC_FORMAT_MACROS

    2 IntelliSense : #error directive : missing -D__STDC_FORMAT_MACROS / #define __STDC_FORMAT_MACROS
    c :\users----\ffmpeg\ffmpeg\include\libavutil\timestamp.h

    how to resolve this error

    i have already done following

    1.Project—>properties—>Configuration Properties—> VC++ Directories —> include dir add all the header files from ffmpeg folder here

    1. in Configuration Properties—> C/C++—>Command Line—>Additional Options —> add -D__STDC_CONSTANT_MACROS

    any help would be highly appreciate

    Thanks

    regards