
Recherche avancée
Autres articles (33)
-
Soumettre améliorations et plugins supplémentaires
10 avril 2011Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...) -
Formulaire personnalisable
21 juin 2013, parCette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire. (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)
Sur d’autres sites (4215)
-
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 conversion fails for 640x360 video size
12 novembre 2015, par user3132858Can somebody advice how I can fix the ffmpeg error below :
Array ( [0] => ffmpeg version 2.0.1 Copyright (c) 2000-2013 the FFmpeg developers
[1] => built on Nov 11 2015 12:17:12 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-16) [2]
=> configuration: --enable-gpl --enable-version3 --enable-shared --enable-nonfree
--enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx
--enable-libx264 --enable-libxvid [3] => libavutil 52. 38.100 / 52. 38.100 [4]
=> libavcodec 55. 18.102 / 55. 18.102 [5] => libavformat 55. 12.100 / 55. 12.100 [6]
=> libavdevice 55. 3.100 / 55. 3.100 [7] => libavfilter 3. 79.101 / 3. 79.101 [8]
=> libswscale 2. 3.100 / 2. 3.100 [9] => libswresample 0. 17.102 / 0. 17.102 [10]
=> libpostproc 52. 3.100 / 52. 3.100 [11] => Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '3.mov': [12]
=> Metadata: [13] => major_brand : qt [14] => minor_version : 537199360 [15] => compatible_brands: qt [16]
=> creation_time : 2005-10-17 22:54:32 [17] => Duration: 00:01:25.50, start: 0.000000,
bitrate: 307 kb/s [18] => Stream #0:0(eng): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D),
yuv420p, 640x480 [SAR 1:1 DAR 4:3], 261 kb/s, 10 fps, 10 tbr, 3k tbn, 25 tbc [19]
=> Metadata: [20] => creation_time : 2005-10-17 22:54:33 [21] => handler_name :
Apple Video Media Handler [22] => Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D),
32000 Hz, mono, fltp, 43 kb/s [23] => Metadata: [24] => creation_time : 2005-10-17 22:54:34 [25]
=> handler_name : Apple Sound Media Handler [26] => [libx264 @ 0x19fbb00] using SAR=944/945 [27]
=> [libx264 @ 0x19fbb00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX [28]
=> Output #0, mp4, to '4.mp4': [29] => Metadata: [30] => major_brand : qt [31]
=> minor_version : 537199360 [32] => compatible_brands: qt [33] => Stream #0:0
(eng): Video: h264, yuv420p, 630x472 [SAR 944:945 DAR 4:3], q=-1--1, 900 kb/s, 90k tbn,
10 tbc [34] => Metadata: [35] => creation_time : 2005-10-17 22:54:33 [36]
=> handler_name : Apple Video Media Handler [37] => Stream #0:1(eng): Audio: aac, 32000 Hz,
mono, fltp, 128 kb/s [38] => Metadata: [39] => creation_time : 2005-10-17 22:54:34 [40]
=> handler_name : Apple Sound Media Handler [41] => Stream mapping: [42]
=> Stream #0:0 -> #0:0 (mpeg4 -> libx264) [43] => Stream #0:1 -> #0:1 (aac -> aac) [44]
=> Error while opening encoder for output stream #0:0 - maybe incorrect parameters
such as bit_rate, rate, width or height )This is my code :
$width=640;
$height=360;
$aspect=round($width/$height, 1);
$command = "/usr/bin/ffmpeg -threads 1 -y -i 3.mov -vf \"scale=min(1\,gt(iw\,".$width.")+gt(ih\,".$height.")) * (gte(a\,".$aspect.")*".$width." + \
lt(a\,".$aspect.")*((".$height."*iw)/ih)) + not(min(1\,gt(iw\,".$width.")+gt(ih\,".$height.")))*iw : \
min(1\,gt(iw\,".$width.")+gt(ih\,".$height.")) * (lte(a\,".$aspect.")*".$height." + \
gt(a\,".$aspect.")*((".$width."*ih)/iw)) + not(min(1\,gt(iw\,".$width.")+gt(ih\,".$height.")))*ih\" -b:v 900k -acodec aac -strict -2 -ab 96k 4.mp4 ";It is rather strange but when I change the width and height parameters to 300 and 200 respectively, the command executes, the error appears when the width x height is 640x360.
Any ideas of what might be wrong ?
UPDATE : I am pretty sure the error has got something to do with the audio encoding. If I change the
-ab 96k
part to-c:a copy
, command executes.
I cannot however use-c:a copy
because for some audio formats the video does not play on mobile devices. Therefore i need the audio settings to be fixed and the same for all videos. -
Error while trying to create dashcast stream using libx265
16 décembre 2015, par RahulI’m trying to create a h265 encoded stream from webcam using the follwoing command.
DashCast -vf video4linux2 -v4l2f mjpeg -v /dev/video0 -conf dashcast.conf -live-media
The content if dashcast.conf is
[v1]
type=video
codec=libx265
bitrate=1000000
framerate=25
width=640
height=480But I’m getting this error.
Options:
video source: /dev/video0
video format: video4linux2
v4l2 format: mjpeg
video crop: 0x0
audio source:
Configurations:
id:v1 res:640x480 vbr:1000000
[mjpeg @ 0xb194e0] Changeing bps to 8
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 50349.327770, bitrate: N/A
Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 1280x720, -5 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
AVCTX give frame duration of 1/1000000 - keeping requested rate -1, but this may result in unexpected behaviour.
[swscaler @ 0xb91ea0] deprecated pixel format used, make sure you did set range correctly
Press q or Q to exit...
[dashcast] Live system dropped a video frame
[dashcast] Live system dropped a video frame
x265 [info]: HEVC encoder version 1.85dcc9d3a928c400b
x265 [info]: build info [Linux][GCC 4.8.4][64 bit] 8bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2
x265 [info]: Main profile, Level-3 (Main tier)
x265 [info]: Thread pool created using 4 threads
x265 [info]: frame threads / pool features : 1 / wpp(8 rows)
[dashcast] Live system dropped a video frame
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge : hex / 57 / 2 / 2
x265 [info]: Keyframe min / max / scenecut : 25 / 250 / 40
x265 [info]: Lookahead / bframes / badapt : 20 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb : 1 / 1 / 0
x265 [info]: References / ref-limit cu / depth : 3 / 0 / 0
x265 [info]: AQ: mode / str / qg-size / cu-tree : 1 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress : ABR-1000 kbps / 0.60
x265 [info]: tools: rd=3 psy-rd=0.30 signhide tmvp strong-intra-smoothing
x265 [info]: tools: deblock sao
Cannot parse HEVC/H265 SPS/PPS
Bad Parameter: dc_gpac_video_write_config
Bad Parameter: gf_isom_start_segment
Cannot open output video file.
Generating MPD at 2015-11-24T19:17:46.040Z
StartTime: 2015-11-24T19:17:46.040Z - startNumber 1 - last number 1
Keyboard thread exit
[dashcast] Live system dropped a video frame
[dashcast] Live system dropped a video frameWhat could be the problem ? Changing codec to libx264 in the conf file works fine.