Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (40)

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

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

Sur d’autres sites (7287)

  • Separate Audio and Video in android

    13 février 2014, par Manoj

    I am beginner to Android application development,The aim of my project is to separate a audio and video from video file. after surfing in internet i came to know that, using FFmpeg we can do it.

    ffmpeg -i input.mkv # show stream numbers and formats
    ffmpeg -i input.mkv -c copy audio.m4a # AAC
    ffmpeg -i input.mkv -c copy audio.mp3 # MP3
    ffmpeg -i input.mkv -c copy audio.ac3 # AC3
    ffmpeg -i input.mkv -an -c copy video.mkv
    ffmpeg -i input.mkv -map 0:1 -c copy audio.m4a # stream 1

    separated video file wouldn't contain any audio it must be contain only video type.
    whether this option too possible in ffmpeg ?
    is any other alternative option there ?.

  • How to properly open libvpx for encoding in via avcodec_open2() ?

    10 juin 2014, par Edison

    With a valid AVCodec and a valid AVContext, when calling avcodec_open2() EINVAL (-22, Invalid arguments) is returned, it turns out the EINVAL is triggered via

       ret = avctx->codec->init(avctx);
       if (ret < 0) {
           goto free_and_end;
       }

    inside avcodec_open2().

    The same code that I have right now can open mpeg4 and h264 just fine.

    Are there any special option parameters that has to be set (e.g. for h263, image size has to be multiples of certain numbers) to open libvpx codec ?

  • Decoding with FFMPEG on Visual Studio 2010

    6 juin 2013, 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>