Recherche avancée

Médias (0)

Mot : - Tags -/organisation

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

Autres articles (57)

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

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (14585)

  • ffmpeg : save separate frames as still gifs

    7 novembre 2013, par Eugene M

    The question is simple : I don't want ffmpeg to create an animated GIF from given video stream, I want separate frames, each in GIF format. But when I set output file to something like frame%09d.gif ffmpeg tends to create an animation (and stores it exactly as frame%09d.gif). The same for -f gif option.

    Of course, I could save PNGs and use ImageMagic's convert utility to transform them to GIFs, but I don't want any additional invocation overhead because I'm dealing with live streams and going to crunch large amounts of data.

    Here is what I do, nothing special :

    ffmpeg -i http://brightcove03-f.akamaihd.net/valgbodmandag1378107345_1_300k@80362 -f gif -y frame_%09d.gif

    ffmpeg version N-54643-g15cee5e Copyright (c) 2000-2013 the FFmpeg developers
     built on Jul 11 2013 03:35:11 with gcc 4.7.3 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnu
    tls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --ena
    ble-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger -
    -enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-lib
    vpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
     libavutil      52. 39.100 / 52. 39.100
     libavcodec     55. 18.102 / 55. 18.102
     libavformat    55. 12.101 / 55. 12.101
     libavdevice    55.  3.100 / 55.  3.100
     libavfilter     3. 80.100 /  3. 80.100
     libswscale      2.  3.100 /  2.  3.100
     libswresample   0. 17.102 /  0. 17.102
     libpostproc    52.  3.100 / 52.  3.100
    [flv @ 00000000002cb700] Stream discovered after head already parsed
    Input #0, flv, from 'http://brightcove03-f.akamaihd.net/valgbodmandag1378107345_1_300k@80362':
     Metadata:
       encoder         : Lavf54.6.100
     Duration: 00:00:00.00, start: 0.000000, bitrate: N/A
       Stream #0:0: Video: h264 (Constrained Baseline), yuv420p, 480x270 [SAR 1:1 DAR 16:9], 25 tbr, 1k tbn, 50 tbc
       Stream #0:1: Audio: aac, 44100 Hz, stereo, fltp, 128 kb/s
       Stream #0:2: Data: none
    [swscaler @ 0000000004d051e0] No accelerated colorspace conversion found from yuv420p to bgr8.
    Output #0, gif, to 'frame_%09d.gif':
     Metadata:
       encoder         : Lavf55.12.101
       Stream #0:0: Video: gif, bgr8, 480x270 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 100 tbn, 25 tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 -> gif)
    Press [q] to stop, [?] for help
    frame=  141 fps=130 q=-1.0 Lsize=    4960kB time=00:00:05.68 bitrate=7153.1kbits/s
    video:5100kB audio:0kB subtitle:0 global headers:0kB muxing overhead -2.743247%

    After all I get a file named "frame_%03d.gif", but instead I want to have several files "frame_001.gif", "frame_002.gif", etc.

    Any ideas ?
    Thanks in advance.

  • How to save the video stream as h264

    16 mars 2023, par aaadddzxc

    I pull the stream through ffmpeg, and then save the video of this stream as an h264 file, but the saved file cannot be played. Why is this ?

    


    The h264 saved by the following code cannot be played,i dont know why...

    


    i try to vlc play, but cant play the h264 file.

    


    can be save to h264 without avformat_alloc_output_context2 function ?

    


    #include <thread>&#xA;#include <iostream>&#xA;#include <fstream>&#xA;extern "C"&#xA;{&#xA;#include <libavcodec></libavcodec>avcodec.h>&#xA;#include <libavcodec></libavcodec>bsf.h>&#xA;#include <libavformat></libavformat>avformat.h>&#xA;}&#xA;&#xA;#pragma comment(lib,"avcodec.lib")&#xA;#pragma comment(lib,"avdevice.lib")&#xA;#pragma comment(lib,"avfilter.lib")&#xA;#pragma comment(lib,"avformat.lib")&#xA;#pragma comment(lib,"avutil.lib")&#xA;#pragma comment(lib,"swresample.lib")&#xA;#pragma comment(lib,"swscale.lib")&#xA;&#xA;int mp4toannexb(AVBSFContext* bsf_ctx, AVPacket* pkt, std::ofstream&amp; out)&#xA;{&#xA;    int ret;&#xA;&#xA;    ret = av_bsf_send_packet(bsf_ctx, pkt);&#xA;    if (ret &lt; 0) {&#xA;        std::cout &lt;&lt; "bsf send packet failed, errno:" &lt;&lt; ret &lt;&lt; std::endl;&#xA;        return -1;&#xA;    }&#xA;&#xA;    for (;;) {&#xA;        ret = av_bsf_receive_packet(bsf_ctx, pkt);&#xA;        if (AVERROR_EOF == ret || AVERROR(EAGAIN) == ret) {&#xA;            return 0;&#xA;        }&#xA;        if (ret &lt; 0) {&#xA;            std::cout &lt;&lt; "Could not receive packet, errno:" &lt;&lt; ret &lt;&lt; std::endl;&#xA;            return -1;&#xA;        }&#xA;        out.write((const char*)pkt->data, pkt->size);&#xA;    }&#xA;    return 0;&#xA;}&#xA;&#xA;&#xA;int main()&#xA;{&#xA;    AVOutputFormat* ofmt = NULL;&#xA;    AVFormatContext* ifmt_ctx = NULL;&#xA;    AVBSFContext* bsf_ctx = NULL;&#xA;    AVPacket* pkt = NULL;&#xA;    const char* in_filename = "http://192.168.1.12:8088/live/123.flv";&#xA;    int ret = -1;&#xA;    int video_index = -1;&#xA;    std::ofstream outh264("D:\\ConsoleApplication1\\Debug\\out.h264", std::ios::binary | std::ios::trunc);&#xA;&#xA;    avformat_network_init();&#xA;&#xA;    if ((ifmt_ctx = avformat_alloc_context()) == NULL) {&#xA;        std::cout &lt;&lt; "avformat_alloc_context failed." &lt;&lt; std::endl;&#xA;        exit(1);&#xA;    }&#xA;&#xA;    if ((ret = avformat_open_input(&amp;ifmt_ctx, in_filename, 0, 0)) &lt; 0) {&#xA;        std::cout &lt;&lt; "Could not open input file." &lt;&lt; std::endl;&#xA;        exit(1);&#xA;    }&#xA;&#xA;    if ((ret = avformat_find_stream_info(ifmt_ctx, 0)) &lt; 0) {&#xA;        std::cout &lt;&lt; "Failed to retrieve input stream information" &lt;&lt; std::endl;&#xA;        return -1;&#xA;    }&#xA;&#xA;    if (!(pkt = av_packet_alloc())) {&#xA;        std::cout &lt;&lt; "Could not allocate packet" &lt;&lt; std::endl;&#xA;        return -1;&#xA;    }&#xA;&#xA;    video_index = av_find_best_stream(ifmt_ctx, AVMEDIA_TYPE_VIDEO, -1, -1, NULL, 0);&#xA;    if (video_index &lt; 0) {&#xA;        std::cout &lt;&lt; "Could not find stream " &lt;&lt; std::string(av_get_media_type_string(AVMEDIA_TYPE_VIDEO)) &lt;&lt; std::endl;&#xA;        return -1;&#xA;    }&#xA;&#xA;    av_dump_format(ifmt_ctx, 0, in_filename, 0);&#xA;&#xA;    const AVBitStreamFilter* filter = av_bsf_get_by_name("h264_mp4toannexb");&#xA;    if (NULL == filter) {&#xA;        std::cout &lt;&lt; "Could not create filter" &lt;&lt; std::endl;&#xA;        return -1;&#xA;    }&#xA;&#xA;    ret = av_bsf_alloc(filter, &amp;bsf_ctx);&#xA;    if (ret &lt; 0) {&#xA;        printf("Could not alloc bitstream filter \n");&#xA;        return -1;&#xA;    }&#xA;&#xA;    // avcodec_parameters_from_context&#xA;    ret = avcodec_parameters_copy(bsf_ctx->par_in, ifmt_ctx->streams[video_index]->codecpar);&#xA;    if (ret &lt; 0) {&#xA;        printf("Parameter copy filed, errno: %d \n", ret);&#xA;        return -1;&#xA;    }&#xA;&#xA;    ret = av_bsf_init(bsf_ctx);&#xA;    if (ret &lt; 0) {&#xA;        printf("BSF init failed, errno: %d \n", ret);&#xA;        return -1;&#xA;    }&#xA;&#xA;    while (av_read_frame(ifmt_ctx, pkt) >= 0) {&#xA;        if (pkt->stream_index == video_index)&#xA;        {&#xA;            mp4toannexb(bsf_ctx, pkt, outh264);&#xA;        }&#xA;        av_packet_unref(pkt);&#xA;    }&#xA;    outh264.close();&#xA;    avformat_close_input(&amp;ifmt_ctx);&#xA;    av_packet_free(&amp;pkt);&#xA;    av_bsf_free(&amp;bsf_ctx);&#xA;&#xA;    return 0;&#xA;}&#xA;</fstream></iostream></thread>

    &#xA;

  • x86/vp9lpf : save a few mov in flat8in/hev masks calc.

    5 février 2014, par Clément Bœsch
    x86/vp9lpf : save a few mov in flat8in/hev masks calc.
    
    • [DH] libavcodec/x86/vp9lpf.asm