Recherche avancée

Médias (1)

Mot : - Tags -/ticket

Autres articles (98)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Les sons

    15 mai 2013, par
  • Gestion de la ferme

    2 mars 2010, par

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

Sur d’autres sites (6408)

  • ffmpeg start_time is negative

    8 décembre 2016, par Alex Bollbach

    I’m using ffmpeg to segment a video by start/end times. For example, I have a set of time [1], and I’d call ffmpeg 3 times here to create the three 2 second videos at times 0, 2, and 4.

    My problem is that these times (which are correct) are not correctly segmenting the video. When I inspect the stats of the video with ffprobe -i test.mov -show_format, I noticed start_time=-0.381044. I also know that this seems to be caused by trimming a video in QuickTime to produce this video. In order to correct this, I must add (start + 0.381044) somewhere in my code, and the output is fine.

    So, why is the start_time set to a negative value by the quicktime trimming ? How can I set start_time=0, so my code can work without the + 0.381044 ?

  • C++ FFmpeg pitch issue

    24 janvier 2016, par David Andrei Norgren

    I’m using swr_convert to lower/raise the pitch of incoming audio and store it in a .mp3. To change the pitch, I’m dividing the out sample rate by a factor. However, the resulting audio is slightly distorted when this factor is anything other than 1. Here’s my conversion code :

    ...

    // Set up resample context
    swrContext = swr_alloc();
    if (!swrContext)
       throw -15;

    av_opt_set_int(swrContext, "in_channel_count", codecContext->channels, 0);
    av_opt_set_int(swrContext, "in_channel_layout", codecContext->channel_layout, 0);
    av_opt_set_int(swrContext, "in_sample_rate", codecContext->sample_rate, 0);
    av_opt_set_sample_fmt(swrContext, "in_sample_fmt", codecContext->sample_fmt, 0);

    av_opt_set_int(swrContext, "out_channel_count", STREAM_AUDIO_CHANNELS, 0);
    av_opt_set_int(swrContext, "out_channel_layout", STREAM_AUDIO_CHANNEL_LAYOUT, 0);
    av_opt_set_int(swrContext, "out_sample_rate", STREAM_AUDIO_SAMPLE_RATE / pitch, 0);
    av_opt_set_sample_fmt(swrContext, "out_sample_fmt", STREAM_AUDIO_SAMPLE_FORMAT_GM, 0);

    if (swr_init(swrContext))
       throw -16;

    // Allocate re-usable frame
    frameDecoded = av_frame_alloc();
    if (!frameDecoded)
       throw -17;

    frameDecoded->format = codecContext->sample_fmt;
    frameDecoded->channel_layout = codecContext->channel_layout;
    frameDecoded->channels = codecContext->channels;
    frameDecoded->sample_rate = codecContext->sample_rate;

    // Load frames
    inPacket.data = NULL;
    inPacket.size = 0;

    int gotFrame, samples = 0;

    while (av_read_frame(formatContext, &inPacket) >= 0) {

       if (inPacket.stream_index != streamId)
           continue;

       if (avcodec_decode_audio4(codecContext, frameDecoded, &gotFrame, &inPacket) < 0)
           throw -18;

       if (!gotFrame)
           continue;

       // Begin conversion
       if (swr_convert(swrContext, NULL, 0, (const uint8_t **)frameDecoded->data, frameDecoded->nb_samples) < 0)
           throw -19;

       while (swr_get_out_samples(swrContext, 0) >= RAW_AUDIO_FRAME_SIZE) {

           // Allocate data
           uint8_t **convertedData = NULL;
           if (av_samples_alloc_array_and_samples(&convertedData, NULL, STREAM_AUDIO_CHANNELS, RAW_AUDIO_FRAME_SIZE, STREAM_AUDIO_SAMPLE_FORMAT_GM, 0) < 0)
               throw -20;

           // Convert
           if (swr_convert(swrContext, convertedData, RAW_AUDIO_FRAME_SIZE, NULL, 0) < 0)
               throw -21;

           // Calculate buffer size
           size_t bufferSize = av_samples_get_buffer_size(NULL, STREAM_AUDIO_CHANNELS, RAW_AUDIO_FRAME_SIZE, STREAM_AUDIO_SAMPLE_FORMAT_GM, 0);
           if (bufferSize < 0)
               throw -22;

           fwrite(convertedData[0], 1, bufferSize, outStream);
           av_free(convertedData);
       }
    }

    ...

    STREAM_AUDIO_SAMPLE_RATE is defined as 44100.
    Here’s the entire program if it helps : http://pastebin.com/5akEwNg4

    The program generates a .mp3 with 25 notes that decrease in pitch.
    Here’s an example of the distortion : http://www.stuffbydavid.com/dl/30256478.mp3

    Can you spot anything incorrect about my conversion, or is my method of changing the pitch incorrect ? Is there another way ?

  • Evolution #3284 (Nouveau) : changer le vert de l’espace privé par defaut

    12 octobre 2014, par Ben .

    Je propose de changer le vert par défaut et de passer au orange (ou une autre couleur) . C’est purement psychologique et c’est histoire de faire une différence pour se dire immédiatement tiens il y a une nouvelle couleur .