Recherche avancée

Médias (1)

Mot : - Tags -/net art

Autres articles (97)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • 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 ;

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

Sur d’autres sites (16704)

  • Scale with scale_vaapi and than pad, got error. Seems ok without "pad"

    24 mai 2023, par huangda1982

    My computer : customized Linux, haswell
I am trying to scale 1280x720 video to 640x450 in 640x480 frame with black borders. To do so, I run this command :

    


    ffmpeg -v warning -hide_banner -init_hw_device vaapi=vaapi0:/dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -hwaccel_device vaapi0 -filter_hw_device vaapi0 -i 'my_video.mp4' -vf 'scale_vaapi=640:450,pad=640:480:0:14' -c:v h264_vaapi -q:v 18 -profile:v main -level 3.1 -c:a aac -q:a 3 -f mp4 out.mp4 -loglevel verbose


    


    And I got this error :

    


    Impossible to convert between the formats supported by the filter &#x27;Parsed_scale_vaapi_0&#x27; and the filter &#x27;auto_scaler_0&#x27;<br />&#xA;Error reinitializing filters!&#xA;Failed to inject frame into filter network: Function not implemented&#xA;Error while processing the decoded data for stream #0:0&#xA;

    &#xA;

    When I removed the ",pad=640:480:0:14" part, the command continued. I pressed ctrl-c, and did not check the result.

    &#xA;

    "-q:v 18", "-level 3.1" and "-q:a" options seem not work.

    &#xA;

    Full message :

    &#xA;

    [h264 @ 0x55dfeb529340] Reinit context to 1280x720, pix_fmt: yuv420p&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;my_video.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: mp41&#xA;    creation_time   : 1970-01-01T00:00:00.000000Z&#xA;    encoder         : PotEncoder&#xA;  Duration: 00:22:45.01, start: 0.000000, bitrate: 3264 kb/s&#xA;  Stream #0:0(und): Video: h264 (Constrained Baseline), 1 reference frame (avc1 / 0x31637661), yuv420p(left), 1280x720 [SAR 1:1 DAR 16:9], 3068 kb/s, 23.98 fps, 23.98 tbr, 1199 tbn, 47.96 tbc (default)&#xA;    Metadata:&#xA;      creation_time   : 1970-01-01T00:00:00.000000Z&#xA;      handler_name    : VideoHandler&#xA;      vendor_id       : [0][0][0][0]&#xA;  Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 192 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 1970-01-01T00:00:00.000000Z&#xA;      handler_name    : SoundHandler&#xA;      vendor_id       : [0][0][0][0]&#xA;File &#x27;out.mp4&#x27; already exists. Overwrite? [y/N] y&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_vaapi))&#xA;  Stream #0:1 -> #0:1 (mp3 (mp3float) -> aac (native))&#xA;Press [q] to stop, [?] for help&#xA;[h264 @ 0x55dfeb553e40] Reinit context to 1280x720, pix_fmt: vaapi_vld&#xA;[graph_1_in_0_1 @ 0x55dfeb6b7580] tb:1/44100 samplefmt:fltp samplerate:44100 chlayout:0x3&#xA;[graph 0 input from stream 0:0 @ 0x55dfebb4d000] w:1280 h:720 pixfmt:vaapi_vld tb:1/1199 fr:1199/50 sar:1/1&#xA;[auto_scaler_0 @ 0x55dfebb4f940] w:iw h:ih flags:&#x27;bicubic&#x27; interl:0&#xA;[Parsed_pad_1 @ 0x55dfebb4c700] auto-inserting filter &#x27;auto_scaler_0&#x27; between the filter &#x27;Parsed_scale_vaapi_0&#x27; and the filter &#x27;Parsed_pad_1&#x27;&#xA;Impossible to convert between the formats supported by the filter &#x27;Parsed_scale_vaapi_0&#x27; and the filter &#x27;auto_scaler_0&#x27;&#xA;Error reinitializing filters!&#xA;Failed to inject frame into filter network: Function not implemented&#xA;Error while processing the decoded data for stream #0:0&#xA;[AVIOContext @ 0x55dfeb5522c0] Statistics: 0 seeks, 0 writeouts&#xA;[aac @ 0x55dfeb551600] Qavg: 354.000&#xA;[aac @ 0x55dfeb551600] 2 frames left in the queue on closing&#xA;[AVIOContext @ 0x55dfeb530500] Statistics: 1144787 bytes read, 2 seeks&#xA;Conversion failed!&#xA;

    &#xA;

  • avcodec_open2 returns -22 "Invalid argument" trying to encode AV_CODEC_ID_H264

    26 mai 2023, par Fries of Doom

    I'm trying to use libavcodec to encode h264 video but avcodec_open2 returns -22 "Invalid argument" and I can't figure out why. Here is my code, which is mostly a copy from the encode example from libavcodec.

    &#xA;

        /* find the mpeg1video encoder */&#xA;    const AVCodec* codec = avcodec_find_encoder(AV_CODEC_ID_H264);&#xA;    if (!codec) {&#xA;        fprintf(stderr, "Codec &#x27;%s&#x27; not found\n", "h.264");&#xA;        exit(1);&#xA;    }&#xA;&#xA;    AVCodecContext* codecContext = avcodec_alloc_context3(codec);&#xA;    if (!codecContext) {&#xA;        fprintf(stderr, "Could not allocate video codec context\n");&#xA;        exit(1);&#xA;    }&#xA;&#xA;    AVPacket* pkt = av_packet_alloc();&#xA;    if (!pkt)&#xA;        exit(1);&#xA;&#xA;    /* put sample parameters */&#xA;    codecContext->bit_rate = 400000;&#xA;    /* resolution must be a multiple of two */&#xA;    codecContext->width = 1920;&#xA;    codecContext->height = 1080;&#xA;    /* frames per second */&#xA;    codecContext->time_base = { 1, 25 };&#xA;    codecContext->framerate = { 25, 1 };&#xA;&#xA;    /* emit one intra frame every ten frames&#xA;     * check frame pict_type before passing frame&#xA;     * to encoder, if frame->pict_type is AV_PICTURE_TYPE_I&#xA;     * then gop_size is ignored and the output of encoder&#xA;     * will always be I frame irrespective to gop_size&#xA;     */&#xA;    codecContext->gop_size = 10;&#xA;    codecContext->max_b_frames = 1;&#xA;    codecContext->codec_type = AVMEDIA_TYPE_VIDEO;&#xA;    codecContext->pix_fmt = AV_PIX_FMT_YUV420P;&#xA;&#xA;    if (codec->id == AV_CODEC_ID_H264)&#xA;        av_opt_set(codecContext->priv_data, "profile", "baseline", 0);&#xA;&#xA;    /* open it */&#xA;    int ret = avcodec_open2(codecContext, codec, nullptr);&#xA;    if (ret &lt; 0) {&#xA;        char eb[AV_ERROR_MAX_STRING_SIZE];&#xA;        fprintf(stderr, "Could not open codec: %s\n", av_make_error_string(eb, AV_ERROR_MAX_STRING_SIZE, ret));&#xA;        exit(1);&#xA;    }&#xA;

    &#xA;

    Does anyone know what I'm doing wrong ?

    &#xA;

  • Ffmpeg : How to fix error "Please choose an encoder manually" ?

    9 juillet 2023, par Alex

    I am trying to convert a x265 videofile to a x264 format so it can be played on a television. I am trying the following command

    &#xA;

    ffmpeg -i input.mkv -f mp4 -vcodec libx264 -preset fast -profile:v main -acodec aac -map 0:0 -map 0:1 -map 0:2 test.mp4&#xA;

    &#xA;

    to select videos stream 0:0 for video, stream 0:1 for audio and stream 0:2 for the subtitle. However I get an error

    &#xA;

    Automatic encoder selection failed Default encoder for format mp4 (codec none) is probably disabled. Please choose an encoder manually.&#xA;Error selecting an encoder&#xA;

    &#xA;

    How to fix this command ?

    &#xA;

    P.S. I am not an expert in ffmpeg or videos conversion/formats/encodings/audio formats/subtitle formats.

    &#xA;

    I found EXACTLY ONE google search result with the exact error phrase HERE. And that is not helping as I do not even understand the first sentence.

    &#xA;

    Below is the output for the first three streams :

    &#xA;

    Input #0, matroska,webm, from &#x27;input.mkv&#x27;:&#xA;  Metadata:&#xA;    creation_time   : 2021-03-25T09:13:20.000000Z&#xA;    ENCODER         : Lavf58.29.100&#xA;  Duration: 00:23:57.65, start: 0.000000, bitrate: 2103 kb/s&#xA;  Stream #0:0(jpn): Video: hevc (Main 10), yuv420p10le(tv), 1920x1080, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn (default)&#xA;    Metadata:&#xA;      title           : [Judas] x265 10b&#xA;      ENCODER         : Lavc58.54.100 libx265&#xA;      BPS-eng         : 1973938&#xA;      DURATION-eng    : 00:23:55.017000000&#xA;      NUMBER_OF_FRAMES-eng: 34406&#xA;      NUMBER_OF_BYTES-eng: 354079423&#xA;      _STATISTICS_WRITING_APP-eng: mkvmerge v48.0.0 (&#x27;Fortress Around Your Heart&#x27;) 64-bit&#xA;      _STATISTICS_WRITING_DATE_UTC-eng: 2021-03-25 09:13:20&#xA;      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES&#xA;  Stream #0:1(jpn): Audio: aac (LC), 44100 Hz, stereo, fltp (default)&#xA;    Metadata:&#xA;      title           : Japanese&#xA;      BPS-eng         : 128000&#xA;      DURATION-eng    : 00:23:55.086000000&#xA;      NUMBER_OF_FRAMES-eng: 61804&#xA;      NUMBER_OF_BYTES-eng: 22961378&#xA;      _STATISTICS_WRITING_APP-eng: mkvmerge v48.0.0 (&#x27;Fortress Around Your Heart&#x27;) 64-bit&#xA;      _STATISTICS_WRITING_DATE_UTC-eng: 2021-03-25 09:13:20&#xA;      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES&#xA;  Stream #0:2(eng): Subtitle: ass&#xA;    Metadata:&#xA;      title           : English&#xA;      BPS-eng         : 196&#xA;      DURATION-eng    : 00:23:53.580000000&#xA;      NUMBER_OF_FRAMES-eng: 478&#xA;      NUMBER_OF_BYTES-eng: 35129&#xA;      _STATISTICS_WRITING_APP-eng: mkvmerge v48.0.0 (&#x27;Fortress Around Your Heart&#x27;) 64-bit&#xA;      _STATISTICS_WRITING_DATE_UTC-eng: 2021-03-25 09:13:20&#xA;      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES&#xA;

    &#xA;

    I found a related question HERE whose answer I do not fully understand. However, I tried the following command

    &#xA;

    ffmpeg -i input.mkv -f mp4 -vcodec libx264 -preset fast -profile:v main -acodec aac -map 0:0 -map 0:1 -map 0:2 -c:s mov_text  test.mp4&#xA;

    &#xA;

    but got a new error

    &#xA;

    Error initializing output stream: Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height&#xA;

    &#xA;

    I thought I am defining an "encoder" for output stream "#0:0" (which I think is video), namely libx264. So what else to do here ?

    &#xA;

    I tried -acode copy and also to use -qp 0 in the command line which all did not work.

    &#xA;