Recherche avancée

Médias (0)

Mot : - Tags -/performance

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

Autres articles (103)

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

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Sélection de projets utilisant MediaSPIP

    29 avril 2011, par

    Les exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
    Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
    Ferme MediaSPIP @ Infini
    L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)

Sur d’autres sites (12015)

  • avcodec/ac3dec : Hardcode tables to save space

    23 mai, par Andreas Rheinhardt
    avcodec/ac3dec : Hardcode tables to save space
    

    The code to initialize the ungrouped bap mantissa tables
    (bap 3 or 5) takes more bytes of .text than the tables itself ;
    they have therefore been hardcoded.

    For GCC (14, -O3, albeit in an av_cold function), the initialization
    code takes 99B each for the fixed and floating point decoders
    (the code is currently duplicated), whereas the hardcoded tables
    only take 96B. For Clang 19 it were 374B each (I don't now what
    Clang was doing there).

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

    • [DH] libavcodec/ac3dec.c
    • [DH] libavcodec/ac3dec_data.c
    • [DH] libavcodec/ac3dec_data.h
  • ffmpeg - where to save the video I plan to cut to frames

    28 décembre 2017, par Kyle

    I have ffmpeg up and running on my computer.

    Now I am trying to cut a video into individual frames. The video is titled IMG_2299.MOV.

    I am using the following command :

    ffmpeg -i img_2299.mov $filename%12d.jpeg

    Two questions :
    1) where do I need the actual video saved for this to work ? In the same folder as the ff* executable files (/usr/loca/bin) ?
    2) And where will the images created be saved ?

    I can run the command above — but I don’t see any results.

    Thank you for any help you can offer.

  • How can I save the h264 encoded video as a sequence of AVPacket-s to the file using libav c++ ?

    8 juillet 2023, par danvik13

    I'm trying to save video, which is generated and encoded on fly using libav (ffmpeg) functional. When I receive next non-empty AVPacket with encoded frame, I call writer.saveNextPacket() method.&#xA;Of cause, before saving, I properly init both codec and filewriter and close them in the very ending.&#xA;Here is some code :

    &#xA;

    #include "utils/FileWriter.h"&#xA;&#xA;#define DEBUG 1&#xA;&#xA;void tp::utils::FileWriter::open(const char* path, tp::encoders::IEncoder* encoder) {&#xA;    int hr;&#xA;&#xA;    debI("guessing");&#xA;    format = av_guess_format(nullptr, path, nullptr);&#xA;    if (!format){&#xA;        debI("av_guess_format");&#xA;    }&#xA;&#xA;    debI("allocating output");&#xA;    hr = avformat_alloc_output_context2(&amp;formatContext, format, nullptr, nullptr);&#xA;    if (hr &lt; 0){&#xA;        debI("avformat_alloc_output_context2", hr);&#xA;    }&#xA;&#xA;    debI("allocating stream");&#xA;    stream = avformat_new_stream(formatContext, nullptr);&#xA;    if (!stream){&#xA;        debI("avformat_new_stream");&#xA;    }&#xA;    debI("setting parameters");&#xA;    AVCodecParameters* parameters = avcodec_parameters_alloc();&#xA;    hr = avcodec_parameters_from_context(parameters, encoder->getCodecContext());&#xA;    if (hr &lt; 0){&#xA;        debI("avcodec_parameters_from_context", hr);&#xA;    }&#xA;&#xA;    stream->codecpar = parameters;&#xA;&#xA;    debI("opening");&#xA;    hr = avio_open(&amp;formatContext->pb, path, AVIO_FLAG_WRITE);&#xA;    if (hr &lt; 0){&#xA;        debI("avio_open", hr);&#xA;    }&#xA;&#xA;    debI("writing headers");&#xA;    hr = avformat_write_header(formatContext, nullptr);&#xA;    if (hr &lt; 0){&#xA;        debI("avformat_write_header", hr);&#xA;    }&#xA;    debI("writer is set");&#xA;}&#xA;&#xA;#define DEBUG 0&#xA;&#xA;void tp::utils::FileWriter::saveNextPacket(AVPacket* packet) {&#xA;    int hr;&#xA;&#xA;    hr = av_interleaved_write_frame(formatContext, packet);&#xA;    if (hr &lt; 0){&#xA;        logF("av_write_frame", hr);&#xA;    }&#xA;}&#xA;&#xA;void tp::utils::FileWriter::close() {&#xA;    int hr;&#xA;&#xA;    hr = av_write_trailer(formatContext);&#xA;    if (hr &lt; 0){&#xA;        logF("av_write_trailer", hr);&#xA;    }&#xA;&#xA;    hr = avio_close(formatContext->pb);&#xA;    if (hr &lt; 0){&#xA;        logF("avio_close", hr);&#xA;    }&#xA;&#xA;    avformat_free_context(formatContext);&#xA;}&#xA;&#xA;

    &#xA;

    Here is the setup part of the encoder :

    &#xA;

        codec = avcodec_find_encoder(AV_CODEC_ID_H264);&#xA;    if (!codec){&#xA;        logF("avcodec_find_encoder", hr);&#xA;    }&#xA;    codecContext = avcodec_alloc_context3(codec);&#xA;    if (!codecContext){&#xA;        logF("avcodec_alloc_context3");&#xA;    }&#xA;    codecContext->width = parameters.width;&#xA;    codecContext->height = parameters.height;&#xA;    codecContext->bit_rate = parameters.bitRate;&#xA;    codecContext->time_base = (AVRational){1, parameters.fps};&#xA;    codecContext->gop_size = 0;&#xA;    codecContext->max_b_frames = 0;&#xA;    codecContext->pix_fmt = AV_PIX_FMT_YUV420P;&#xA;    if (parameters.preset == EncoderParameters::Preset::Fast){&#xA;        av_opt_set(codecContext->priv_data, "preset", "ultrafast", 0);&#xA;    }else if (parameters.preset == EncoderParameters::Preset::Slow){&#xA;        av_opt_set(codecContext->priv_data, "preset", "slow", 0);&#xA;    }&#xA;&#xA;    hr = avcodec_open2(codecContext, codec, nullptr);&#xA;    if (hr &lt; 0){&#xA;        logF("avcodec_open2", hr);&#xA;    }&#xA;

    &#xA;

    The problem : I open "output.mp4" file and assume that the class properly saves the header of the file. However, the file weights 262 bytes (there is no useful data such as frames) and it is corrupted for running video on any video players&#xA;ps : I've enabled libav logging, which seems to be ok, despite some messages :

    &#xA;

      &#xA;
    1. [file @ 0000017a74c6c540] Setting default whitelist 'file,crypto,data'&#xA;I have some concers about the appropriateness of the whitelist as no crypto is expected
    2. &#xA;

    3. [AVIOContext @ 0000017a6a249100] Statistics : 266 bytes written, 2 seeks, 3 writeouts&#xA;The actual size of the file is 262. Does it mean that there are some info leaking during saving and even the header is already broken ?
    4. &#xA;

    &#xA;

    I've tried to adjust various codec settings. Even turning off any speed presets. Actually, the encoder was tested in the pair with various libav decoders and image rendering and I'm pretty sure about encoder part.&#xA;Moreover, I've written the FileWriter code three times as there are some dissimilar guides. Only the current code does not throw any warnings or errors.&#xA;Give me a hint, which part of code may be wrong or provide me with some samples of using latest ffmpeg and answer my questions, please.

    &#xA;