
Recherche avancée
Médias (1)
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
Autres articles (56)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;
Sur d’autres sites (6018)
-
How can I compress or change the resolution of the video very fast with FFmpeg ?
28 mai 2017, par RaresI would like to compress or change the resolution of the video before sending it to server but I don’t want to take too long. For example for the following code a video with size 100MB it takes 2-3 min to resize it to 10MB. Can I do it faster without losing too much quality ?
String[] command = {"-i", filePath, "-vf", "scale=640:360", "-c:a", "copy", "-preset", "ultrafast", dest.getAbsolutePath()};
Console output for above command :
05-28 11:50:22.131 23323-23323/com.example.rares.peoplecounterapp D/TestFFmpeg: SUCCESS with output : ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8 (GCC)
configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/DCIM/Camera/20170501_212606.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2017-05-01 18:26:46
com.android.version: 6.0
Duration: 00:00:38.70, start: 0.000000, bitrate: 17203 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 17007 kb/s, SAR 1:1 DAR 16:9, 29.98 fps, 29.92 tbr, 90k tbn, 180k tbc (default)
Metadata:
creation_time : 2017-05-01 18:26:46
handler_name : VideoHandle
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 155 kb/s (default)
Metadata:
creation_time : 2017-05-01 18:26:46
handler_name : SoundHandle
[libx264 @ 0xf7344400] using SAR=1/1
[libx264 @ 0xf7344400] using cpu capabilities: none!
[libx264 @ 0xf7344400] profile Constrained Baseline, level 3.0
[libx264 @ 0xf7344400] 264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=9 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
Output #0, mp4, to '/storage/emulated/0/DCIM/Camera/20170501_212606_compressed97.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
com.android.version: 6.0
encoder : Lavf57.25.100
Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 29.92 fps, 11488 tbn, 29.92 tbc (default)
Metadata:
creation_time : 2017-05-01 18:26:46
handler_name : VideoHandle
encoder : Lavc57.24.102 libx264
Side data:
unknown side data type 10 (24 bytes)
Stream #0:1(eng): Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, 155 kb/s (default)
Metadata:
creation_time : 2017-05-01 18:26:46
handler_name : SoundHandle
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 6 fps=0.0 q=0.0 size= 0kB time=00:00:01.04 bitrate= 0.4kbits/s speed=1.96x
frame= 15 fps=
05-28 11:50:22.132 23323-23323/com.example.rares.peoplecounterapp D/TestFFmpeg: Finished command :ffmpeg [Ljava.lang.String;@d8854f -
Create 1 video using image with length of audio
19 septembre 2017, par VishnuI am trying to create video with the length of an audio file , and 1 single image as the background for whole video.
I use following code
'ffmpeg -y -loop 1 -f image2 -r 24 -i subtitle.jpg -i audio.mp3 -c:v libx264 -c:a copy -shortest video.flv';
But problem is processing time is too slow , and sometime video length is not same as audio length.Can some one suggest me alternative ideas.
p.s : audio length is just 3 to 8 seconds.
Below is my output
ffmpeg version N-83443-gc03029a Copyright (c) 2000-2017 the FFmpeg
developers built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-11)
configuration : —enable-gpl —enable-version3 —enable-libfdk_aac
—enable-libmp3lame —enable-libtheora —enable-libvorbis —enable-libvpx —enable-libx264 —enable-nonfree —enable-libopencore-amrnb —enable-libopencore-amrwb —enable-libgsm —enable-libxvid —disable-static —enable-shared libavutil 55. 46.100 / 55. 46.100 libavcodec 57. 75.100 / 57. 75.100 libavformat 57. 66.101
/ 57. 66.101 libavdevice 57. 2.100 / 57. 2.100 libavfilter 6. 73.100 /
6. 73.100 libswscale 4. 3.101 / 4. 3.101 libswresample 2. 4.100 / 2. 4.100 libpostproc 54. 2.100 / 54. 2.100 Input #0, image2, from ’subtitle/1.jpg’ : Duration : 00:00:00.04, start : 0.000000, bitrate : N/A
Stream #0:0 : Video : mjpeg, yuvj420p(pc, bt470bg/unknown/unknown),
1280x720 [SAR 1:1 DAR 16:9], 24 fps, 24 tbr, 24 tbn, 24 tbc [mp3 @
0x1013ee0] Estimating duration from bitrate, this may be inaccurate
Input #1, mp3, from ’audio/1.mp3’ : Metadata : encoder : Lavf57.71.100
Duration : 00:00:05.98, start : 0.000000, bitrate : 32 kb/s Stream #1:0 :
Audio : mp3, 22050 Hz, mono, s16p, 32 kb/s No pixel format specified,
yuvj420p for H.264 encoding chosen. Use -pix_fmt yuv420p for
compatibility with outdated media players. [libx264 @ 0x1020600] using
SAR=1/1 [libx264 @ 0x1020600] using cpu capabilities : MMX2 SSE2Fast
SSSE3 SSE4.2 AVX [libx264 @ 0x1020600] profile High, level 3.1
[libx264 @ 0x1020600] 264 - core 148 r2762 90a61ec - H.264/MPEG-4 AVC
codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html -
options : cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7
psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1
8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2
threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1
interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2
b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250
keyint_min=24 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf
mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40
aq=1:1.00 Output #0, flv, to ’video/1.flv’ : Metadata : encoder :
Lavf57.66.101 Stream #0:0 : Video : h264 (libx264) ([7][0][0][0] /
0x0007), yuvj420p(pc), 1280x720 [SAR 1:1 DAR 16:9], q=-1—1, 24 fps,
1k tbn, 24 tbc Metadata : encoder : Lavc57.75.100 libx264 Side data :
cpb : bitrate max/min/avg : 0/0/0 buffer size : 0 vbv_delay : -1 Stream0:1 : Audio : mp3 ([2][0][0][0] / 0x0002), 22050 Hz, mono, s16p, 32 kb/s Stream mapping : Stream #0:0 -> #0:0 (mjpeg (native) -> h264
(libx264)) Stream #1:0 -> #0:1 (copy) Press [q] to stop, [?] for help
[image2 @ 0x1011680] Thread message queue blocking ; consider raising
the thread_queue_size option (current value : 8) frame= 32 fps=0.0
q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x frame= 53 fps=
51 q=28.0 size= 210kB time=00:00:00.13 bitrate=13157.8kbits/s
speed=0.126x frame= 73 fps= 47 q=28.0 size= 216kB time=00:00:00.96
bitrate=1828.9kbits/s speed=0.622x frame= 93 fps= 45 q=28.0 size=
221kB time=00:00:01.79 bitrate=1009.9kbits/s speed=0.859x frame= 109
fps= 42 q=28.0 size= 225kB time=00:00:02.45 bitrate= 750.6kbits/s
speed=0.95x frame= 126 fps= 40 q=28.0 size= 230kB time=00:00:03.16
bitrate= 594.3kbits/s speed=1.02x frame= 145 fps= 40 q=28.0 size=
235kB time=00:00:03.95 bitrate= 485.7kbits/s speed=1.09x frame= 162
fps= 39 q=28.0 size= 239kB time=00:00:04.67 bitrate= 419.3kbits/s
speed=1.12x frame= 181 fps= 39 q=28.0 size= 244kB time=00:00:05.46
bitrate= 366.5kbits/s speed=1.17x frame= 193 fps= 33 q=28.0 Lsize=
248kB time=00:00:05.95 bitrate= 340.4kbits/s speed=1.03x video:217kB
audio:23kB subtitle:0kB other streams:0kB global headers:0kB muxing
overhead : 2.834417% [libx264 @ 0x1020600] frame I:1 Avg QP:17.19
size:212155 [libx264 @ 0x1020600] frame P:48 Avg QP:18.02 size : 140
[libx264 @ 0x1020600] frame B:144 Avg QP:27.33 size : 43 [libx264 @
0x1020600] consecutive B-frames : 0.5% 0.0% 0.0% 99.5% [libx264 @
0x1020600] mb I I16..4 : 3.1% 86.8% 10.2% [libx264 @ 0x1020600] mb P
I16..4 : 0.0% 0.0% 0.0% P16..4 : 1.0% 0.0% 0.0% 0.0% 0.0% skip:99.0%
[libx264 @ 0x1020600] mb B I16..4 : 0.0% 0.0% 0.0% B16..8 : 0.1% 0.0%
0.0% direct : 0.0% skip:99.8% L0 : 9.1% L1:90.9% BI : 0.0% [libx264 @ 0x1020600] 8x8 transform intra:82.0% inter:55.7% [libx264 @ 0x1020600]
coded y,uvDC,uvAC intra : 87.6% 80.7% 62.5% inter : 0.0% 0.2% 0.0%
[libx264 @ 0x1020600] i16 v,h,dc,p : 76% 22% 2% 1% [libx264 @
0x1020600] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu : 11% 15% 24% 7% 9% 7% 10% 6%
10% [libx264 @ 0x1020600] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu : 23% 27% 9% 7%
8% 6% 8% 5% 8% [libx264 @ 0x1020600] i8c dc,h,v,p : 55% 23% 14% 8%
[libx264 @ 0x1020600] Weighted P-Frames : Y:0.0% UV:0.0% [libx264 @
0x1020600] ref P L0 : 95.1% 0.1% 3.2% 1.6% [libx264 @ 0x1020600] ref B
L0 : 91.7% 3.3% 5.0% [libx264 @ 0x1020600] ref B L1 : 86.1% 13.9%
[libx264 @ 0x1020600] kb/s:223.84 0 -
Blank video as the result of converting from bmp ffmpeg [duplicate]
1er juin 2021, par Артур Клочко

Update


I'm sorry, as I wrote I tried to play video via different variants and got nothing, but now I send it to myself via Telegram app, and it displays there correctly. It plays via Chrome also. Seems it is not the ffmpeg problem.


I uploaded it to my site, if you are not aware, please check it via stupid uwp app or Windows Media player if you are using Windows, and if you have the same problem, please feedback and I will report it as a bug





Recently I have been using ffmpeg to convert
jpg
file set tomp4
, and it was successfully. I used the next.bat
file to do it :

ffmpeg -framerate 60 -i out\%%d.jpg render.mp4



Now, I am trying to do the same, but with
bmp
files, generated as screenshots using WinApi. Images as themselves are absolutely correct - I can open them via photos app, or anything else. Images resolution is constant and equals 2002x773.

So now I am using the same
.bat
to make video :

ffmpeg -framerate 60 -i out\%%d.bmp render.mp4



It generates a tiny-size video (17 kb, for 10 bmp images, 5 mb each), that is opening by UWP video app or Windows Media program, but nothing is happening - no errors, yet no video length. If there are more images, the result video size also increases, but the video still doesn't play.


Full output from ffmpeg :


ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 9.2.1 (GCC) 20200122
 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --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 --enable-libopenmpt
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
Input #0, image2, from 'rnd\%d.bmp':
 Duration: 00:00:00.17, start: 0.000000, bitrate: N/A
 Stream #0:0: Video: bmp, bgra, 2002x773, 60 tbr, 60 tbn, 60 tbc
Stream mapping:
 Stream #0:0 -> #0:0 (bmp (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 052fed40] using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2
[libx264 @ 052fed40] profile High 4:4:4 Predictive, level 4.2, 4:4:4, 8-bit
[libx264 @ 052fed40] 264 - core 159 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=4 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'caev.mp4':
 Metadata:
 encoder : Lavf58.29.100
 Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv444p, 2002x773, q=-1--1, 60 fps, 15360 tbn, 60 tbc
 Metadata:
 encoder : Lavc58.54.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame= 10 fps=0.0 q=-1.0 Lsize= 16kB time=00:00:00.11 bitrate=1142.4kbits/s speed=0.151x
video:15kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 6.097639%
[libx264 @ 052fed40] frame I:1 Avg QP:18.80 size: 6840
[libx264 @ 052fed40] frame P:4 Avg QP:25.73 size: 1517
[libx264 @ 052fed40] frame B:5 Avg QP:35.54 size: 426
[libx264 @ 052fed40] consecutive B-frames: 20.0% 40.0% 0.0% 40.0%
[libx264 @ 052fed40] mb I I16..4: 21.1% 76.3% 2.6%
[libx264 @ 052fed40] mb P I16..4: 0.6% 0.3% 0.3% P16..4: 0.9% 0.6% 0.1% 0.0% 0.0% skip:97.0%
[libx264 @ 052fed40] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 4.0% 0.2% 0.0% direct: 0.0% skip:95.6% L0:34.5% L1:64.6% BI: 0.9%
[libx264 @ 052fed40] 8x8 transform intra:73.8% inter:10.2%
[libx264 @ 052fed40] coded y,u,v intra: 1.8% 1.5% 1.5% inter: 0.1% 0.1% 0.1%
[libx264 @ 052fed40] i16 v,h,dc,p: 52% 47% 1% 0%
[libx264 @ 052fed40] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 47% 45% 8% 0% 0% 0% 0% 0% 0%
[libx264 @ 052fed40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 31% 32% 3% 0% 1% 2% 5% 2%
[libx264 @ 052fed40] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 052fed40] ref P L0: 75.8% 4.1% 15.8% 4.3%
[libx264 @ 052fed40] ref B L0: 63.5% 34.8% 1.7%
[libx264 @ 052fed40] ref B L1: 97.6% 2.4%
[libx264 @ 052fed40] kb/s:721.78