Recherche avancée

Médias (0)

Mot : - Tags -/masques

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

Autres articles (85)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

Sur d’autres sites (14558)

  • avcodec/put_bits : Add functions for amount of bytes written/left

    25 mars 2021, par Andreas Rheinhardt
    avcodec/put_bits : Add functions for amount of bytes written/left
    

    Often a caller doesn't want the amount of bits written via a
    PutBitContext, but the amount of bytes. This in particular happens
    after one has flushed the PutBitContext (e.g. at the end of encoding,
    when one wants to know the actual packet size). The current way of doing
    this is with put_bits_count(pb)/8 (or (put_bits_count(pb) + 7)/8).

    Yet this has some issues : It contains implicit multiplications and
    divisions by 8 with a cast in between ; it obscurs the intent ; and
    it restricts the size of the buffer to (currently) INT_MAX/8 (or
    to 1/8 of the maximum of whatever put_bits_count() returns), although
    said restriction is not really necessary for users that don't need
    a bitcount.

    Corresponding functions for the amount of bytes left have also been
    addded.

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>

    • [DH] libavcodec/put_bits.h
  • How do you specify container format in FFmpeg ?

    15 avril 2021, par TheNeuronalCoder

    I am trying to encode mp4 video, but it doesn't open on my macbook because while it has the supported H264 codec, the container format is not MP4. So all I ask is how you would go about specifying the container format so I can generate video that is actually playable without using ffplay.

    &#xA;

    ffprobe version N-101948-g870bfe1 Copyright (c) 2007-2021 the FFmpeg developers&#xA;  built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)&#xA;  configuration: --disable-asm --enable-shared --enable-libx264 --enable-gpl&#xA;  libavutil      56. 72.100 / 56. 72.100&#xA;  libavcodec     58.136.101 / 58.136.101&#xA;  libavformat    58. 78.100 / 58. 78.100&#xA;  libavdevice    58. 14.100 / 58. 14.100&#xA;  libavfilter     7.111.100 /  7.111.100&#xA;  libswscale      5. 10.100 /  5. 10.100&#xA;  libswresample   3. 10.100 /  3. 10.100&#xA;  libpostproc    55. 10.100 / 55. 10.100&#xA;Input #0, h264, from &#x27;animation.mp4&#x27;:&#xA;  Duration: N/A, bitrate: N/A&#xA;  Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 24.33 fps, 24 tbr, 1200k tbn, 48 tbc&#xA;

    &#xA;

    void imagine::Camera::Record() {&#xA;  if (recording_ == true)&#xA;    throw std::runtime_error(&#xA;      "you must close your camera before starting another recording"&#xA;    );&#xA;  recording_ = true;&#xA;&#xA;  output_file_ = std::fopen(output_.c_str(), "wb");&#xA;  if (!output_file_)&#xA;    throw std::runtime_error("failed to open file");&#xA;&#xA;  AVCodec* codec = avcodec_find_encoder(AV_CODEC_ID_H264);&#xA;  if (!codec)&#xA;    throw std::runtime_error("failed to find codec");&#xA;&#xA;  context_ = avcodec_alloc_context3(codec);&#xA;  if (!context_)&#xA;    throw std::runtime_error("failed to allocate video codec context");&#xA;&#xA;  packet_ = av_packet_alloc();&#xA;  if (!packet_)&#xA;    throw std::runtime_error("failed to allocate video packet");&#xA;&#xA;  py::tuple size = py::globals()["main_scene"].attr("size");&#xA;  context_->width = size[0].cast<int>();&#xA;  context_->height = size[1].cast<int>();&#xA;  context_->bit_rate = 0.4 * fps_ * context_->width * context_->height;&#xA;  context_->time_base = (AVRational){ 1, fps_ };&#xA;  context_->framerate = (AVRational){ fps_, 1 };&#xA;  context_->gop_size = 10;&#xA;  context_->max_b_frames = 1;&#xA;  context_->pix_fmt = AV_PIX_FMT_YUV420P;&#xA;&#xA;  if (avcodec_open2(context_, codec, NULL) &lt; 0)&#xA;    throw std::runtime_error("failed to open codec");&#xA;&#xA;  frame_ = av_frame_alloc();&#xA;  if (!frame_)&#xA;    throw std::runtime_error("failed to allocate video frame");&#xA;&#xA;  frame_->width  = context_->width;&#xA;  frame_->height = context_->height;&#xA;  frame_->format = AV_PIX_FMT_YUV420P;&#xA;&#xA;  if (av_frame_get_buffer(frame_, 0) &lt; 0)&#xA;    throw std::runtime_error("failed to allocate the video frame data");&#xA;}&#xA;</int></int>

    &#xA;

  • gcc : Undefined Reference Error

    26 octobre 2024, par jamie_y

    I would like to use a function 'ff_load_image' defined in ffmpeg/libavfilter/lavfutils.h.

    &#xA;&#xA;

    program.c

    &#xA;&#xA;

    #include "../ffmpeg/libavfilter/lavfutils.h"&#xA;&#xA;int main ()&#xA;{&#xA;  uint8_t* data;&#xA;&#xA;  int linesize, width, height, log_ctx;&#xA;&#xA;  int i = ff_load_image(&amp;data, &amp;linesize, &amp;width, &amp;height, AV_PIX_FMT_RGB24, "blue.jpg", &amp;log_ctx);&#xA;}&#xA;

    &#xA;&#xA;

    Running

    &#xA;&#xA;

    gcc -I$HOME/ffmpeg/include program.c -L$HOME/ffmpeg/lib -lavfilter -lavcodec -lavutil&#xA;

    &#xA;&#xA;

    gives undefined reference errors.

    &#xA;&#xA;

    program.c: In function \u2018main\u2019:&#xA;program.c:9: warning: passing argument 1 of \u2018ff_load_image\u2019 from incompatible pointer type&#xA;../ffmpeg/libavfilter/lavfutils.h:39: note: expected \u2018uint8_t **\u2019 but argument is of type \u2018uint8_t *\u2019&#xA;program.c:9: warning: passing argument 2 of \u2018ff_load_image\u2019 makes pointer from integer without a cast&#xA;../ffmpeg/libavfilter/lavfutils.h:39: note: expected \u2018int *\u2019 but argument is of type \u2018int\u2019&#xA;program.c:9: warning: passing argument 3 of \u2018ff_load_image\u2019 makes pointer from integer without a cast&#xA;../ffmpeg/libavfilter/lavfutils.h:39: note: expected \u2018int *\u2019 but argument is of type \u2018int\u2019&#xA;program.c:9: warning: passing argument 4 of \u2018ff_load_image\u2019 makes pointer from integer without a cast&#xA;../ffmpeg/libavfilter/lavfutils.h:39: note: expected \u2018int *\u2019 but argument is of type \u2018int\u2019&#xA;program.c:9: warning: passing argument 5 of \u2018ff_load_image\u2019 makes pointer from integer without a cast&#xA;../ffmpeg/libavfilter/lavfutils.h:39: note: expected \u2018enum AVPixelFormat *\u2019 but argument is of type \u2018int\u2019&#xA;program.c:9: warning: passing argument 7 of \u2018ff_load_image\u2019 makes pointer from integer without a cast&#xA;../ffmpeg/libavfilter/lavfutils.h:39: note: expected \u2018void *\u2019 but argument is of type \u2018int\u2019&#xA;/home/jamiey/ffmpeg/lib/libavfilter.a(lavfutils.o): In function `ff_load_image&#x27;:&#xA;/home/jamiey/ffmpeg/libavfilter/lavfutils.c:38: undefined reference to `av_register_all&#x27;&#xA;/home/jamiey/ffmpeg/libavfilter/lavfutils.c:40: undefined reference to `av_find_input_format&#x27;&#xA;/home/jamiey/ffmpeg/libavfilter/lavfutils.c:41: undefined reference to `avformat_open_input&#x27;&#xA;/home/jamiey/ffmpeg/libavfilter/lavfutils.c:66: undefined reference to `av_read_frame&#x27;&#xA;/home/jamiey/ffmpeg/libavfilter/lavfutils.c:92: undefined reference to `avformat_close_input&#x27;&#xA;/home/jamiey/ffmpeg/libavfilter/lavfutils.c:92: undefined reference to `avformat_close_input&#x27;&#xA;/home/jamiey/ffmpeg/libavfilter/lavfutils.c:92: undefined reference to `avformat_close_input&#x27;&#xA;/home/jamiey/ffmpeg/lib/libavcodec.a(frame_thread_encoder.o): In function `ff_frame_thread_encoder_free&#x27;:&#xA;/home/jamiey/ffmpeg/libavcodec/frame_thread_encoder.c:225: undefined reference to `pthread_join&#x27;&#xA;/home/jamiey/ffmpeg/lib/libavcodec.a(frame_thread_encoder.o): In function `ff_frame_thread_encoder_init&#x27;:&#xA;/home/jamiey/ffmpeg/libavcodec/frame_thread_encoder.c:200: undefined reference to `pthread_create&#x27;&#xA;/home/jamiey/ffmpeg/lib/libavcodec.a(pthread_frame.o): In function `ff_frame_thread_free&#x27;:&#xA;/home/jamiey/ffmpeg/libavcodec/pthread_frame.c:575: undefined reference to `pthread_join&#x27;&#xA;/home/jamiey/ffmpeg/lib/libavcodec.a(pthread_frame.o): In function `ff_frame_thread_init&#x27;:&#xA;/home/jamiey/ffmpeg/libavcodec/pthread_frame.c:705: undefined reference to `pthread_create&#x27;&#xA;/home/jamiey/ffmpeg/lib/libavcodec.a(pthread_slice.o): In function `ff_slice_thread_init&#x27;:&#xA;/home/jamiey/ffmpeg/libavcodec/pthread_slice.c:220: undefined reference to `pthread_create&#x27;&#xA;/home/jamiey/ffmpeg/lib/libavcodec.a(pthread_slice.o): In function `ff_slice_thread_free&#x27;:&#xA;/home/jamiey/ffmpeg/libavcodec/pthread_slice.c:118: undefined reference to `pthread_join&#x27;&#xA;/home/jamiey/ffmpeg/lib/libavutil.a(rational.o): In function `av_d2q&#x27;:&#xA;/home/jamiey/ffmpeg/libavutil/rational.c:115: undefined reference to `log&#x27;&#xA;/home/jamiey/ffmpeg/libavutil/rational.c:118: undefined reference to `floor&#x27;&#xA;/home/jamiey/ffmpeg/lib/libavutil.a(eval.o): In function `eval_expr&#x27;:&#xA;/home/jamiey/ffmpeg/libavutil/eval.c:183: undefined reference to `trunc&#x27;&#xA;/home/jamiey/ffmpeg/libavutil/eval.c:182: undefined reference to `ceil&#x27;&#xA;/home/jamiey/ffmpeg/libavutil/eval.c:181: undefined reference to `floor&#x27;&#xA;/home/jamiey/ffmpeg/libavutil/eval.c:241: undefined reference to `pow&#x27;&#xA;/home/jamiey/ffmpeg/libavutil/eval.c:177: undefined reference to `exp&#x27;&#xA;/home/jamiey/ffmpeg/libavutil/eval.c:176: undefined reference to `exp&#x27;&#xA;/home/jamiey/ffmpeg/libavutil/eval.c:287: undefined reference to `pow&#x27;&#xA;/home/jamiey/ffmpeg/libavutil/eval.c:278: undefined reference to `floor&#x27;&#xA;/home/jamiey/ffmpeg/lib/libavutil.a(eval.o): In function `av_strtod&#x27;:&#xA;/home/jamiey/ffmpeg/libavutil/eval.c:112: undefined reference to `pow&#x27;&#xA;/home/jamiey/ffmpeg/libavutil/eval.c:103: undefined reference to `pow&#x27;&#xA;/home/jamiey/ffmpeg/libavutil/eval.c:109: undefined reference to `pow&#x27;&#xA;/home/jamiey/ffmpeg/lib/libavutil.a(eval.o): In function `parse_primary&#x27;:&#xA;/home/jamiey/ffmpeg/libavutil/eval.c:394: undefined reference to `sinh&#x27;&#xA;/home/jamiey/ffmpeg/libavutil/eval.c:395: undefined reference to `cosh&#x27;&#xA;/home/jamiey/ffmpeg/libavutil/eval.c:396: undefined reference to `tanh&#x27;&#xA;/home/jamiey/ffmpeg/libavutil/eval.c:397: undefined reference to `sin&#x27;&#xA;/home/jamiey/ffmpeg/libavutil/eval.c:398: undefined reference to `cos&#x27;&#xA;/home/jamiey/ffmpeg/libavutil/eval.c:399: undefined reference to `tan&#x27;&#xA;/home/jamiey/ffmpeg/libavutil/eval.c:400: undefined reference to `atan&#x27;&#xA;/home/jamiey/ffmpeg/libavutil/eval.c:401: undefined reference to `asin&#x27;&#xA;/home/jamiey/ffmpeg/libavutil/eval.c:402: undefined reference to `acos&#x27;&#xA;/home/jamiey/ffmpeg/libavutil/eval.c:403: undefined reference to `exp&#x27;&#xA;/home/jamiey/ffmpeg/libavutil/eval.c:404: undefined reference to `log&#x27;&#xA;/home/jamiey/ffmpeg/libavutil/eval.c:405: undefined reference to `fabs&#x27;&#xA;collect2: ld returned 1 exit status&#xA;

    &#xA;&#xA;

    However, I was successful in running functions in other library, such as the ones in "ffmpeg/libavcodec/avcodec.h". Why is this happening to "ffmpeg/libavfilter/lavfutils.h" ?

    &#xA;