
Recherche avancée
Autres articles (25)
-
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
Automated installation script of MediaSPIP
25 avril 2011, parTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...) -
Librairies et logiciels spécifiques aux médias
10 décembre 2010, parPour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)
Sur d’autres sites (2772)
-
Script timing with FFMPEG and PHP
23 juin 2014, par egekhterI’m running into a very strange bug.
Here’s my command console output :
ffmpeg -i /transcodes/original/883_1000_1403436916_00001.MTS -y -vcodec libx264 -tune zerolatency -
movflags faststart -crf 20 -profile:v high -level:v 4.0 -maxrate 6000k -bufsize 12000k -acodec libfdk_aac -b:a 256k /transcodes/883_1000_1403436916_00001_HQ.mp4 -vcodec libx264 -s 848x480 -tune zerolatency -movflags faststart -crf 25 -profile:v main -level:v 3.1 -maxrate 1400k -bufsize 1400k -acodec libfdk_aac -b:a 256k /transcodes/883_1000_1403436916_00001_SQ.mp4 -ss 166.16 -f image2 -vframes 1 /transcodes/883_1000_1403436916_00001_poster.jpg -ss 166.16 -f image2 -vf scale=-1:240 -vframes 1 /transcodes/883_1000_1403436916_00001_thumb.jpg
ffmpeg version 2.2.git Copyright (c) 2000-2014 the FFmpeg developers
built on Jun 13 2014 02:40:27 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --prefix=/home/ubuntu/ffmpeg_build --extra-cflags=-I/home/ubuntu/ffmpeg_build/include --extra-ldflags=-L/home/ubuntu/ffmpeg_build/lib --bindir=/home/ubuntu/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
libavutil 52. 89.100 / 52. 89.100
libavcodec 55. 66.100 / 55. 66.100
libavformat 55. 43.100 / 55. 43.100
libavdevice 55. 13.101 / 55. 13.101
libavfilter 4. 8.100 / 4. 8.100
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, mpegts, from '/transcodes/original/883_1000_1403436916_00001.MTS':
Duration: 00:04:11.74, start: 0.382511, bitrate: 25222 kb/s
Program 1
Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc
Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s
Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
[swscaler @ 0x216fe40] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x2188c20] deprecated pixel format used, make sure you did set range correctly
[libx264 @ 0x2143e60] using SAR=1/1
[libx264 @ 0x2143e60] MB rate (489110) > level limit (245760)
[libx264 @ 0x2143e60] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x2143e60] profile High, level 4.0
[libx264 @ 0x2143e60] 264 - core 142 - 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=2 lookahead_threads=2 sliced_threads=1 slices=2 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=0 rc=crf mbtree=0 crf=20.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=6000 vbv_bufsize=12000 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
[libx264 @ 0x2150680] using SAR=160/159
[libx264 @ 0x2150680] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x2150680] profile Main, level 3.1
[libx264 @ 0x2150680] 264 - core 142 - 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=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=2 lookahead_threads=2 sliced_threads=1 slices=2 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=0 rc=crf mbtree=0 crf=25.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=1400 vbv_bufsize=1400 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '/transcodes/883_1000_1403436916_00001_HQ.mp4':
Metadata:
encoder : Lavf55.43.100
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, max. 6000 kb/s, 59.94 fps, 60k tbn, 59.94 tbc
Metadata:
encoder : Lavc55.66.100 libx264
Stream #0:1: Audio: aac (libfdk_aac) ([64][0][0][0] / 0x0040), 48000 Hz, 5.1, s16, 256 kb/s
Metadata:
encoder : Lavc55.66.100 libfdk_aac
Output #1, mp4, to '/transcodes/883_1000_1403436916_00001_SQ.mp4':
Metadata:
encoder : Lavf55.43.100
Stream #1:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 848x480 [SAR 160:159 DAR 16:9], q=-1--1, max. 1400 kb/s, 59.94 fps, 60k tbn, 59.94 tbc
Metadata:
encoder : Lavc55.66.100 libx264
Stream #1:1: Audio: aac (libfdk_aac) ([64][0][0][0] / 0x0040), 48000 Hz, 5.1, s16, 256 kb/s
Metadata:
encoder : Lavc55.66.100 libfdk_aac
Output #2, image2, to '/transcodes/883_1000_1403436916_00001_poster.jpg':
Metadata:
encoder : Lavf55.43.100
Stream #2:0: Video: mjpeg, yuvj420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 59.94 fps, 90k tbn, 59.94 tbc
Metadata:
encoder : Lavc55.66.100 mjpeg
Output #3, image2, to '/transcodes/883_1000_1403436916_00001_thumb.jpg':
Metadata:
encoder : Lavf55.43.100
Stream #3:0: Video: mjpeg, yuvj420p, 427x240 [SAR 1280:1281 DAR 16:9], q=2-31, 200 kb/s, 59.94 fps, 90k tbn, 59.94 tbc
Metadata:
encoder : Lavc55.66.100 mjpeg
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (ac3 (native) -> aac (libfdk_aac))
Stream #0:0 -> #1:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #1:1 (ac3 (native) -> aac (libfdk_aac))
Stream #0:0 -> #2:0 (h264 (native) -> mjpeg (mjpeg))
Stream #0:0 -> #3:0 (h264 (native) -> mjpeg (mjpeg))
frame=15090 fps=1.0 q=39.0 q=30.0 q=6.6 q=4.3 size= 193843kB time=00:04:11.75 bitrate=6307.7kbits/s dup=0 drop=15088
[mp4 @ 0x210ae00] Starting second pass: moving the moov atom to the beginning of the file
[mp4 @ 0x210ae00] Unable to re-open /transcodes/883_1000_1403436916_00001_HQ.mp4 output file for the second pass (faststart)
[mp4 @ 0x214fc20] Starting second pass: moving the moov atom to the beginning of the file
[mp4 @ 0x214fc20] Unable to re-open /transcodes/883_1000_1403436916_00001_SQ.mp4 output file for the second pass (faststart)
frame=15090 fps=1.0 q=39.0 Lq=30.0 q=6.6 q=4.3 size= 193843kB time=00:04:11.77 bitrate=6307.1kbits/s dup=0 drop=15088
video:212914kB audio:15741kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[libx264 @ 0x2143e60] frame I:162 Avg QP:23.31 size: 38205
[libx264 @ 0x2143e60] frame P:14928 Avg QP:25.47 size: 12322
[libx264 @ 0x2143e60] mb I I16..4: 24.9% 70.4% 4.6%
[libx264 @ 0x2143e60] mb P I16..4: 2.2% 3.2% 0.0% P16..4: 38.3% 3.7% 4.3% 0.0% 0.0% skip:48.3%
[libx264 @ 0x2143e60] 8x8 transform intra:60.6% inter:94.6%
[libx264 @ 0x2143e60] coded y,uvDC,uvAC intra: 25.5% 50.7% 2.8% inter: 9.7% 17.3% 0.0%
[libx264 @ 0x2143e60] i16 v,h,dc,p: 43% 17% 10% 29%
[libx264 @ 0x2143e60] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 13% 34% 4% 4% 4% 5% 3% 3%
[libx264 @ 0x2143e60] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 37% 18% 13% 5% 7% 6% 7% 4% 3%
[libx264 @ 0x2143e60] i8c dc,h,v,p: 64% 15% 19% 2%
[libx264 @ 0x2143e60] Weighted P-Frames: Y:0.2% UV:0.0%
[libx264 @ 0x2143e60] ref P L0: 67.7% 14.5% 13.8% 4.0% 0.0%
[libx264 @ 0x2143e60] kb/s:6042.08
[libx264 @ 0x2150680] frame I:72 Avg QP:24.70 size: 14016
[libx264 @ 0x2150680] frame P:15018 Avg QP:28.46 size: 1783
[libx264 @ 0x2150680] mb I I16..4: 39.4% 0.0% 60.6%
[libx264 @ 0x2150680] mb P I16..4: 0.8% 0.0% 0.3% P16..4: 36.3% 4.1% 2.6% 0.0% 0.0% skip:56.0%
[libx264 @ 0x2150680] coded y,uvDC,uvAC intra: 32.1% 41.1% 7.1% inter: 3.9% 6.6% 0.1%
[libx264 @ 0x2150680] i16 v,h,dc,p: 50% 12% 10% 27%
[libx264 @ 0x2150680] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 34% 15% 22% 5% 5% 5% 6% 5% 3%
[libx264 @ 0x2150680] i8c dc,h,v,p: 67% 11% 19% 3%
[libx264 @ 0x2150680] Weighted P-Frames: Y:0.7% UV:0.1%
[libx264 @ 0x2150680] ref P L0: 65.0% 22.3% 10.0% 2.6% 0.0%
[libx264 @ 0x2150680] kb/s:882.93I’ve tried adding sleep(5) after :
exec($cmd, $out, $ret);
to give the script time to move the moov atom to the front before uploading the local file to s3 and then deleting the local file, but it is not 100% reliable.
Any ideas ?
-
Why ffmpeg convert only the first frame of my animated gif ? [duplicate]
23 novembre 2016, par CyriltraThis question already has an answer here :
My animated gif is around 37mo and last for around 10sec. I use the following command on debian to convert it to .mp4 :
avconv -i test2_37m2.gif -pix_fmt yuv420p -vf \"scale=trunc(iw/2)*2:trunc(ih/2)*2\" test2_37m2_mp4.mp4 2>&1
The result is a 14kb .mp4 which is just a static frame (the first one) of the gif. Why ?
here is the output log of ffmpeg / avconv
avconv version 0.8.18-6:0.8.18-0+deb7u1, Copyright (c) 2000-2014 the Libav developers
built on Oct 4 2016 17:59:06 with gcc 4.7.2
Input #0, image2, from '/var/www/clients/client1/web1/web/test/gif/test2_37m2.gif':
Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
Stream #0.0: Video: gif, pal8, 640x360, 25 tbr, 25 tbn, 25 tbc
Incompatible pixel format 'pal8' for codec 'libx264', auto-selecting format 'yuv420p'
[buffer @ 0x1a4a820] w:640 h:360 pixfmt:pal8
[avsink @ 0x1a4aac0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x1a4ae20] w:640 h:360 fmt:pal8 -> w:640 h:360 fmt:yuv420p flags:0x4
[libx264 @ 0x1a4a060] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
[libx264 @ 0x1a4a060] profile Main, level 3.0
[libx264 @ 0x1a4a060] 264 - core 123 r2189 35cf912 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=0 b_adapt=1 b_bias=0 direct=1 weightb=0 open_gop=1 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.25 aq=1:1.00
Output #0, mp4, to '/var/www/clients/client1/web1/web/test/gif/test2_37m2_mp4.mp4':
Metadata:
encoder : Lavf53.21.1
Stream #0.0: Video: libx264, yuv420p, 640x360, q=-1--1, 25 tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (gif -> libx264)
Press ctrl-c to stop encoding
frame= 1 fps= 0 q=28.0 Lsize= 13kB time=10000000000.00 bitrate= 0.0kbits/s
video:12kB audio:0kB global headers:0kB muxing overhead 6.292888%
[libx264 @ 0x1a4a060] frame I:1 Avg QP:27.23 size: 12119
[libx264 @ 0x1a4a060] mb I I16..4: 49.2% 0.0% 50.8%
[libx264 @ 0x1a4a060] coded y,uvDC,uvAC intra: 68.7% 45.8% 3.4%
[libx264 @ 0x1a4a060] i16 v,h,dc,p: 22% 25% 22% 31%
[libx264 @ 0x1a4a060] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 28% 21% 4% 5% 4% 9% 3% 7%
[libx264 @ 0x1a4a060] i8c dc,h,v,p: 57% 29% 13% 1%
[libx264 @ 0x1a4a060] kb/s:2423.80Thank you
-
ffmpeg "Option preset not found."
2 février 2015, par PiTheNumberI am trying to convert a .mpg to .flv with ffmpeg. On other servers I got it working but here with the ffmpeg clone (avconv) it just does not do it.
Originally I was working with libfaac and preset fastfirstpass but thats not available in this build so I switched to the experimental acc and preset libx264-fast_firstpass :
$ /usr/bin/ffmpeg -i /data/upload/videos/original/150128_Test_731_9d5b83.mpg
-strict experimental -acodec aac -ab 128k -ar 44100 -vcodec libx264 -pass 1
-pre libx264-fast_firstpass -b 512k -s 360x204
-f flv /data/upload/videos/encoded/150129_Test_731_54f06a.flv
avconv version 9.16-6:9.16-0ubuntu0.14.04.1, Copyright (c) 2000-2014 the Libav developers
built on Aug 10 2014 18:16:02 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
[mpeg @ 0xc87de0] max_analyze_duration reached
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, mpeg, from '/data/upload/videos/original/150128_Test_731_9d5b83.mpg':
Duration: 00:01:00.12, start: 0.989978, bitrate: 4814 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x406 [PAR 406:405 DAR 16:9], 104857 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 224 kb/s
[libx264 @ 0xc8b4c0] using SAR=136/135
[libx264 @ 0xc8b4c0] MB rate (26910000) > level limit (2073600)
[libx264 @ 0xc8b4c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0xc8b4c0] profile Main, level 5.2
[libx264 @ 0xc8b4c0] 264 - core 142 r2389 956c8d8 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0 me=dia subme=2 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=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=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=30 rc=abr mbtree=1 bitrate=512 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.25 aq=1:1.00
Option preset not found.What does the error in the last line mean ?
I already made sure the preset libx264-fast_firstpass.avpreset exists in /usr/share/avconv/ and if I change it to invalid ffmpeg complains with
Preset invalid specified for stream 0:0, but could not be opened.
, so the preset is correct.Google does provide two results for this error. This chatlog and it’s pastebin about live streaming with the solution to add -f flv and some russian page. Nothing helped.
Any advice ?