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

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Utilisation et configuration du script

    19 janvier 2011, par

    Informations spécifiques à la distribution Debian
    Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
    Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
    Récupération du script
    Le script d’installation peut être récupéré de deux manières différentes.
    Via svn en utilisant la commande pour récupérer le code source à jour :
    svn co (...)

Sur d’autres sites (11566)

  • Is there a way to include a transition video when using ffmpeg's select filter ?

    19 février 2021, par Tim

    I wanted to take some segments of an input video and make a highlight reel automatically using ffmpeg. I was originally experimenting with trimming and concating but it was difficult because the audio was falling out of sync and also I have a variable number of highlights that I want.

    


    I discovered from the top comment here that the 'select' filter is very powerful. I have a python program that inputs all the parts I want selected into the command and run it in the terminal and it works perfect. Only issue is that I want a quick transition video to play in between each of these highlights. Is this not possible with select ? Do I have to return to using trim and concat ? Thank you !

    


    Edit : for reference, here is an example ffmpeg command I am running

    


    ffmpeg -y -i video.mp4 -i audio.mp4 -vf "select='between(t,56,69)+between(t,60,135)+between(t,73,132)+between(t,152,163)+between(t,251,278)+between(t,600,700)+between(t,774,872)', setpts=N/FRAME_RATE/TB " -af "aselect='between(t,56,69)+between(t,60,135)+between(t,73,132)+between(t,152,163)+between(t,251,278)+between(t,600,700)+between(t,774,872)',asetpts=N/SR/TB" output.mp4


    


  • FFmpeg : How to apply volume filter fast in ffmpeg

    29 novembre 2018, par Prashant_Sarin

    i am using below code for applying volume filter in ffmpeg, but its taking too long.Let’s say the audio itself is for 5 minutes then applying this filter takes 3 minutes. Can someone help to speed up the process.

    my command is as :

    var command = "-i $audioPath -af volume=enable='between(t,5,10)':volume=0.25,volume=enable='between(t,15,20)':volume=0.25 $outputFile"

    logs are :

    2018-11-29 15:17:16.912 17250-17250/com.example.prashants.ffmpegtest
    D/com.example.prashants.ffmpegtest.service.AudioOverlayService: onProgress -
    ---AudioVolume---- video:0kB audio:3030kB subtitle:0kB other streams:0kB
    global headers:0kB muxing overhead: 1.236199%
    2018-11-29 15:17:16.913 17250-17250/com.example.prashants.ffmpegtest
    D/com.example.prashants.ffmpegtest.service.AudioOverlayService: onProgress -
    ---AudioVolume---- bench: utime=168.977s
    2018-11-29 15:17:16.915 17250-17250/com.example.prashants.ffmpegtest
    D/com.example.prashants.ffmpegtest.service.AudioOverlayService: onProgress -
    ---AudioVolume---- bench: maxrss=65116kB
    2018-11-29 15:17:16.917 17250-17250/com.example.prashants.ffmpegtest
    D/com.example.prashants.ffmpegtest.service.AudioOverlayService: onProgress -
    ---AudioVolume---- [aac @ 0xaf5e4400] Qavg: 15833.816
    2018-11-29 15:17:16.920 17250-17250/com.example.prashants.ffmpegtest
    D/com.example.prashants.ffmpegtest.service.AudioOverlayService: AudioVolume
    success--------- -benchmark -threads 4 -i
    /storage/emulated/0/FFmpegTest/looped.m4a -af
    volume=enable='between(t,5,10)+between(t,15,20)':volume=0.25:eval=frame
    /storage/emulated/0/FFmpegTest/filtered_audio.m4a

    that’s the log from my android studio console

  • FFMPEG C++ Volume Filter

    18 mai 2020, par Hrethric

    I seem to be having a bit of trouble using FFMPEG audio filters in C++ code. If I only have "abuffer" and "abuffersink" filters, and grab the audio frame from the filtergraph, it sounds perfect. Once I add another filter into the graph (in this case, it's a "volume" filter), there is a lot of noise introduced. I can't figure out what would be causing this.

    



    This isn't the case for all filters - "aecho" works just fine, for example. Any thoughts ? Here's the relevant code :

    



    Filter Creation

    



    char args[512];
int ret = 0;

_filterGraph = avfilter_graph_alloc();

// abuffer must be the first filter used -- it feeds data into the filter graph
/******************
ABUFFER FILTER
*******************/
_abufferFilter = avfilter_get_by_name("abuffer");

/*buffer audio source : decoded frames will be
inserted here. */
if (!_inAudioCodecContext->channel_layout)
{
    _inAudioCodecContext->channel_layout = av_get_default_channel_layout(_inAudioStream->codec->channels);
}

snprintf(args, sizeof(args),
    "sample_rate=%d:sample_fmt=%s:channel_layout=0x%" PRIx64,
    _inAudioCodecContext->sample_rate,
    av_get_sample_fmt_name(_inAudioCodecContext->sample_fmt),
    _inAudioCodecContext->channel_layout);

ret = avfilter_graph_create_filter(&_abufferFilterCtx, _abufferFilter, "abuffer", args, NULL, _filterGraph);
char *errorCode = new char[256];
av_strerror(ret, errorCode, 256);

/******************
VOLUME FILTER
*******************/
snprintf(args, sizeof(args),
    "%f",
    2.0f);
_volumeFilter = avfilter_get_by_name("volume");
ret = avfilter_graph_create_filter(&_volumeFilterCtx, _volumeFilter, "volume", args, NULL, _filterGraph);
char *errorCode = new char[256];
av_strerror(ret, errorCode, 256);

/******************
ABUFFERSINK FILTER
*******************/
// abuffersink must be the last filter used -- it gets data out of the filter graph
_abuffersinkFilter = avfilter_get_by_name("abuffersink");
ret = avfilter_graph_create_filter(&_abufferSinkFilterCtx, _abuffersinkFilter, "abuffersink", NULL, NULL, _filterGraph);

// Link the source buffer to the volume filter
// If I link this to the sink buffer and comment out the next line
// Audio sounds perfect
ret = avfilter_link(_abufferFilterCtx, 0, _volumeFilterCtx, 0);
// Link the volume filter to the sink buffer
ret = avfilter_link(_volumeFilterCtx, 0, _abufferSinkFilterCtx, 0);
ret = avfilter_graph_config(_filterGraph, NULL);

return ret;


    



    Read frames from buffer

    



    // Read a frame from the audio stream/file
ret = av_read_frame(_inFormatContext, &_packet);
int frameFinished = 0;
// Decode the resulting packet into a single frame for processing
int length = avcodec_decode_audio4(_inAudioCodecContext, _audioFrame, &frameFinished, &_packet);

if (frameFinished)
{
    // Insert the frame into the source filter
    ret = av_buffersrc_write_frame(_abufferFilterCtx, _audioFrame);
    while (true)
    {
        // Pull a frame from the filter graph
        ret = av_buffersink_get_frame(_abufferSinkFilterCtx, _audioFrame);

        // EOF or EAGAIN is expected when filtering frames, set the error to "0"
        if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)
        {
            ret = 0;
            break;
        }
        if (ret < 0)
        {
            break;
        }
    }

    // This keeps going, doing some resampling and conversion based on codec output selection, but that isn't relevant to the issue