Recherche avancée

Médias (0)

Mot : - Tags -/page unique

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

Autres articles (20)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (1988)

  • ffmpeg - How to change the filter-paramaters depending on time oder framenumber ?

    2 mars 2020, par LookAndSee

    Hallo to all userse and helpers here in this forum ! Thank you, i am new and i have found allready a lot of solutions.

    Now I want to ask, if someone can help me :

    I have a Movie about 30 seconds made of 1 image.
    Now I want to pixelate depending on time or framenumber - every time a litlle bit less.
    My code so far :

    ffmpeg -i in.mp4 -vf scale=iw/n:ih/n,scale=niw:nih:flags=neighbor out.mp4

    where n should be the framenumber 1 to 900.
    this scould also be t+1 for slower change.

    the stars are gone - so i mean n times iw:n times ih :

    error-massage :

    undefined constant or missing ’(’ in ’n’
    error when evaluating the expression ’ih/n’
    maybe the expression for out_w :’w/n’ or for out_h :’ih/n’ is self-referencing.
    failed to configure output pad on paresed_scale_0
    error reinitializing filters !
    failed to inject frame into filter network : invalid argument
    error while processing the decoded data for stream #0:0

    Do you have some suggestion plaese - Thank you in Advance

  • How to use ffmpeg api to make a filter overlay water mark ?

    6 septembre 2022, par Leon Lee

    OS : Ubuntu 20.04

    


    FFmpeg : 4.4.0

    


    Test video :

    


    Input #0, hevc, from './videos/akiyo_352x288p25.265' :
Duration : N/A, bitrate : N/A
Stream #0:0 : Video : hevc (Main), yuv420p(tv), 352x288, 25 fps, 25 tbr, 1200k tbn, 25 tbc

    


    Test watermark :

    


    200*200.png

    


    I copy ffmpeg official example.

    


    Compiler no error, run no error , but i can't see add watermark

    


    Here is my code

    


    #include <libavcodec></libavcodec>avcodec.h>&#xA;#include <libavformat></libavformat>avformat.h>&#xA;#include <libavutil></libavutil>opt.h>&#xA;#include <libavfilter></libavfilter>buffersink.h>&#xA;#include <libavfilter></libavfilter>buffersrc.h>&#xA;int open_input_file(AVFormatContext *fmt, AVCodecContext **codecctx, AVCodec *codec, const char *filename, int index)&#xA;{&#xA;    int ret = 0;&#xA;    char msg[500];&#xA;    *codecctx = avcodec_alloc_context3(codec);&#xA;    ret = avcodec_parameters_to_context(*codecctx, fmt->streams[index]->codecpar);&#xA;    if (ret &lt; 0)&#xA;    {&#xA;        printf("avcodec_parameters_to_context error,ret:%d\n", ret);&#xA;        &#xA;        return -1;&#xA;    }&#xA;&#xA;    // open 解码器&#xA;    ret = avcodec_open2(*codecctx, codec, NULL);&#xA;    if (ret &lt; 0)&#xA;    {&#xA;        printf("avcodec_open2 error,ret:%d\n", ret);&#xA;        &#xA;        return -2;&#xA;    }&#xA;    printf("pix:%d\n", (*codecctx)->pix_fmt);&#xA;    return ret;&#xA;}&#xA;&#xA;int init_filter(AVFilterContext **buffersrc_ctx, AVFilterContext **buffersink_ctx, AVFilterGraph **filter_graph, AVStream *stream, AVCodecContext *codecctx, const char *filter_desc)&#xA;{&#xA;    int ret = -1;&#xA;    char args[512];&#xA;    char msg[500];&#xA;    const AVFilter *buffersrc = avfilter_get_by_name("buffer");&#xA;    const AVFilter *buffersink = avfilter_get_by_name("buffersink");&#xA;&#xA;    AVFilterInOut *input = avfilter_inout_alloc();&#xA;    AVFilterInOut *output = avfilter_inout_alloc();&#xA;&#xA;    AVRational time_base = stream->time_base;&#xA;    enum AVPixelFormat pix_fmts[] = {AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE};&#xA;&#xA;    if (!output || !input || !filter_graph)&#xA;    {&#xA;        ret = -1;&#xA;        printf("avfilter_graph_alloc/avfilter_inout_alloc error,ret:%d\n", ret);&#xA;        &#xA;        goto end;&#xA;    }&#xA;    snprintf(args, sizeof(args), "video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:pixel_aspect=%d/%d", codecctx->width, codecctx->height, codecctx->pix_fmt, stream->time_base.num, stream->time_base.den, codecctx->sample_aspect_ratio.num, codecctx->sample_aspect_ratio.den);&#xA;    ret = avfilter_graph_create_filter(buffersrc_ctx, buffersrc, "in", args, NULL, *filter_graph);&#xA;    if (ret &lt; 0)&#xA;    {&#xA;        printf("avfilter_graph_create_filter buffersrc error,ret:%d\n", ret);&#xA;        &#xA;        goto end;&#xA;    }&#xA;&#xA;    ret = avfilter_graph_create_filter(buffersink_ctx, buffersink, "out", NULL, NULL, *filter_graph);&#xA;    if (ret &lt; 0)&#xA;    {&#xA;        printf("avfilter_graph_create_filter buffersink error,ret:%d\n", ret);&#xA;        &#xA;        goto end;&#xA;    }&#xA;    ret = av_opt_set_int_list(*buffersink_ctx, "pix_fmts", pix_fmts, AV_PIX_FMT_NONE, AV_OPT_SEARCH_CHILDREN);&#xA;    if (ret &lt; 0)&#xA;    {&#xA;        printf("av_opt_set_int_list error,ret:%d\n", ret);&#xA;        &#xA;        goto end;&#xA;    }&#xA;    /*&#xA; * The buffer source output must be connected to the input pad of&#xA; * the first filter described by filters_descr; since the first&#xA; * filter input label is not specified, it is set to "in" by&#xA; * default.&#xA; */&#xA;    output->name = av_strdup("in");&#xA;    output->filter_ctx = *buffersrc_ctx;&#xA;    output->pad_idx = 0;&#xA;    output->next = NULL;&#xA;&#xA;    /*&#xA; * The buffer sink input must be connected to the output pad of&#xA; * the last filter described by filters_descr; since the last&#xA; * filter output label is not specified, it is set to "out" by&#xA; * default.&#xA; */&#xA;    input->name = av_strdup("out");&#xA;    input->filter_ctx = *buffersink_ctx;&#xA;    input->pad_idx = 0;&#xA;    input->next = NULL;&#xA;&#xA;    if ((ret = avfilter_graph_parse_ptr(*filter_graph, filter_desc, &amp;input, &amp;output, NULL)) &lt; 0)&#xA;    {&#xA;        printf("avfilter_graph_parse_ptr error,ret:%d\n", ret);&#xA;        &#xA;        goto end;&#xA;    }&#xA;&#xA;    if ((ret = avfilter_graph_config(*filter_graph, NULL)) &lt; 0)&#xA;    {&#xA;        printf("avfilter_graph_config error,ret:%d\n", ret);&#xA;        &#xA;        goto end;&#xA;    }&#xA;    end:&#xA;    avfilter_inout_free(&amp;input);&#xA;    avfilter_inout_free(&amp;output);&#xA;    return ret;&#xA;}&#xA;&#xA;int main(int argc, char **argv)&#xA;{&#xA;    int ret;&#xA;    char msg[500];&#xA;    const char *filter_descr = "drawbox=x=100:y=100:w=100:h=100:color=pink@0.5"; // OK&#xA;    //const char *filter_descr = "movie=200.png[wm];[in][wm]overlay=10:10[out]"; //Test&#xA;    // const char *filter_descr = "scale=640:360,transpose=cclock";&#xA;    AVFormatContext *pFormatCtx = NULL;&#xA;    AVCodecContext *pCodecCtx;&#xA;    AVFilterContext *buffersink_ctx;&#xA;    AVFilterContext *buffersrc_ctx;&#xA;    AVFilterGraph *filter_graph;&#xA;    AVCodec *codec;&#xA;    int video_stream_index = -1;&#xA;&#xA;    AVPacket packet;&#xA;    AVFrame *pFrame;&#xA;    AVFrame *pFrame_out;&#xA;    filter_graph = avfilter_graph_alloc();&#xA;    FILE *fp_yuv = fopen("test.yuv", "wb&#x2B;");&#xA;    ret = avformat_open_input(&amp;pFormatCtx, argv[1], NULL, NULL);&#xA;    if (ret &lt; 0)&#xA;    {&#xA;        printf("avformat_open_input error,ret:%d\n", ret);&#xA;        &#xA;        return -1;&#xA;    }&#xA;&#xA;    ret = avformat_find_stream_info(pFormatCtx, NULL);&#xA;    if (ret &lt; 0)&#xA;    {&#xA;        printf("avformat_find_stream_info error,ret:%d\n", ret);&#xA;        &#xA;        return -2;&#xA;    }&#xA;&#xA;    ret = av_find_best_stream(pFormatCtx, AVMEDIA_TYPE_VIDEO, -1, -1, &amp;codec, 0);&#xA;    if (ret &lt; 0)&#xA;    {&#xA;        printf("av_find_best_stream error,ret:%d\n", ret);&#xA;        &#xA;        return -3;&#xA;    }&#xA;    // 获取到视频流索引&#xA;    video_stream_index = ret;&#xA;&#xA;    av_dump_format(pFormatCtx, 0, argv[1], 0);&#xA;    if ((ret = open_input_file(pFormatCtx, &amp;pCodecCtx, codec, argv[1], video_stream_index)) &lt; 0)&#xA;    {&#xA;        ret = -1;&#xA;        printf("open_input_file error,ret:%d\n", ret);&#xA;        &#xA;        goto end;&#xA;    }&#xA;&#xA;    if ((ret = init_filter(&amp;buffersrc_ctx, &amp;buffersink_ctx, &amp;filter_graph, pFormatCtx->streams[video_stream_index], pCodecCtx, filter_descr)) &lt; 0)&#xA;    {&#xA;        ret = -2;&#xA;        printf("init_filter error,ret:%d\n", ret);&#xA;        &#xA;        goto end;&#xA;    }&#xA;    pFrame = av_frame_alloc();&#xA;    pFrame_out = av_frame_alloc();&#xA;    while (1)&#xA;    {&#xA;        if ((ret = av_read_frame(pFormatCtx, &amp;packet)) &lt; 0)&#xA;            break;&#xA;&#xA;        if (packet.stream_index == video_stream_index)&#xA;        {&#xA;            ret = avcodec_send_packet(pCodecCtx, &amp;packet);&#xA;            if (ret &lt; 0)&#xA;            {&#xA;                printf("avcodec_send_packet error,ret:%d\n", ret);&#xA;                &#xA;                break;&#xA;            }&#xA;&#xA;            while (ret >= 0)&#xA;            {&#xA;                ret = avcodec_receive_frame(pCodecCtx, pFrame);&#xA;                if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)&#xA;                {&#xA;                    break;&#xA;                }&#xA;                else if (ret &lt; 0)&#xA;                {&#xA;                    printf("avcodec_receive_frame error,ret:%d\n", ret);&#xA;                    &#xA;                    goto end;&#xA;                }&#xA;&#xA;                pFrame->pts = pFrame->best_effort_timestamp;&#xA;&#xA;                /* push the decoded frame into the filtergraph */&#xA;                ret = av_buffersrc_add_frame_flags(buffersrc_ctx, pFrame, AV_BUFFERSRC_FLAG_KEEP_REF);&#xA;                if (ret &lt; 0)&#xA;                {&#xA;                    printf("av_buffersrc_add_frame_flags error,ret:%d\n", ret);&#xA;                    &#xA;                    break;&#xA;                }&#xA;&#xA;                /* pull filtered frames from the filtergraph */&#xA;                while (1)&#xA;                {&#xA;                    ret = av_buffersink_get_frame(buffersink_ctx, pFrame_out);&#xA;                    if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)&#xA;                        break;&#xA;                    if (ret &lt; 0)&#xA;                        goto end;&#xA;                    if (pFrame_out->format == AV_PIX_FMT_YUV420P)&#xA;                    {&#xA;                        //Y, U, V&#xA;                        for (int i = 0; i &lt; pFrame_out->height; i&#x2B;&#x2B;)&#xA;                        {&#xA;                            fwrite(pFrame_out->data[0] &#x2B; pFrame_out->linesize[0] * i, 1, pFrame_out->width, fp_yuv);&#xA;                        }&#xA;                        for (int i = 0; i &lt; pFrame_out->height / 2; i&#x2B;&#x2B;)&#xA;                        {&#xA;                            fwrite(pFrame_out->data[1] &#x2B; pFrame_out->linesize[1] * i, 1, pFrame_out->width / 2, fp_yuv);&#xA;                        }&#xA;                        for (int i = 0; i &lt; pFrame_out->height / 2; i&#x2B;&#x2B;)&#xA;                        {&#xA;                            fwrite(pFrame_out->data[2] &#x2B; pFrame_out->linesize[2] * i, 1, pFrame_out->width / 2, fp_yuv);&#xA;                        }&#xA;                    }&#xA;                    av_frame_unref(pFrame_out);&#xA;                }&#xA;                av_frame_unref(pFrame);&#xA;            }&#xA;        }&#xA;        av_packet_unref(&amp;packet);&#xA;    }&#xA;    end:&#xA;    avcodec_free_context(&amp;pCodecCtx);&#xA;    fclose(fp_yuv);&#xA;}&#xA;

    &#xA;

  • Cloaked Archive Wiki

    16 mai 2011, par Multimedia Mike — General

    Google’s Chrome browser has made me phenomenally lazy. I don’t even attempt to type proper, complete URLs into the address bar anymore. I just type something vaguely related to the address and let the search engine take over. I saw something weird when I used this method to visit Archive Team’s site :



    There’s greater detail when you elect to view more results from the site :



    As the administrator of a MediaWiki installation like the one that archiveteam.org runs on, I was a little worried that they might have a spam problem. However, clicking through to any of those out-of-place pages does not indicate anything related to pharmaceuticals. Viewing source also reveals nothing amiss.

    I quickly deduced that this is a textbook example of website cloaking. This is when a website reports different content to a search engine than it reports to normal web browsers (humans, presumably). General pseudocode :

    C :
    1. if (web_request.user_agent_string == CRAWLER_USER_AGENT)
    2.  return cloaked_data ;
    3. else
    4.  return real_data ;

    You can verify this for yourself using the wget command line utility :

    <br />
    $ wget --quiet --user-agent="<strong>Mozilla/5.0</strong>" \<br />
     http://www.archiveteam.org/index.php?title=Geocities -O - | grep \&lt;title\&gt;<br />
    &lt;title&gt;GeoCities - Archiveteam&lt;/title&gt;

    $ wget —quiet —user-agent="Googlebot/2.1"
    http://www.archiveteam.org/index.php?title=Geocities -O - | grep \<title\>
    <title>Cheap xanax | Online Drug Store, Big Discounts</title>

    I guess the little web prank worked because the phaux-pharma stuff got indexed. It makes we wonder if there’s a MediaWiki plugin that does this automatically.

    For extra fun, here’s a site called the CloakingDetector which purports to be able to detect whether a page employs cloaking. This is just one humble observer’s opinion, but I don’t think the site works too well :