Recherche avancée

Médias (3)

Mot : - Tags -/collection

Autres articles (20)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (3800)

  • FFMPEG - avcodec_decode_video2 return "Invalid frame dimensions 0x0"

    20 octobre 2014, par user3004612

    I am trying to build a simple FFMPEG MPEG2 video PES decoder on ANDROID using the ffmpeg/doc/example/decoding__encoding_8c-source.html.

    I am using FFMPEG version 2.0 !

    I initialize the ffmpeg system with the following code :

    int VideoPlayer::_setupFFmpeg()
    {
       int rc;
       AVCodec *codec;

       av_register_all();
       codec = avcodec_find_decoder(AV_CODEC_ID_MPEG2VIDEO);
       if(NULL == codec){
           LOGE("_setupFFmpeg. No codec!");
           return -1;
       }
       LOGI("found: %p. name: %s", codec, codec->name);

       _video_dec_ctx = avcodec_alloc_context3(codec);
       if(NULL == _video_dec_ctx){
           LOGE("_setupFFmpeg. Could not allocate codec context space!");
           return -1;
       }
       _video_dec_ctx->debug = FF_DEBUG_PICT_INFO;
       if(codec->capabilities & CODEC_CAP_TRUNCATED) _video_dec_ctx->flags |= CODEC_FLAG_TRUNCATED;

       rc = avcodec_open2(_video_dec_ctx, codec, NULL);
       if(rc < 0) {
           LOGE("_setupFFmpeg. Could not open the codec: %s!", _video_dec_ctx->codec->name);
           return -1;
       }

       av_init_packet(&_avpkt);

       if(NULL == _video_frame) _video_frame = avcodec_alloc_frame();
       if(NULL == _video_frame){
           LOGE("_setupFFmpeg. Could not allocate memory for the video frame!");
           return -1;
       }

       LOGI("_setupFFmpeg(exit)");
       return 0;
    }

    And then just having a loop that is continuously sending PES packets at the decoder calling this function :

    int VideoPlayer::_playVideoPacket(PesPacket *packet)
    {
       int len, frameReady;
       _avpkt.data = packet->buf;
       _avpkt.size = packet->info.bufferSize;
       while(_avpkt.size){
           len = avcodec_decode_video2(_video_dec_ctx, _video_frame, &frameReady, &_avpkt);
           if(len < 0){
               LOGE("FFW_decodeVideo");
               return len;
           }
           if(frameReady){
               //Draw the picture...
           }
           _avpkt.size -= len;
           _avpkt.data += len;
       }
       return 1;
    }

    But when I run the code I get :
    "Invalid frame dimensions 0x0" error from FFMPEG after calling avcodec_decode_video2().

    It seems that I am not setting up the codec correctly. The MpegEncContext in Mpeg1Context in mpeg12dec.c is not setup correctly. What do I have to do to setup MpegEncContext correctly ?

  • Revision 2b8dc065d1 : google style guide include guards Change-Id : I2c252f3ddcc99e96c1f5d3dab8bcb25a2

    30 novembre 2012, par Jim Bankoski

    Changed Paths : Modify /vp9/common/arm/vp9_bilinearfilter_arm.h Modify /vp9/common/arm/vp9_idct_arm.h Modify /vp9/common/arm/vp9_loopfilter_arm.h Modify /vp9/common/arm/vp9_recon_arm.h Modify /vp9/common/arm/vp9_subpixel_arm.h Modify /vp9/common/vp9_alloccommon.h (...)

  • Node 18 or Node 20 break ffmpeg (in google cloud functions -> ffprobe was killed with signal SIGSEGV)

    10 janvier 2024, par user20206929

    Please see below, the code is working on node js 16, but not when upgrading to node 18 or 20.

    


    const ffmpeg = require("fluent-ffmpeg");

// Following is inside a .https.onRequest Google Cloud function with enough memory

try {
  const duration = new Promise((resolve, reject) => {
  ffmpeg.ffprobe(videoUrl, async (err, metadata) => {
    if (err) {
      if (res.headersSent) {
        console.error("Response already sent");
        return;
      } else {
        console.log("Metadata:", metadata);
        console.log("err: " + err);
        res.status(400).send("Error getting video metadata");
        return;
      }
    }
  const duration = metadata.format.duration;
  console.log("video duration in second: " + duration);
  resolve(duration);
  });
});
  videoDuration = await duration;
} catch (err) {
  console.log(err);
  throw err;
}


    


    When upgrading to node 18/20 (No other change than upgrading node), the error "ffprobe not found" appears.

    


    But setting the path manually using ffmpeg.setFfprobePath(ffprobePath) ;
trigger the error : Error : ffprobe was killed with signal SIGSEGV

    


    So it seem its a permissions issue.

    


    However, I tried a lot of different solutions, none of them made this work.
For instance i tried to download manually the ffprobe from the official website https://ffbinaries.com/downloads. Then manually add it to the code.

    


    I tried to use https://www.npmjs.com/package/@ffprobe-installer/ffprobe or others package like https://www.npmjs.com/package/ffprobe-static

    


    I also tried to download the ffprobe file to the temporary folder of google cloud, and change the permission of this folder.

    


    All of those was doing the same error.

    


    None of what i could think of made any difference.

    


    Please help because i need to update node 16 to 18 or 20 before google remove node 16 on january 31 2024 and for now i don't see a solution.

    


    I also looked for other solution to get this duration from a video file url, but using ffmpeg seem to be the only one that should work out of the box. As it is working on node 16.

    


    Thank you,

    


    UPDATE - 11/26/2023

    


    GCP Functions NodeJS 16 runtime uses Ubuntu 18.04 with FFMpeg installed.
NodeJS 18/20 use Ubuntu 22.04, and Google decided not to include FFMpeg.

    


    https://cloud.google.com/functions/docs/runtime-support#node.js
https://cloud.google.com/functions/docs/reference/system-packages

    


    No workaround or solutions found as of now

    


    UPDATE - 01/10/2024

    


    Google added back ffmpeg to latest version, this is working as before now.