Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (101)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

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

  • Emballe Médias : Mettre en ligne simplement des documents

    29 octobre 2010, par

    Le plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
    Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
    D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...)

Sur d’autres sites (12486)

  • 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
  • Is 'Android+FFMpeg' friendship really available ?

    26 janvier 2016, par vold_by

    The question does not mean that I’m interested if ffmpeg code can be used on Andoid. I know that it can. I’m just asking if somebody has the real performance progress with that stuff.
    I’ve created the question after several weeks of experiments with the stuff and I’ve had enough...
    I do not want to write to branches where people even do not say what kind of video they decode (resolution, codec) and talk only about some mystical FPS. I just don’t understand what they want to do. Also I’m not going to develop application only for my phone or for Android 2.2++ phones that have some extended OpenGL features. I have quite popular phone HTC Desire so if the application does not work on it, so what’s next ?

    Well, what do I have ?

    1. FFMpeg source from the latest HEAD branch. Actually I could not buld it with NDK5 so I decided to use stolen one.

    2. Bambuser’s build script (bash) with appropriate ffmpeg source ([web] : http://bambuser.com/r/opensource/ffmpeg-4f7d2fe-android-2011-03-07.tar.gz).
      It builds well after some corrections by using NDK5.

    3. Rockplayer’s gelded ffmpeg source code with huge Android.mk in the capacity of build script ([web] : http://www.rockplayer.com/download/rockplayer_ffmpeg_git_20100418.zip).
      It builds by NDK3 and NDK5 after some corrections. Rockplayer is probably the most cool media player for Android and I supposed that I would have some perks using it’s build.

    I had suitable video for a project (is not big and is not small) : 600x360 H.264.

    Both libraries we got from clauses 2 and 3 provide us possibility to get frames from video (frame-by-frame, seek etc.). I did not try to get an audio track because I did not need one for the project. I’m not publishing my source here because I think that’s traditional and it’s easy to find.

    Well, what’s the results with video ?
    HTC Desire, Android 2.2
    600x360, H.264
    decoding and rendering are in different threads

    1. Bambuser (NDK5 buld for armv5te, RGBA8888) : 33 ms/frame average.
    2. Rockplayer (NDK3 build for neon, RGB565) : 27 ms/frame average.

    It’s not bad for the first look, but just think that these are results only to decode frames.
    If somebody has much better results with decoding time, let me know.

    The most hard thing for a video is rendering. If we have bitmap 600x360 we should scale one somehow before painting because different phones have different screen sizes and we can not expect that our video will be the same size as screen.

    What options do we have to rescale a frame to fit it to screen ?
    I was able to check (the same phone and video source) those cases :

    1. sws_scale() C function in Bambuser’s build : 70 ms/frame. Unacceptable.
    2. Stupid bitmap rescaling in Android (Bitmap.createScaledBitmap) : 65 ms/frame. Unacceptable.
    3. OpenGL rendering in ortho projection on textured quad. In this case I did not need to scale frame. I just needed to prepare texture 1024x512 (in my case it was RGBA8888) containig frame pixels and than load it in GPU (gl.glTexImage2D). Result : 220 ms/frame to render. Unacceptable. I did not expect that glTexImage2D just sucked on Snapdragon CPU.

    That’s all.
    I know that there is some way to use fragment shader to convert YUV pixels using GPU, but we will have the same glTexImage2D and 200 ms just to texture loading.

    But this is not the end. ...my only friend the end... :)
    It’s not hopeless condition.

    Trying to use RockPlayer you definitely will wonder how they do that damn frame scaling so fast. I suppose that they have really good experience in ARM achitecture. They most probably use avcodec_decode_video2 and than img_convert (as I did in RP version), but then they use some tricks (depends of ARM version) for scaling.
    Maybe they also have some "magic" buld configuration for ffmpeg decreasing decoding time but Android.mk that they published is not THE Android.mk they use. Dunno...

    So, now it looks like you can not just buld some easy JNI bridge for ffmpeg and than have real media player for Android platform. You can do this only if you have suitable video that you do not need to scale.

    Any ideas ? I hope for you ;)