Recherche avancée

Médias (0)

Mot : - Tags -/optimisation

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (28)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

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

  • Les images

    15 mai 2013

Sur d’autres sites (1646)

  • How To Write An Oscilloscope

    29 avril 2012, par Multimedia Mike — General, gme, oscilloscope, visualization

    I’m trying to figure out how to write a software oscilloscope audio visualization. It’s made more frustrating by the knowledge that I am certain that I have accomplished this task before.

    In this context, the oscilloscope is used to draw the time-domain samples of an audio wave form. I have written such a plugin as part of the xine project. However, for that project, I didn’t have to write the full playback pipeline— my plugin was just handed some PCM data and drew some graphical data in response. Now I’m trying to write the entire engine in a standalone program and I’m wondering how to get it just right.



    This is an SDL-based oscilloscope visualizer and audio player for Game Music Emu library. My approach is to have an audio buffer that holds a second of audio (44100 stereo 16-bit samples). The player updates the visualization at 30 frames per second. The o-scope is 512 pixels wide. So, at every 1/30th second interval, the player dips into the audio buffer at position ((frame_number % 30) * 44100 / 30) and takes the first 512 stereo frames for plotting on the graph.

    It seems to be working okay, I guess. The only problem is that the A/V sync seems to be slightly misaligned. I am just wondering if this is the correct approach. Perhaps the player should be performing some slightly more complicated calculation over those (44100/30) audio frames during each update in order to obtain a more accurate graph ? I described my process to an electrical engineer friend of mine and he insisted that I needed to apply something called hysteresis to the output or I would never get accurate A/V sync in this scenario.

    Further, I know that some schools of thought on these matters require that the dots in those graphs be connected, that the scattered points simply won’t do. I guess it’s a stylistic choice.

    Still, I think I have a reasonable, workable approach here. I might just be starting the visualization 1/30th of a second too late.

  • How could I add an overlay to a video based on mouse cursor coordinates ?

    5 mars 2023, par Dima

    I am making a web app, where the user clicks through some images while talking about them and pointing things out with the cursor. The audio, timestamps of image changes, and mouse cursor coordinates and times are sent to a php script which uses ffmpeg to make a slideshow from the images and audio.

    


    Then it runs another ffmpeg command to overlay a moving image representing the cursor hundreds of times to mimic the user's mouse movements.

    


    Here is an example command that inserts the mouse overlay :

    


    ffmpeg \
  -i ../tmp/6400d9c21a62d.mp4 \
  -i ../assets/mouse-circle.png \
  -filter_complex "[0:v][1:v]overlay=enable='between=(t,0.627,0.874)':x=777.648+(t-0.627)*0.000/0.247:y=937.572+(t-0.627)*0.000/0.247[a1]; \
    [a1][1:v]overlay=enable='between=(t,0.874,0.914)':x=777.648+(t-0.874)*0.000/0.040:y=937.572+(t-0.874)*-1.223/0.040[a2]; \
    [a2][1:v]overlay=enable='between=(t,0.914,0.936)':x=777.648+(t-0.914)*0.000/0.022:y=936.349+(t-0.914)*0.000/0.022[a3]; \
    [a3][1:v]overlay=enable='between=(t,0.936,0.945)':x=777.648+(t-0.936)*0.000/0.009:y=936.349+(t-0.936)*-1.223/0.009[a4]; \
    [a4][1:v]overlay=enable='between=(t,0.945,0.966)':x=777.648+(t-0.945)*0.000/0.021:y=935.127+(t-0.945)*-1.223/0.021[a5]; \
    [a5][1:v]overlay=enable='between=(t,0.966,0.976)':x=777.648+(t-0.966)*0.000/0.010:y=933.904+(t-0.966)*-1.223/0.010[a6]; \
    [a6][1:v]overlay=enable='between=(t,0.976,0.999)':x=777.648+(t-0.976)*0.000/0.023:y=932.682+(t-0.976)*0.000/0.023[a7]; \
    [a7][1:v]overlay=enable='between=(t,0.999,1.019)':x=777.648+(t-0.999)*1.227/0.020:y=932.682+(t-0.999)*-1.223/0.020[a8]; \
    [a8][1:v]overlay=enable='between=(t,1.019,1.039)':x=778.875+(t-1.019)*0.000/0.020:y=931.459+(t-1.019)*-1.223/0.020[a9]; \
    [a9][1:v]overlay=enable='between=(t,1.039,1.091)':x=778.875+(t-1.039)*0.000/0.052:y=930.236+(t-1.039)*0.000/0.052[a10]; \
    [a10][1:v]overlay=enable='between=(t,1.091,1.142)':x=778.875+(t-1.091)*0.000/0.051:y=930.236+(t-1.091)*-1.223/0.051[a11]; \
    [a11][1:v]overlay=enable='between=(t,1.142,1.152)':x=778.875+(t-1.142)*0.000/0.010:y=929.014+(t-1.142)*-1.223/0.010[a12]; \
    [a12][1:v]overlay=enable='between=(t,1.152,1.161)':x=778.875+(t-1.152)*0.000/0.009:y=927.791+(t-1.152)*-1.223/0.009[a13]; \
    [a13][1:v]overlay=enable='between=(t,1.161,1.173)':x=778.875+(t-1.161)*2.454/0.012:y=926.569+(t-1.161)*-3.668/0.012[a14]; \
    [a14][1:v]overlay=enable='between=(t,1.173,1.184)':x=781.329+(t-1.173)*0.000/0.011:y=922.901+(t-1.173)*-8.558/0.011[a15]; \
    [a15][1:v]overlay=enable='between=(t,1.184,1.193)':x=781.329+(t-1.184)*0.000/0.009:y=914.343+(t-1.184)*-4.890/0.009[a16]; \
    [a16][1:v]overlay=enable='between=(t,1.193,1.203)':x=781.329+(t-1.193)*0.000/0.010:y=909.452+(t-1.193)*-3.668/0.010[a17]; \
    [a17][1:v]overlay=enable='between=(t,1.203,1.213)':x=781.329+(t-1.203)*0.000/0.010:y=905.784+(t-1.203)*-8.558/0.010[a18]; \
    [a18][1:v]overlay=enable='between=(t,1.213,1.223)':x=781.329+(t-1.213)*0.000/0.010:y=897.226+(t-1.213)*-4.890/0.010[a19]; \
    [a19][1:v]overlay=enable='between=(t,1.223,1.234)':x=781.329+(t-1.223)*0.000/0.011:y=892.336+(t-1.223)*-3.668/0.011[a20]; \
    [a20][1:v]overlay=enable='between=(t,1.234,1.246)':x=781.329+(t-1.234)*0.000/0.012:y=888.668+(t-1.234)*-8.558/0.012[a21]; \
    [a21][1:v]overlay=enable='between=(t,1.246,1.256)':x=781.329+(t-1.246)*0.000/0.010:y=880.110+(t-1.246)*-3.668/0.010[a22]; \
    [a22][1:v]overlay=enable='between=(t,1.256,1.265)':x=781.329+(t-1.256)*0.000/0.009:y=876.442+(t-1.256)*-4.890/0.009[a23]; \
    [a23][1:v]overlay=enable='between=(t,1.265,1.282)':x=781.329+(t-1.265)*0.000/0.017:y=871.551+(t-1.265)*-8.558/0.017[a24]; \
    [a24][1:v]overlay=enable='between=(t,1.282,1.298)':x=781.329+(t-1.282)*1.227/0.016:y=862.993+(t-1.282)*-8.558/0.016[a25]; \
    [a25][1:v]overlay=enable='between=(t,1.298,1.316)':x=782.556+(t-1.298)*0.000/0.018:y=854.435+(t-1.298)*-8.558/0.018[a26]; \
    [a26][1:v]overlay=enable='between=(t,1.316,1.331)':x=782.556+(t-1.316)*2.454/0.015:y=845.877+(t-1.316)*-8.558/0.015[a27]; \
    [a27][1:v]overlay=enable='between=(t,1.331,1.349)':x=785.010+(t-1.331)*0.000/0.018:y=837.318+(t-1.331)*-3.668/0.018[a28]; \
    [a28][1:v]overlay=enable='between=(t,1.349,1.365)':x=785.010+(t-1.349)*2.454/0.016:y=833.651+(t-1.349)*-13.449/0.016[a29]; \
    [a29][1:v]overlay=enable='between=(t,1.365,1.382)':x=787.464+(t-1.365)*3.681/0.017:y=820.202+(t-1.365)*-13.449/0.017[a30]; \
    [a30][1:v]overlay=enable='between=(t,1.382,1.399)':x=791.145+(t-1.382)*0.000/0.017:y=806.753+(t-1.382)*-8.558/0.017[a31]; \
    [a31][1:v]overlay=enable='between=(t,1.399,1.415)':x=791.145+(t-1.399)*4.908/0.016:y=798.195+(t-1.399)*-13.449/0.016[a32]; \
    [a32][1:v]overlay=enable='between=(t,1.415,1.433)':x=796.053+(t-1.415)*2.454/0.018:y=784.746+(t-1.415)*-17.116/0.018[a33]; \
    [a33][1:v]overlay=enable='between=(t,1.433,1.449)':x=798.507+(t-1.433)*3.681/0.016:y=767.630+(t-1.433)*-8.558/0.016[a34]; \
    [a34][1:v]overlay=enable='between=(t,1.449,1.466)':x=802.188+(t-1.449)*6.135/0.017:y=759.072+(t-1.449)*-18.339/0.017[a35]; \
    [a35][1:v]overlay=enable='between=(t,1.466,1.482)':x=808.323+(t-1.466)*2.454/0.016:y=740.733+(t-1.466)*-8.558/0.016[a36]; \
    [a36][1:v]overlay=enable='between=(t,1.482,1.499)':x=810.777+(t-1.482)*6.135/0.017:y=732.174+(t-1.482)*-18.339/0.017[a37]; \
    [a37][1:v]overlay=enable='between=(t,1.499,1.516)':x=816.912+(t-1.499)*8.589/0.017:y=713.835+(t-1.499)*-14.671/0.017[a38]; \
    [a38][1:v]overlay=enable='between=(t,1.516,1.532)':x=825.501+(t-1.516)*3.681/0.016:y=699.164+(t-1.516)*-8.558/0.016[a39]; \
    [a39][1:v]overlay=enable='between=(t,1.532,1.549)':x=829.181+(t-1.532)*4.908/0.017:y=690.606+(t-1.532)*-13.449/0.017[a40]; \
    [a40][1:v]overlay=enable='between=(t,1.549,1.565)':x=834.089+(t-1.549)*8.589/0.016:y=677.157+(t-1.549)*-14.671/0.016[a41]; \
    [a41][1:v]overlay=enable='between=(t,1.565,1.583)':x=842.678+(t-1.565)*2.454/0.018:y=662.486+(t-1.565)*-8.558/0.018[a42]; \
    [a42][1:v]overlay=enable='between=(t,1.583,1.599)':x=845.132+(t-1.583)*8.589/0.016:y=653.928+(t-1.583)*-14.671/0.016[a43]; \
    [a43][1:v]overlay=enable='between=(t,1.599,1.616)':x=853.721+(t-1.599)*2.454/0.017:y=639.257+(t-1.599)*-4.890/0.017[a44]; \
    [a44][1:v]overlay=enable='between=(t,1.616,1.632)':x=856.175+(t-1.616)*9.816/0.016:y=634.366+(t-1.616)*-18.339/0.016[a45]; \
    [a45][1:v]overlay=enable='between=(t,1.632,1.649)':x=865.991+(t-1.632)*8.589/0.017:y=616.027+(t-1.632)*-14.671/0.017[a46]; \
    [a46][1:v]overlay=enable='between=(t,1.649,1.666)':x=874.580+(t-1.649)*6.135/0.017:y=601.356+(t-1.649)*-9.781/0.017[a47]; \
    [a47][1:v]overlay=enable='between=(t,1.666,1.682)':x=880.715+(t-1.666)*8.589/0.016:y=591.575+(t-1.666)*-14.671/0.016[a48]; \
    [a48][1:v]overlay=enable='between=(t,1.682,1.699)':x=889.303+(t-1.682)*8.589/0.017:y=576.904+(t-1.682)*-14.671/0.017[a49]; \
    [a49][1:v]overlay=enable='between=(t,1.699,1.716)':x=897.892+(t-1.699)*6.135/0.017:y=562.232+(t-1.699)*-4.890/0.017[a50]; \
    [a50][1:v]overlay=enable='between=(t,1.716,1.732)':x=904.027+(t-1.716)*8.589/0.016:y=557.342+(t-1.716)*-14.671/0.016[a51]; \
    [a51][1:v]overlay=enable='between=(t,1.732,1.749)':x=912.616+(t-1.732)*7.362/0.017:y=542.671+(t-1.732)*-9.781/0.017[a52]; \
    [a52][1:v]overlay=enable='between=(t,1.749,1.766)':x=919.978+(t-1.749)*8.589/0.017:y=532.890+(t-1.749)*-14.671/0.017[a53]; \
    [a53][1:v]overlay=enable='between=(t,1.766,1.782)':x=928.567+(t-1.766)*4.908/0.016:y=518.219+(t-1.766)*-4.890/0.016[a54]; \
    [a54][1:v]overlay=enable='between=(t,1.782,1.799)':x=933.475+(t-1.782)*8.589/0.017:y=513.328+(t-1.782)*-11.003/0.017[a55]; \
    [a55][1:v]overlay=enable='between=(t,1.799,1.815)':x=942.063+(t-1.799)*7.362/0.016:y=502.325+(t-1.799)*-9.781/0.016[a56]; \
    [a56][1:v]overlay=enable='between=(t,1.815,1.832)':x=949.425+(t-1.815)*6.135/0.017:y=492.544+(t-1.815)*-4.890/0.017[a57]; \
    [a57][1:v]overlay=enable='between=(t,1.832,1.849)':x=955.560+(t-1.832)*6.135/0.017:y=487.654+(t-1.832)*-7.336/0.017[a58]; \
    [a58][1:v]overlay=enable='between=(t,1.849,1.866)':x=961.695+(t-1.849)*6.135/0.017:y=480.318+(t-1.849)*-3.668/0.017[a59]; \
    [a59][1:v]overlay=enable='between=(t,1.866,1.883)':x=967.830+(t-1.866)*1.227/0.017:y=476.650+(t-1.866)*-1.223/0.017[a60]; \
    [a60][1:v]overlay=enable='between=(t,1.883,1.900)':x=969.057+(t-1.883)*8.589/0.017:y=475.427+(t-1.883)*-2.445/0.017[a61]; \
    [a61][1:v]overlay=enable='between=(t,1.900,1.916)':x=977.646+(t-1.900)*6.135/0.016:y=472.982+(t-1.900)*-1.223/0.016[a62]; \
    [a62][1:v]overlay=enable='between=(t,1.916,1.933)':x=983.781+(t-1.916)*1.227/0.017:y=471.760+(t-1.916)*0.000/0.017[a63]; \
    [a63][1:v]overlay=enable='between=(t,1.933,1.949)':x=985.008+(t-1.933)*1.227/0.016:y=471.760+(t-1.933)*0.000/0.016[a64]; \
    [a64][1:v]overlay=enable='between=(t,1.949,1.966)':x=986.235+(t-1.949)*1.227/0.017:y=471.760+(t-1.949)*0.000/0.017[a65]; \
    [a65][1:v]overlay=enable='between=(t,1.966,1.983)':x=987.462+(t-1.966)*2.454/0.017:y=471.760+(t-1.966)*0.000/0.017[a66]; \
    [a66][1:v]overlay=enable='between=(t,1.983,2.000)':x=989.916+(t-1.983)*0.000/0.017:y=471.760+(t-1.983)*0.000/0.017[a67]; \
    [a67][1:v]overlay=enable='between=(t,2.000,2.016)':x=989.916+(t-2.000)*0.000/0.016:y=471.760+(t-2.000)*1.223/0.016[a68]; \
    [a68][1:v]overlay=enable='between=(t,2.016,2.033)':x=989.916+(t-2.016)*2.454/0.017:y=472.982+(t-2.016)*2.445/0.017[a69]; \
    [a69][1:v]overlay=enable='between=(t,2.033,2.050)':x=992.370+(t-2.033)*0.000/0.017:y=475.427+(t-2.033)*1.223/0.017[a70]; \
    [a70][1:v]overlay=enable='between=(t,2.050,2.066)':x=992.370+(t-2.050)*2.454/0.016:y=476.650+(t-2.050)*8.558/0.016[a71]; \
    [a71][1:v]overlay=enable='between=(t,2.066,2.082)':x=994.824+(t-2.066)*0.000/0.016:y=485.208+(t-2.066)*7.336/0.016[a72]; \
    [a72][1:v]overlay=enable='between=(t,2.082,2.100)':x=994.824+(t-2.082)*0.000/0.018:y=492.544+(t-2.082)*4.890/0.018[a73]; \
    [a73][1:v]overlay=enable='between=(t,2.100,2.116)':x=994.824+(t-2.100)*3.681/0.016:y=497.434+(t-2.100)*13.449/0.016[a74]; \
    [a74][1:v]overlay=enable='between=(t,2.116,2.134)':x=998.504+(t-2.116)*0.000/0.018:y=510.883+(t-2.116)*7.336/0.018[a75]; \
    [a75][1:v]overlay=enable='between=(t,2.134,2.150)':x=998.504+(t-2.134)*0.000/0.016:y=518.219+(t-2.134)*8.558/0.016[a76]; \
    [a76][1:v]overlay=enable='between=(t,2.150,2.167)':x=998.504+(t-2.150)*0.000/0.017:y=526.777+(t-2.150)*17.116/0.017[a77]; \
    [a77][1:v]overlay=enable='between=(t,2.167,2.183)':x=998.504+(t-2.167)*-7.362/0.016:y=543.893+(t-2.167)*24.452/0.016[a78]; \
    [a78][1:v]overlay=enable='between=(t,2.183,2.200)':x=991.143+(t-2.183)*0.000/0.017:y=568.345+(t-2.183)*8.558/0.017[a79]; \
    [a79][1:v]overlay=enable='between=(t,2.200,2.217)':x=991.143+(t-2.200)*-6.135/0.017:y=576.904+(t-2.200)*23.229/0.017[a80]; \
    [a80][1:v]overlay=enable='between=(t,2.217,2.233)':x=985.008+(t-2.217)*-3.681/0.016:y=600.133+(t-2.217)*14.671/0.016[a81]; \
    [a81][1:v]overlay=enable='between=(t,2.233,2.251)':x=981.327+(t-2.233)*-12.270/0.018:y=614.804+(t-2.233)*36.678/0.018[a82]; \
    [a82][1:v]overlay=enable='between=(t,2.251,2.267)':x=969.057+(t-2.251)*-3.681/0.016:y=651.483+(t-2.251)*14.671/0.016[a83]; \
    [a83][1:v]overlay=enable='between=(t,2.267,2.284)':x=965.376+(t-2.267)*-12.270/0.017:y=666.154+(t-2.267)*36.678/0.017[a84]; \
    [a84][1:v]overlay=enable='between=(t,2.284,2.301)':x=953.106+(t-2.284)*-15.951/0.017:y=702.832+(t-2.284)*31.788/0.017[a85]; \
    [a85][1:v]overlay=enable='between=(t,2.301,2.317)':x=937.156+(t-2.301)*-7.362/0.016:y=734.620+(t-2.301)*14.671/0.016[a86]; \
    [a86][1:v]overlay=enable='between=(t,2.317,2.334)':x=929.794+(t-2.317)*-14.724/0.017:y=749.291+(t-2.317)*25.675/0.017[a87]; \
    [a87][1:v]overlay=enable='between=(t,2.334,2.350)':x=915.070+(t-2.334)*-7.362/0.016:y=774.966+(t-2.334)*15.894/0.016[a88]; \
    [a88][1:v]overlay=enable='between=(t,2.350,2.367)':x=907.708+(t-2.350)*-14.724/0.017:y=790.859+(t-2.350)*25.675/0.017[a89]; \
    [a89][1:v]overlay=enable='between=(t,2.367,2.384)':x=892.984+(t-2.367)*-18.405/0.017:y=816.534+(t-2.367)*20.784/0.017[a90]; \
    [a90][1:v]overlay=enable='between=(t,2.384,2.400)':x=874.580+(t-2.384)*-6.135/0.016:y=837.318+(t-2.384)*11.003/0.016[a91]; \
    [a91][1:v]overlay=enable='between=(t,2.400,2.418)':x=868.445+(t-2.400)*-11.043/0.018:y=848.322+(t-2.400)*9.781/0.018[a92]; \
    [a92][1:v]overlay=enable='between=(t,2.418,2.434)':x=857.402+(t-2.418)*-9.816/0.016:y=858.103+(t-2.418)*8.558/0.016[a93]; \
    [a93][1:v]overlay=enable='between=(t,2.434,2.451)':x=847.586+(t-2.434)*-6.135/0.017:y=866.661+(t-2.434)*4.890/0.017[a94]; \
    [a94][1:v]overlay=enable='between=(t,2.451,2.467)':x=841.451+(t-2.451)*-8.589/0.016:y=871.551+(t-2.451)*4.890/0.016[a95]; \
    [a95][1:v]overlay=enable='between=(t,2.467,2.484)':x=832.862+(t-2.467)*-1.227/0.017:y=876.442+(t-2.467)*1.223/0.017[a96]; \
    [a96][1:v]overlay=enable='between=(t,2.484,2.501)':x=831.635+(t-2.484)*-6.135/0.017:y=877.664+(t-2.484)*3.668/0.017[a97]; \
    [a97][1:v]overlay=enable='between=(t,2.501,2.517)':x=825.501+(t-2.501)*-8.589/0.016:y=881.332+(t-2.501)*2.445/0.016[a98]; \
    [a98][1:v]overlay=enable='between=(t,2.517,2.535)':x=816.912+(t-2.517)*-2.454/0.018:y=883.777+(t-2.517)*1.223/0.018[a99]; \
    [a99][1:v]overlay=enable='between=(t,2.535,2.551)':x=814.458+(t-2.535)*-2.454/0.016:y=885.000+(t-2.535)*2.445/0.016[a100]; \
    [a100][1:v]overlay=enable='between=(t,2.551,2.567)':x=812.004+(t-2.551)*-1.227/0.016:y=887.445+(t-2.551)*0.000/0.016[a101]; \
    [a101][1:v]overlay=enable='between=(t,2.567,2.584)':x=810.777+(t-2.567)*-1.227/0.017:y=887.445+(t-2.567)*0.000/0.017[a102]; \
    [a102][1:v]overlay=enable='between=(t,2.584,2.600)':x=809.550+(t-2.584)*0.000/0.016:y=887.445+(t-2.584)*0.000/0.016[a103]; \
    [a103][1:v]overlay=enable='between=(t,2.600,2.617)':x=809.550+(t-2.600)*-1.227/0.017:y=887.445+(t-2.600)*0.000/0.017[a104]; \
    [a104][1:v]overlay=enable='between=(t,2.617,2.689)':x=808.323+(t-2.617)*0.000/0.072:y=887.445+(t-2.617)*0.000/0.072[a105] \
     \
  " -map "[a105]" -map 0:a:? ../tmp/vid-6400d9c21a62d.mp4 -y


    


    And this is just from a four second video. When I tried to do thirty seconds worth of mouse movements, the command would not even run because there were too many arguments. So I need to come up with another way to add a mouse overlay.

    


    An obvious choice would just be screen recording the user's screen to not have to add a mouse overlay because it would already be there. But then I don't think I can use full resolution pictures in the final video. It will be recordings of the images at whatever resolution the user's screen is set to. (Unless there's a way around this that I don't know about.)

    


    So how could I take a long list of mouse coordinates and timestamps and add an overlay representing a cursor to an existing video ?

    


    Edit : I tried putting everything from the filter-complex argument into a text file and calling it with filter_complex_script instead, as @БаярГончикжапов suggested in comments. Now it at least starts to run, but every time fails with this error :

    


    [Parsed_overlay_1553 @ 0x55caae67f900] [framesync @ 0x55caae6802a8] Sync level 2
[auto_scale_1554 @ 0x55cab4b34b80] Failed to configure output pad on auto_scale_1554
Error reinitializing filters!
Failed to inject frame into filter network: Resource temporarily unavailable
Error while processing the decoded data for stream #1:0
[AVIOContext @ 0x55cab451c900] Statistics: 0 bytes written, 0 seeks, 0 writeouts
[aac @ 0x55cab4523b80] Qavg: 25282.062
[aac @ 0x55cab4523b80] 2 frames left in the queue on closing


    


    It only happens if there are more than 1553 arguments, and changing the arguments for 1553 and surrounding ones doesn't stop the error.

    


  • ffmpeg - when scaling, how to keep shapes of people's heads

    19 janvier 2017, par Dave

    Ok, I’m quite familiar with FFMPEG utility in general, and have used it for
    years to cut short snippets from videos, etc. But it’s only in the last
    month that and I decided to learn to use it to transcode with video-filters
    etc. (Before that, I was using other tools such as ’Handbrake’ and ’FreeMake’
    and VLC, etc.)

    For my ffmpeg transcodes, my target output resolution will always be constant, from one transcode run to the next. But the resolution and display aspect-ratio of the input file, from one transcode run to the next, will vary...could be almost any values.
    The input files will never already have black-bars when displayed.

    So, the relevant portion [ i.e. the video-filter(s) part) of my cmd line ] presently is as follows :

    ffmpeg ... -vf "scale=720:406,setsar=1,pad=720:506:0:40:Black" ...

    Also note : I do NOT use the "-aspect" option in the cmd-line. (Maybe I’ll
    need to (???) to solve my issue, but I’m unsure about how that interacts
    with scaling.)

    ( EDIT : Oh, I happen to have chosen that resolution value of 720x406, for
    the image-area (i.e. inside the top/bottom black bars) because it
    has an aspect ratio of 16:9 (Of course, 16:9 ratio is common these days. )

    My cmd always executes cleanly and produces an output file (a WebM, tho I doubt
    that container types and/or vcodec choices matter at all to scaling algorithm issues).

    So the issue/problem that I’m trying to solve is how to prevent any stretching
    in either direction. In other words, a round soccer ball in the input file
    must yield a round ball in the output file ! (NOT oval-shaped in either axis).

    ( Edit #2 : Oh, I forgot to mention that I’m not have the same amount of stretching from one ffmpeg output file to the next. Sometimes there is
    no stretch in my output file, and with some other input file, the
    people are too tall in the output, and some other output file will have
    people are too wide. I’m assuming
    there is some single cmd that will always work for each randomly sized
    input file, WITHOUT having to resort to examining meta-data of each
    input and then having to adjust portions of the needed ffmpeg cmd.
    I assume this because I have used a tool called "FreeMake" that needs
    no such adjustment. When you do a ’scale’ with that program, it asks
    you to choose one of four adjustment-algorithms labeled "original"
    "stretched", "zoom..." and "auto". If I recall correctly, it was the
    "auto" choice that prevented any stretching.)

    The goal of that last filter (i.e. the "pad=720:506:0:40:Black" phrase) is to
    add a black bar of 40 pixels to the top and 60 pixels to the bottom.
    (That filter IS producing the black-bands, as desired. I mention it,
    because I’m unsure whether it could be having any effect on the altered
    shape of the ’round soccer ball’). If the "pad" filter IS part of the
    issue, then maybe I’ll need to make multiple ffmpeg cmds to achieve
    my overall goal (!?!?). [I’d LIKE to be able to do everything in just
    one ffmpeg cmd, as shown.]

    OK ?

    So are there any image-processing and ffmpeg gurus out there that
    know how to fix my problem ?

    TIA...

    Dave