
Recherche avancée
Autres articles (29)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
Sur d’autres sites (4108)
-
How to implement spring animation (mass, tension, friction) in FFmpeg zoompan filter instead of linear interpolation ?
29 mai, par Mykyta ManuilenkoI'm trying to create a zoom-in and zoom-out animation using FFmpeg's zoompan filter, but I want to replace the linear interpolation with a spring animation that uses physics parameters (mass, tension, friction).


My input parameters :


"zoompan": {
 "focusRect": {
 "x": 1086.36,
 "y": 641.87,
 "width": 613,
 "height": 345
 }, 
 "easing": {
 "mass": 1,
 "tension": 120,
 "friction": 20
 }
}



Current working linear animation :


ffmpeg -framerate 25 -loop 1 -i input.png \
 -filter_complex "\
 [0:v]scale=6010:3380,setsar=1,split=3[zoomin_input][hold_input][zoomout_input]; \
 [zoomin_input]zoompan= \
 z='iw/(iw/zoom + (ow - iw)/duration)': \
 x='x + (3400 - 0)/duration': \
 y='y + (2009 - 0)/duration': \
 d=25:fps=25:s=1920x1080, \
 trim=duration=1,setpts=PTS-STARTPTS[zoomin]; \
 [hold_input]crop=1920:1080:3400:2009,trim=duration=4,setpts=PTS-STARTPTS[hold]; \
 [zoomout_input]zoompan=\
 zoom='if(eq(on,0),iw/ow,iw/(iw/zoom + (iw-ow)/duration))':\
 x='if(eq(on,0),3400,x + (0-3400)/duration)':\
 y='if(eq(on,0),2009,y + (0-2009)/duration)':\
 d=25:fps=25:s=1920x1080, \
 trim=duration=1,setpts=PTS-STARTPTS[zoomout];
 [zoomin][hold][zoomout]concat=n=3:v=1:a=0[outv]" \
 -map "[outv]" \
 -crf 23 \
 -preset medium \
 -c:v libx264 \
 -pix_fmt yuv420p \
 output.mp4



Notes :


- 

-
It creates a perfectly straight zoom path to the specific point on the screen (similar to pinch-zooming on a smartphone - straight zooming to the center of the focus rectangle)


-
To improve the quality of the output, I upscale it beforehand








What I want to achieve :


Instead of linear interpolation, I want to implement a spring function with these physics parameters :


- 

- mass : 1
- tension : 120
- friction : 20








Note that these params can be changed.


Also, I want to preserve a perfectly straight zoom path to the specific point on the screen (similar to pinch-zooming on a smartphone).


Question :


How can I properly implement a spring animation function in FFmpeg's zoompan filter ?


-
-
wasm/hevc : Add sao_band_filter
7 juin, par Zhao Zhiliwasm/hevc : Add sao_band_filter
hevc_sao_band_8_8_c : 63.0 ( 1.00x)
hevc_sao_band_8_8_simd128 : 10.4 ( 6.06x)
hevc_sao_band_16_8_c : 230.4 ( 1.00x)
hevc_sao_band_16_8_simd128 : 22.9 (10.07x)
hevc_sao_band_32_8_c : 900.4 ( 1.00x)
hevc_sao_band_32_8_simd128 : 81.5 (11.05x)
hevc_sao_band_48_8_c : 2009.1 ( 1.00x)
hevc_sao_band_48_8_simd128 : 170.2 (11.80x)
hevc_sao_band_64_8_c : 3535.0 ( 1.00x)
hevc_sao_band_64_8_simd128 : 297.5 (11.88x)Signed-off-by : Zhao Zhili <zhilizhao@tencent.com>
-
Algorithm to draw waveform from audio
25 septembre 2024, par yayujI'm trying to draw a waveform from a raw audio file. I demuxed/decoded an audio file using FFmpeg and I have those informations : samples buffer, the size of the samples buffer, the duration of the audio file (in seconds), sample rate (44100, 48000, etc), sample size, sample format (uint8, int16, int32, float, double), and the raw audio data itself.



Digging on the Internet I found this algorithm (more here) :



White Noise :






The Algorithm





All you need to do is randomize every sample from –amplitude to
 amplitude. We don’t care about the number of channels in most cases so
 we just fill every sample with a new random number.





Random rnd = new Random();
short randomValue = 0;

for (int i = 0; i < numSamples; i++)
{
 randomValue = Convert.ToInt16(rnd.Next(-amplitude, amplitude));
 data.shortArray[i] = randomValue;
}




It's really good but I don't want to draw that way, but this way :






Is there any algorithm or idea of how I can be drawing using the informations that I have ?