Recherche avancée

Médias (91)

Autres articles (56)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • L’agrémenter visuellement

    10 avril 2011

    MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
    Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté.

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (10051)

  • php - convert avi to mp4, webm and flv using ffmpeg command

    5 juin 2015, par Aisha

    My problem is I am trying to convert and upload videos into three formats at upload button. I am stuck at the very first step when i am trying to convert avi to mp4, webm and flv. I have tried various commands to convert in to mp4 and webm but nothing worked. its converting to flv smoothly. i searched a lot on internet but none of the commands worked. i have set execution_time to 0 and set_time_limit(0) as well for unlimited execution time. here are the commands i tried to convert in to mp4 and webm

    **For mp4:**

    exec("ffmpeg -i input.avi -c:v libx264 -crf 19 output.mp4");
    exec("ffmpeg -i input.avi -c:v libx264 -pix_fmt yuv420p output.mp4");
    exec("ffmpeg -i input.avi -c:v libx264 -c:a libfaac \ -movflags +faststart output.mp4");

    **For webm**
    passthru("ffmpeg -i input.avi output.webm");
    passthru("ffmpeg -i input.avi -b 1500k -vcodec libvpx -acodec libvorbis -ab 160000 -f webm -g 30 output.webm");

    Note :
    For avi to mp4 files that are less than 1mb are converting successfully but more than 1mb files are showing its converting but its size is 0bytes.

    Similarly, i am facing a problem in converting mp4 to flv. Some files are converting and some are not. Some of the large files are converting but some small files are not converting. It was strange. there was no problem of permission or php configuration settings all was fine. I tried renaming a file which was not converting and it got uploaded. I am confused why this happened.

    Any help for both the issues is highly appreciated.

    Thanks in advance.

    Edited
    /bin$ ffmpeg -v
    ffmpeg version 0.10.15 Copyright (c) 2000-2014 the FFmpeg developers
    built on Aug 30 2014 15:49:19 with gcc 4.4.7 20120313 (Red Hat 4.4.7-3)
    configuration : —prefix=/usr —bindir=/usr/bin —datadir=/usr/share/ffmpeg —incdir=/usr/include/ffmpeg —libdir=/usr/lib64 —mandir=/usr/share/man —arch=x86_64 —extra-cflags=’-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector —param=ssp-buffer-size=4 -m64 -mtune=generic’ —enable-bzlib —disable-crystalhd —enable-gnutls —enable-libass —enable-libcdio —enable-libcelt —enable-libdc1394 —disable-indev=jack —enable-libfreetype —enable-libgsm —enable-libmp3lame —enable-openal —enable-libopenjpeg —enable-libpulse —enable-librtmp —enable-libschroedinger —enable-libspeex —enable-libtheora —enable-libvorbis —enable-libv4l2 —enable-libx264 —enable-libxvid —enable-x11grab —enable-avfilter —enable-postproc —enable-pthreads —disable-static —enable-shared —enable-gpl —disable-debug —disable-stripping —shlibdir=/usr/lib64 —enable-runtime-cpudetect
    libavutil 51. 35.100 / 51. 35.100
    libavcodec 53. 61.100 / 53. 61.100
    libavformat 53. 32.100 / 53. 32.100
    libavdevice 53. 4.100 / 53. 4.100
    libavfilter 2. 61.100 / 2. 61.100
    libswscale 2. 1.100 / 2. 1.100
    libswresample 0. 6.100 / 0. 6.100
    libpostproc 52. 0.100 / 52. 0.100
    Missing argument for option ’v’

  • Add JPG image before movie with ffmpeg

    29 octobre 2020, par 220284

    I would like to create a new movie from a JPG image and some movie file using ffmpeg. The image should be displayed for some seconds at the beginning of the movie. This can be achieved using the command

    


    ffmpeg -loop 1 -framerate 60 -t 8 -i image.jpg -t 8 -f lavfi -i aevalsrc=0 -i movie.mp4 -filter_complex '[0:0] [1:0] [2:0] [2:1] concat=n=2:v=1:a=1' output.mp4



    


    Here the framerate is 60fps and the image is shown for 8 seconds. This all works fine, but takes a lot of time as everything is encoded again. Instead I tried to create a movie from the image first using

    


    ffmpeg -loop 1 -framerate 60 -i image.jpg -c:v libx264 -t 8 -pix_fmt yuv420p intro.mp4


    


    and then concatenating the intro to the movie file as described here
https://trac.ffmpeg.org/wiki/Concatenate. The second method is significantly faster, but the resulting movie file has no audio. Does anyone know a fast method to do this ?

    


    As per the request below, I post ffmpeg -i movie.mp4, it gives

    


    ffmpeg -i movie.mp4                   
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with Apple clang version 12.0.0 (clang-1200.0.32.2)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.1_1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'movie.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.45.100
  Duration: 00:01:36.55, start: 0.000000, bitrate: 445 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc), 1488x1116, 301 kb/s, 60 fps, 60 tbr, 15360 tbn, 120 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 131 kb/s (default)
    Metadata:
      handler_name    : SoundHandler


    


  • FFmpeg is dropping a frame when converting MP4 to image sequence

    24 juillet 2019, par Phillip Dodson

    I have an MP4 file that’s encoded at 12fps that I’m trying to convert to an image sequence using FFmpeg. The issue is that there is one frame missing. I’ve used the solutions here to confirm that the number of frames are 195 but when I run the following ffmpeg -i video.mp4 frames_%04d.png, I only get 194 PNGs. I’ve tried using the -r 12 and -framerate 12 flags but they do not change the output.

    I’ve also run the MP4 through Adobe Media Encoder to create an image sequence and that produces 195 frames. Any thoughts on to why I’m losing a frame ?

    Edit - Logs added below

    Log from the command ffmpeg -i video.mp4 frames_%04d.png :

    ffmpeg version 4.1.4 Copyright (c) 2000-2019 the FFmpeg developers
     built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.4_1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-12.0.1.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-12.0.1.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
     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
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fead5800000] st: 0 edit list: 1 Missing key frame while searching for timestamp: 0
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fead5800000] st: 0 edit list 1 Cannot find an index entry before timestamp: 0.
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mp4':
     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: mp42mp41
       creation_time   : 2019-07-23T18:30:01.000000Z
     Duration: 00:00:16.25, start: 0.000000, bitrate: 957 kb/s
       Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, smpte170m), 728x90, 953 kb/s, 12 fps, 12 tbr, 24k tbn, 24 tbc (default)
       Metadata:
         creation_time   : 2019-07-23T18:30:01.000000Z
         handler_name    : ?Mainconcept Video Media Handler
         encoder         : AVC Coding
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> png (native))
    Press [q] to stop, [?] for help
    Output #0, image2, to 'frames_%04d.png':
     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: mp42mp41
       encoder         : Lavf58.20.100
       Stream #0:0(eng): Video: png, rgb24, 728x90, q=2-31, 200 kb/s, 12 fps, 12 tbn, 12 tbc (default)
       Metadata:
         creation_time   : 2019-07-23T18:30:01.000000Z
         handler_name    : ?Mainconcept Video Media Handler
         encoder         : Lavc58.35.100 png
    frame=  194 fps=0.0 q=-0.0 Lsize=N/A time=00:00:16.16 bitrate=N/A speed=52.1x    
    video:17552kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

    Log from the command that I use that shows 195 frames ffmpeg -i video.mp4 -map 0:v:0 -c copy -f null -

    ffmpeg version 4.1.4 Copyright (c) 2000-2019 the FFmpeg developers
     built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.4_1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-12.0.1.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-12.0.1.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
     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
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f88f700b000] st: 0 edit list: 1 Missing key frame while searching for timestamp: 0
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f88f700b000] st: 0 edit list 1 Cannot find an index entry before timestamp: 0.
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mp4':
     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: mp42mp41
       creation_time   : 2019-07-23T18:30:01.000000Z
     Duration: 00:00:16.25, start: 0.000000, bitrate: 957 kb/s
       Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, smpte170m), 728x90, 953 kb/s, 12 fps, 12 tbr, 24k tbn, 24 tbc (default)
       Metadata:
         creation_time   : 2019-07-23T18:30:01.000000Z
         handler_name    : ?Mainconcept Video Media Handler
         encoder         : AVC Coding
    Output #0, null, to 'pipe:':
     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: mp42mp41
       encoder         : Lavf58.20.100
       Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, smpte170m), 728x90, q=2-31, 953 kb/s, 12 fps, 12 tbr, 24k tbn, 24k tbc (default)
       Metadata:
         creation_time   : 2019-07-23T18:30:01.000000Z
         handler_name    : ?Mainconcept Video Media Handler
         encoder         : AVC Coding
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    frame=  195 fps=0.0 q=-1.0 Lsize=N/A time=00:00:16.08 bitrate=N/A speed=1.13e+04x    
    video:1891kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown