Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP 0.2

Autres articles (101)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (5130)

  • Crop individual frames of a video and then concat for output

    27 juin 2024, par Ashish Padave

    I want to Crop individual frames of a video and then concat for output. This works with 2 ffmpeg commands. The first one extracts each frame and the second concats them.
I want to get it done without the intermediate frames.

    


    Tried with the following

    


    ffmpeg  -y -i input.mp4 -filter_complex "[0:v]split=890[v0][v1][v2][v3][v4][v5];[v0]select='eq(n\,0)',setpts=PTS-STARTPTS,crop=404:720:225:0[v0]; [v1]select='eq(n\,1)',setpts=PTS-STARTPTS,crop=404:720:225:0[v1]; [v2]select='eq(n\,2)',setpts=PTS-STARTPTS,crop=404:720:225:0[v2]; [v3]select='eq(n\,3)',setpts=PTS-STARTPTS,crop=404:720:225:0[v3]; [v4]select='eq(n\,4)',setpts=PTS-STARTPTS,crop=404:720:225:0[v4]; [v5]select='eq(n\,5)',setpts=PTS-STARTPTS,crop=404:720:225:0[v5];[v0][v1][v2][v3][v4][v5]concat=n=6:v=1:a=0[outv]" -map "[outv]" -map 0:a? -c:a copy -vsync 2 output.mp4


    


    The above is an abridged version of the command. The video I am working with has 890 frames and a frame rate of 25.

    


    The output log with 890 frames is

    


    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf59.5.100
  Duration: 00:00:35.61, start: 0.000000, bitrate: 3380 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 3246 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 (h264) -> split
  concat -> Stream #0:0 (libx264)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[libx264 @ 0x55963ad4b700] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 AVX512
[libx264 @ 0x55963ad4b700] profile High, level 3.0
[libx264 @ 0x55963ad4b700] 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=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=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 'output.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 404x720, q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
    Metadata:
      encoder         : Lavc58.54.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
frame=    3 fps=0.6 q=-1.0 Lsize=     586kB time=00:00:35.59 bitrate= 134.9kbits/s dup=0 drop=887 speed=6.73x
video:21kB audio:558kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.278277%
[libx264 @ 0x55963ad4b700] frame I:1     Avg QP:23.09  size: 17546
[libx264 @ 0x55963ad4b700] frame P:1     Avg QP:25.73  size:  2069
[libx264 @ 0x55963ad4b700] frame B:1     Avg QP:26.34  size:   845
[libx264 @ 0x55963ad4b700] consecutive B-frames: 33.3% 66.7%  0.0%  0.0%
[libx264 @ 0x55963ad4b700] mb I  I16..4:  8.4% 68.9% 22.7%
[libx264 @ 0x55963ad4b700] mb P  I16..4:  0.1%  0.6%  0.3%  P16..4: 28.5%  5.0%  3.9%  0.0%  0.0%    skip:61.6%
[libx264 @ 0x55963ad4b700] mb B  I16..4:  0.0%  0.1%  0.0%  B16..8: 29.6%  3.4%  0.3%  direct: 0.2%  skip:66.4%  L0:59.3% L1:35.6% BI: 5.1%
[libx264 @ 0x55963ad4b700] 8x8 transform intra:68.8% inter:73.3%
[libx264 @ 0x55963ad4b700] coded y,uvDC,uvAC intra: 73.0% 80.1% 36.4% inter: 3.9% 7.0% 0.7%
[libx264 @ 0x55963ad4b700] i16 v,h,dc,p:  2% 74%  6% 18%
[libx264 @ 0x55963ad4b700] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 36% 20%  8%  4%  2%  6%  4%  8%
[libx264 @ 0x55963ad4b700] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 41% 10%  4%  7%  4%  5%  3%  5%
[libx264 @ 0x55963ad4b700] i8c dc,h,v,p: 44% 37% 14%  6%
[libx264 @ 0x55963ad4b700] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x55963ad4b700] kb/s:1364.00


    


    So it is basically dropping 887 frames. The output file has the full audio but no video.
Is this even possible ?

    


  • Converting avi to mp4 (use ffmpeg library) is very slow [closed]

    7 décembre 2012, par yAnTar

    I have task - convert any video from user to mp4 format.
    I use command

    ffmpeg -i $file -vcodec libx264 -vpre ultrafast -bt 500k -acodec libfaac -ab 56k -ac 2 -s 480x320 $outputFileMp4

    I try to change options bitrate, dimensions, but spped of converting is slow - 3 mbytes convert arround 90 seconds.

    If i convert avi to flv - no problem.

    FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
     built on Jan 29 2012 17:52:15 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6)
     configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --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
     libavfilter    1.19. 0 /  1.19. 0
     libswscale     0.11. 0 /  0.11. 0
     libpostproc   51. 2. 0 / 51. 2. 0
    Input #0, avi, from 'intro.avi':
     Duration: 00:07:48.53, start: 0.000000, bitrate: 244 kb/s
       Stream #0.0: Video: camtasia, bgr24, 800x600, 15 tbr, 15 tbn, 15 tbc
       Metadata:
         strn            : Camtasia Producer_render549ab1f.avi Video #1
       Stream #0.1: Audio: pcm_s16le, 12000 Hz, 1 channels, s16, 192 kb/s
       Metadata:
         strn            : Microsoft Waveform: Camtasia Producer_render549ab1f.wav
    [libx264 @ 0x1202e40]using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
    [libx264 @ 0x1202e40]profile Constrained Baseline, level 2.2
    [libx264 @ 0x1202e40]264 - core 107 - H.264/MPEG-4 AVC codec - Copyleft 2003-2010 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0x1:0 me=dia subme=0 psy=1 psy_rd=0.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=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=abr mbtree=0 bitrate=200 ratetol=2.5 qcomp=0.60 qpmin=10 qpmax=51 qpstep=4 ip_ratio=1.41 aq=0
    Output #0, mp4, to 'test2.mp4':
     Metadata:
       encoder         : Lavf52.64.2
       Stream #0.0: Video: libx264, yuv420p, 640x480, q=10-51, 200 kb/s, 15 tbn, 15 tbc
       Metadata:
         strn            : Camtasia Producer_render549ab1f.avi Video #1
       Stream #0.1: Audio: libfaac, 12000 Hz, 2 channels, s16, 5 kb/s
       Metadata:
         strn            : Microsoft Waveform: Camtasia Producer_render549ab1f.wav
    Stream mapping:
     Stream #0.0 -> #0.0
     Stream #0.1 -> #0.1

    and result of executing

    frame= 7028 fps= 52 q=10.0 Lsize=    2654kB time=468.31 bitrate=  46.4kbits/s
    video:1883kB audio:672kB global headers:0kB muxing overhead 3.876805%
    [libx264 @ 0xe1ee40]frame I:29    Avg QP:10.83  size: 25781
    [libx264 @ 0xe1ee40]frame P:6999  Avg QP:10.08  size:   169
    [libx264 @ 0xe1ee40]mb I  I16..4: 80.1%  0.0% 19.9%
    [libx264 @ 0xe1ee40]mb P  I16..4:  0.2%  0.0%  0.0%  P16..4:  0.2%  0.0%  0.0%  0.0%  0.0%    skip:99.6%
    [libx264 @ 0xe1ee40]final ratefactor: 5.71
    [libx264 @ 0xe1ee40]coded y,uvDC,uvAC intra: 37.1% 3.3% 3.1% inter: 0.1% 0.0% 0.0%
    [libx264 @ 0xe1ee40]i16 v,h,dc,p: 87% 12%  1%  0%
    [libx264 @ 0xe1ee40]i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 23% 27%  8%  6%  3%  3%  2%  8%
    [libx264 @ 0xe1ee40]i8c dc,h,v,p: 94%  6%  0%  0%
    [libx264 @ 0xe1ee40]kb/s:32.91
  • ffmpeg concat video length is not the sum of durations

    9 novembre 2019, par Mason

    I’m simply trying to put some images together into a video with specific durations. I’m using the command

    ffmpeg -f concat -i concat.txt -r 30 video.mp4
    # concat.txt

    file capture12.png
    duration 1
    file capture57.png
    duration 3
    file capture156.png
    duration 7
    file capture234.png
    duration 5
    file capture272.png
    duration 3

    The output of my console is

    ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
     built with gcc 9.1.1 (GCC) 20190807
     configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
     libavutil      56. 31.100 / 56. 31.100
     libavcodec     58. 54.100 / 58. 54.100
     libavformat    58. 29.100 / 58. 29.100
     libavdevice    58.  8.100 / 58.  8.100
     libavfilter     7. 57.100 /  7. 57.100
     libswscale      5.  5.100 /  5.  5.100
     libswresample   3.  5.100 /  3.  5.100
     libpostproc    55.  5.100 / 55.  5.100
    Input #0, concat, from 'concat.txt':
     Duration: 00:00:19.00, start: 0.000000, bitrate: 0 kb/s
       Stream #0:0: Video: png, rgba(pc), 983x553, 25 tbr, 25 tbn, 25 tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    [libx264 @ 000001b3e55c5c80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
    [libx264 @ 000001b3e55c5c80] profile High 4:4:4 Predictive, level 3.1, 4:4:4, 8-bit
    [libx264 @ 000001b3e55c5c80] 264 - core 158 r2984 3759fcb - 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=4 threads=6 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 'video.mp4':
     Metadata:
       encoder         : Lavf58.29.100
       Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv444p, 983x553, q=-1--1, 30 fps, 15360 tbn, 30 tbc
       Metadata:
         encoder         : Lavc58.54.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    frame=  629 fps=400 q=-1.0 Lsize=     124kB time=00:00:20.86 bitrate=  48.8kbits/s dup=624 drop=0 speed=13.3x
    video:116kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 7.050883%
    [libx264 @ 000001b3e55c5c80] frame I:3     Avg QP:13.09  size: 20222
    [libx264 @ 000001b3e55c5c80] frame P:158   Avg QP:10.80  size:   207
    [libx264 @ 000001b3e55c5c80] frame B:468   Avg QP:13.75  size:    53
    [libx264 @ 000001b3e55c5c80] consecutive B-frames:  0.8%  0.0%  0.0% 99.2%
    [libx264 @ 000001b3e55c5c80] mb I  I16..4: 23.0% 58.6% 18.4%
    [libx264 @ 000001b3e55c5c80] mb P  I16..4:  0.0%  0.0%  0.2%  P16..4:  0.1%  0.0%  0.0%  0.0%  0.0%    skip:99.7%
    [libx264 @ 000001b3e55c5c80] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  1.3%  0.0%  0.0%  direct: 0.0%  skip:98.7%  L0:66.5% L1:33.5% BI: 0.0%
    [libx264 @ 000001b3e55c5c80] 8x8 transform intra:54.0% inter:7.4%
    [libx264 @ 000001b3e55c5c80] coded y,u,v intra: 15.3% 0.7% 0.7% inter: 0.0% 0.0% 0.0%
    [libx264 @ 000001b3e55c5c80] i16 v,h,dc,p: 86% 14%  0%  0%
    [libx264 @ 000001b3e55c5c80] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 65%  7% 28%  0%  0%  0%  0%  0%  0%
    [libx264 @ 000001b3e55c5c80] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 50% 14% 14%  3%  4%  5%  4%  4%  3%
    [libx264 @ 000001b3e55c5c80] Weighted P-Frames: Y:0.0% UV:0.0%
    [libx264 @ 000001b3e55c5c80] ref P L0: 87.3%  6.3%  5.6%  0.8%
    [libx264 @ 000001b3e55c5c80] ref B L0: 45.3% 54.3%  0.4%
    [libx264 @ 000001b3e55c5c80] ref B L1: 99.6%  0.4%
    [libx264 @ 000001b3e55c5c80] kb/s:45.07

    I can see it clearly saying Duration 00:00:19.00 (as it should be) and then later saying that the final video is 00:00:20.86. How do I get these numbers to match ?