Recherche avancée

Médias (1)

Mot : - Tags -/bug

Autres articles (58)

  • 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

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (11235)

  • h264 ffmpeg : How to initialize ffmpeg to decode NALs created with x264

    14 décembre 2014, par Raul Calvo

    I have encoded some frames using x264, using x264_encoder_encode and after that I have created AVPackets using a function like this :

    bool PacketizeNals( uint8_t* a_pNalBuffer, int a_nNalBufferSize, AVPacket* a_pPacket )
    {
       if ( !a_pPacket )
    return false;
       a_pPacket->data = a_pNalBuffer;
       a_pPacket->size = a_nNalBufferSize;
       a_pPacket->stream_index = 0;
       a_pPacket->flags = AV_PKT_FLAG_KEY;

       a_pPacket->pts = int64_t(0x8000000000000000);
       a_pPacket->dts = int64_t(0x8000000000000000);
    }

    I call this function like this :

    x264_nal_t* nals;
    int num_nals = encode_frame(pic, &nals);
    for (int i = 0; i < num_nals; i++)
    {
       AVPacket* pPacket = ( AVPacket* )av_malloc( sizeof( AVPacket ) );
       av_init_packet( pPacket );
       if ( PacketizeNals( nals[i].p_payload, nals[i].i_payload, pPacket ) )
       {
           packets.push_back( pPacket );
       }
    }

    Now what I want to do is to decode these AVPackets using avcodec_decode_video2. I think the problem is that I haven’t initialized properly the decoder because to encode I used "ultrafast" profile and "zerolatency" tune ( x264 ) and to decode I don’t know how to specify to ffmpeg these options.
    In some examples I have read people initialize the decoder using the file where the video is stored, but in this case I have directly the AVPackets.
    What I’m doing to try to decode is :

    avcodec_init();  
    avcodec_register_all();  
    AVCodec* pCodec;  
    pCodec=avcodec_find_decoder(CODEC_ID_H264);  
    AVCodecContext* pCodecContext;  
    pCodecContext=avcodec_alloc_context();  
    avcodec_open(pCodecContext,pCodec);  
    pCodecContext->width = 320;
    pCodecContext->height = 200;
    pCodecContext->extradata = NULL;
    unsigned int nNumPackets = packets.size();
    int frameFinished = 0;
    for ( auto it = packets.begin(); it != packets.end(); it++ )
    {
       AVFrame* pFrame;
       pFrame = avcodec_alloc_frame();
       AVPacket* pPacket = *it;
       int iReturn = avcodec_decode_video2( pCodecContext, pFrame, &frameFinished, pPacket );
    }

    But in iReturn always is -1.

    Can anyone help me ? Sorry if my knowledge in this area es low, I’m new.

    Thanks.

  • h264 ffmpeg : How to initialize ffmpeg to decode NALs created with x264

    14 décembre 2014, par Raul Calvo

    I have encoded some frames using x264, using x264_encoder_encode and after that I have created AVPackets using a function like this :

    bool PacketizeNals( uint8_t* a_pNalBuffer, int a_nNalBufferSize, AVPacket* a_pPacket )
    {
       if ( !a_pPacket )
    return false;
       a_pPacket->data = a_pNalBuffer;
       a_pPacket->size = a_nNalBufferSize;
       a_pPacket->stream_index = 0;
       a_pPacket->flags = AV_PKT_FLAG_KEY;

       a_pPacket->pts = int64_t(0x8000000000000000);
       a_pPacket->dts = int64_t(0x8000000000000000);
    }

    I call this function like this :

    x264_nal_t* nals;
    int num_nals = encode_frame(pic, &nals);
    for (int i = 0; i < num_nals; i++)
    {
       AVPacket* pPacket = ( AVPacket* )av_malloc( sizeof( AVPacket ) );
       av_init_packet( pPacket );
       if ( PacketizeNals( nals[i].p_payload, nals[i].i_payload, pPacket ) )
       {
           packets.push_back( pPacket );
       }
    }

    Now what I want to do is to decode these AVPackets using avcodec_decode_video2. I think the problem is that I haven’t initialized properly the decoder because to encode I used "ultrafast" profile and "zerolatency" tune ( x264 ) and to decode I don’t know how to specify to ffmpeg these options.
    In some examples I have read people initialize the decoder using the file where the video is stored, but in this case I have directly the AVPackets.
    What I’m doing to try to decode is :

    avcodec_init();  
    avcodec_register_all();  
    AVCodec* pCodec;  
    pCodec=avcodec_find_decoder(CODEC_ID_H264);  
    AVCodecContext* pCodecContext;  
    pCodecContext=avcodec_alloc_context();  
    avcodec_open(pCodecContext,pCodec);  
    pCodecContext->width = 320;
    pCodecContext->height = 200;
    pCodecContext->extradata = NULL;
    unsigned int nNumPackets = packets.size();
    int frameFinished = 0;
    for ( auto it = packets.begin(); it != packets.end(); it++ )
    {
       AVFrame* pFrame;
       pFrame = avcodec_alloc_frame();
       AVPacket* pPacket = *it;
       int iReturn = avcodec_decode_video2( pCodecContext, pFrame, &frameFinished, pPacket );
    }

    But in iReturn always is -1.

    Can anyone help me ? Sorry if my knowledge in this area es low, I’m new.

    Thanks.

  • ffmpeg conversion for apple tv

    24 janvier 2013, par Sam

    I have one particular movie file that is giving me grief while I am trying to convert my movie library to be able to be viewed on my Apple TV. I have been using iFlicks to convert all of my files and have only had one issue. The original of this particular movie file plays fine but after it has been converted the video freezes after a few minutes but the audio keeps playing. I tried using ffmpeg to convert the file but now the file is very choppy. The first time it is played the video will be choppy, the next time the audio will be choppy... but it plays fine in VLC for some reason. So I was thinking that maybe I have chosen the wrong codecs to suit Quicktime/Apple TV. Below is the command I used for ffmpeg. Have I chosen the right codecs and actually written the command correctly ? (I haven't really used ffmpeg before...)

    ffmpeg -i input.avi -vcodec libx264 -acodec libfaac output.m4v