Recherche avancée

Médias (1)

Mot : - Tags -/belgique

Autres articles (46)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour 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 (...)

  • Activation de l’inscription des visiteurs

    12 avril 2011, par

    Il est également possible d’activer l’inscription des visiteurs ce qui permettra à tout un chacun d’ouvrir soit même un compte sur le canal en question dans le cadre de projets ouverts par exemple.
    Pour ce faire, il suffit d’aller dans l’espace de configuration du site en choisissant le sous menus "Gestion des utilisateurs". Le premier formulaire visible correspond à cette fonctionnalité.
    Par défaut, MediaSPIP a créé lors de son initialisation un élément de menu dans le menu du haut de la page menant (...)

Sur d’autres sites (8691)

  • ffmpeg converts anything to mp4

    23 septembre 2015, par KevinOelen

    I’m trying to get familiar with python subprocess and here is my little code :

    import subprocess
    import os
    import re
    import subprocess as sp
    import logging

    the_file = "/home/vagrant/test/out.pkg"
    out_file = "/home/vagrant/test/result.mp4"

    ffmpeg = sp.Popen(['/usr/bin/ffmpeg', '-i', the_file, out_file], stdout = sp.PIPE, stderr = sp.STDOUT)
    process_output =  ffmpeg.communicate()
    print "communicate:", process_output

    The result :

    communicate: ("ffmpeg version N-75410-g58fe57d Copyright (c) 2000-2015 the FFmpeg developers\n  built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-16)\n  configuration: --prefix=/home/vagrant/ffmpeg_build --extra-cflags=-I/home/vagrant/ffmpeg_build/include --extra-ldflags=-L/home/vagrant/ffmpeg_build/lib --bindir=/usr/local/bin --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libvpx --enable-libx264 --enable-libfreetype\n  libavutil      55.  2.100 / 55.  2.100\n  libavcodec     57.  3.100 / 57.  3.100\n  libavformat    57.  2.100 / 57.  2.100\n  libavdevice    57.  0.100 / 57.  0.100\n  libavfilter     6.  5.100 /  6.  5.100\n  libswscale      4.  0.100 /  4.  0.100\n  libswresample   2.  0.100 /  2.  0.100\n  libpostproc    54.  0.100 / 54.  0.100\nInput #0, tty, from '/home/vagrant/test/out.txt':\n  Duration: 00:00:00.04, bitrate: 1 kb/s\n    Stream #0:0: Video: ansi, pal8, 640x400, 25 fps, 25 tbr, 25 tbn, 25 tbc\nNo pixel format specified, yuv444p for H.264 encoding chosen.\nUse -pix_fmt yuv420p for compatibility with outdated media players.\n[libx264 @ 0x379f300] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64\n[libx264 @ 0x379f300] profile High 4:4:4 Predictive, level 3.0, 4:4:4 8-bit\n[libx264 @ 0x379f300] 264 - core 148 r2597 e86f3a1 - 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=4 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\nOutput #0, mp4, to '/home/vagrant/test/result.mp4':\n  Metadata:\n    encoder         : Lavf57.2.100\n    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv444p, 640x400, q=-1--1, 25 fps, 12800 tbn, 25 tbc\n    Metadata:\n      encoder         : Lavc57.3.100 libx264\nStream mapping:\n  Stream #0:0 -> #0:0 (ansi (native) -> h264 (libx264))\nPress [q] to stop, [?] for help\nframe=    1 fps=0.0 q=28.0 Lsize=       2kB time=00:00:00.04 bitrate= 362.4kbits/s    \nvideo:1kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 78.698227%\n[libx264 @ 0x379f300] frame I:1     Avg QP:13.08  size:   326\n[libx264 @ 0x379f300] mb I  I16..4:  0.4% 99.1%  0.5%\n[libx264 @ 0x379f300] 8x8 transform intra:99.1%\n[libx264 @ 0x379f300] coded y,u,v intra: 0.4% 0.0% 0.0%\n[libx264 @ 0x379f300] i16 v,h,dc,p:  0% 75% 25%  0%\n[libx264 @ 0x379f300] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  0% 92%  8%  0%  0%  0%  0%  0%  0%\n[libx264 @ 0x379f300] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 35% 35%  2%  1%  0%  2%  0%  0%\n[libx264 @ 0x379f300] kb/s:65.20\n", None)

    As it expected, sends me back a tuple (stdout,stderr). But the problem is, ffmpeg converts any file(as you can see above, even pkg file) without giving me back an error or exit status with 1. stderr = None

    Can anyone explain what’s wrong on this one ? Thanks so much.

  • How to make drawtext work in AWS Lambda ffmpeg ?

    22 mars 2020, par codeul

    I have setup an AWS Lambda function to use ffmpeg using layer https://serverlessrepo.aws.amazon.com/applications/arn:aws:serverlessrepo:us-east-1:145266761615:applications~ffmpeg-lambda-layer.

    Some ffmpeg commands work, but noticed when I use drawtext or drawbox, I am not getting a proper mp4 file. The output looks corrupted and is low in size. (FYI : The output file is /tmp/test2.mp4 and then I copy it to an S3 bucket.)

    Whats wrong here ? Would appreciate any help. Thanks.

    ffmpeg command :

    ffmpeg -f lavfi -i color=0x142d3d:s=1280*720:d=10 -vf  "drawtext=fontcolor=white:fontsize=50:fontfile=aladin.ttf:text='test':y=10:x=10"  -movflags +faststart    -y /tmp/test2.mp4

    From log :

    o --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzvbi --enable-libzimg
           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
           libswscale      5.  3.100 /  5.  3.100
           libswresample   3.  3.100 /  3.  3.100
           libpostproc    55.  3.100 / 55.  3.100
       Input #0, lavfi, from 'color=0x142d3d:s=1280*720:d=10':
           Duration: N/A, start: 0.000000, bitrate: N/A
           Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
       Stream mapping:
           Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
       Press [q] to stop, [?] for help
       [Parsed_drawtext_0 @ 0x5852500] Using "/var/task/fonts/aladin.ttf"
       [libx264 @ 0x5850080] using SAR=1/1
       [libx264 @ 0x5850080] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
       [libx264 @ 0x5850080] profile Progressive High, level 3.1, 4:2:0, 8-bit
       [libx264 @ 0x5850080] 264 - core 157 r2969 d4099dd - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - 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=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=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/test2.mp4':
           Metadata:
           encoder         : Lavf58.20.100
           Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 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=    2 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   0x    
       frame=    9 fps=7.5 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   0x    
       frame=   17 fps=9.8 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   0x    
       frame=   25 fps= 11 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   0x    
       frame=   30 fps=7.4 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   0x    
    =================
  • .mov conversion to .mp4 using ffmpeg doesn't convert the entire video

    5 février 2013, par user504879

    I am trying to convert a mov file which I got from saving my powerpoint presentation to a movie file. However only a part of the presentation is converted not the entire one and also running qt-start doesn't make the exported mp4 to stream over rtmp. Is there something which I am missing ?

    I am attaching the output which i get when I am trying to convert the file using ffmpeg

    $ export LD_LIBRARY_PATH=/usr/local/lib; /usr/local/bin/ffmpeg -y -i /data/tmp/vialogues_prez.mov -r 20 -g 40 -acodec libfaac -ar 44100  -ab 96k -vcodec libx264 -s 640x480 -vpre medium /data/videos/vialogues_prez.mp4

    FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers
     built on Feb 19 2011 19:03:56 with gcc 4.4.5
     configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
     libavutil     50.15. 1 / 50.15. 1
     libavcodec    52.72. 2 / 52.72. 2
     libavformat   52.64. 2 / 52.64. 2
     libavdevice   52. 2. 0 / 52. 2. 0
     libswscale     0.11. 0 /  0.11. 0
     libpostproc   51. 2. 0 / 51. 2. 0
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x186f460]max_analyze_duration reached

    Seems stream 0 codec frame rate differs from container frame rate: 600.00 (600/1) -> 0.08 (1/12)
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/data/tmp/vialogues_prez.mov':
     Metadata:
       major_brand     : qt  
       minor_version   : 537199360
       compatible_brands: qt  
       comment         : Microsoft PowerPoint Movie
       comment-eng     : Microsoft PowerPoint Movie
     Duration: 00:04:47.00, start: 0.000000, bitrate: 22 kb/s
       Stream #0.0(eng): Video: qtrle, bgra, 640x480, 21 kb/s, 0.01 fps, 0.08 tbr, 600 tbn, 600 tbc
       Stream #0.1(eng): Video: 0x0000, 600 tbr, 600 tbn, 600 tbc
       Stream #0.2(eng): Video: 0x0000, 600 tbr, 600 tbn, 600 tbc
    [libx264 @ 0x1873b50]using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
    [libx264 @ 0x1873b50]profile High, level 3.0
    [libx264 @ 0x1873b50]264 - core 114 - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - 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 sliced_threads=0 nr=0 decimate=1 interlaced=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=abr mbtree=1 bitrate=200 ratetol=20.0 qcomp=0.60 qpmin=10 qpmax=51 qpstep=4 ip_ratio=1.41 aq=1:1.00
    Output #0, mp4, to '/data/videos/vialogues_prez.mp4':
     Metadata:
       encoder         : Lavf52.64.2
       Stream #0.0(eng): Video: libx264, yuv420p, 640x480, q=10-51, 200 kb/s, 20 tbn, 20 tbc
    Stream mapping:
     Stream #0.0 -> #0.0
    Press [q] to stop encoding
    frame=    4 fps=  0 q=32766.0 Lsize=      50kB time=45.05 bitrate=   9.0kbits/s    
    video:49kB audio:0kB global headers:0kB muxing overhead 1.740573%
    [libx264 @ 0x1873b50]frame I:1     Avg QP:32.73  size:  8427
    [libx264 @ 0x1873b50]frame P:3     Avg QP:20.68  size: 13640
    [libx264 @ 0x1873b50]mb I  I16..4: 60.8% 14.6% 24.7%
    [libx264 @ 0x1873b50]mb P  I16..4: 28.7%  7.2% 15.4%  P16..4:  2.0%  1.3%  1.4%  0.0%  0.0%    skip:43.9%
    [libx264 @ 0x1873b50]final ratefactor: -16.67
    [libx264 @ 0x1873b50]8x8 transform intra:14.2% inter:5.0%
    [libx264 @ 0x1873b50]coded y,uvDC,uvAC intra: 25.2% 18.4% 13.0% inter: 5.3% 7.4% 7.2%
    [libx264 @ 0x1873b50]i16 v,h,dc,p: 63% 34%  1%  2%
    [libx264 @ 0x1873b50]i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 41% 31%  1%  1%  1%  1%  1%  4%
    [libx264 @ 0x1873b50]i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 33% 19%  2%  3%  3%  4%  3%  4%
    [libx264 @ 0x1873b50]i8c dc,h,v,p: 75% 20%  4%  1%
    [libx264 @ 0x1873b50]Weighted P-Frames: Y:0.0% UV:0.0%
    [libx264 @ 0x1873b50]ref P L0: 57.0% 12.2% 26.2%  4.7%
    [libx264 @ 0x1873b50]kb/s:1.14

    any help is appreciated.