Recherche avancée

Médias (91)

Autres articles (73)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Menus personnalisés

    14 novembre 2010, par

    MediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
    Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
    Menus créés à l’initialisation du site
    Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)

Sur d’autres sites (6658)

  • amrwbdec_mips : Add missing ff_ prefix

    29 janvier 2016, par Timothy Gu
    amrwbdec_mips : Add missing ff_ prefix
    
    • [DH] libavcodec/mips/amrwbdec_mips.c
    • [DH] libavcodec/mips/amrwbdec_mips.h
  • ffmpeg audio decoding providing half the data from original audio in C++

    3 mai 2016, par hockeyislife

    I am trying to write a simple program in C++ that captures audio from a microphone on the computer and encodes it into mp2. Which I was successful in doing, I verified this by saving a mp2 audio file and playing it back in VLC.

    I then decided to see if I could take the encoded audio packets from ffmpeg and convert them back to raw PCM format, and this is where I am having trouble.

    So below is my decoder settings :

    AVCodecID audio_codec_id = AV_CODEC_ID_MP2;
    AVCodec * audio_decodec = avcodec_find_decoder(audio_codec_id);
    if (!audio_decodec)
    {
       return -1;
    }
    audio_decodec_ctx = avcodec_alloc_context3(audio_decodec);
    audio_decodec_ctx->bit_rate = 64000;
    audio_decodec_ctx->channels = 2;
    audio_decodec_ctx->channel_layout = AV_CH_LAYOUT_STEREO;
    audio_decodec_ctx->sample_rate = 44100;
    audio_decodec_ctx->sample_fmt = AV_SAMPLE_FMT_S16;

    int retval;
    if ((retval = avcodec_open2(audio_decodec_ctx, audio_decodec, NULL)) < 0)
    {
       return -1;
    }

    Here is my encoder settings, which I made identical :

    AVCodecID audio_codec_id = AV_CODEC_ID_MP2;
    AVCodec* audio_codec = avcodec_find_encoder(audio_codec_id);
    if (!audio_codec)
    {
       return -1;
    }

    // Initialize codec.
    AVCodecContext* audio_codec_ctx = avcodec_alloc_context3(audio_codec);
    audio_codec_ctx->bit_rate = 64000;
    audio_codec_ctx->channels = 2;
    audio_codec_ctx->channel_layout = AV_CH_LAYOUT_STEREO;
    audio_codec_ctx->sample_rate = 44100;
    audio_codec_ctx->sample_fmt = AV_SAMPLE_FMT_S16;

    int audio_retval;
    if ((audio_retval = avcodec_open2(audio_codec_ctx, audio_codec, NULL)) < 0)
    {
       return -1;
    }

    As stated previously, the encoding of the audio signal works perfectly, when I try to take the packets that are encoded and attempt to convert them back I am getting only half the data.

    avcodec_encode_audio2(audio_codec_ctx, &audio_pkt, pOutAudioFrame, &got_output);

    if (got_output)
    {
       fwrite(audio_pkt.data, 1, audio_pkt.size, f); // MP2 file write which, sounds very nice, which leads me to believe encoding is being done correctly
       AVFrame * audio_frame_decode = av_frame_alloc();
       avcodec_get_frame_defaults(audio_frame_decode);
       int frame_finished = 0;

       avcodec_decode_audio4(audio_decodec_ctx, audio_frame_decode, &frame_finished, &audio_pkt );
       if (frame_finished)
       {
           decoded_size += audio_frame_decode->linesize[0];  // only getting 2304 bytes
           av_free_packet(&audio_pkt);
       }
    }  

    The amount of PCM data being taken is 4608 but after decoding the encoder version I am getting only 2304 bytes. Seems like I have something incorrect but I can’t put my finger on it. Any help would be greatly appreciated.

    Thanks in advance.

  • ffmpeg concat converts multiple videos to chipmunk version with half the video silence

    27 mai 2020, par inselmensch

    i try to concat multiple videos to one video and add an background music to it.

    



    for some reason the background music is perfectly added to the output video but the audio of each part of the output is speed up to a chipmunk version of the video itself. this results in an output video of 7 minutes with about 5 minutes of silence since everything is so fast that all the audio finishes after about 2 minutes.

    



    my command is :

    



    ffmpeg -safe 0 -i videolist.ffconcat -i bg_loop.mp3 -y -filter_complex "[1:0]volume=0.3[a1];[0:a][a1]amix=inputs=2" -vcodec libx264 -r 25 -filter:v scale=w=1920:h=1080 -map 0:v:0 output.mp4

    



    i tried to remove the background music (since i wasn't able to loop it through the video i thought maybe that's the issue) and still.. all the audio of the video clips is still speed up resulting in chaotic audio at the beginning and silence at the end.

    



    my video list looks like this :

    



    ffconcat version 1.0
file intro.mp4
file clip-x.mp4
file clip-y.mp4
file clip-x.mp4
file clip-y.mp4
[... and so on]


    



    i hope somebody can tell me what i'm doing wrong here (and maybe how to adjust my command to loop the background music through all the clips)

    



    i googled a bit and found the adjustment of my command to add amix=inputs=2:duration=first but that doesn't do the trick and if i add duration=shortest or duration=longest nothing changes the output audio