Recherche avancée

Médias (0)

Mot : - Tags -/signalement

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

Autres articles (65)

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

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

Sur d’autres sites (6803)

  • How to compress output file using FFmpeg - Apple ProRes 422

    10 septembre 2015, par user1526912

    I am new to video encoding and trying to encode a music video for the apple itunes video store.

    I am currently using FFmpeg for encoding.

    My source file is mp4 file type and file size=650MB

    I encode the file using the Apple ProRes 422 (HQ) codec and output a mov file.

    ffmpeg -y -i busy1.mp4  -vcodec prores -profile:v 3 -r "29.97" -c:a mp2   busy2.mov

    I am trying to encode the video according to the following specs :

    ● Apple ProRes 422 (HQ)
    ● VBR expected at 220 Mbps

    Encoded PASP Converted to ProRes From
    1920 x 1080 1:1 HDCAM SR, D5, ATSC
    1280 x 720 1:1 ATSC progressive

    29.97 interlaced frames per second for video sourced

    Music Video Audio Source Profile

    ● MPEG-2 layer II stereo
    ● 384 kpbs
    ● 48Khz

    The file is encoded perfectly fine however the output is 6Gb in size.

    Why would the file be so large after encoding ?

    Am I doing something wrong here ?

  • mpeg dash on wowza server not working, status error 404 Not Found

    10 septembre 2015, par jobin

    adaptives links for mpeg dash on wowza server not working with me, the following are the steps that I used to publish video on wowza :

    1. I install and configure Wowza server, and I tested it and it is working fine.
    2. Transcode this video using ffmepg (I bring these command from wowza documentation)

    3. I test the files and all of them workig fine then I moved these files to wowza content folder and create the smil file as following :

    enter image description here

    <?xml version="1.0" encoding="UTF-8"?>
    <smil title="sintel">
     
       <switch>
         <video width="320" height="180" src="sintel_320p.mp4" systemlanguage="eng">
           
           
         </video>
         <video width="640" height="360" src="sintel_640p.mp4" systemlanguage="eng">
           
           
         </video>
         <video width="320" height="180" src="sintel_400p.mp4" systemlanguage="eng">
           
           
         </video>
         <video width="420" height="270" src="sintel_700p.mp4" systemlanguage="eng">
           
           
         </video>
         <video width="720" height="406" src="sintel_1100p.mp4" systemlanguage="eng">
           
           
         </video>
         <video width="1024" height="576" src="sintel_1300p.mp4" systemlanguage="eng">
           
           
         </video>
         <video width="1080" height="608" src="sintel_1500p.mp4" systemlanguage="eng">
           
           
         </video>
       </switch>
     
    </smil>
    1. I use the mpd file (http://191.237.26.137:1935/vod/smil:sintel.smil/manifest.mpd) with http://www.jwplayer.com/innovation/roadmap/mpeg-dash/

    Result : the video work for first few seconds the stop

    enter image description here

  • Have problems using FFMPEG to save RGB image sequence to .mp4

    28 septembre 2021, par Clubs

    I render some images with OpenGL and need to compose them into a video file. Each of the images is a sequence of uint8_t values representing a sRGB color component (image array looks like ...rgbrgbrgb...)

    &#xA;&#xA;

    I know very little about video processing and have no experience with ffmpeg libraries at all. I made a little test program using these sources as reference :

    &#xA;&#xA;

    https://ffmpeg.org/doxygen/trunk/encode_video_8c-example.html

    &#xA;&#xA;

    How to convert RGB from YUV420p for ffmpeg encoder ?

    &#xA;&#xA;

    The test program is supposed to make a video about growing green vertical stripe. I'm just trying to figure out how to make a video using some source of raw RGB data.

    &#xA;&#xA;

    Here is my code :

    &#xA;&#xA;

    #include <iostream>&#xA;#include <vector>&#xA;#include <algorithm>&#xA;&#xA;extern "C" {&#xA;    #include <libavcodec></libavcodec>avcodec.h>&#xA;    #include <libavutil></libavutil>opt.h>&#xA;    #include <libavutil></libavutil>imgutils.h>&#xA;    #include <libswscale></libswscale>swscale.h>&#xA;}&#xA;&#xA;static void encode( AVCodecContext* enc_ctx,&#xA;                    AVFrame* frame, AVPacket* pkt,&#xA;                    FILE* outfile                  )&#xA;{&#xA;    int ret;&#xA;    ret = avcodec_send_frame(enc_ctx, frame);&#xA;    if (ret &lt; 0) {&#xA;        std::cerr &lt;&lt; "Error sending a frame for encoding\n";&#xA;        return;&#xA;    }&#xA;    while (ret >= 0) {&#xA;        ret = avcodec_receive_packet(enc_ctx, pkt);&#xA;        if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)&#xA;            return;&#xA;        else if (ret &lt; 0) {&#xA;            fprintf(stderr, "Error during encoding\n");&#xA;            exit(1);&#xA;        }&#xA;        fwrite(pkt->data, 1, pkt->size, outfile);&#xA;        av_packet_unref(pkt);&#xA;    }&#xA;}&#xA;&#xA;static constexpr int w = 1920, h = 1080;&#xA;static constexpr float fps = 20.f, time = 5.f;&#xA;static constexpr int nFrames = static_cast<int>(fps * time);&#xA;static std::vector imageRGB(w * h * 3, 0);&#xA;&#xA;static void UpdateImageRGB()&#xA;{&#xA;    static int d = 50;&#xA;    imageRGB.assign(w * h * 3, 0);&#xA;    for (int i = 0; i &lt; h; &#x2B;&#x2B;i)&#xA;        for ( int j = std::max(0, w / 2 - d);&#xA;              j &lt; std::min(w, w / 2 &#x2B; d);&#xA;              &#x2B;&#x2B;j                             )&#xA;        {&#xA;            imageRGB[(w * i &#x2B; j) * 3 &#x2B; 0] = 50;&#xA;            imageRGB[(w * i &#x2B; j) * 3 &#x2B; 1] = 200;&#xA;            imageRGB[(w * i &#x2B; j) * 3 &#x2B; 2] = 50;&#xA;        }&#xA;    d &#x2B;= 5;&#xA;}&#xA;&#xA;int main()&#xA;{&#xA;    int ret = 0;&#xA;    auto filename = "test.mp4";&#xA;&#xA;    auto codec = avcodec_find_encoder(AV_CODEC_ID_H264);&#xA;    if (!codec) {&#xA;        std::cerr &lt;&lt; "Codec \"x.264\" not found\n";&#xA;        return 1;&#xA;    }&#xA;    auto c = avcodec_alloc_context3(codec);&#xA;    if (!c) {&#xA;        std::cerr &lt;&lt; "Could not allocate video codec context\n";&#xA;        return 1;&#xA;    }&#xA;    auto pkt = av_packet_alloc();&#xA;    if (!pkt) return 1;&#xA;&#xA;    // 1.8 bits / (pixel * frame)&#xA;    c->bit_rate = static_cast(1.8f * w * h * fps);&#xA;    /* resolution must be a multiple of two */&#xA;    c->width = w;&#xA;    c->height = h;&#xA;    /* frames per second */&#xA;    c->time_base = AVRational{ 1, static_cast<int>(fps) };&#xA;    c->framerate = AVRational{ static_cast<int>(fps), 1 };&#xA;&#xA;    c->gop_size = 10;&#xA;    c->max_b_frames = 1;&#xA;    c->pix_fmt = AV_PIX_FMT_YUV420P;&#xA;    av_opt_set(c->priv_data, "preset", "slow", 0);&#xA;    av_opt_set(c->priv_data, "preset", "slow", 0);&#xA;&#xA;    ret = avcodec_open2(c, codec, NULL);&#xA;    if (ret &lt; 0) {&#xA;        char str[AV_ERROR_MAX_STRING_SIZE];&#xA;        std::cerr &lt;&lt; "Could not open codec: "&#xA;                  &lt;&lt; av_make_error_string(str, AV_ERROR_MAX_STRING_SIZE, ret)&#xA;                  &lt;&lt; "\n";&#xA;        return 1;&#xA;    }&#xA;&#xA;    FILE * f;&#xA;    fopen_s(&amp;f, filename, "wb");&#xA;    if (!f) {&#xA;        std::cerr &lt;&lt; "Could not open " &lt;&lt; filename &lt;&lt; &#x27;\n&#x27;;&#xA;        return 1;&#xA;    }&#xA;&#xA;    auto frame = av_frame_alloc();&#xA;    if (!frame) {&#xA;        std::cerr &lt;&lt; "Could not allocate video frame\n";&#xA;        return 1;&#xA;    }&#xA;    frame->format = c->pix_fmt;&#xA;    frame->width = c->width;&#xA;    frame->height = c->height;&#xA;    ret = av_frame_get_buffer(frame, 0);&#xA;    if (ret &lt; 0) {&#xA;        std::cerr &lt;&lt; stderr, "Could not allocate the video frame data\n";&#xA;        return 1;&#xA;    }&#xA;&#xA;    SwsContext* ctx = sws_getContext( w, h, AV_PIX_FMT_RGB24,&#xA;                                      w, h, AV_PIX_FMT_YUV420P,&#xA;                                      0, 0, 0, 0                );&#xA;&#xA;    for (int i = 0; i &lt; nFrames; i&#x2B;&#x2B;)&#xA;    {&#xA;        ret = av_frame_make_writable(frame);&#xA;        UpdateImageRGB();&#xA;        static const uint8_t* rgbData[1] = { &amp;imageRGB[0] };&#xA;        static constexpr int rgbLinesize[1] = { 3 * w };&#xA;        sws_scale( ctx, rgbData, rgbLinesize, 0, h,&#xA;                   frame->data, frame->linesize     );&#xA;        frame->pts = i;&#xA;        /* encode the image */&#xA;        encode(c, frame, pkt, f);&#xA;    }&#xA;    encode(c, NULL, pkt, f);&#xA;&#xA;    fclose(f);&#xA;    avcodec_free_context(&amp;c);&#xA;    av_frame_free(&amp;frame);&#xA;    av_packet_free(&amp;pkt);&#xA;    return 0;&#xA;}&#xA;</int></int></int></algorithm></vector></iostream>

    &#xA;&#xA;

    The program generates 33.9k video file with further console output :

    &#xA;&#xA;

    [libx264 @ 0000020c18681800] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2&#xA;[libx264 @ 0000020c18681800] profile High, level 5.0, 4:2:0, 8-bit&#xA;[libx264 @ 0000020c18681800] frame I:11    Avg QP: 0.00  size:   639&#xA;[libx264 @ 0000020c18681800] frame P:74    Avg QP: 0.32  size:   174&#xA;[libx264 @ 0000020c18681800] frame B:15    Avg QP: 2.26  size:   990&#xA;[libx264 @ 0000020c18681800] consecutive B-frames: 70.0% 30.0%&#xA;[libx264 @ 0000020c18681800] mb I  I16..4: 100.0%  0.0%  0.0%&#xA;[libx264 @ 0000020c18681800] mb P  I16..4:  0.6%  0.0%  0.0%  P16..4:  2.1%  0.0%  0.0%  0.0%  0.0%    skip:97.3%&#xA;[libx264 @ 0000020c18681800] mb B  I16..4:  0.1%  0.0%  0.0%  B16..8:  0.6%  0.0%  0.0%  direct: 0.6%  skip:98.7%  L0:39.8% L1:60.2% BI: 0.0%&#xA;[libx264 @ 0000020c18681800] final ratefactor: -46.47&#xA;[libx264 @ 0000020c18681800] 8x8 transform intra:0.0%&#xA;[libx264 @ 0000020c18681800] direct mvs  spatial:0.0% temporal:100.0%&#xA;[libx264 @ 0000020c18681800] coded y,uvDC,uvAC intra: 0.0% 0.1% 0.1% inter: 0.0% 0.1% 0.1%&#xA;[libx264 @ 0000020c18681800] i16 v,h,dc,p: 99%  0%  1%  0%&#xA;[libx264 @ 0000020c18681800] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  0%  0% 100%  0%  0%  0%  0%  0%  0%&#xA;[libx264 @ 0000020c18681800] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 46%  0% 54%  0%  0%  0%  0%  0%  0%&#xA;[libx264 @ 0000020c18681800] i8c dc,h,v,p: 96%  1%  3%  0%&#xA;[libx264 @ 0000020c18681800] Weighted P-Frames: Y:0.0% UV:0.0%&#xA;[libx264 @ 0000020c18681800] ref P L0: 70.2%  0.0% 29.8%  0.0%  0.0%&#xA;[libx264 @ 0000020c18681800] kb/s:55.61&#xA;

    &#xA;&#xA;

      &#xA;
    1. "Media Player Classic" on Windows plays this video but the time slider doesn't move, and the video cannot be fast-forwarded to some frame
    2. &#xA;

    3. VLC cannot play the video at all. It launches, shows me VLC logo, and time slider (which is unusually big) jumps from left to right, not responding to my clicks
    4. &#xA;

    5. If I set time = 0.05 to make a video of only 1 frame, I cannot play it even with "Media Player Classic". I want to make an algorithm to convert the arbitrary number of raw RGB images into the video files, even if there's only one image, and with arbitrary image size (that is, width and height may be odd).
    6. &#xA;

    7. As I said, I don't really understand what am I doing. There are low-level codec settings in lines 83-84. Are they all right ?
    8. &#xA;

    9. Do I have to manually set a bit rate (line 75) ? Shouldn't it be calculated automatically by the codec ?
    10. &#xA;

    &#xA;