Recherche avancée

Médias (0)

Mot : - Tags -/content

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

Autres articles (24)

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

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

Sur d’autres sites (4507)

  • How do I force an IDR-frame using the x264 C API ?

    28 octobre 2020, par Keith

    I am attempting to use an external bool signal to force the next encoded frame to be an IDR-frame using the x264 C API. I am using the "baseline" profile with the "ultrafast" and "zerolatency" presets. I tried to use the input pic settings prior to encoding, as in this code snippet, but this has not worked. My class Open() and Encode() methods are shown here. Any help will be appreciated.

    


    int X264Encoder::Open(void)
{
  if (_x264VideoEncoder != NULL)
    Close();

  // Set up default parameters.
  if (x264_param_default_preset(&_param, _encoderSpeedPreset.c_str(), "zerolatency") < 0)  // 0=success, -1=failed
    { _errStr = "X264Encoder::Open: Default parameter preset failed with " + _encoderSpeedPreset; return(0); }

  // Set non-default params.
  _param.i_bitdepth       = 8;
  _param.i_csp            = _colourSpaceMapping[_colourSpace]; // Input colour space
  if(!_param.i_csp)
    { _errStr = "X264Encoder::Open: Incompatible colour space " + to_string(_colourSpace); return(0); }
  _param.i_width          = _width;
  _param.i_height         = _height;
  _param.i_fps_num        = _videoRateNumerator;
  _param.i_fps_den        = _videoRateDenominator;

  _param.rc.i_bitrate     = _avgBitsPerSecond / 1000; // bitrate units are in kbits/s

  _param.i_threads        = 1;
  _param.b_vfr_input      = 0;  // VFR input.  If 1, use timebase and timestamps for ratecontrol purposes. If 0, use fps only.
  _param.b_repeat_headers = 1;  // Put SPS/PPS before each keyframe
  _param.b_annexb         = 1;  // If set, place start codes (4 bytes) before NAL units, otherwise place size (4 bytes) before NAL units.

  // Apply profile restrictions.
  if (x264_param_apply_profile(&_param, _profile.c_str()) < 0)  // 0=success, -1=failed
    { _errStr = "X264Encoder::Open: Unable to set profile " + _profile; return(0); }

  // Initialise the encoder input pic buffer.
  if (x264_picture_alloc(&_picIn, _param.i_csp, _param.i_width, _param.i_height) < 0)
    { _errStr = "X264Encoder::Open: Unable to alloc input picture buffer"; return(0); }
  _inPicIsAllocated = true;

  // Instantiate the encoder.
  _x264VideoEncoder = x264_encoder_open(&_param);
  if (_x264VideoEncoder == NULL)
  {
    _errStr = "X264Encoder::Open: Unable to instantiate the encoder"; 
    // Clean up before exit.
    x264_picture_clean(&_picIn);
    _inPicIsAllocated = false;
    return(0);
  }//end if !_x264VideoEncoder...

  // Frame counting for pts timestamps.
  _frameNum     = 0;
  _lastPicType  = 0; // IDR-frame

  d.clear();

  return(1);
}//end Open.

int X264Encoder::Encode(void* pSrc, void* pCmp, void* codeParameter)
{
  _encodedFrameSize = 0;

  // Validation house work.
  if(!Ready())
    { _errStr = "X264Encoder::Encode: Not ready"; return(0); }

  if(!pSrc || !pCmp)
    { _errStr = "X264Encoder::Encode: Invalid function parameter list"; return(0); }

  // Load input image. 
  if(_param.i_csp != X264_CSP_I420) // Can only process I420 input colour space.
    { _errStr = "X264Encoder::Encode: I420 colour space required"; return(0); }
  uint32_t lumSize = _width * _height;
  uint32_t chrSize = lumSize / 4;
  // Transfer the input source image into the x264 picture img structure.
  uint8_t* pImg = static_cast(pSrc);
  memcpy_s(_picIn.img.plane[0], lumSize, pImg, lumSize);
  pImg += lumSize;
  memcpy_s(_picIn.img.plane[1], chrSize, pImg, chrSize);
  pImg += chrSize;
  memcpy_s(_picIn.img.plane[2], chrSize, pImg, chrSize);

  // Encode single frame
  _picIn.i_pts = _frameNum;
  if (_idrFrameRequired) 
  {  
    _picIn.i_type = X264_TYPE_IDR; 
    //... and clear the signal.
    _idrFrameRequired = false; 
  }//end if _idrFrameRequired...
  else 
    _picIn.i_type = X264_TYPE_AUTO;

  _encodedFrameSize = x264_encoder_encode(_x264VideoEncoder, &_nal, &_nalCnt, &_picIn, &_picOut);
  if (_encodedFrameSize > 0)
  {
    // Write the encoded stream to the output.
    uint8_t* pOut = static_cast(pCmp);
    memcpy_s(pOut, _encodedFrameSize, _nal->p_payload, _encodedFrameSize);
  }//end else if _encodedFrameSize...
  else
    { _errStr = "X264Encoder::Encode: Encode process failed"; return(0); }

  _lastPicType = 1; // Non-IDR
  if (_picOut.i_type == X264_TYPE_IDR)
    _lastPicType = 0; // IDR

  d.push_back({ _encodedFrameSize, _lastPicType });

  _frameNum++;
  return(1);
}//end Encode...


    


  • On WebP and Academic Exercises

    2 octobre 2010, par Multimedia Mike — General

    Yesterday, Google released a new still image format called WebP. To those skilled in the art, this new format will be recognizable as a single VP8 golden frame with a 20-byte header slapped on the front (and maybe a little metadata thrown in for good measure). We have a MultimediaWiki page and a sample ready to go.

    Further, I submitted a patch to ffmpeg-devel for FFmpeg’s img2 handling system to decode these files. FFmpeg should support processing these files soon… if anyone cares. This leads into…

    The Point, or Lack Thereof
    Since yesterday’s release, I have read a whirlwind of commentary about this format, much of it critical and of the “what’s the point ?” variety. For my part, I can respect academic exercises, a.k.a., just trying random stuff to see if you can make it work. That’s pretty much this blog’s entire raison d’être. But WebP transcends mere academic exercise ; Google seems to be trying to push it as a new web standard. I don’t see how the format can go anywhere based on criticisms raised elsewhere — e.g., see Dark Shikari’s thoughtful write-up — which basically boil down to WebP not solving any real problems, technical, legal, or otherwise.

    How did WebP come to be ? I strongly suspect some engineers noticed that JPEG is roughly the same as an MPEG-1 intraframe, so why not create a new still frame format based on VP8 intraframes ? Again, I can respect that thinking– I have pondered how a still image format would perform if based on VP3/Theora or Sorenson Video 1.

    Technically
    Google claims a significant size savings for WebP vs. standard JPEG. Assuming that’s true (and there will be no shortage of blog posts to the contrary), it will still be some time before WebP support will find its way into the majority of the web browser population.

    But this got me thinking about possible interim solutions. A website could store images compressed in both formats if it so chose. Then it could serve up a WebM image if the browser could support it, as indicated by the ‘Accept’ header in the HTTP request. It seems that a website might have to reference a generic image name such as <img src="some-picture.image"> ; the web server would have to recognize the .image extension and map it to either a .jpg or a .webp image depending on what the browser claims it is capable of displaying.

    Leftovers
    I appreciate that Dark Shikari has once again stuck his neck out and made a valiant — though often futile — effort to educate the internet’s masses. I long ago resigned myself to the fact that many people aren’t going to understand many of the most basic issues surrounding multimedia technology (i.e., moving pictures synchronized with audio). But apparently, this extends to still image formats as well. It was simultaneously humorous and disheartening to see commenters who don’t even understand the application of, e.g., PNG vs. JPEG : Ahem, “We already have a great replacement for jpg : .PNG”. Coupled with the typical accusations of MPEG tribalism, I remain impressed D. Shikari finds the will to bother.

    Still, I appreciate that the discussion has introduced me to some new image formats of which I was previously unaware, such as PGF and JPEG XR.

  • Using ffmpeg with Python3 subprocess to convert multiple PNGs to a video

    17 décembre 2016, par ylnor

    I am using Python3, subprocess and ffmpeg to convert multiple PNG images into a single video.

    I have 400 PNG numbered as "00001.png".

    This call for one single specific image to a a one-frame-video works :

    subprocess.call(["ffmpeg","-y","-r","24","-i", "00300.png","-vcodec","mpeg4", "-qscale","5", "-r", "24", "video.mp4"])

    However, when I try some methods seen online for calling all of my images formated as "#####.png" using "%05d.png" as below, it does not work anymore :

    subprocess.call(["ffmpeg","-y","-r","24","-i", "%05d.png","-vcodec","mpeg4", "-qscale","5", "-r", "24", "video.mp4"])

    I receive the error : "%05d.png: No such file or directory".

    I have the feelling that the above syntax is proper to Python2 and not working on my python3 but can’t find the correct python3 syntax anywhere.

    Thanks in advance for your help