Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (105)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • D’autres logiciels intéressants

    12 avril 2011, par

    On ne revendique pas d’être les seuls à faire ce que l’on fait ... et on ne revendique surtout pas d’être les meilleurs non plus ... Ce que l’on fait, on essaie juste de le faire bien, et de mieux en mieux...
    La liste suivante correspond à des logiciels qui tendent peu ou prou à faire comme MediaSPIP ou que MediaSPIP tente peu ou prou à faire pareil, peu importe ...
    On ne les connais pas, on ne les a pas essayé, mais vous pouvez peut être y jeter un coup d’oeil.
    Videopress
    Site Internet : (...)

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

Sur d’autres sites (7756)

  • Using ffmpeg avcodec_decode_video2 got_picture_ptr returns 0

    3 septembre 2014, par kaiken

    I’m trying to playback the gopro live feed which consists of a series of very short .ts files encoded using H264. I tested it on videos with different containers (mkv,avi,mp4) and different codecs (MPEG4, H264, MSVIDEO1). However, the files from the gopro always returns got_picture_ptr as 0 from avcodec_decode_video2 while the function returns the packet’s size. If I use ffplay or vlc it play the file without problem. I’m not sure what I’m doing wrong. I’m not very experienced with ffmpeg or video in general.

    Here is my test code. I based it off of this tutorial which is out of date but I was able to update the depreciated functions.

    AVFormatContext *pFormatCtx = NULL;
    AVCodecContext *pCodecCtx;
    AVStream *pStream = NULL;
    int videoStream;
    AVCodec *pCodec;
    AVFrame *pFrame=NULL, *pFrameRGB=NULL;
    HBITMAP membmp;
    int widht,height;
    BYTE *membits;
    int frameFinished;
    AVPacket packet;
    img_convert_ctx = NULL;
    uint8_t *buffer;
    int numBytes;

    // Open video file
    if(avformat_open_input(&pFormatCtx,params->fname,NULL,NULL)!=0)
      return -1;
    // Retrieve stream information
    if(avformat_find_stream_info(pFormatCtx,NULL)<0)
      return -1;
    //av_dump_format(pFormatCtx, 0, path, 0);

    // Find the first video stream
    for(int i=0; inb_streams; i++)
      if(pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO)
      {
         pStream=pFormatCtx->streams[i];
         videoStream = i;
         break;
      }
    if(pStream==NULL)
      return -1; // Didn't find a video stream

    // Get a pointer to the codec context for the video stream
    pCodecCtx=pStream->codec;

    // Find the decoder for the video stream
    pCodec=avcodec_find_decoder(pCodecCtx->codec_id);
    if(pCodec==NULL) {
      fprintf(stderr, "Unsupported codec!\n");
      return -1; // Codec not found
    }

    // Open codec
    if(avcodec_open2(pCodecCtx, pCodec, NULL)<0)
      return -1;

    // Allocate an AVFrame structure
    pFrame=avcodec_alloc_frame();
    pFrameRGB=avcodec_alloc_frame();
    if(pFrameRGB==NULL)
      return -1;

    MakeBitmap(*params->memdc,membmp,(void**)&membits,pCodecCtx->width,pCodecCtx->height);
    // Assign appropriate parts of buffer to image planes in pFrameRGB
    // Note that pFrameRGB is an AVFrame, but AVFrame is a superset
    // of AVPicture
    avpicture_fill((AVPicture *)pFrameRGB, membits, PIX_FMT_RGB24,
                  pCodecCtx->width, pCodecCtx->height);

    while (av_read_frame(pFormatCtx, &packet) >= 0)
    {
       // Is this a packet from the video stream?
       if (packet.stream_index == videoStream)
       {
           // Decode video frame
           int bytesUsed = avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished, &packet);
           // Did we get a video frame?
           if(frameFinished)
           {
              //Do stuff with frame
           }
       }
       // Free the packet that was allocated by av_read_frame
       av_free_packet(&packet);
       //if(i++>500)
       //   break;
    }
    DeleteObject(membmp);


    // Free the frames
    av_free(pFrameRGB);
    av_free(pFrame);
    // Close the codec
    avcodec_close(pCodecCtx);
    // Close the video file
    avformat_close_input(&pFormatCtx);

    return  -1;

    For reference I’m doing this on Windows with the versions of the dlls :

    • avcodec-56.dll
    • avdevice-56.dll
    • avfilter-5.dll
    • avformat-56.dll
    • avutil-54.dll
    • postproc-53.dll
    • swresample-1.dll
    • swscale-3.dll

    and sample video file https://www.dropbox.com/s/htlinnv3qk5dfiu/amba_hls-2.ts?dl=0

  • arm : Consistently use proper interworking function returns

    3 octobre 2024, par Martin Storsjö
    arm : Consistently use proper interworking function returns
    

    Use "bx lr", or "pop lr", which do proper mode switching
    between thumb and arm modes. A plain "mov pc, lr" does not switch
    from thumb mode to arm mode (while in arm mode, it does switch
    mode for a thumb caller).

    This is normally not an issue, as CONFIG_THUMB only is enabled if
    the C compiler defaults to thumb ; but stick to patterns that can
    do mode switching if needed, for consistency.

    Signed-off-by : Martin Storsjö <martin@martin.st>

    • [DH] libswresample/arm/resample.S
    • [DH] libswscale/arm/hscale.S
    • [DH] libswscale/arm/output.S
    • [DH] libswscale/arm/yuv2rgb_neon.S
  • python imageio.get_reader() returns format error

    19 août 2020, par tristan_jia
    import imageio&#xA;&#xA;reader = imageio.get_reader("./t.mp4")&#xA;

    &#xA;

    As shown above, with python 3.6.10, it returns :

    &#xA;

    >>> reader = imageio.get_reader("../")&#xA;Traceback (most recent call last):&#xA;  File "<stdin>", line 1, in <module>&#xA;  File "/home/tristan_jia/workspace/py3.6/venv/lib/python3.6/site-packages/imageio/core/functions.py", line 129, in get_reader&#xA;    return format.get_reader(request)&#xA;  File "/home/tristan_jia/workspace/py3.6/venv/lib/python3.6/site-packages/imageio/core/format.py", line 168, in get_reader&#xA;    return self.Reader(self, request)&#xA;  File "/home/tristan_jia/workspace/py3.6/venv/lib/python3.6/site-packages/imageio/core/format.py", line 217, in __init__&#xA;    self._open(**self.request.kwargs.copy())&#xA;  File "/home/tristan_jia/workspace/py3.6/venv/lib/python3.6/site-packages/imageio/plugins/ffmpeg.py", line 357, in _open&#xA;    self._initialize()&#xA;  File "/home/tristan_jia/workspace/py3.6/venv/lib/python3.6/site-packages/imageio/plugins/ffmpeg.py", line 430, in _initialize&#xA;    shell=ISWIN)&#xA;  File "/usr/lib64/python3.6/subprocess.py", line 729, in __init__&#xA;    restore_signals, start_new_session)&#xA;  File "/usr/lib64/python3.6/subprocess.py", line 1364, in _execute_child&#xA;    raise child_exception_type(errno_num, err_msg, err_filename)&#xA;OSError: [Errno 8] Exec format error: &#x27;/home/tristan_jia/.imageio/ffmpeg/ffmpeg-linux64-v3.3.1&#x27;&#xA;&#xA;</module></stdin>

    &#xA;

    I searched everywhere but haven't seen any similar questions. The script runs on Opensuse Leap 15.1, is it related to the system I use ?

    &#xA;