Recherche avancée

Médias (16)

Mot : - Tags -/mp3

Autres articles (57)

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

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

Sur d’autres sites (6669)

  • ffmpeg 6.0 custom IO error : Could not find codec parameters for stream 0 : unspecified pixel format

    5 février 2024, par Heng Zhang

    I run avio_read_callback.c example of ffmpeg 6.0 source code (ffmpeg-6.0/doc/examples/avio_read_callback.c), Got a error info when input a 1080*1920p video file :

    


    ./avio_read_callback 1080_1920.mp4
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1ec23c0] stream 0, offset 0x30: partial file
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1ec23c0] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none(tv, bt709), 1920x1080, 2179 kb/s): unspecified pixel format
Consider increasing the value for the 'analyzeduration' (10000000) and 'probesize' (10000000) options
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1080_1920.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf59.34.102
  Duration: 00:01:20.63, start: 0.000000, bitrate: N/A
  Stream #0:0[0x1](und): Video: h264 (avc1 / 0x31637661), none(tv, bt709), 1920x1080, 2179 kb/s, SAR 1:1 DAR 16:9, 30 fps, 30 tbr, 15360 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
      encoder         : Lavc59.37.100 libx264


    


    I tried to use ffprobe to get video infomation, it is ok :

    


    ffprobe -i 1080_1920.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1080_1920.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf59.34.102
  Duration: 00:01:20.63, start: 0.000000, bitrate: 2182 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 2179 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
  Metadata:
    handler_name    : VideoHandler
    vendor_id       : [0][0][0][0]
    encoder         : Lavc59.37.100 libx264


    


    Then I tried to open this video file directly by using avformat_open_input(&ctx, file_pash, NULL, NULL), and recomplie, rerun this example, result show it is still ok :

    


    ./avio_read_callback 1080_1920.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1080_1920.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf59.34.102
  Duration: 00:01:20.63, start: 0.000000, bitrate: 2182 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 2179 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
      encoder         : Lavc59.37.100 libx264


    


    I changed code of opening file directly as showing below :

    


    #include <libavcodec></libavcodec>avcodec.h>&#xA;#include <libavformat></libavformat>avformat.h>&#xA;#include <libavformat></libavformat>avio.h>&#xA;#include <libavutil></libavutil>file.h>&#xA;&#xA;struct buffer_data {&#xA;    uint8_t *ptr;&#xA;    size_t size; ///&lt; size left in the buffer&#xA;};&#xA;&#xA;static int read_packet(void *opaque, uint8_t *buf, int buf_size)&#xA;{&#xA;    struct buffer_data *bd = (struct buffer_data *)opaque;&#xA;    buf_size = FFMIN(buf_size, bd->size);&#xA;&#xA;    if (!buf_size)&#xA;        return AVERROR_EOF;&#xA;    // printf("ptr:%p size:%zu\n", bd->ptr, bd->size);&#xA;&#xA;    /* copy internal buffer data to buf */&#xA;    memcpy(buf, bd->ptr, buf_size);&#xA;    bd->ptr  &#x2B;= buf_size;&#xA;    bd->size -= buf_size;&#xA;&#xA;    return buf_size;&#xA;}&#xA;&#xA;int main(int argc, char *argv[])&#xA;{&#xA;    AVFormatContext *fmt_ctx = NULL;&#xA;    AVIOContext *avio_ctx = NULL;&#xA;    uint8_t *buffer = NULL, *avio_ctx_buffer = NULL;&#xA;    size_t buffer_size, avio_ctx_buffer_size = 4096;&#xA;    char *input_filename = NULL;&#xA;    int ret = 0;&#xA;    struct buffer_data bd = { 0 };&#xA;&#xA;    if (argc != 2) {&#xA;        fprintf(stderr, "usage: %s input_file\n"&#xA;                "API example program to show how to read from a custom buffer "&#xA;                "accessed through AVIOContext.\n", argv[0]);&#xA;        return 1;&#xA;    }&#xA;    input_filename = argv[1];&#xA;&#xA;    /* slurp file content into buffer */&#xA;    ret = av_file_map(input_filename, &amp;buffer, &amp;buffer_size, 0, NULL);&#xA;    if (ret &lt; 0)&#xA;        goto end;&#xA;&#xA;    /* fill opaque structure used by the AVIOContext read callback */&#xA;    bd.ptr  = buffer;&#xA;    bd.size = buffer_size;&#xA;&#xA;    /*&#xA;    if (!(fmt_ctx = avformat_alloc_context())) {&#xA;        ret = AVERROR(ENOMEM);&#xA;        goto end;&#xA;    }&#xA;    fmt_ctx->probesize = 100000000;&#xA;    fmt_ctx->max_analyze_duration = 0;&#xA;&#xA;    avio_ctx_buffer = av_malloc(avio_ctx_buffer_size);&#xA;    if (!avio_ctx_buffer) {&#xA;        ret = AVERROR(ENOMEM);&#xA;        goto end;&#xA;    }&#xA;    avio_ctx = avio_alloc_context(avio_ctx_buffer, avio_ctx_buffer_size,&#xA;                                  0, &amp;bd, &amp;read_packet, NULL, NULL);&#xA;    if (!avio_ctx) {&#xA;        ret = AVERROR(ENOMEM);&#xA;        goto end;&#xA;    }&#xA;    fmt_ctx->pb = avio_ctx;&#xA;    */&#xA;&#xA;    ret = avformat_open_input(&amp;fmt_ctx, input_filename, NULL, NULL);&#xA;    if (ret &lt; 0) {&#xA;        fprintf(stderr, "Could not open input\n");&#xA;        goto end;&#xA;    }&#xA;&#xA;    ret = avformat_find_stream_info(fmt_ctx, NULL);&#xA;    if (ret &lt; 0) {&#xA;        fprintf(stderr, "Could not find stream information\n");&#xA;        goto end;&#xA;    }&#xA;&#xA;    av_dump_format(fmt_ctx, 0, input_filename, 0);&#xA;&#xA;end:&#xA;    avformat_close_input(&amp;fmt_ctx);&#xA;&#xA;    /* note: the internal buffer could have changed, and be != avio_ctx_buffer */&#xA;    if (avio_ctx)&#xA;        av_freep(&amp;avio_ctx->buffer);&#xA;    avio_context_free(&amp;avio_ctx);&#xA;&#xA;    av_file_unmap(buffer, buffer_size);&#xA;&#xA;    if (ret &lt; 0) {&#xA;        fprintf(stderr, "Error occurred: %s\n", av_err2str(ret));&#xA;        return 1;&#xA;    }&#xA;&#xA;    return 0;&#xA;}&#xA;

    &#xA;

    I wonder why custom will report error ?

    &#xA;

  • How to avoid color shift using FFmpeg libx264

    7 septembre 2021, par florit

    I’d like to convert some footage to proxy H.264 using ffmpeg. I got a slight colorshift using the following command :

    &#xA;

    ffmpeg -i /path/to/045_0054.MXF -map 0 -dn -c:v libx264 -preset slow -profile:v main -level:v 4.1 -coder 1 -pix_fmt yuv420p -crf 25 -vf "scale=1280:720:flags=lanczos" -movflags &#x2B;faststart -colorspace 1 -color_primaries 1 -color_trc 1 -color_range 1 -brand mp42 -refs 1 -x264-params b-pyramid=0 -bf 2 -g 5 -y /path/to/045_0054.mp4&#xA;

    &#xA;

    How can I get rid of the slight magenta shift ?

    &#xA;

    mediainfo prints the following about the source file :

    &#xA;

    General&#xA;Complete name                            : /path/to/045_0054.MXF&#xA;Format                                   : MXF&#xA;Format version                           : 1.3&#xA;Format profile                           : OP-1a&#xA;Format settings                          : Closed / Complete&#xA;File size                                : 180 MiB&#xA;Duration                                 : 14 s 720 ms&#xA;Overall bit rate mode                    : Variable&#xA;Overall bit rate                         : 102 Mb/s&#xA;Encoded date                             : 2021-02-19 13:13:15.000&#xA;Writing application                      : Sony Mem 2.00&#xA;&#xA;Video&#xA;ID                                       : 2&#xA;Format                                   : AVC&#xA;Format/Info                              : Advanced Video Codec&#xA;Format profile                           : High@L5.1&#xA;Format settings                          : CABAC / 2 Ref Frames&#xA;Format settings, CABAC                   : Yes&#xA;Format settings, Reference frames        : 2 frames&#xA;Format settings, GOP                     : M=3, N=6&#xA;Format settings, wrapping mode           : Frame&#xA;Codec ID                                 : 0D01030102106001-0401020201314001&#xA;Duration                                 : 14 s 720 ms&#xA;Bit rate mode                            : Variable&#xA;Bit rate                                 : 97.8 Mb/s&#xA;Maximum bit rate                         : 100.0 Mb/s&#xA;Width                                    : 3 840 pixels&#xA;Height                                   : 2 160 pixels&#xA;Display aspect ratio                     : 16:9&#xA;Frame rate                               : 25.000 FPS&#xA;Color space                              : YUV&#xA;Chroma subsampling                       : 4:2:0&#xA;Bit depth                                : 8 bits&#xA;Scan type                                : Progressive&#xA;Bits/(Pixel*Frame)                       : 0.472&#xA;Stream size                              : 172 MiB (95%)&#xA;Color range                              : Limited&#xA;Color primaries                          : BT.709&#xA;Transfer characteristics                 : BT.709&#xA;Matrix coefficients                      : BT.709&#xA;

    &#xA;

  • How to avoid color shift using FFmpeg libx264

    7 septembre 2021, par florit

    I’d like to convert some footage to proxy H.264 using ffmpeg. I got a slight colorshift using the following command :

    &#xA;

    ffmpeg -i /path/to/045_0054.MXF -map 0 -dn -c:v libx264 -preset slow -profile:v main -level:v 4.1 -coder 1 -pix_fmt yuv420p -crf 25 -vf "scale=1280:720:flags=lanczos" -movflags &#x2B;faststart -colorspace 1 -color_primaries 1 -color_trc 1 -color_range 1 -brand mp42 -refs 1 -x264-params b-pyramid=0 -bf 2 -g 5 -y /path/to/045_0054.mp4&#xA;

    &#xA;

    How can I get rid of the slight magenta shift ?

    &#xA;

    mediainfo prints the following about the source file :

    &#xA;

    General&#xA;Complete name                            : /path/to/045_0054.MXF&#xA;Format                                   : MXF&#xA;Format version                           : 1.3&#xA;Format profile                           : OP-1a&#xA;Format settings                          : Closed / Complete&#xA;File size                                : 180 MiB&#xA;Duration                                 : 14 s 720 ms&#xA;Overall bit rate mode                    : Variable&#xA;Overall bit rate                         : 102 Mb/s&#xA;Encoded date                             : 2021-02-19 13:13:15.000&#xA;Writing application                      : Sony Mem 2.00&#xA;&#xA;Video&#xA;ID                                       : 2&#xA;Format                                   : AVC&#xA;Format/Info                              : Advanced Video Codec&#xA;Format profile                           : High@L5.1&#xA;Format settings                          : CABAC / 2 Ref Frames&#xA;Format settings, CABAC                   : Yes&#xA;Format settings, Reference frames        : 2 frames&#xA;Format settings, GOP                     : M=3, N=6&#xA;Format settings, wrapping mode           : Frame&#xA;Codec ID                                 : 0D01030102106001-0401020201314001&#xA;Duration                                 : 14 s 720 ms&#xA;Bit rate mode                            : Variable&#xA;Bit rate                                 : 97.8 Mb/s&#xA;Maximum bit rate                         : 100.0 Mb/s&#xA;Width                                    : 3 840 pixels&#xA;Height                                   : 2 160 pixels&#xA;Display aspect ratio                     : 16:9&#xA;Frame rate                               : 25.000 FPS&#xA;Color space                              : YUV&#xA;Chroma subsampling                       : 4:2:0&#xA;Bit depth                                : 8 bits&#xA;Scan type                                : Progressive&#xA;Bits/(Pixel*Frame)                       : 0.472&#xA;Stream size                              : 172 MiB (95%)&#xA;Color range                              : Limited&#xA;Color primaries                          : BT.709&#xA;Transfer characteristics                 : BT.709&#xA;Matrix coefficients                      : BT.709&#xA;

    &#xA;