
Recherche avancée
Médias (1)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (28)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community. -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.
Sur d’autres sites (7108)
-
Evaluate function within ffmpeg drawtext
22 juin 2022, par Dan SteingartI am looking to display a counter that is a multiple of the frame number on a video created with ffmpeg. Previous answers on SO taught me that a command of the form


ffmpeg -y -r 25 -pattern_type glob -i '*.jpg' -vf "text='%{n}': start_number=0: x=0: y=0: fontcolor=black: fontsize=30: box=1: boxcolor=white: boxborderw=5" -c:a copy movie.mp4



Will display the frame number, and this works nicely. But if I try to evaluate an expression within the
%{}
, e.g.

ffmpeg -y -r 25 -pattern_type glob -i '*.jpg' -vf "text='%{n*50}': start_number=0: x=0: y=0: fontcolor=black: fontsize=30: box=1: boxcolor=white: boxborderw=5" -c:a copy movie.mp4



Then I get the following error


[Parsed_drawtext_0 @ 0x55683f9b00] %{n*50} is not known 



on each frame. What is the proper syntax to evaluate
n*50
and display indrawtext
? TIA.

-
ffmpeg : Dynamically set output duration based on sliding text width
18 janvier 2016, par John WhitemanI need to create a smooth ’news ticker’ on a low powered android device. Unfortunately this is impossible at runtime using HTML or native code as there is always some stutter or glitch.
I’ve created a solution that gives me a smooth result by encoding an mp4 for each message and displaying one video after the other. This is the code I’m using :
ffmpeg -f lavfi -i color=c=black:s=1280x100 -vf "drawtext=BebasNeue.otf:fontsize=60:fontcolor=white:y=h-line_h-30:x=-(4*n)+1280:text='Hello world'" -t 10 output.mp4
Problem :
I need to set the video’s duration dynamically so that the video stops when the text has completed it’s journey from right to left. The messages will be of varying lengths and I need each message to scroll at a constant speed (ie. an mp4 with a longer message would have a longer duration).Is this possible via an expression ? If not is there some clever way I can calculate this outside of ffmpeg and pass it to the ’-t’ (duration) parameter ?
** Edit **
To calculate outside of ffmpeg I can do a calculation like video_width + text_width / video_fps (ie. 1280 + 262 / 25) to give me the duration. So now I’m just looking to see if this is possible within the ffmpeg command line itself. tMany thanks
-
How can I create time gaps in video recordings using newest version of FFMPEG ?
10 juin 2019, par Jovana KostićI am new to the forum so I hope I’ve formulated this question correctly.
I have downloaded newest version of FFMPEG and I would like to use it to modify existing video by inserting time gaps in it.
Here is what I mean by time gap. If I have input video that lasts 2 seconds and was recorded at FPS=10, timestamps of its frames would be as follows :
0.1s, 0.2s,0.3s,0.4s, .. 1.7s, 1.8s, 1.9.s, 2s
If I would to introduce time gaps, input videos frame would be something like this :
0.1s, 0.2s, 0.9s, 1s, 1.1s, 1.7s, 1.8s, 1.9s, 2s
Is something like this possible to achieve ?
!!!EDIT !!!
I would like to post here results of the commands Gyan was kind enough to comment.
For command :
ffmpeg -i input.mp4 -vf "setpts='PTS+gte(t,0.3)*(0.6/TB)+gte(t,1.5)*(1.1/TB)',showinfo" -vsync vfr out.mp4
I am getting :
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.20.100
Duration: 00:00:09.30, start: 0.000000, bitrate: 1185 kb/s
Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 960x540, 1184 kb/s, 10 fps, 10 tbr, 10240 tbn, 20480 tbc (default)
Metadata:
handler_name : VideoHandler
File 'out.mp4' already exists. Overwrite ? [y/N] y
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[Parsed_setpts_0 @ 0x55e4f4f85400] [Eval @ 0x7fffadb2ac80] Unknown function in 't,0.3)*(0.6/TB)+gte(t,1.5)*(1.1/TB)'
[Parsed_setpts_0 @ 0x55e4f4f85400] Error while parsing expression 'PTS+gte(t,0.3)*(0.6/TB)+gte(t,1.5)*(1.1/TB)'
[AVFilterGraph @ 0x55e4f4eff400] Error initializing filter 'setpts' with args 'PTS+gte(t,0.3)*(0.6/TB)+gte(t,1.5)*(1.1/TB)'
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
Conversion failed!And for command :
ffmpeg -i input.mp4 -vf select='not(between(t,0.3,0.7)+between(t,1.5.1.8))' -vsync vfr out.mp4
I am getting :
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.20.100
Duration: 00:00:09.30, start: 0.000000, bitrate: 1185 kb/s
Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 960x540, 1184 kb/s, 10 fps, 10 tbr, 10240 tbn, 20480 tbc (default)
Metadata:
handler_name : VideoHandler
File 'out.mp4' already exists. Overwrite ? [y/N] y
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[Parsed_select_0 @ 0x55ce2c4f9d00] [Eval @ 0x7ffc980730c0] Missing ')' or too many args in 'between(t'
[Parsed_select_0 @ 0x55ce2c4f9d00] Error while parsing expression 'not(between(t'
[AVFilterGraph @ 0x55ce2c491a00] Error initializing filter 'select' with args 'not(between(t'
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
Conversion failed!