
Recherche avancée
Médias (1)
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
Autres articles (31)
-
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 -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
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 (...)
Sur d’autres sites (3245)
-
FFmpeg - Concatenating videos with different resolutions
7 août 2017, par JillI currently have an android app where the videos get combined using ffmpeg’s concat. That works fine. However, when I add text (using drawtext) to one of the videos, after combining the videos again, the combined video gets distorted. The video with the drawtext shows up fine, but then the videos without text switches orientation.
I think the problem roots from the fact that a vertical video on my android phone has the resolution of 1920x1080, however if I use that for the scale when executing drawtext, it becomes horizontal.
I think an example might help explain this better. Let’s say I have 2 vertically recorded videos, and I combine them with concat. The combined video shows up fine. Then if I add text to the 1st video using drawtext, the combined video will then show the first video (with text) at normal orientation (vertical). However, when it transitions to the next video, it first stalls for a couple seconds and then the 2nd video is shown at a horizontal orientation.
Also, I tried this also with having the aspect ratio as 1:1 so it wouldn’t matter, but the second video’s orientation still changed counter clockwise.
Thanks for the help, and happy to add more clarification if needed.
This is for adding the text :
ffmpeg -i input.mp4 -vf drawbox=y=ih-200:color=black@0.5:width=iw:height=200:t=max
,drawtext=fontfile=RobotoRegular.ttf:text='Text':x=(w-text_w)/2:y=(h-text_h)-100:fontsize=70:fontcolor=white
-c:v libx264 -b:v 17000k -r 30 -preset ultrafast -y output.mp4Output :
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/Android/data/com.me.app/files/65/VID_20170802_111518.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2017-08-02 18:15:20
com.android.version: 7.0
Duration: 00:00:00.93, start: 0.000000, bitrate: 16415 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 16408 kb/s, SAR 1:1 DAR 16:9, 28.94 fps, 30 tbr, 90k tbn, 180k tbc (default)
Metadata:
rotate : 90
creation_time : 2017-08-02 18:15:20
handler_name : VideoHandle
Side data:
displaymatrix: rotation of -90.00 degrees
[libx264 @ 0xeab7ec00] using SAR=1/1
[libx264 @ 0xeab7ec00] using cpu capabilities: none!
[libx264 @ 0xeab7ec00] profile Constrained Baseline, level 4.1
[libx264 @ 0xeab7ec00] 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=12 lookahead_threads=2 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=abr mbtree=0 bitrate=17000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
Output #0, mp4, to '/storage/emulated/0/Android/data/com.me.app/files/65/temp.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
com.android.version: 7.0
encoder : Lavf57.25.100
Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1080x1920 [SAR 1:1 DAR 9:16], q=-1--1, 17000 kb/s, 30 fps, 15360 tbn, 30 tbc (default)
Metadata:
handler_name : VideoHandle
creation_time : 2017-08-02 18:15:20
encoder : Lavc57.24.102 libx264
Side data:
unknown side data type 10 (24 bytes)
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame= 6 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A dup=1 drop=0 speed= 0x
frame= 10 fps=8.8 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A dup=1 drop=0 speed= 0x
frame= 14 fps=8.4 q=15.0 size= 155kB time=00:00:00.03 bitrate=38067.5kbits/s dup=1 drop=0 speed=0.0201x
frame= 18 fps=8.0 q=22.0 size= 744kB time=00:00:00.16 bitrate=36592.5kbffmpeg -f concat -safe 0 -i input.mp4 -c copy -y output.mp4
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
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xe762a600] Auto-inserting h264_mp4toannexb bitstream filter
Input #0, concat, from '/storage/emulated/0/Android/data/com.me.app/files/64/TXT_20170802_110325.txt':
Duration: N/A, start: 0.000000, bitrate: 23403 kb/s
Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1080x1920 [SAR 1:1 DAR 9:16], 23403 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc
Metadata:
handler_name : VideoHandler
Output #0, mp4, to '/storage/emulated/0/Android/data/com.me.app/files/64/VID_20170802_110325concat.mp4':
Metadata:
encoder : Lavf57.25.100
Stream #0:0(eng): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1080x1920 [SAR 1:1 DAR 9:16], q=2-31, 23403 kb/s, 30 fps, 30 tbr, 15360 tbn, 15360 tbc
Metadata:
handler_name : VideoHandler
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xe762a600] Auto-inserting h264_mp4toannexb bitstream filter
frame= 64 fps=0.0 q=-1.0 Lsize= 5218kB time=00:00:12.30 bitrate=3474.5kbits/s speed= 122x
video:5217kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.025721% -
Conversion for WebM file format using FFMPEG
23 mars 2012, par user974435I am using followng command to convert video to webm format
ffmpeg -i video/ds2.mp4 -acodec libvorbis -ac 2 -ab 96k -ar 44100 -b:a 345k -s 640x360 video/ds2.webm
I am receiving following errors :
1) incompatible sample format 's16' for codec 'libvorbis'
2) strptime() unavailable on this system, cannot convert the data string
Do you any idea why I cannot convert, tested conversion to FLV and it's working very well
Console output
C:\inetpub\wwwroot>ffmpeg -i video/testavi.avi video/ds2.webm
ffmpeg version N-35709-g7d531e8, Copyright (c) 2000-2011 the FFmpeg developers
built on Dec 12 2011 13:56:52 with gcc 4.6.2
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-ru
ntime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libope
ncore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --en
able-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger -
-enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwben
c --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-
libxvid --enable-zlib
libavutil 51. 32. 0 / 51. 32. 0
libavcodec 53. 43. 0 / 53. 43. 0
libavformat 53. 24. 0 / 53. 24. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 53. 0 / 2. 53. 0
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, avi, from 'video/testavi.avi':
Metadata:
encoder : Lavf51.12.1
Duration: 00:00:13.03, start: 0.000000, bitrate: 36427 kb/s
Stream #0:0: Video: msmpeg4 (MP43 / 0x3334504D), yuv420p, 1920x1080, 30 tbr,
30 tbn, 30 tbc
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, stereo, s16, 192 kb
/s
File 'video/ds2.webm' already exists. Overwrite ? [y/N] y
w:1920 h:1080 pixfmt:yuv420p tb:1/1000000 sar:0/1 sws_param:
[libvpx @ 0000000001CA9BB0] v0.9.7-p1
Output #0, webm, to 'video/ds2.webm':
Metadata:
encoder : Lavf53.24.0
Stream #0:0: Video: vp8, yuv420p, 1920x1080, q=-1--1, 200 kb/s, 1k tbn, 30 t
bc
Stream #0:1: Audio: vorbis, 44100 Hz, stereo, s16, 128 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (msmpeg4 -> libvpx)
Stream #0:1 -> #0:1 (mp3 -> libvorbis)
Press [q] to stop, [?] for helpProblem signature:
Problem Event Name: APPCRASH
Application Name: ffmpeg.exe
Application Version: 0.0.0.0
Application Timestamp: 4ee64f02
Fault Module Name: ffmpeg.exe
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 4ee64f02
Exception Code: c0000005
Exception Offset: 000000000091e090
OS Version: 6.1.7601.2.1.0.272.7
Locale ID: 1033
Additional Information 1: ab8f
Additional Information 2: ab8f35a907f8f11a8d2e787a8e40efbd
Additional Information 3: f4d5
Additional Information 4: f4d524f8bf76a4b71cc6a7afa6412ca9
Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409
If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txtAnd Console Uncut Output
C:\inetpub\wwwroot>ffmpeg.exe -i "video/testavi.avi" -acodec libvorbis -b:a 96k
-ac 2 -vcodec libvpx -b:v 400k -f webm -s 384x216 "video/testavi.webm"
ffmpeg version N-35709-g7d531e8, Copyright (c) 2000-2011 the FFmpeg developers
built on Dec 12 2011 13:56:52 with gcc 4.6.2
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-ru
ntime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libope
ncore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --en
able-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger -
-enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwben
c --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-
libxvid --enable-zlib
libavutil 51. 32. 0 / 51. 32. 0
libavcodec 53. 43. 0 / 53. 43. 0
libavformat 53. 24. 0 / 53. 24. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 53. 0 / 2. 53. 0
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, avi, from 'video/testavi.avi':
Metadata:
encoder : Lavf51.12.1
Duration: 00:00:13.03, start: 0.000000, bitrate: 36427 kb/s
Stream #0:0: Video: msmpeg4 (MP43 / 0x3334504D), yuv420p, 1920x1080, 30 tbr,
30 tbn, 30 tbc
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, stereo, s16, 192 kb
/s
[buffer @ 0000000001D7FF60] w:1920 h:1080 pixfmt:yuv420p tb:1/1000000 sar:0/1 sw
s_param:
[scale @ 0000000001D7E9E0] w:1920 h:1080 fmt:yuv420p -> w:384 h:216 fmt:yuv420p
flags:0x4
[libvpx @ 0000000001BF7C10] v0.9.7-p1
Output #0, webm, to 'video/testavi.webm':
Metadata:
encoder : Lavf53.24.0
Stream #0:0: Video: vp8, yuv420p, 384x216, q=-1--1, 400 kb/s, 1k tbn, 30 tbc
Stream #0:1: Audio: vorbis, 44100 Hz, 2 channels, s16, 96 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (msmpeg4 -> libvpx)
Stream #0:1 -> #0:1 (mp3 -> libvorbis)
Press [q] to stop, [?] for help -
FFMPEG and libavfilter
21 mars 2012, par SergioWith the currently installed ffmpeg I can't post watermark on converted videos. Can the reason for that be that I have not installed libavfilter library ?
Currently # ffmpeg -v looks like :
FFmpeg version SVN-r20374, Copyright (c) 2000-2009 Fabrice Bellard, et al.
built on Oct 26 2009 22:47:01 with gcc 4.1.2 20080704 (Red Hat 4.1.2-46)
configuration: --enable-libmp3lame --enable-libopencore-amrnb --enable-version3 - enable-libopencore-amrwb --enable-version3 --enable-nonfree --enable-libfaad --enable-gpl - -disable-mmx --enable-shared --enable-libfaac --enable-libvorbis
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.37. 1 / 52.37. 1
libavformat 52.39. 2 / 52.39. 2
libavdevice 52. 2. 0 / 52. 2. 0As you can see I'm missing libavfilter ? How can I add that library to FFMPEG and successfully add watermark on videos ?
Thanks for any help.