Recherche avancée

Médias (91)

Autres articles (99)

  • Soumettre bugs et patchs

    10 avril 2011

    Un logiciel n’est malheureusement jamais parfait...
    Si vous pensez avoir mis la main sur un bug, reportez le dans notre système de tickets en prenant bien soin de nous remonter certaines informations pertinentes : le type de navigateur et sa version exacte avec lequel vous avez l’anomalie ; une explication la plus précise possible du problème rencontré ; si possibles les étapes pour reproduire le problème ; un lien vers le site / la page en question ;
    Si vous pensez avoir résolu vous même le bug (...)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (13118)

  • avcodec/cbs_mpeg2 : Simplify splitting fragment

    4 février 2022, par Andreas Rheinhardt
    avcodec/cbs_mpeg2 : Simplify splitting fragment
    

    avpriv_find_start_code() supports non-contiguous buffers
    by maintaining a state that allows to find start codes
    that span across multiple buffers ; a consequence thereof
    is that avpriv_find_start_code() is given a zero-sized
    buffer, it does not modify this state, so that it appears
    as if a start code was found if the state contained a start code.

    This can e.g. happen with Sequence End units in MPEG-2 and
    to counter this, cbs_mpeg2_split_fragment() reset the state
    when it has already encountered the end of the fragment
    in order to add the last unit (if it is only of the form 00 00 01 xy)
    only once ; it also used a flag to set whether this is the final unit.

    Yet this can be improved by simply resetting state unconditionally
    (thereby avoiding a branch) ; the flag can be removed by just checking
    whether we have a valid start code (of the next unit to add)
    at the end.

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libavcodec/cbs_mpeg2.c
  • Exception thrown at 0x7C2E6005 (swscale-5.dll) in Video_playing.exe : 0xC0000005 : Access violation reading location 0xCCCCCD04 [closed]

    11 mai 2020, par jatin yadav

    Trying to play a video using GLFW and FFmpeg on visual studio 2019 on windows 10.

    &#xA;&#xA;

    Exception is thrown at sws_scale(sws_scaler_ctx, av_frame->data, av_frame->linesize, 0, av_frame->height, dest, dest_linesize) ; in the code. Don't know why this is occurred. Please Help !!

    &#xA;&#xA;

    #include "video_reader.h"&#xA;#include &#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", 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;        }&#xA;        else if (response &lt; 0) {&#xA;            printf("Failed to decode packet: %s\n", 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;        sws_scaler_ctx = sws_getContext(width, height, av_codec_ctx->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;

  • How to accurately detect the start of the main beat and soundtracks in diverse audio tracks ?

    18 juin 2024, par SnoofFloof

    I'm working on a project where I need to edit soundtracks. The challenge is to detect when the main beat and melody of any given soundtrack is properly developed. I am certain there is better terminology to describe what I am aiming for, but ideally, I want to skip the "build-up" and immediately have the song starting at the "main part". This needs to work for various songs across different genres, which often have different structures and onset patterns, making it difficult to streamline the process.

    &#xA;

    For example :

    &#xA;

    https://www.youtube.com/watch?v=P77CNtHrnmI -> I would want to my code to identify the onset at 0:24

    &#xA;

    https://www.youtube.com/watch?v=OOsPCR8SyRo -> Onset detection at 0:12

    &#xA;

    https://www.youtube.com/watch?v=XKiZBlelIzc -> Onset detection at 0:19

    &#xA;

    I've tried using librosa to analyze the onset strength and detect beats, but the current implementation either detects the very beginning of the song or fails to consistently identify when the beat is fully developed.

    &#xA;

    This was my approach ;

    &#xA;

    def analyze_and_edit_audio(input_file, output_file):&#xA;    y, sr = librosa.load(input_file)&#xA;    tempo, beat_frames = librosa.beat.beat_track(y=y, sr=sr)&#xA;    beat_times = librosa.frames_to_time(beat_frames, sr=sr)&#xA;    main_beat_start = beat_times[0]&#xA;

    &#xA;

    I have very little experience with librosa/audio editing, so I would appreciate any suggestions you might have !

    &#xA;