
Recherche avancée
Autres articles (26)
-
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Taille des images et des logos définissables
9 février 2011, parDans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)
Sur d’autres sites (7475)
-
ffmpeg get machine readable output
15 mai 2017, par J.SI am trying to find a way to get FFmpeg to return a machine readable output. basically, I just want to know if video conversion was successfull.
I am calling FFmpeg from go code.
output, err := exec.Command("ffmpeg", "-i", source, "-vcodec", "h264", "-acodec", "aac", "-strict", "-2", destination).CombinedOutput()
The above code executes this command :
ffmpeg -i /tmp/pitchVideo-1494844705-102.mp4 -vcodec h264 -acodec aac -strict -2 /tmp/1494844705.mp4
I get the following output :
ffmpeg version 2.4.3-1ubuntu1~trusty6 Copyright (c) 2000-2014 the FFmpeg developers
built on Nov 22 2014 17:07:19 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
configuration: --prefix=/usr --extra-version='1ubuntu1~trusty6' --build-suffix=-ffmpeg --toolchain=hardened --extra-cflags= --extra-cxxflags= --libdir=/usr/lib/x86_64-linux-gnu --shlibdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-fontconfig --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-opengl --enable-x11grab --enable-libxvid --enable-libx265 --enable-libdc1394 --enable-libiec61883 --enable-libzvbi --enable-libzmq --enable-frei0r --enable-libx264 --enable-libsoxr --enable-openal --enable-libopencv
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.101 / 56. 4.101
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 1.100 / 5. 1.100
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/pitchVideo-1494844705-102.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.40.101
Duration: 00:00:39.28, start: 0.000000, bitrate: 2300 kb/s
Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x480, 2231 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 64 kb/s (default)
Metadata:
handler_name : SoundHandler
[libx264 @ 0x1e12640] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX LZCNT
[libx264 @ 0x1e12640] profile High, level 3.0
[libx264 @ 0x1e12640] 264 - core 142 r2389 956c8d8 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - 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=1 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 '/tmp/new.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.4.101
Stream #0:0(und): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 640x480, q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc56.1.100 libx264
Stream #0:1(und): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, mono, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
encoder : Lavc56.1.100 aac
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
frame= 983 fps= 27 q=28.0 Lsize= 4134kB time=00:00:39.24 bitrate= 863.0kbits/s dup=1 drop=0
video:3542kB audio:565kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.646525%
[libx264 @ 0x1e12640] frame I:9 Avg QP:19.44 size: 9936
[libx264 @ 0x1e12640] frame P:664 Avg QP:23.58 size: 4839
[libx264 @ 0x1e12640] frame B:310 Avg QP:25.50 size: 1045
[libx264 @ 0x1e12640] consecutive B-frames: 56.0% 4.3% 5.2% 34.6%
[libx264 @ 0x1e12640] mb I I16..4: 33.9% 53.6% 12.5%
[libx264 @ 0x1e12640] mb P I16..4: 6.7% 10.2% 0.9% P16..4: 50.7% 8.3% 3.0% 0.0% 0.0% skip:20.2%
[libx264 @ 0x1e12640] mb B I16..4: 0.4% 0.4% 0.0% B16..8: 41.7% 1.4% 0.1% direct: 1.3% skip:54.7% L0:46.9% L1:50.4% BI: 2.8%
[libx264 @ 0x1e12640] 8x8 transform intra:56.8% inter:76.1%
[libx264 @ 0x1e12640] coded y,uvDC,uvAC intra: 37.0% 60.5% 13.9% inter: 17.8% 26.0% 0.3%
[libx264 @ 0x1e12640] i16 v,h,dc,p: 23% 35% 15% 27%
[libx264 @ 0x1e12640] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 27% 21% 4% 4% 4% 4% 5% 5%
[libx264 @ 0x1e12640] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 26% 14% 4% 5% 5% 5% 5% 4%
[libx264 @ 0x1e12640] i8c dc,h,v,p: 53% 22% 19% 6%
[libx264 @ 0x1e12640] Weighted P-Frames: Y:8.7% UV:3.5%
[libx264 @ 0x1e12640] ref P L0: 73.8% 15.7% 8.4% 2.0% 0.1%
[libx264 @ 0x1e12640] ref B L0: 92.9% 6.2% 0.9%
[libx264 @ 0x1e12640] ref B L1: 96.1% 3.9%
[libx264 @ 0x1e12640] kb/s:737.84Edit 1 : Maybe I can just check if new video file was generated. But I don’t know if that is a dependable way to do it.
-
FFMPEG - Concatenate 2 MP4 Files, one has video and audio and the other has only audio
5 août 2016, par AviI am trying to merge 2 mp4 files using FFMPEG. One of these files has both video and audio (
track1.mp4
), while the other one has only audio (track2.mp4
). The names of these files are listed in a text file called'filesToMerge.txt'
in the following manner :file 'track1.mp4'
file 'track2.mp4'I then execute the following ffmpeg command to merge them.
ffmpeg -f concat -i filesToMerge.txt -c copy output.mp4
However, the concatenated file that is generated consists of only the first file that is listed in
filesToMerge.txt
. That is, iftrack1.mp4
(which has both video and audio) is the first file in the list, then only that file makes up output.mp4 (the concatenated file produced) and vice versa.I would like for both files to be in
output.mp4
. I am using Ubuntu 14.04 (if that helps). How can I solve this problem ?When I run this command
ffmpeg -i track1.mp4 -i track2.mp4 output.mp4
I get the followingffmpeg version N-76944-g15206ff Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libdcadec --enable-libfreetype --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvo-aacenc --enable-libvidstab
libavutil 55. 9.100 / 55. 9.100
libavcodec 57. 16.101 / 57. 16.101
libavformat 57. 19.100 / 57. 19.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 17.100 / 6. 17.100
libavresample 3. 0. 0 / 3. 0. 0
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 'track1.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.40.101
Duration: 00:00:10.76, start: 0.023220, bitrate: 351 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 800x400 [SAR 400:533 DAR 800:533], 181 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 194 kb/s (default)
Metadata:
handler_name : SoundHandler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'track2.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
creation_time : 1970-01-01 00:00:00
encoder : Lavf52.32.0
Duration: 00:00:32.21, start: 0.000000, bitrate: 46 kb/s
Stream #1:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 43 kb/s (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : SoundHandler
[libx264 @ 0x3950ce0] using SAR=400/533
[libx264 @ 0x3950ce0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2
[libx264 @ 0x3950ce0] profile High, level 3.0
[libx264 @ 0x3950ce0] 264 - core 142 r2491 24e4fed - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - 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=1 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 'output.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.19.100
Stream #0:0(und): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 800x400 [SAR 400:533 DAR 800:533], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc57.16.101 libx264
Stream #0:1(und): Audio: aac (libfdk_aac) ([64][0][0][0] / 0x0040), 44100 Hz, stereo, s16, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
encoder : Lavc57.16.101 libfdk_aac
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (libfdk_aac))
Press [q] to stop, [?] for help
frame= 270 fps= 99 q=28.0 Lsize= 382kB time=00:00:10.72 bitrate= 291.9kbits/s dup=1 drop=0
video:230kB audio:143kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.482656%
[libx264 @ 0x3950ce0] frame I:2 Avg QP:18.87 size:109452
[libx264 @ 0x3950ce0] frame P:68 Avg QP:15.09 size: 171
[libx264 @ 0x3950ce0] frame B:200 Avg QP:23.33 size: 23
[libx264 @ 0x3950ce0] consecutive B-frames: 1.1% 0.0% 1.1% 97.8%
[libx264 @ 0x3950ce0] mb I I16..4: 11.0% 39.6% 49.5%
[libx264 @ 0x3950ce0] mb P I16..4: 0.0% 0.0% 0.0% P16..4: 5.9% 0.1% 0.0% 0.0% 0.0% skip:93.9%
[libx264 @ 0x3950ce0] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.3% 0.0% 0.0% direct: 0.0% skip:99.7% L0:21.8% L1:78.2% BI: 0.0%
[libx264 @ 0x3950ce0] 8x8 transform intra:39.7% inter:92.8%
[libx264 @ 0x3950ce0] coded y,uvDC,uvAC intra: 92.0% 95.0% 73.2% inter: 0.1% 1.4% 0.0%
[libx264 @ 0x3950ce0] i16 v,h,dc,p: 1% 30% 4% 66%
[libx264 @ 0x3950ce0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 6% 55% 16% 2% 4% 2% 8% 2% 6%
[libx264 @ 0x3950ce0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 18% 13% 7% 9% 7% 12% 6% 11%
[libx264 @ 0x3950ce0] i8c dc,h,v,p: 44% 35% 10% 11%
[libx264 @ 0x3950ce0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x3950ce0] ref P L0: 98.1% 0.2% 1.1% 0.5%
[libx264 @ 0x3950ce0] ref B L0: 85.1% 13.2% 1.7%
[libx264 @ 0x3950ce0] ref B L1: 93.6% 6.4%
[libx264 @ 0x3950ce0] kb/s:174.10 -
ffmpeg : how to correctly program input framerate calculation, given desired video length duration and output framerate ?
19 septembre 2015, par user89Let us say that I have
n
pictures named asimgXY.png
(whereXY
represent the numbers0
ton-1
, properly padded with zeros).From these, I would like to create a video that is
t
seconds long, that has an (output) framerateR
.I want to figure out what the input framerate should be, so I do the following calculation :
-
time spent per frame :
t_per_frame = t/n
-
input framerate :
1/t_per_frame = n/t
However, when I then try to create a movie using the following command :
ffmpeg -framerate n/t -i img%02d.png -r 30 test_output.mp4
I don’t get a movie that is
t
seconds long, and only two of the frames end up getting displayed. Why is this the case ?The following questions were unhelpful :
How to successfully use ffmpeg to convert images into videos
Turning images into videos with ffmpeg
I think I am misunderstanding what is meant by input framerate, and what is meant by output framerate. Could you help clarify ? I am using a Python script to call ffmpeg, as documented here : http://zulko.github.io/blog/2013/09/27/read-and-write-video-frames-in-python-using-ffmpeg/
Here’s the output from the following manually executed command :
ffmpeg -framerate 24/5 -i img%02d.png -c:v libx264 -r 30 -pix_fmt yuv420p test_output.mp4
ffmpeg version N-75204-g314bc20 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-l
ibilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --en
able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --ena
ble-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enabl
e-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --ena
ble-decklink --enable-opencl --enable-zlib
libavutil 55. 2.100 / 55. 2.100
libavcodec 57. 1.100 / 57. 1.100
libavformat 57. 0.100 / 57. 0.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 1.100 / 6. 1.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.100 / 2. 0.100
libpostproc 54. 0.100 / 54. 0.100
Input #0, image2, from 'img%02d.png':
Duration: 00:00:00.42, start: 0.000000, bitrate: N/A
Stream #0:0: Video: png, rgb24(pc), 800x400, 4.80 tbr, 4.80 tbn, 4.80 tbc
File 'test_output.mp4' already exists. Overwrite ? [y/N] y
[libx264 @ 0000000004f16ba0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0000000004f16ba0] profile High, level 3.0
[libx264 @ 0000000004f16ba0] 264 - core 148 r2597 e86f3a1 - H.264/MPEG-4 AVC cod
ec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 r
ef=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_pski
p=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 dec
imate=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 'test_output.mp4':
Metadata:
encoder : Lavf57.0.100
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 800x40
0, q=-1--1, 30 fps, 15360 tbn, 30 tbc
Metadata:
encoder : Lavc57.1.100 libx264
Stream mapping:
Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame= 12 fps=0.0 q=-1.0 Lsize= 3kB time=00:00:00.33 bitrate= 62.2kbits
/s dup=10 drop=0
video:2kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing ove
rhead: 60.557274%
[libx264 @ 0000000004f16ba0] frame I:1 Avg QP:10.12 size: 566
[libx264 @ 0000000004f16ba0] frame P:3 Avg QP:18.10 size: 62
[libx264 @ 0000000004f16ba0] frame B:8 Avg QP:13.75 size: 22
[libx264 @ 0000000004f16ba0] consecutive B-frames: 8.3% 0.0% 25.0% 66.7%
[libx264 @ 0000000004f16ba0] mb I I16..4: 99.4% 0.0% 0.6%
[libx264 @ 0000000004f16ba0] mb P I16..4: 0.0% 0.0% 0.0% P16..4: 0.0% 0.0
% 0.0% 0.0% 0.0% skip:99.9%
[libx264 @ 0000000004f16ba0] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.1% 0.0
% 0.0% direct: 0.0% skip:99.9% L0:37.5% L1:62.5% BI: 0.0%
[libx264 @ 0000000004f16ba0] 8x8 transform intra:0.0% inter:0.0%
[libx264 @ 0000000004f16ba0] coded y,uvDC,uvAC intra: 0.6% 0.0% 0.0% inter: 0.0%
0.0% 0.0%
[libx264 @ 0000000004f16ba0] i16 v,h,dc,p: 96% 0% 4% 0%
[libx264 @ 0000000004f16ba0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 18% 36% 2% 2%
3% 3% 5% 1%
[libx264 @ 0000000004f16ba0] i8c dc,h,v,p: 100% 0% 0% 0%
[libx264 @ 0000000004f16ba0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0000000004f16ba0] ref P L0: 50.0% 50.0%
[libx264 @ 0000000004f16ba0] kb/s:18.50 -