
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (89)
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration 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 (5702)
-
FFmpeg that can be packaged by Pyinstaller as a module ?
26 avril 2020, par Andy_yeI created a program that would extract a mp3 file from a webm file. It uses FFmpeg as a conversion tool, and when I turn it into a exe file it works well on my computer, but there are some problems.



- 

-
When using a nother computer, in does not work because the FFmpeg is not present
-
When changing location of the FFmpeg, for example, in a folder with my exe, it does not work







so Is there any way to 1.point the python file to the ffmpeg or 2. use some package that includes ffmpeg in itself ?


-
-
Blur a video based on timestamps using FFMPEG
22 avril 2020, par Aeren singhI have a JSON file which contains location of human faces as well as their timestamp throughout the video.
I want to blur the video at multiple locations. My scenario is like there may be 3 faces at given time all 3 should be blurred, at times there may be no faces and hence no blurring will be needed.


-
ffmpeg : join + crossfade 5 input files (video+audio) into one output file
7 avril 2020, par Fab SanchezI have 5 mp4 input videos (audio+video) that I want to 'join' into a single output video with a crossfade effect in between each pair of videos.
I want to 'crossfade' both the audio and the video, with a transition of 0.4s.
(Not an actual crossfade, more like video-2 fades in over video-1, video-1 does not need to fade out, but this is not the problem)



I'm using ffmpeg-4.1.3-win64-static



I have followed many tutorials and answers from here, but there are so many different ways to do it...



Each one of the 5 videos is 1.024s long, duration obtained with ffprobe



ffprobe.exe -i "0.mp4" -show_entries format=duration -v quiet -of csv="p=0"




This is the command for both audio and video :
(I've reformatted the command so it is easier to read, it is issued as a single line in the command prompt)



ffmpeg.exe -y -i "0.mp4" -i "1.mp4" -i "2.mp4" -i "3.mp4" -i "4.mp4" 
-filter_complex "
[0:v]setpts=PTS-STARTPTS[v1];
[1:v]format=yuva420p,fade=in:st=0:d=0.4:alpha=1,setpts=PTS-STARTPTS+(0.6/TB)[v2];
[2:v]format=yuva420p,fade=in:st=0:d=0.4:alpha=1,setpts=PTS-STARTPTS+(1.2/TB)[v3];
[3:v]format=yuva420p,fade=in:st=0:d=0.4:alpha=1,setpts=PTS-STARTPTS+(1.8/TB)[v4];
[4:v]format=yuva420p,fade=in:st=0:d=0.4:alpha=1,setpts=PTS-STARTPTS+(2.4/TB)[v5];
[v1][v2]overlay[u1];[u1][v3]overlay[u2];[u2][v4]overlay[u3];[u3][v5]overlay,format=yuv420p[v];
[0][1]acrossfade=d=0.4[a0];
[a0][2]acrossfade=d=0.4[a1];
[a1][3]acrossfade=d=0.4[a2];
[a2][4]acrossfade=d=0.4[a]
" -map [v] -map [a] "output.mp4"




When I do both audio and video into a single output file, output.mp4 can not be played on VLC, this is the vlc log :



main debug: `file:///C:/project/input-videos/output.mp4' gives access `file' demux `any' path `/C:project/input-videos/output.mp4'
main debug: creating demux: access='file' demux='any' location='/C:/project/input-videos/output.mp4' file='C:\project\input-videos\output.mp4'
main debug: looking for access_demux module matching "file": 15 candidates
main debug: no access_demux modules matched
main debug: creating access: file:///C:/project/input-videos/output.mp4
main debug: (path: C:\project\input-videos\output.mp4)
main debug: looking for access module matching "file": 26 candidates
main debug: using access module "filesystem"
main debug: looking for stream_filter module matching "prefetch,cache_read": 24 candidates
cache_read debug: Using stream method for AStream*
cache_read debug: starting pre-buffering
cache_read error: cannot pre fill buffer
main debug: looking for meta fetcher module matching "any": 1 candidates
main debug: no stream_filter modules matched
main warning: cannot insert stream filter prefetch,cache_read
main debug: looking for stream_filter module matching "any": 24 candidates
playlist debug: not enough data
...




This is the output from ffmpeg :



ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 8.3.1 (GCC) 20190414
 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
 libavutil 56. 22.100 / 56. 22.100
 libavcodec 58. 35.100 / 58. 35.100
 libavformat 58. 20.100 / 58. 20.100
 libavdevice 58. 5.100 / 58. 5.100
 libavfilter 7. 40.101 / 7. 40.101
 libswscale 5. 3.100 / 5. 3.100
 libswresample 3. 3.100 / 3. 3.100
 libpostproc 55. 3.100 / 55. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '0.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.20.100
 location-eng : +52.6899-001.8293/
 location : +52.6899-001.8293/
 Duration: 00:00:01.02, start: 0.000000, bitrate: 13821 kb/s
 Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 2224x1080 [SAR 1:1 DAR 278:135], 14002 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
 Metadata:
 handler_name : VideoHandle
 Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
 Metadata:
 handler_name : SoundHandle
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.20.100
 location-eng : +53.4256-001.3580/
 location : +53.4256-001.3580/
 Duration: 00:00:01.02, start: 0.000000, bitrate: 7094 kb/s
 Stream #1:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 2224x1080 [SAR 1:1 DAR 278:135], 7113 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
 Metadata:
 handler_name : VideoHandle
 Stream #1:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
 Metadata:
 handler_name : SoundHandle
Input #2, mov,mp4,m4a,3gp,3g2,mj2, from '2.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.20.100
 location-eng : +53.3927-001.5044/
 location : +53.3927-001.5044/
 Duration: 00:00:01.02, start: 0.000000, bitrate: 7367 kb/s
 Stream #2:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 2224x1080 [SAR 1:1 DAR 278:135], 7394 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
 Metadata:
 handler_name : VideoHandle
 Stream #2:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 126 kb/s (default)
 Metadata:
 handler_name : SoundHandle
Input #3, mov,mp4,m4a,3gp,3g2,mj2, from '3.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.20.100
 location-eng : +53.3927-001.5044/
 location : +53.3927-001.5044/
 Duration: 00:00:01.02, start: 0.000000, bitrate: 8145 kb/s
 Stream #3:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 2224x1080 [SAR 1:1 DAR 278:135], 8192 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
 Metadata:
 handler_name : VideoHandle
 Stream #3:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 125 kb/s (default)
 Metadata:
 handler_name : SoundHandle
Input #4, mov,mp4,m4a,3gp,3g2,mj2, from '4.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.20.100
 location-eng : +53.3927-001.5044/
 location : +53.3927-001.5044/
 Duration: 00:00:01.02, start: 0.000000, bitrate: 6241 kb/s
 Stream #4:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 2224x1080 [SAR 1:1 DAR 278:135], 6241 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
 Metadata:
 handler_name : VideoHandle
 Stream #4:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 126 kb/s (default)
 Metadata:
 handler_name : SoundHandle
Stream mapping:
 Stream #0:0 (h264) -> setpts
 Stream #0:1 (aac) -> acrossfade:crossfade0
 Stream #1:0 (h264) -> format
 Stream #1:1 (aac) -> acrossfade:crossfade1
 Stream #2:0 (h264) -> format
 Stream #2:1 (aac) -> acrossfade:crossfade1
 Stream #3:0 (h264) -> format
 Stream #3:1 (aac) -> acrossfade:crossfade1
 Stream #4:0 (h264) -> format
 Stream #4:1 (aac) -> acrossfade:crossfade1
 format -> Stream #0:0 (libx264)
 acrossfade -> Stream #0:1 (aac)
 Press [q] to stop, [?] for help




When I do the video only it is fine. The duration of the output.mp4 file generated for video-only is 3.4s



When I do the audio only it is also fine. The duration of the output.mp4 file generated for audio-only is 3.435s



This is the command for video only :



ffmpeg.exe -y -i "0.mp4" -i "1.mp4" -i "2.mp4" -i "3.mp4" -i "4.mp4" 
-filter_complex "
[0:v]setpts=PTS-STARTPTS[v1];
[1:v]format=yuva420p,fade=in:st=0:d=0.4:alpha=1,setpts=PTS-STARTPTS+(0.6/TB)[v2];
[2:v]format=yuva420p,fade=in:st=0:d=0.4:alpha=1,setpts=PTS-STARTPTS+(1.2/TB)[v3];
[3:v]format=yuva420p,fade=in:st=0:d=0.4:alpha=1,setpts=PTS-STARTPTS+(1.8/TB)[v4];
[4:v]format=yuva420p,fade=in:st=0:d=0.4:alpha=1,setpts=PTS-STARTPTS+(2.4/TB)[v5];
[v1][v2]overlay[u1];[u1][v3]overlay[u2];[u2][v4]overlay[u3];[u3][v5]overlay,format=yuv420p[v]
" -map [v] "output.mp4"




This is the command for audio only :



ffmpeg.exe -y -i "0.mp4" -i "1.mp4" -i "2.mp4" -i "3.mp4" -i "4.mp4" 
-filter_complex "
[0][1]acrossfade=d=0.4[a0];
[a0][2]acrossfade=d=0.4[a1];
[a1][3]acrossfade=d=0.4[a2];
[a2][4]acrossfade=d=0.4[a]
" -map [a] "output.mp4"




What am I missing in order to generate one output file with both audio and video content ?



Edit : Here's the full ffmpeg command + result for audio and video combined with "-loglevel debug" added. (Too big to add directly here, so I've added it to Pastebin)
https://pastebin.com/NLBc7Abb



Work Around
Not a solution, but I found a work around :



- 

- Create video only output using command above, output to video.mp4
- Create audio only output using command above, output to audio.mp4
- Merge both video.mp4 and audio.mp4 into output.mp4 using the following command :









ffmpeg.exe -y -i "video.mp4" -i "audio.mp4" -c:v copy -c:a aac output.mp4




If anyone has any ideas as to why the combined audio+video command does not work, please let me know. :)