Recherche avancée

Médias (91)

Autres articles (112)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

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

  • Evolution #4120 : Ajouter l’info de numéro de nouvelle version directement dans le bouton "Mettre ...

    29 mars 2018, par Peet du
  • fftools/ffprobe : Print more Stereo 3D info from side data

    30 mai 2024, par Derek Buitenhuis
    fftools/ffprobe : Print more Stereo 3D info from side data
    

    Signed-off-by : Derek Buitenhuis <derek.buitenhuis@gmail.com>

    • [DH] fftools/ffprobe.c
    • [DH] tests/ref/fate/matroska-spherical-mono
    • [DH] tests/ref/fate/matroska-spherical-mono-remux
    • [DH] tests/ref/fate/matroska-stereo_mode
    • [DH] tests/ref/fate/matroska-vp8-alpha-remux
    • [DH] tests/ref/fate/mov-spherical-mono
  • FFMPEG library- transcode raw image to h264 stream, and the output file does not contains pts and dts info

    5 novembre 2020, par zhumm

    I am trying using ffmpeg c++ library to convert several raw yuyv image to h264 stream, the image come from memory and passed as string about 24fps, i do the convention as the following steps :

    &#xA;

      &#xA;
    1. init AVFormatContext,AVCodec,AVCodecContext and create new AVStream. this step i mainly refer to ffmpeg-libav-tutorial, and AVFormatContext use customize write_buffer() function(refer to simplest_ffmpeg_mem_handler)
    2. &#xA;

    3. receive raw frame data, set width and height(1920x1080), and set pts and dts. here i manually set the output fps to 24, and use a global counter to count num of frames, and the pts is calculated by this counter, code snippet(video_avs is AVStream,output_fps is 24 and time_base is 1/24) :
    4. &#xA;

    &#xA;

        input_frame->width = w;  // 1920&#xA;    input_frame->height = h;  // 1080&#xA;    input_frame->pkt_dts = input_frame->pts = global_pts;&#xA;    global_pts &#x2B;= video_avs->time_base.den/video_avs->time_base.num / output_fps.num * output_fps.den;&#xA;

    &#xA;

      &#xA;
    1. convert it from yuyv to yuv422(because h264 does not support yuyv) and resize it from 1920x1080 to 640x480(because i need this resolution output), use sws_scale()

      &#xA;

    2. &#xA;

    3. use avcodec_send_frame() and avcodec_receive_packet() to get the output packet. set output_packet duration and stream_index, then use av_write_frame() to write frame data.

      &#xA;

    4. &#xA;

    &#xA;

        AVPacket *output_packet = av_packet_alloc();&#xA;    int response = avcodec_send_frame(encoder->video_avcc, frame);&#xA;    while (response >= 0) {&#xA;        response = avcodec_receive_packet(encoder->video_avcc, output_packet); // !! here output_packet.size is calculated&#xA;        if (response == AVERROR(EAGAIN) || response == AVERROR_EOF) {&#xA;            break;&#xA;        } &#xA;        else if (response &lt; 0) {&#xA;            printf("Error while sending packet to decoder");  // ??av_err2str(response)会报错&#xA;            return response;&#xA;        }&#xA;&#xA;        // duration = next_pts - this_pts = timescale / fps = 1 / timebase / fps&#xA;        output_packet->duration = (encoder->video_avs->time_base.den / encoder->video_avs->time_base.num) / (output_fps.num / output_fps.den);&#xA;        output_packet->stream_index = 0;&#xA;        int response = av_write_frame(encoder->avfc, output_packet);  // packet order are not ensure&#xA;        if (response != 0) { printf("Error %d while receiving packet from decoder", response); return -1;}   &#xA;    }&#xA;    av_packet_unref(output_packet);&#xA;    av_packet_free(&amp;output_packet);&#xA;

    &#xA;

      &#xA;
    1. in write_buffer() function, video stream output is stored to string variable, and then i write this string to file with ostream, and suffix mp4.
    2. &#xA;

    &#xA;

    after all the above steps, the output.mp4 cannot be played, the ffprobe output.mp4 -show_frames output is&#xA;(image) :

    &#xA;

    Input #0, h264, from &#x27;/Users/ming/code/dev/haomo/output.mp4&#x27;:&#xA;  Duration: N/A, bitrate: N/A&#xA;    Stream #0:0: Video: h264 (High 4:2:2), yuv422p(progressive), 640x480, 24.92 fps, 24 tbr, 1200k tbn, 48 tbc&#xA;[FRAME]&#xA;media_type=video&#xA;stream_index=0&#xA;key_frame=1&#xA;pkt_pts=N/A&#xA;pkt_pts_time=N/A&#xA;pkt_dts=N/A&#xA;pkt_dts_time=N/A&#xA;best_effort_timestamp=N/A&#xA;best_effort_timestamp_time=N/A&#xA;

    &#xA;

    Note that before and after calling av_write_frame() in step 4, the passed argument output_packet contains correct pts and dts info, i cannot figure out why the output stream lost these info.

    &#xA;