Recherche avancée

Médias (2)

Mot : - Tags -/map

Autres articles (111)

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

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

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

Sur d’autres sites (6521)

  • How to join AAC files with AVCONV CONCAT using an input txt file ?

    26 mars 2015, par user27284

    I have a number of AAC files and want to concatenate them into one AAC file. When I do this with AVCONV at the command line and I am specific with the file names, it works. When I try to do this with a text file that holds a list of files, it fails. What led me here is the FFMPEG tutorial page at Concatenating media files. I get a variety of results depending on what I try and I cannot find any info on what I am doing wrong with the syntax.

    My file list (list.txt in the same directory)...

    file 'sr_program_2015_03_23_05_44_01.aac'
    file 'sr_program_2015_03_23_07_44_58.aac'

    When I follow the example at the page I mentioned above, I get an error. I included both the use of ffmpeg AND avconv but the results are the same.

    ffmpeg...

    ffmpeg -f concat -i list.txt -c copy output
    ffmpeg version 0.8.17-6:0.8.17-1, Copyright (c) 2000-2014 the Libav developers
     built on Mar 15 2015 17:00:31 with gcc 4.7.2
    The ffmpeg program is only provided for script compatibility and will be removed
    in a future release. It has been deprecated in the Libav project to allow for
    incompatible command line syntax improvements in its replacement called avconv
    (see Changelog for details). Please use avconv instead.
    Unknown input format: 'concat'

    avconv...

    avconv -f concat -i list.txt -c copy output
    avconv version 0.8.17-6:0.8.17-1, Copyright (c) 2000-2014 the Libav developers
     built on Mar 15 2015 17:00:31 with gcc 4.7.2
    Unknown input format: 'concat'

    When I remove the "-f" and use the filenames directly, it works. I have no idea why. The resulting file also plays as expected.

    avconv -i concat:sr_program_2015_03_23_05_44_01.aac\|sr_program_2015_03_23_07_44_58.aac -c copy output.aac
    avconv version 0.8.17-6:0.8.17-1, Copyright (c) 2000-2014 the Libav developers
     built on Mar 15 2015 17:00:31 with gcc 4.7.2
    [aac @ 0xcb6cc0] channel element 3.5 is not allocated
    [aac @ 0xcb4b20] max_analyze_duration reached
    [aac @ 0xcb4b20] Estimating duration from bitrate, this may be inaccurate
    Input #0, aac, from 'concat:sr_program_2015_03_23_05_44_01.aac|sr_program_2015_03_23_07_44_58.aac':
     Duration: 01:58:34.29, bitrate: 65 kb/s
       Stream #0.0: Audio: aac, 44100 Hz, stereo, s16, 65 kb/s
    Output #0, adts, to 'output.aac':
     Metadata:
       encoder         : Lavf53.21.1
       Stream #0.0: Audio: aac, 44100 Hz, stereo, 65 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
    Press ctrl-c to stop encoding
    size=   57148kB time=7315.03 bitrate=  64.0kbits/s
    video:0kB audio:57148kB global headers:0kB muxing overhead 0.000000%

    Noticing that the working approach does not use the ’-f’ option, I tried that again with my first attempt and got a completely different error.

    avconv concat -i list.txt -c copy output.aac
    avconv version 0.8.17-6:0.8.17-1, Copyright (c) 2000-2014 the Libav developers
     built on Mar 15 2015 17:00:31 with gcc 4.7.2
    Unable to find a suitable output format for 'concat'

    The reason I want to process these ’broken stream’ aac files from a file list in a file is because I want to create the list from a script/code and then process it as part of a daily automated process. When the streams have broken, there are numerous files with the same date. When all goes well, there is only one file. It happens every other week or so. I want to automate the fix that I usually do manually. I have already accomplished creating the target file list, ironically, from examples on the same page mentioned above when I became stuck with this odd behavior.

    I also want to know what it is I am doing wrong. I see the example I used first everywhere. I have tried this on two different machines running debian but different architectures (arm and x86) and received the same results.

    Also, to make sure I had the latest ffmeg, I compiled it on each system using this page... Compile FFmpeg on Ubuntu, Debian, or Mint

    Thank you for your time.

  • avfilter/avfilter : Add numbers of (in|out)pads directly to AVFilter

    12 août 2021, par Andreas Rheinhardt
    avfilter/avfilter : Add numbers of (in|out)pads directly to AVFilter
    

    Up until now, an AVFilter's lists of input and output AVFilterPads
    were terminated by a sentinel and the only way to get the length
    of these lists was by using avfilter_pad_count(). This has two
    drawbacks : first, sizeof(AVFilterPad) is not negligible
    (i.e. 64B on 64bit systems) ; second, getting the size involves
    a function call instead of just reading the data.

    This commit therefore changes this. The sentinels are removed and new
    private fields nb_inputs and nb_outputs are added to AVFilter that
    contain the number of elements of the respective AVFilterPad array.

    Given that AVFilter.(in|out)puts are the only arrays of zero-terminated
    AVFilterPads an API user has access to (AVFilterContext.(in|out)put_pads
    are not zero-terminated and they already have a size field) the argument
    to avfilter_pad_count() is always one of these lists, so it just has to
    find the filter the list belongs to and read said number. This is slower
    than before, but a replacement function that just reads the internal numbers
    that users are expected to switch to will be added soon ; and furthermore,
    avfilter_pad_count() is probably never called in hot loops anyway.

    This saves about 49KiB from the binary ; notice that these sentinels are
    not in .bss despite being zeroed : they are in .data.rel.ro due to the
    non-sentinels.

    Reviewed-by : Nicolas George <george@nsup.org>
    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libavfilter/aeval.c
    • [DH] libavfilter/af_acontrast.c
    • [DH] libavfilter/af_acopy.c
    • [DH] libavfilter/af_acrossover.c
    • [DH] libavfilter/af_acrusher.c
    • [DH] libavfilter/af_adeclick.c
    • [DH] libavfilter/af_adelay.c
    • [DH] libavfilter/af_adenorm.c
    • [DH] libavfilter/af_aderivative.c
    • [DH] libavfilter/af_aecho.c
    • [DH] libavfilter/af_aemphasis.c
    • [DH] libavfilter/af_aexciter.c
    • [DH] libavfilter/af_afade.c
    • [DH] libavfilter/af_afftdn.c
    • [DH] libavfilter/af_afftfilt.c
    • [DH] libavfilter/af_aformat.c
    • [DH] libavfilter/af_afreqshift.c
    • [DH] libavfilter/af_afwtdn.c
    • [DH] libavfilter/af_agate.c
    • [DH] libavfilter/af_aiir.c
    • [DH] libavfilter/af_alimiter.c
    • [DH] libavfilter/af_amerge.c
    • [DH] libavfilter/af_amix.c
    • [DH] libavfilter/af_amultiply.c
    • [DH] libavfilter/af_anequalizer.c
    • [DH] libavfilter/af_anlmdn.c
    • [DH] libavfilter/af_anlms.c
    • [DH] libavfilter/af_anull.c
    • [DH] libavfilter/af_apad.c
    • [DH] libavfilter/af_aphaser.c
    • [DH] libavfilter/af_apulsator.c
    • [DH] libavfilter/af_aresample.c
    • [DH] libavfilter/af_arnndn.c
    • [DH] libavfilter/af_asetnsamples.c
    • [DH] libavfilter/af_asetrate.c
    • [DH] libavfilter/af_ashowinfo.c
    • [DH] libavfilter/af_asoftclip.c
    • [DH] libavfilter/af_asr.c
    • [DH] libavfilter/af_astats.c
    • [DH] libavfilter/af_asubboost.c
    • [DH] libavfilter/af_asupercut.c
    • [DH] libavfilter/af_atempo.c
    • [DH] libavfilter/af_axcorrelate.c
    • [DH] libavfilter/af_biquads.c
    • [DH] libavfilter/af_bs2b.c
    • [DH] libavfilter/af_channelmap.c
    • [DH] libavfilter/af_channelsplit.c
    • [DH] libavfilter/af_chorus.c
    • [DH] libavfilter/af_compand.c
    • [DH] libavfilter/af_compensationdelay.c
    • [DH] libavfilter/af_crossfeed.c
    • [DH] libavfilter/af_crystalizer.c
    • [DH] libavfilter/af_dcshift.c
    • [DH] libavfilter/af_deesser.c
    • [DH] libavfilter/af_drmeter.c
    • [DH] libavfilter/af_dynaudnorm.c
    • [DH] libavfilter/af_earwax.c
    • [DH] libavfilter/af_extrastereo.c
    • [DH] libavfilter/af_firequalizer.c
    • [DH] libavfilter/af_flanger.c
    • [DH] libavfilter/af_haas.c
    • [DH] libavfilter/af_hdcd.c
    • [DH] libavfilter/af_headphone.c
    • [DH] libavfilter/af_join.c
    • [DH] libavfilter/af_ladspa.c
    • [DH] libavfilter/af_loudnorm.c
    • [DH] libavfilter/af_lv2.c
    • [DH] libavfilter/af_mcompand.c
    • [DH] libavfilter/af_pan.c
    • [DH] libavfilter/af_replaygain.c
    • [DH] libavfilter/af_rubberband.c
    • [DH] libavfilter/af_sidechaincompress.c
    • [DH] libavfilter/af_silencedetect.c
    • [DH] libavfilter/af_silenceremove.c
    • [DH] libavfilter/af_sofalizer.c
    • [DH] libavfilter/af_speechnorm.c
    • [DH] libavfilter/af_stereotools.c
    • [DH] libavfilter/af_stereowiden.c
    • [DH] libavfilter/af_superequalizer.c
    • [DH] libavfilter/af_surround.c
    • [DH] libavfilter/af_tremolo.c
    • [DH] libavfilter/af_vibrato.c
    • [DH] libavfilter/af_volume.c
    • [DH] libavfilter/af_volumedetect.c
    • [DH] libavfilter/asink_anullsink.c
    • [DH] libavfilter/asrc_afirsrc.c
    • [DH] libavfilter/asrc_anoisesrc.c
    • [DH] libavfilter/asrc_anullsrc.c
    • [DH] libavfilter/asrc_flite.c
    • [DH] libavfilter/asrc_hilbert.c
    • [DH] libavfilter/asrc_sinc.c
    • [DH] libavfilter/asrc_sine.c
    • [DH] libavfilter/avf_abitscope.c
    • [DH] libavfilter/avf_ahistogram.c
    • [DH] libavfilter/avf_aphasemeter.c
    • [DH] libavfilter/avf_avectorscope.c
    • [DH] libavfilter/avf_showcqt.c
    • [DH] libavfilter/avf_showfreqs.c
    • [DH] libavfilter/avf_showspatial.c
    • [DH] libavfilter/avf_showspectrum.c
    • [DH] libavfilter/avf_showvolume.c
    • [DH] libavfilter/avf_showwaves.c
    • [DH] libavfilter/avfilter.c
    • [DH] libavfilter/avfilter.h
    • [DH] libavfilter/buffersink.c
    • [DH] libavfilter/buffersrc.c
    • [DH] libavfilter/f_bench.c
    • [DH] libavfilter/f_cue.c
    • [DH] libavfilter/f_drawgraph.c
    • [DH] libavfilter/f_ebur128.c
    • [DH] libavfilter/f_graphmonitor.c
    • [DH] libavfilter/f_interleave.c
    • [DH] libavfilter/f_loop.c
    • [DH] libavfilter/f_metadata.c
    • [DH] libavfilter/f_perms.c
    • [DH] libavfilter/f_realtime.c
    • [DH] libavfilter/f_reverse.c
    • [DH] libavfilter/f_segment.c
    • [DH] libavfilter/f_select.c
    • [DH] libavfilter/f_sendcmd.c
    • [DH] libavfilter/f_sidedata.c
    • [DH] libavfilter/f_zmq.c
    • [DH] libavfilter/fifo.c
    • [DH] libavfilter/internal.h
    • [DH] libavfilter/setpts.c
    • [DH] libavfilter/settb.c
    • [DH] libavfilter/split.c
    • [DH] libavfilter/trim.c
    • [D
  • Assertion desc failed at src/libswscale/swscale_internal.h:764

    18 avril 2022, par harsh bhatnagar

    I am trying to implement the ffmpeg code written in C++ language .

    &#xA;

    Tutorial link : https://www.youtube.com/watch?v=W6Yx3injNZs

    &#xA;

    Github Reference : https://github.com/bartjoyce/video-app/tree/master/src

    &#xA;

    When pass the filename or Rtsp Link in the avformat_open_input funcion. It shows the strange bug not able understand the issue in the C++ code or camera setting issue .

    &#xA;

    // av_err2str returns a temporary array. This doesn&#x27;t work in gcc.&#xA;// This function can be used as a replacement for av_err2str.&#xA;#include "video_reader.hpp"&#xA;static const char* av_make_error(int errnum) {&#xA;    static char str[AV_ERROR_MAX_STRING_SIZE];&#xA;    memset(str, 0, sizeof(str));&#xA;    return av_make_error_string(str, AV_ERROR_MAX_STRING_SIZE, errnum);&#xA;}&#xA;&#xA;static AVPixelFormat correct_for_deprecated_pixel_format(AVPixelFormat pix_fmt) {&#xA;    // Fix swscaler deprecated pixel format warning&#xA;    // (YUVJ has been deprecated, change pixel format to regular YUV)&#xA;    switch (pix_fmt) {&#xA;        case AV_PIX_FMT_YUVJ420P: return AV_PIX_FMT_YUV420P;&#xA;        case AV_PIX_FMT_YUVJ422P: return AV_PIX_FMT_YUV422P;&#xA;        case AV_PIX_FMT_YUVJ444P: return AV_PIX_FMT_YUV444P;&#xA;        case AV_PIX_FMT_YUVJ440P: return AV_PIX_FMT_YUV440P;&#xA;        default:                  return pix_fmt;&#xA;    }&#xA;}&#xA;&#xA;bool video_reader_open(VideoReaderState* state, const char* filename) {&#xA;&#xA;    // Unpack members of state&#xA;    auto&amp; width = state->width;&#xA;    auto&amp; height = state->height;&#xA;    auto&amp; time_base = state->time_base;&#xA;    auto&amp; av_format_ctx = state->av_format_ctx;&#xA;    auto&amp; av_codec_ctx = state->av_codec_ctx;&#xA;    auto&amp; video_stream_index = state->video_stream_index;&#xA;    auto&amp; av_frame = state->av_frame;&#xA;    auto&amp; av_packet = state->av_packet;&#xA;&#xA;    // Open the file using libavformat&#xA;    av_format_ctx = avformat_alloc_context();&#xA;    if (!av_format_ctx) {&#xA;        printf("Couldn&#x27;t created AVFormatContext\n");&#xA;        return false;&#xA;    }&#xA;&#xA;    if (avformat_open_input(&amp;av_format_ctx, filename, NULL, NULL) != 0) {&#xA;        printf("Couldn&#x27;t open video file\n");&#xA;        return false;&#xA;    }&#xA;&#xA;    // Find the first valid video stream inside the file&#xA;    video_stream_index = -1;&#xA;    AVCodecParameters* av_codec_params;&#xA;    AVCodec* av_codec;&#xA;    for (int i = 0; i &lt; av_format_ctx->nb_streams; &#x2B;&#x2B;i) {&#xA;        av_codec_params = av_format_ctx->streams[i]->codecpar;&#xA;        av_codec = avcodec_find_decoder(av_codec_params->codec_id);&#xA;        if (!av_codec) {&#xA;            continue;&#xA;        }&#xA;        if (av_codec_params->codec_type == AVMEDIA_TYPE_VIDEO) {&#xA;            video_stream_index = i;&#xA;            width = av_codec_params->width;&#xA;            height = av_codec_params->height;&#xA;            time_base = av_format_ctx->streams[i]->time_base;&#xA;            break;&#xA;        }&#xA;    }&#xA;    if (video_stream_index == -1) {&#xA;        printf("Couldn&#x27;t find valid video stream inside file\n");&#xA;        return false;&#xA;    }&#xA;&#xA;    // Set up a codec context for the decoder&#xA;    av_codec_ctx = avcodec_alloc_context3(av_codec);&#xA;    if (!av_codec_ctx) {&#xA;        printf("Couldn&#x27;t create AVCodecContext\n");&#xA;        return false;&#xA;    }&#xA;    if (avcodec_parameters_to_context(av_codec_ctx, av_codec_params) &lt; 0) {&#xA;        printf("Couldn&#x27;t initialize AVCodecContext\n");&#xA;        return false;&#xA;    }&#xA;    if (avcodec_open2(av_codec_ctx, av_codec, NULL) &lt; 0) {&#xA;        printf("Couldn&#x27;t open codec\n");&#xA;        return false;&#xA;    }&#xA;&#xA;    av_frame = av_frame_alloc();&#xA;    if (!av_frame) {&#xA;        printf("Couldn&#x27;t allocate AVFrame\n");&#xA;        return false;&#xA;    }&#xA;    av_packet = av_packet_alloc();&#xA;    if (!av_packet) {&#xA;        printf("Couldn&#x27;t allocate AVPacket\n");&#xA;        return false;&#xA;    }&#xA;&#xA;    return true;&#xA;}&#xA;&#xA;bool video_reader_read_frame(VideoReaderState* state, uint8_t* frame_buffer, int64_t* pts) {&#xA;&#xA;    // Unpack members of state&#xA;    auto&amp; width = state->width;&#xA;    auto&amp; height = state->height;&#xA;    auto&amp; av_format_ctx = state->av_format_ctx;&#xA;    auto&amp; av_codec_ctx = state->av_codec_ctx;&#xA;    auto&amp; video_stream_index = state->video_stream_index;&#xA;    auto&amp; av_frame = state->av_frame;&#xA;    auto&amp; av_packet = state->av_packet;&#xA;    auto&amp; sws_scaler_ctx = state->sws_scaler_ctx;&#xA;&#xA;    // Decode one frame&#xA;    int response;&#xA;    while (av_read_frame(av_format_ctx, av_packet) >= 0) {&#xA;        if (av_packet->stream_index != video_stream_index) {&#xA;            av_packet_unref(av_packet);&#xA;            continue;&#xA;        }&#xA;&#xA;        response = avcodec_send_packet(av_codec_ctx, av_packet);&#xA;        if (response &lt; 0) {&#xA;            printf("Failed to decode packet: %s\n", av_make_error(response));&#xA;            return false;&#xA;        }&#xA;&#xA;        response = avcodec_receive_frame(av_codec_ctx, av_frame);&#xA;        if (response == AVERROR(EAGAIN) || response == AVERROR_EOF) {&#xA;            av_packet_unref(av_packet);&#xA;            continue;&#xA;        } else if (response &lt; 0) {&#xA;            printf("Failed to decode packet: %s\n", av_make_error(response));&#xA;            return false;&#xA;        }&#xA;&#xA;        av_packet_unref(av_packet);&#xA;        break;&#xA;    }&#xA;&#xA;    *pts = av_frame->pts;&#xA;    &#xA;    // Set up sws scaler&#xA;    if (!sws_scaler_ctx) {&#xA;        auto source_pix_fmt = correct_for_deprecated_pixel_format(av_codec_ctx->pix_fmt);&#xA;        sws_scaler_ctx = sws_getContext(width, height, source_pix_fmt,&#xA;                                        width, height, AV_PIX_FMT_RGB0,&#xA;                                        SWS_BILINEAR, NULL, NULL, NULL);&#xA;    }&#xA;    if (!sws_scaler_ctx) {&#xA;        printf("Couldn&#x27;t initialize sw scaler\n");&#xA;        return false;&#xA;    }&#xA;&#xA;    uint8_t* dest[4] = { frame_buffer, NULL, NULL, NULL };&#xA;    int dest_linesize[4] = { width * 4, 0, 0, 0 };&#xA;    sws_scale(sws_scaler_ctx, av_frame->data, av_frame->linesize, 0, av_frame->height, dest, dest_linesize);&#xA;&#xA;    return true;&#xA;}&#xA;&#xA;bool video_reader_seek_frame(VideoReaderState* state, int64_t ts) {&#xA;    &#xA;    // Unpack members of state&#xA;    auto&amp; av_format_ctx = state->av_format_ctx;&#xA;    auto&amp; av_codec_ctx = state->av_codec_ctx;&#xA;    auto&amp; video_stream_index = state->video_stream_index;&#xA;    auto&amp; av_packet = state->av_packet;&#xA;    auto&amp; av_frame = state->av_frame;&#xA;    &#xA;    av_seek_frame(av_format_ctx, video_stream_index, ts, AVSEEK_FLAG_BACKWARD);&#xA;&#xA;    // av_seek_frame takes effect after one frame, so I&#x27;m decoding one here&#xA;    // so that the next call to video_reader_read_frame() will give the correct&#xA;    // frame&#xA;    int response;&#xA;    while (av_read_frame(av_format_ctx, av_packet) >= 0) {&#xA;        if (av_packet->stream_index != video_stream_index) {&#xA;            av_packet_unref(av_packet);&#xA;            continue;&#xA;        }&#xA;&#xA;        response = avcodec_send_packet(av_codec_ctx, av_packet);&#xA;        if (response &lt; 0) {&#xA;            printf("Failed to decode packet: %s\n", av_make_error(response));&#xA;            return false;&#xA;        }&#xA;&#xA;        response = avcodec_receive_frame(av_codec_ctx, av_frame);&#xA;        if (response == AVERROR(EAGAIN) || response == AVERROR_EOF) {&#xA;            av_packet_unref(av_packet);&#xA;            continue;&#xA;        } else if (response &lt; 0) {&#xA;            printf("Failed to decode packet: %s\n", av_make_error(response));&#xA;            return false;&#xA;        }&#xA;&#xA;        av_packet_unref(av_packet);&#xA;        break;&#xA;    }&#xA;&#xA;    return true;&#xA;}&#xA;&#xA;void video_reader_close(VideoReaderState* state) {&#xA;    sws_freeContext(state->sws_scaler_ctx);&#xA;    avformat_close_input(&amp;state->av_format_ctx);&#xA;    avformat_free_context(state->av_format_ctx);&#xA;    av_frame_free(&amp;state->av_frame);&#xA;    av_packet_free(&amp;state->av_packet);&#xA;    avcodec_free_context(&amp;state->av_codec_ctx);&#xA;}&#xA;

    &#xA;

    Bug :

    &#xA;

    [rtsp @ 0x55def0b00ac0] getaddrinfo(): Name or service not known&#xA;[rtsp @ 0x55def0b00ac0] max delay reached. need to consume packet&#xA;[rtsp @ 0x55def0b00ac0] RTP: missed 10 packets&#xA;Assertion desc failed at src/libswscale/swscale_internal.h:764&#xA;Aborted (core dumped)&#xA;

    &#xA;