
Recherche avancée
Médias (2)
-
Granite de l’Aber Ildut
9 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
Autres articles (77)
-
Librairies et logiciels spécifiques aux médias
10 décembre 2010, parPour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...) -
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)
Sur d’autres sites (5946)
-
ffmpeg throws error "Invalid file index 1 in filtergraph description" when used with concat and -/filter_complex [closed]
20 février, par Ernst VI want to create mp4 videos from many small .jpg files (time-lapse). Each image is shown for 2 seconds and then fades to the next. This works fine when I issue the command with a few images (see below). But when the number of images reaches hundreds or thousands, I can no longer put them into a single command, but have to put the filenames and the complex filter into .txt files.


Whatever I try, I always get the error
"Invalid file index 1 in filtergraph description"
.

This works fine :


ffmpeg -loop 1 -i "image1.jpg" -loop 1 -i "image2.jpg" -loop 1 -i "image3.jpg" -loop 1 -i "image4.jpg" -loop 1 -i "image5.jpg" -filter_complex "[0:v]trim=0:2,setpts=PTS-STARTPTS[v0]; [1:v]trim=0:2,setpts=PTS-STARTPTS[v1]; [2:v]trim=0:2,setpts=PTS-STARTPTS[v2]; [3:v]trim=0:2,setpts=PTS-STARTPTS[v3]; [4:v]trim=0:2,setpts=PTS-STARTPTS[v4]; [v0][v1] xfade=transition=fade:duration=1:offset=1 [xf1]; [xf1][v2] xfade=transition=fade:duration=1:offset=2 [xf2]; [xf2][v3] xfade=transition=fade:duration=1:offset=3 [xf3]; [xf3][v4] xfade=transition=fade:duration=1:offset=4 [xf4]" -map "[xf4]" -c:v libx264 -crf 18 -pix_fmt yuv420p output.mp4



But when I put the input files and the filter in txt files, it fails with the error above :


ffmpeg -stream_loop 1 -f concat -safe 0 -i concat_list.txt -/filter_complex filter_script.txt -map "[xf4]" -c:v libx264 -crf 18 -pix_fmt yuv420p output.mp4



This is the
concat_list.txt
:

file 'image1.jpg'
file 'image2.jpg'
file 'image3.jpg'
file 'image4.jpg'
file 'image5.jpg'



This is the
filter_script.txt
:

[0:v]trim=0:2,setpts=PTS-STARTPTS[v0];[1:v]trim=0:2,setpts=PTS-STARTPTS[v1];[2:v]trim=0:2,setpts=PTS-STARTPTS[v2];[3:v]trim=0:2,setpts=PTS-STARTPTS[v3];[4:v]trim=0:2,setpts=PTS-STARTPTS[v4];[v0][v1] xfade=transition=fade:duration=1:offset=1 [xf1];[xf1][v2] xfade=transition=fade:duration=1:offset=2 [xf2];[xf2][v3] xfade=transition=fade:duration=1:offset=3 [xf3];[xf3][v4] xfade=transition=fade:duration=1:offset=4 [xf4]



I tried adding/removing line breaks, semicolons, etc. Nothing helped.
Any idea what is going wrong here ? Thank you very much !


My ffmpeg version is the most recent one :


ffmpeg version 2025-02-17-git-b92577405b-full_build-www.gyan.dev


-
ffmpeg unable to get duration/bitrate of remote gif
17 février, par Peter XiaI'm trying to get the duration of a gif.


The command
ffmpeg -i https://cdn.7tv.app/emote/01F6MZGCNG000255K4X1K7NTHR/4x.gif


gives

Duration: N/A, start: 0.000000, bitrate: N/A


However if i download the file and pass it in

ffmpeg -i 4x.gif


it gives :

Duration: 00:00:07.92, start: 0.000000, bitrate: 1225 kb/s


The issue seems limited only to gifs on 7tv site.


- 

- It works for other sites. (example :
ffmpeg -i https://c.tenor.com/ULCY5B996-oAAAAd/tenor.gif
). - It also works for other encodings of that image (exmaple
ffmpeg -i https://cdn.7tv.app/emote/01F6MZGCNG000255K4X1K7NTHR/4x.avif
)






Here is the HTTP response header from 7tv site of that gif :


HTTP/2 200 
content-type: image/gif
content-length: 1213725
x-7tv-cache-hits: 37527
x-7tv-cache: hit
age: 228365
cache-control: public, max-age=604800, s-maxage=86400, immutable
alt-svc: h3=":443"; ma=2592000
x-7tv-cdn-pod: cdn-ssprq
x-7tv-cdn-node: cdn-1
server: SevenTV
vary: origin, access-control-request-method, access-control-request-headers
access-control-allow-origin: *
access-control-expose-headers: *
date: Sun, 16 Feb 2025 20:47:28 GMT



Can someone help me understand ? Something spcecific to this site is causing ffmpeg to behave differently ?


- It works for other sites. (example :
-
HlS playlist skip files with ffmpeg
29 janvier, par tamirgI simply downloaded 5 mp3 files from here :
https://samplelib.com/sample-mp3.html


which means i have :


sample-3s.mp3
sample-6s.mp3
sample-9s.mp3
sample-12s.mp3
sample-15s.mp3



and then i create a simple hls playlist sample.m3u8 :


#EXTM3U
#EXT-X-TARGETDURATION:20
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:3.0,
sample-3s.mp3
#EXTINF:6.0,
sample-6s.mp3
#EXTINF:9.0,
sample-9s.mp3
#EXTINF:12.0,
sample-12s.mp3
#EXTINF:15.0,
sample-15s.mp3



But when i play this playlist :


ffplay sample.m3u8



i get :


[hls @ 0x13703b4d0] Opening 'sample-9s.mp3' for reading
[mp3 @ 0x13703b740] invalid concatenated file detected - using bitrate for duration
Input #0, hls, from 'playlist2.m3u8':
 Duration: N/A, start: 0.000000, bitrate: 128 kb/s
 Program 0
 Metadata:
 variant_bitrate : 0
 Stream #0:0: Audio: mp3 (mp3float), 44100 Hz, stereo, fltp, 128 kb/s
 Metadata:
 variant_bitrate : 0
 encoder : Lavc57.10
2025-01-29 10:57:46.957 ffplay[17029:696588] +[IMKClient subclass]: chose IMKClient_Modern
2025-01-29 10:57:46.957 ffplay[17029:696588] +[IMKInputSession subclass]: chose IMKInputSession_Modern
[hls @ 0x13703b4d0] Opening 'sample-12s.mp3' for reading 0B
[mp3float @ 0x13703c710] Header missingvq= 0KB sq= 0B
[hls @ 0x13703b4d0] Opening 'sample-15s.mp3' for reading 0B



It starts playing from the file sample-9s, and not sample-3s. So it skips the first two files.
Why does it happen ?