
Recherche avancée
Médias (2)
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (111)
-
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
Les notifications de la ferme
1er décembre 2010, parAfin d’assurer une gestion correcte de la ferme, il est nécessaire de notifier plusieurs choses lors d’actions spécifiques à la fois à l’utilisateur mais également à l’ensemble des administrateurs de la ferme.
Les notifications de changement de statut
Lors d’un changement de statut d’une instance, l’ensemble des administrateurs de la ferme doivent être notifiés de cette modification ainsi que l’utilisateur administrateur de l’instance.
À la demande d’un canal
Passage au statut "publie"
Passage au (...) -
Initialisation de MediaSPIP (préconfiguration)
20 février 2010, parLors de l’installation de MediaSPIP, celui-ci est préconfiguré pour les usages les plus fréquents.
Cette préconfiguration est réalisée par un plugin activé par défaut et non désactivable appelé MediaSPIP Init.
Ce plugin sert à préconfigurer de manière correcte chaque instance de MediaSPIP. Il doit donc être placé dans le dossier plugins-dist/ du site ou de la ferme pour être installé par défaut avant de pouvoir utiliser le site.
Dans un premier temps il active ou désactive des options de SPIP qui ne le (...)
Sur d’autres sites (5775)
-
avutil/channel_layout : add a 9.1.4 channel layout
3 novembre 2023, par James Almeravutil/channel_layout : add a 9.1.4 channel layout
Mapping to ITU-R BS.2051-3 "Sound System G" and ITU-R BS.1196-8 "Channel
Configuration 20".Signed-off-by : James Almer <jamrial@gmail.com>
-
avutil/channel_layout : add a 7.2.3 channel layout
3 novembre 2023, par James Almeravutil/channel_layout : add a 7.2.3 channel layout
Mapping to ITU-R BS.2051-3 "Sound System F" and ITU-R BS.1196-8 "Channel
Configuration 15".Signed-off-by : James Almer <jamrial@gmail.com>
-
How can I combine a screenshot and two video files with ffmpeg ?
26 novembre 2023, par lukascbossertI have a folder with video files. Some are
.mov
, some are.mp4
. As a first step I am converting the.mov
-files into.mp4
with :

while read mov; do
 mp4=$(echo "$mov"|sed -e 's|\.mov$|.mp4|i')
 if [ "$mov" == "$mp4" ]; then
 echo "Failed to generate unique MP4 filename for file $mov"
 fi
 ffmpeg -i "$mov" -c:v libx264 -f mp4 "$mp4"
 done < <(find . -type f -iname '*.mov')



This works technically fine.


As a second step I need to merge two video files : the first one is always the same (
intro.mp4
with audio), the second file is the either converted.mov
or the.mp4
from the folder (also with audio).
Additionally I need a screenshot of the first frame from the second video, which shall be the very first frame and visible for e.g. half a second (for e.g. youtube-shorts to differentiate the videos).

I create the screenshot with


ffmpeg -i ${fzbVideo} -ss 1 -vframes 1 ${cover}"_%01d.jpg"



which works perfectly fine.


As far as I could I followed the example shown here and the documentation of ffmpeg
and created a loop for all the videos and the steps of merge screenshot and videos :


for fzbVideo in *.mp4; do
 # intro should be at the beginning of each video
 intro="intro/fzb-intro.mp4"
 # getting a cover imge
 cover="$(basename ${fzbVideo} .mp4)_cover"
 # naming the output file
 fzbVideoOutput="$(basename ${fzbVideo} .mp4)_output.mp4"
 # create a cover image from the first frame of the video
 ffmpeg -i ${fzbVideo} -ss 1 -vframes 1 ${cover}"_%01d.jpg"
 # combine the cover image with the intro and the actual video file
 ffmpeg \
-loop 1 -framerate 1 -t 1 -i ${cover}"_1.jpg" \
-i ${intro} \
-i ${fzbVideo} \
-f lavfi -t 0.1 -i anullsrc=channel_layout=stereo:sample_rate=44100 \
-filter_complex '[0:v:0][0:a:0][1:v:0][1:a:0][2:a:0][2:a:0]concat=n=3:v=1:a=1' ${fzbVideoOutput}
done



But this creates the error :


Stream specifier ':a:0' in filtergraph description [0:v:0][0:a:0][1:v:0][1:a:0][2:a:0][2:a:0]concat=n=3:v=1:a=1 matches no streams.



What do I need to change ?
Additionally, is there a way to combine the converstion from
.mov
to.mp4
also in the loop (if necessary) ?


Edit : content from the CLI, in case this is important information :


ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers
 built with Apple clang version 14.0.3 (clang-1403.0.22.14.1)
 configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/6.0_1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon
 libavutil 58. 2.100 / 58. 2.100
 libavcodec 60. 3.100 / 60. 3.100
 libavformat 60. 3.100 / 60. 3.100
 libavdevice 60. 1.100 / 60. 1.100
 libavfilter 9. 3.100 / 9. 3.100
 libswscale 7. 1.100 / 7. 1.100
 libswresample 4. 10.100 / 4. 10.100
 libpostproc 57. 1.100 / 57. 1.100
Input #0, image2, from 'IMG_5546_cover_1.jpg':
 Duration: 00:00:01.00, start: 0.000000, bitrate: 836 kb/s
 Stream #0:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 1080x1920, 1 fps, 1 tbr, 1 tbn
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'intro/fzb-intro.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 1
 compatible_brands: isommp41mp42
 creation_time : 2023-11-24T21:59:10.000000Z
 Duration: 00:00:00.83, start: 0.000000, bitrate: 1247 kb/s
 Stream #1:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 602x1070, 1191 kb/s, 30 fps, 30 tbr, 600 tbn (default)
 Metadata:
 creation_time : 2023-11-24T21:59:10.000000Z
 handler_name : Core Media Video
 vendor_id : [0][0][0][0]
 Stream #1:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 38 kb/s (default)
 Metadata:
 creation_time : 2023-11-24T21:59:10.000000Z
 handler_name : Core Media Audio
 vendor_id : [0][0][0][0]
Input #2, mov,mp4,m4a,3gp,3g2,mj2, from 'IMG_5546.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf60.3.100
 Duration: 00:00:28.37, start: 0.000000, bitrate: 3126 kb/s
 Stream #2:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1080x1920, 2989 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default)
 Metadata:
 handler_name : Core Media Video
 vendor_id : [0][0][0][0]
 encoder : Lavc60.3.100 libx264
 Stream #2:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
 Metadata:
 handler_name : Core Media Audio
 vendor_id : [0][0][0][0]
Stream specifier ':a' in filtergraph description [0:v] [0:a] [1:v] [1:a] [2:v] [2:a] concat=n=3:v=1:a=1 [v] [a] matches no streams.