
Recherche avancée
Autres articles (57)
-
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 (...) -
Le plugin : Podcasts.
14 juillet 2010, parLe problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
Types de fichiers supportés dans les flux
Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...) -
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (7418)
-
FFMPEG convert .mpg video to .mp4 without lose quality
12 novembre 2015, par reteriusHow can i convert video .mpg to .mp4 wihtout love quality. My codes below :
$INCPATH = dirname(__FILE__).'/';
$id = 99999;
$ext = "MPG" ;
$input_dir = $INCPATH."../img/videos/".$id.".".$ext ;
$output_dir2 = $INCPATH."../img/videos/".$id.".mp4" ;
$q = '/usr/bin/ffmpeg -i '.$input_dir.' -c:v libx264 -c:a libfaac -r 30 '.$output_dir2." 2>&1" ;
$out = shell_exec($q) ;
$input_dir = $output_dir2 ;
echo var_dump($out);Response that :
string(5735) "ffmpeg version N-76539-g480bad7-syslint Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-16)
configuration: --prefix=/usr/local/cpffmpeg --enable-shared --enable-nonfree --enable-gpl --enable-pthreads --enable-libopencore-amrnb --enable-decoder=liba52 --enable-libopencore-amrwb --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --extra-cflags=-I/usr/local/cpffmpeg/include/ --extra-ldflags=-L/usr/local/cpffmpeg/lib --enable-version3 --extra-version=syslint
libavutil 55. 5.100 / 55. 5.100
libavcodec 57. 15.100 / 57. 15.100
libavformat 57. 14.100 / 57. 14.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 15.100 / 6. 15.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, mpeg, from '/home/imcajans/public_html/kzmk/../img/videos/99999.MPG':
Duration: 00:00:08.16, start: 0.116600, bitrate: 2955 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 720x576 [SAR 64:45 DAR 16:9], max. 9100 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 256 kb/s
[libx264 @ 0x161e820] using SAR=64/45
[libx264 @ 0x161e820] using cpu capabilities: none!
[libx264 @ 0x161e820] profile High, level 3.1
[libx264 @ 0x161e820] 264 - core 148 r2638 7599210 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - 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=18 lookahead_threads=3 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 '/home/imcajans/public_html/kzmk/../img/videos/99999.mp4':
Metadata:
encoder : Lavf57.14.100
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 720x576 [SAR 64:45 DAR 16:9], q=-1--1, 30 fps, 15360 tbn, 30 tbc
Metadata:
encoder : Lavc57.15.100 libx264
Stream #0:1: Audio: aac (libfaac) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, s16, 128 kb/s
Metadata:
encoder : Lavc57.15.100 libfaac
Stream mapping:
Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (ac3 (native) -> aac (libfaac))
Press [q] to stop, [?] for help
frame= 48 fps=0.0 q=0.0 size= 0kB time=00:00:01.19 bitrate= 0.3kbits/s dup=8 drop=0
frame= 66 fps= 58 q=29.0 size= 20kB time=00:00:01.83 bitrate= 87.2kbits/s dup=11 drop=0
frame= 77 fps= 43 q=29.0 size= 51kB time=00:00:02.17 bitrate= 190.3kbits/s dup=13 drop=0
frame= 89 fps= 38 q=29.0 size= 86kB time=00:00:02.60 bitrate= 272.2kbits/s dup=15 drop=0
frame= 101 fps= 34 q=29.0 size= 124kB time=00:00:02.98 bitrate= 340.6kbits/s dup=17 drop=0
frame= 114 fps= 32 q=29.0 size= 166kB time=00:00:03.39 bitrate= 400.3kbits/s dup=19 drop=0
frame= 126 fps= 31 q=29.0 size= 201kB time=00:00:03.84 bitrate= 428.3kbits/s dup=21 drop=0
frame= 137 fps= 30 q=29.0 size= 236kB time=00:00:04.20 bitrate= 459.6kbits/s dup=23 drop=0
frame= 151 fps= 29 q=29.0 size= 275kB time=00:00:04.65 bitrate= 484.2kbits/s dup=25 drop=0
frame= 165 fps= 29 q=29.0 size= 316kB time=00:00:05.12 bitrate= 505.4kbits/s dup=27 drop=0
frame= 177 fps= 28 q=29.0 size= 350kB time=00:00:05.50 bitrate= 521.3kbits/s dup=29 drop=0
frame= 188 fps= 27 q=29.0 size= 387kB time=00:00:05.93 bitrate= 534.6kbits/s dup=31 drop=0
frame= 198 fps= 27 q=29.0 size= 419kB time=00:00:06.25 bitrate= 548.7kbits/s dup=33 drop=0
frame= 212 fps= 27 q=29.0 size= 461kB time=00:00:06.72 bitrate= 562.4kbits/s dup=35 drop=0
frame= 223 fps= 26 q=29.0 size= 495kB time=00:00:07.04 bitrate= 576.6kbits/s dup=37 drop=0
frame= 240 fps= 26 q=29.0 size= 574kB time=00:00:07.59 bitrate= 618.9kbits/s dup=40 drop=0
frame= 245 fps= 20 q=-1.0 Lsize= 834kB time=00:00:08.17 bitrate= 835.9kbits/s dup=41 drop=0
video:696kB audio:128kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.134396%
[libx264 @ 0x161e820] frame I:2 Avg QP:22.05 size: 10777
[libx264 @ 0x161e820] frame P:187 Avg QP:22.67 size: 3323
[libx264 @ 0x161e820] frame B:56 Avg QP:23.98 size: 1242
[libx264 @ 0x161e820] consecutive B-frames: 54.7% 44.1% 1.2% 0.0%
[libx264 @ 0x161e820] mb I I16..4: 33.5% 63.9% 2.5%
[libx264 @ 0x161e820] mb P I16..4: 1.9% 1.8% 0.0% P16..4: 46.9% 4.7% 6.4% 0.0% 0.0% skip:38.3%
[libx264 @ 0x161e820] mb B I16..4: 0.1% 0.1% 0.0% B16..8: 34.4% 0.5% 0.0% direct: 3.1% skip:61.8% L0:41.1% L1:57.8% BI: 1.1%
[libx264 @ 0x161e820] 8x8 transform intra:51.1% inter:96.1%
[libx264 @ 0x161e820] coded y,uvDC,uvAC intra: 25.1% 86.2% 30.4% inter: 9.5% 38.5% 1.1%
[libx264 @ 0x161e820] i16 v,h,dc,p: 41% 5% 11% 43%
[libx264 @ 0x161e820] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 36% 6% 48% 1% 1% 3% 1% 3% 1%
[libx264 @ 0x161e820] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 54% 10% 15% 3% 3% 8% 2% 5% 2%
[libx264 @ 0x161e820] i8c dc,h,v,p: 66% 12% 18% 3%
[libx264 @ 0x161e820] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x161e820] ref P L0: 66.7% 5.8% 17.5% 10.0%
[libx264 @ 0x161e820] ref B L0: 81.1% 18.9% 0.0%
[libx264 @ 0x161e820] ref B L1: 99.5% 0.5%
[libx264 @ 0x161e820] kb/s:697.87
"And my video which has .mpg extention its best quality : https://imcajans.com/img/videos/99999.mpg
And my video which coverted from .mpg to .mp4 its bad quality : https://imcajans.com/img/videos/99999.mp4
-
ffmpeg Error while opening enconder for output stream [duplicate]
4 décembre 2015, par user650922This question already has an answer here :
As a testing purpose I am converting .mp4 video to .mp4.
The error message is "Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height".
Could someone please help me in finding the reason behind below error.
Below is my terminal log.
C:\Users\work\Downloads\ffmpeg-20151130-git-7b11eea-win64-static\ffmpeg-20151130
-git-7b11eea-win64-static\bin
>ffmpeg -i C:\Users\work\Desktop\Esocializ\Sample.mp4 C:\Users\work\Desktop\Esoc
ializ\Sample1.mp4
ffmpeg version N-76957-g7b11eea Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 5.2.0 (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-libzimg --
enable-lzma --enable-decklink --enable-zlib
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
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 'C:\Users\work\Desktop\Esocializ\Sample.
mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 1970-01-01 00:00:00
encoder : Lavf53.24.2
Duration: 00:00:05.31, start: 0.000000, bitrate: 1589 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720
[SAR 1:1 DAR 16:9], 1205 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp,
384 kb/s (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : SoundHandler
[libx264 @ 000000c07583dde0] using SAR=1/1
[libx264 @ 000000c07583dde0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 000000c07583dde0] profile High, level 3.1
[libx264 @ 000000c07583dde0] 264 - core 148 r2638 7599210 - 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
[libvo_aacenc @ 000000c0758d6da0] Unable to set encoding parameters
Output #0, mp4, to 'C:\Users\work\Desktop\Esocializ\Sample1.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf53.24.2
Stream #0:0(und): Video: h264 (libx264), yuv420p, 1280x720 [SAR 1:1 DAR 16:9
], q=-1--1, 25 fps, 25 tbn, 25 tbc (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : VideoHandler
encoder : Lavc57.16.101 libx264
Stream #0:1(und): Audio: aac, 0 channels, 128 kb/s (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : SoundHandler
encoder : Lavc57.16.101 libvo_aacenc
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (libvo_aacenc))
Error while opening encoder for output stream #0:1 - maybe incorrect parameters
such as bit_rate, rate, width or height
C:\Users\work\Downloads\ffmpeg-20151130-git-7b11eea-win64-static\ffmpeg-20151130
-git-7b11eea-win64-static\bin
> -
Why duration of the mp4 file created with ffmpeg from png files is smaller than expected ?
17 août 2021, par qwark97I'm trying to concatenate a bunch of
png
files into onemp4
file usingffmpeg
. I use following command :

ffmpeg -f concat -i concat.txt -f mp4 out.mp4



The "description file" (
concat.txt
) looks like this :

file screen_001.png
duration 0.14538311958312988
file screen_002.png
duration 0.11382007598876953
file screen_003.png
duration 2.543360710144043
...
file screen_036.png
duration 0.15303301811218262
file screen_037.png
duration 0.160630464553833
file screen_038.png
duration 3.2751874923706055



Given command works, I'm able to create desired
mp4
file. The problem is, the duration of the output file is smaller than sum of theduration
lines fromconcat.txt
. I expectmp4
file 22.48s long but I get 19.20s long file.

What am I doing wrong ? Maybe I'm not using some flag I should ? Is it even possible to do what I want ? I'm kind a newbie with
ffmpeg
and video manipulation at all so any help would be appreciated.

Output of the
ffmpeg
, maybe will be useful :

root@65181939e08e:/files/tmp# ffmpeg -f concat -i concat.txt -f mp4 out.mp4
ffmpeg version 4.1.6-1~deb10u1 Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 8 (Debian 8.3.0-6)
 configuration: --prefix=/usr --extra-version='1~deb10u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
 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
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 3.100 / 5. 3.100
 libswresample 3. 3.100 / 3. 3.100
 libpostproc 55. 3.100 / 55. 3.100
Input #0, concat, from 'concat.txt':
 Duration: 00:00:22.48, start: 0.000000, bitrate: 0 kb/s
 Stream #0:0: Video: png, rgba(pc), 1366x768, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
 Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x5651f1a6e8c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x5651f1a6e8c0] profile High 4:4:4 Predictive, level 3.2, 4:4:4 8-bit
[libx264 @ 0x5651f1a6e8c0] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - 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=4 threads=12 lookahead_threads=2 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 'out.mp4':
 Metadata:
 encoder : Lavf58.20.100
 Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv444p, 1366x768, q=-1--1, 25 fps, 12800 tbn, 25 tbc
 Metadata:
 encoder : Lavc58.35.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame= 483 fps=199 q=-1.0 Lsize= 258kB time=00:00:19.20 bitrate= 110.2kbits/s dup=445 drop=0 speed=7.89x 
video:252kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.564829%
[libx264 @ 0x5651f1a6e8c0] frame I:5 Avg QP: 7.86 size: 28761
[libx264 @ 0x5651f1a6e8c0] frame P:121 Avg QP:14.58 size: 729
[libx264 @ 0x5651f1a6e8c0] frame B:357 Avg QP:13.34 size: 70
[libx264 @ 0x5651f1a6e8c0] consecutive B-frames: 1.2% 0.0% 1.9% 96.9%
[libx264 @ 0x5651f1a6e8c0] mb I I16..4: 88.2% 0.0% 11.8%
[libx264 @ 0x5651f1a6e8c0] mb P I16..4: 1.3% 0.0% 0.3% P16..4: 0.2% 0.0% 0.0% 0.0% 0.0% skip:98.1%
[libx264 @ 0x5651f1a6e8c0] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.9% 0.0% 0.0% direct: 0.0% skip:99.1% L0:59.4% L1:40.6% BI: 0.0%
[libx264 @ 0x5651f1a6e8c0] coded y,u,v intra: 7.9% 0.7% 1.3% inter: 0.0% 0.0% 0.0%
[libx264 @ 0x5651f1a6e8c0] i16 v,h,dc,p: 81% 18% 1% 0%
[libx264 @ 0x5651f1a6e8c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 33% 28% 22% 2% 3% 3% 3% 3% 3%
[libx264 @ 0x5651f1a6e8c0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x5651f1a6e8c0] ref P L0: 72.5% 11.9% 12.4% 3.1%
[libx264 @ 0x5651f1a6e8c0] ref B L0: 50.4% 48.1% 1.4%
[libx264 @ 0x5651f1a6e8c0] ref B L1: 98.9% 1.1%
[libx264 @ 0x5651f1a6e8c0] kb/s:106.45



Thanks for your help !