
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (76)
-
Menus personnalisés
14 novembre 2010, parMediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
Menus créés à l’initialisation du site
Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...) -
Participer à sa traduction
10 avril 2011Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
Actuellement MediaSPIP n’est disponible qu’en français et (...) -
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
Sur d’autres sites (10342)
-
How can I delete a file in FOR loop in batch scripting after another command ?
1er octobre 2020, par Andrew AndersonI compress a video with FFMPEG by means of a batch scripting one-liner with a FOR LOOP. After compressing I want to remove the original file.


This code perfectly makes the compressing job, but the original file is not being removed :


for %%i in (*.mp4) do ffmpeg -i "%%i" -vcodec libx265 -crf 28 "%%~ni"-small.mp4&&del "%%i"
pause



What have I missed ?


By the way, this is a near to perfect compression ratio for any kinds of educational videos, tutorials, etc. which have occupied your hard drive.


-
How to use FFmpeg filters setsar and setdar when generating animated gif ?
1er janvier 2016, par KonstantinI would like to make an animated gif from a small section of an mp4 video file. Unfortunately the mp4 video file has bad aspect ratio. Instead of 4:3 (640x480) it is 3:2 (720x480). When I call "ffmpeg -i" on the video I can see :
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709), 720x480 [SAR 8:9 DAR 4:3], 1835 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 180k tbc (default)
When I play it with VLC media player, it shows corrected aspect ratio, becasue I think it honours the DAR value (4:3), which is set in the mp4 video. However when I try to transcode to animated gif, that animated image file format doesn’t store such an information as DAR, because the pixels are always square shaped. So when I call my simple conversion script called movie2gif :
#!/bin/sh
video=$1
max_colors=$2
ss=$3
t=$4
out=$5
palette="/tmp/palette.png"
fps=18
filt="fps=fps=$fps,setdar=4:3,scale=150:-1,lutyuv=y=gammaval(0.4),"
ffmpeg -ss $ss -t $t -i "$video" -sws_flags lanczos -lavfi "$filt palettegen=max_colors=$max_colors:stats_mode=full" -vsync 0 -y "$palette"
ffmpeg -ss $ss -i "$video" -i "$palette" -sws_flags lanczos -lavfi "$filt paletteuse=dither=bayer:bayer_scale=1" -vsync 0 -t $t -pix_fmt pal8 -gifflags +transdiff -y -f gif "$5"I always get a 150x100 pixel animated gif. I tried different values / expressions for setting both or one of the values of "setsar" and "setdar", in different order, placing them before the "scale" and after the "scale" filter, they have no effect on the resulting animated gif dimensions, it is always 150x100 pixels. How can I use these two filter properly to get a correct result, a 150x112 animated gif image ?
-
ffmpeg convert and add silent audio track to an mpeg
13 janvier 2016, par vollschauerI need to remove the B-Frames and also add a silent audio track to an mpeg. This is my source file (mediainfo input.mpg) :
General
Complete name : input.mpg
Format : MPEG-PS
File size : 3.88 MiB
Duration : 4s 0ms
Overall bit rate : 8 131 Kbps
Writing library : encoded by TMPGEnc (ver. 2.525.64.184)
Video
ID : 224 (0xE0)
Format : MPEG Video
Format version : Version 1
Format settings, BVOP : Yes
Format settings, Matrix : Default
Format settings, GOP : M=3, N=9
Duration : 4s 0ms
Bit rate : 8 000 Kbps
Width : 800 pixels
Height : 600 pixels
Display aspect ratio : 4:3
Frame rate : 30.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.556
Time code of first frame : 00:00:00:00
Time code source : Group of pictures header
GOP, Open/Closed : Open
GOP, Open/Closed of first frame : Closed
Stream size : 3.80 MiB (98%)
Writing library : TMPGEnc 2.525.64.184I’m trying it with :
ffmpeg -f lavfi -i anullsrc -i input.mpg -c:v mpeg1video -b:v 8000k \
-minrate 8000k -maxrate 8000k -pix_fmt yuv420p -g 9 -acodec mp2 \
-ac 2 -ab 128k -ar 44100 -async 1 -shortest -y out.mpgmediainfo out.mpg
General
Complete name : out.mpg
Format : MPEG-PS
File size : 3.96 MiB
Duration : 4s 23ms
Overall bit rate : 8 251 Kbps
Video
ID : 224 (0xE0)
Format : MPEG Video
Format version : Version 1
Format settings, BVOP : No
Format settings, Matrix : Default
Format settings, GOP : N=9
Duration : 4s 0ms
Bit rate : 8 000 Kbps
Width : 800 pixels
Height : 600 pixels
Display aspect ratio : 4:3
Frame rate : 30.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.556
Time code of first frame : 00:00:00:00
Time code source : Group of pictures header
GOP, Open/Closed : Open
GOP, Open/Closed of first frame : Closed
Stream size : 3.80 MiB (96%)
Audio
ID : 192 (0xC0)
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 2
Duration : 4s 23ms
Bit rate mode : Constant
Bit rate : 128 Kbps
Channel(s) : 2 channels
Sampling rate : 44.1 KHz
Compression mode : Lossy
Delay relative to video : -11ms
Stream size : 62.9 KiB (2%)Unfortunately is the audio duration different to the video duration and there is some "Delay relative to video" of -11ms
I found in another post this option :-af asetpts=PTS+0.011/TB
which gives me this output :
Audio
ID : 192 (0xC0)
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 2
Duration : 3s 997ms
Bit rate mode : Constant
Bit rate : 128 Kbps
Channel(s) : 2 channels
Sampling rate : 44.1 KHz
Compression mode : Lossy
Stream size : 62.5 KiB (2%)This one is close but still not my "4s 0ms" what I expected. How can I
add a silent audio track with the "absoutly exact" duration ? And do I encode the video right ?