Recherche avancée

Médias (91)

Autres articles (73)

  • Encodage et transformation en formats lisibles sur Internet

    10 avril 2011

    MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
    Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
    Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)

  • Monitoring de fermes de MediaSPIP (et de SPIP tant qu’à faire)

    31 mai 2013, par

    Lorsque l’on gère plusieurs (voir plusieurs dizaines) de MediaSPIP sur la même installation, il peut être très pratique d’obtenir d’un coup d’oeil certaines informations.
    Cet article a pour but de documenter les scripts de monitoring Munin développés avec l’aide d’Infini.
    Ces scripts sont installés automatiquement par le script d’installation automatique si une installation de munin est détectée.
    Description des scripts
    Trois scripts Munin ont été développés :
    1. mediaspip_medias
    Un script de (...)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

Sur d’autres sites (13280)

  • FFmpeg uses xface to merge videos without transition effects

    30 avril 2024, par soapbar

    ffmpeg -i ./first.mp4 -i ./first.mp4 -filter_complex "xfade=transition=circlecrop:duration=1:offset=4,format=yuv420p" -y output.mp4

    


    FFMPEG version 6.1.1, the video is generated normally without any error prompts, but the generated video does not have any transition effects.

    


    output

    


    
ffmpeg version 6.1.1-tessus  https://evermeet.cx/ffmpeg/  Copyright (c) 2000-2023 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.17)
  configuration : —cc=/usr/bin/clang —prefix=/opt/ffmpeg —extra-version=tessus —enable-avisynth —enable-fontconfig —enable-gpl —enable-libaom —enable-libass —enable-libbluray —enable-libdav1d —enable-libfreetype —enable-libgsm —enable-libmodplug —enable-libmp3lame —enable-libmysofa —enable-libopencore-amrnb —enable-libopencore-amrwb —enable-libopenh264 —enable-libopenjpeg —enable-libopus —enable-librubberband —enable-libshine —enable-libsnappy —enable-libsoxr —enable-libspeex —enable-libtheora —enable-libtwolame —enable-libvidstab —enable-libvmaf —enable-libvo-amrwbenc —enable-libvorbis —enable-libvpx —enable-libwebp —enable-libx264 —enable-libx265 —enable-libxavs —enable-libxml2 —enable-libxvid —enable-libzimg —enable-libzmq —enable-libzvbi —enable-version3 —pkg-config-flags=—static —disable-ffplay
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
  libpostproc    57.  3.100 / 57.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './first.mp4' :
  Metadata :
    major_brand : isom
    minor_version : 512
    compatible_brands : isomiso2avc1mp41
    encoder : Lavf61.1.100
  Duration : 00:00:05.00, start : 0.000000, bitrate : 110 kb/s
  Stream #0:0[0x1](und) : Video : h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1080x1920 [SAR 4095:4096 DAR 36855:65536], 109 kb/s, SAR 14317:14320 DAR 128853:229120, 0.20 fps, 0.20 tbr, 16384 tbn (default)
    Metadata :
      handler_name : VideoHandler
      vendor_id : [0][0][0][0]
      encoder : Lavc61.3.100 libx264
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from './first.mp4' :
  Metadata :
    major_brand : isom
    minor_version : 512
    compatible_brands : isomiso2avc1mp41
    encoder : Lavf61.1.100
  Duration : 00:00:05.00, start : 0.000000, bitrate : 110 kb/s
  Stream #1:0[0x1](und) : Video : h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1080x1920 [SAR 4095:4096 DAR 36855:65536], 109 kb/s, SAR 14317:14320 DAR 128853:229120, 0.20 fps, 0.20 tbr, 16384 tbn (default)
    Metadata :
      handler_name : VideoHandler
      vendor_id : [0][0][0][0]
      encoder : Lavc61.3.100 libx264
Stream mapping :
  Stream #0:0 (h264) -> xfade
  Stream #1:0 (h264) -> xfade
  format:default -> Stream #0:0 (libx264)
Press [q] to stop, [?] for help
[libx264 @ 0x7f9f99fc87c0] using SAR=4095/4096
[libx264 @ 0x7f9f99fc87c0] using cpu capabilities : MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x7f9f99fc87c0] profile High, level 4.0, 4:2:0, 8-bit
[libx264 @ 0x7f9f99fc87c0] 264 - core 164 r3172 c1c9931 - H.264/MPEG-4 AVC codec - Copyleft 2003-2023 - 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=1 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 : Lavf60.16.100
  Stream #0:0 : Video : h264 (avc1 / 0x31637661), yuv420p(tv, progressive), 1080x1920 [SAR 14317:14320 DAR 128853:229120], q=2-31, 0.20 fps, 16384 tbn
    Metadata :
      encoder : Lavc60.31.102 libx264
    Side data :
      cpb : bitrate max/min/avg : 0/0/0 buffer size : 0 vbv_delay : N/A
[out#0/mp4 @ 0x7f9f99fc74c0] video:72kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead : 1.190217%
frame=    2 fps=0.0 q=-1.0 Lsize=      73kB time=00:00:05.00 bitrate= 118.9kbits/s speed=45.5x    
[libx264 @ 0x7f9f99fc87c0] frame I:1     Avg QP:12.25  size : 72527
[libx264 @ 0x7f9f99fc87c0] frame P:1     Avg QP:13.77  size :   216
[libx264 @ 0x7f9f99fc87c0] mb I  I16..4 : 51.4% 34.9% 13.8%
[libx264 @ 0x7f9f99fc87c0] mb P  I16..4 :  0.0%  0.0%  0.0%  P16..4 :  0.8%  0.0%  0.0%  0.0%  0.0%    skip:99.2%
[libx264 @ 0x7f9f99fc87c0] 8x8 transform intra:34.9% inter:0.0%
[libx264 @ 0x7f9f99fc87c0] coded y,uvDC,uvAC intra : 9.2% 9.6% 6.9% inter : 0.0% 0.6% 0.0%
[libx264 @ 0x7f9f99fc87c0] i16 v,h,dc,p : 79% 20%  2%  0%
[libx264 @ 0x7f9f99fc87c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu :  1% 97%  2%  0%  0%  0%  0%  0%  0%
[libx264 @ 0x7f9f99fc87c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu : 36% 32% 10%  3%  3%  3%  4%  3%  4%
[libx264 @ 0x7f9f99fc87c0] i8c dc,h,v,p : 80% 15%  4%  0%
[libx264 @ 0x7f9f99fc87c0] Weighted P-Frames : Y:0.0% UV:0.0%
[libx264 @ 0x7f9f99fc87c0] kb/s:58.19


    


  • ffmpeg segmentation fails with floating point exception

    19 août 2020, par painfulenglish

    I'm trying to segment a video using the following command :

    


    ffmpeg -i /home/user/videos/0001.MP4 -codec copy -map 0 -f segment -segment_frames 66 /tmp/boos/0001/0001_%03d.MP4


    


    After working for a few seconds, the output being

    


    frame=  251 fps=0.0 q=-1.0 size=N/A time=00:00:10.02 bitrate=N/A speed=19.6x    


    


    the process fails with a floating point exception. The full output is given below. I have a suspicion that the problem may be specific to GoPro videos due to the following observations :

    


      

    1. The same video is segmented successfully if I first re-encode it using ffmpeg.
    2. 


    3. Other videos (non-GoPro) do not cause the problem.
    4. 


    


    I would appreciate any suggestions on how to track down or even solve the problem.

    


    Full output :

    


    ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers&#xA;  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)&#xA;  configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared&#xA;  libavutil      55. 78.100 / 55. 78.100&#xA;  libavcodec     57.107.100 / 57.107.100&#xA;  libavformat    57. 83.100 / 57. 83.100&#xA;  libavdevice    57. 10.100 / 57. 10.100&#xA;  libavfilter     6.107.100 /  6.107.100&#xA;  libavresample   3.  7.  0 /  3.  7.  0&#xA;  libswscale      4.  8.100 /  4.  8.100&#xA;  libswresample   2.  9.100 /  2.  9.100&#xA;  libpostproc    54.  7.100 / 54.  7.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &amp;apos;/home/broadbelt/videos/0001.MP4&amp;apos;:&#xA;  Metadata:&#xA;    major_brand     : mp41&#xA;    minor_version   : 538120216&#xA;    compatible_brands: mp41&#xA;    creation_time   : 2019-11-18T13:55:42.000000Z&#xA;    firmware        : HD7.01.01.80.00&#xA;  Duration: 00:17:38.22, start: 0.000000, bitrate: 30245 kb/s&#xA;    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 30000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)&#xA;    Metadata:&#xA;      creation_time   : 2019-11-18T13:55:42.000000Z&#xA;      handler_name    : GoPro AVC  &#xA;      encoder         : GoPro AVC encoder&#xA;      timecode        : 13:55:42:21&#xA;    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2019-11-18T13:55:42.000000Z&#xA;      handler_name    : GoPro AAC  &#xA;      timecode        : 13:55:42:21&#xA;    Stream #0:2(eng): Data: none (tmcd / 0x64636D74) (default)&#xA;    Metadata:&#xA;      creation_time   : 2019-11-18T13:55:42.000000Z&#xA;      handler_name    : GoPro TCD  &#xA;      timecode        : 13:55:42:21&#xA;    Stream #0:3(eng): Data: none (gpmd / 0x646D7067), 37 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2019-11-18T13:55:42.000000Z&#xA;      handler_name    : GoPro MET  &#xA;    Stream #0:4(eng): Data: none (fdsc / 0x63736466), 9 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2019-11-18T13:55:42.000000Z&#xA;      handler_name    : GoPro SOS  &#xA;<span style="background-color:#2E3436"><font color="#FF87FF">[segment @ 0x562a95062f40] </font></span>Opening &amp;apos;/tmp/boost/0001/0001_000.MP4&amp;apos; for writing&#xA;<span style="background-color:#2E3436"><font color="#FF87FF">[mp4 @ 0x562a9506a600] </font></span><span style="background-color:#2E3436"><font color="#FF0000">Timecode frame rate must be specified</font></span>&#xA;Output #0, segment, to &amp;apos;/tmp/boost/0001/0001_%03d.MP4&amp;apos;:&#xA;  Metadata:&#xA;    major_brand     : mp41&#xA;    minor_version   : 538120216&#xA;    compatible_brands: mp41&#xA;    firmware        : HD7.01.01.80.00&#xA;    encoder         : Lavf57.83.100&#xA;    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 30000 kb/s, 25 fps, 25 tbr, 12800 tbn, 25 tbc (default)&#xA;    Metadata:&#xA;      creation_time   : 2019-11-18T13:55:42.000000Z&#xA;      handler_name    : GoPro AVC  &#xA;      encoder         : GoPro AVC encoder&#xA;      timecode        : 13:55:42:21&#xA;    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2019-11-18T13:55:42.000000Z&#xA;      handler_name    : GoPro AAC  &#xA;      timecode        : 13:55:42:21&#xA;    Stream #0:2(eng): Data: none (tmcd / 0x64636D74) (default)&#xA;    Metadata:&#xA;      creation_time   : 2019-11-18T13:55:42.000000Z&#xA;      handler_name    : GoPro TCD  &#xA;      timecode        : 13:55:42:21&#xA;    Stream #0:3(eng): Data: none (gpmd / 0x646D7067), 37 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2019-11-18T13:55:42.000000Z&#xA;      handler_name    : GoPro MET  &#xA;    Stream #0:4(eng): Data: none (fdsc / 0x63736466), 9 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2019-11-18T13:55:42.000000Z&#xA;      handler_name    : GoPro SOS  &#xA;Stream mapping:&#xA;  Stream #0:0 -&amp;gt; #0:0 (copy)&#xA;  Stream #0:1 -&amp;gt; #0:1 (copy)&#xA;  Stream #0:2 -&amp;gt; #0:2 (copy)&#xA;  Stream #0:3 -&amp;gt; #0:3 (copy)&#xA;  Stream #0:4 -&amp;gt; #0:4 (copy)&#xA;Press [q] to stop, [?] for help&#xA;**Floating point exception (core dumped)me=00:00:01.00 bitrate=N/A speed=0.143x**   &#xA;

    &#xA;

  • How to set background transparency for animation with ffmpeg

    23 octobre 2023, par Jan Turowski

    I am creating animated physics graphs with a transparent background for later use in a NLE. On my old machine at work they display and render with background transparency just fine. The exact same code however loses background transparency in the ffmpeg render on both my Linux and my Windows machine at home. The animations are displayed just fine on all machines.

    &#xA;

    As I first thought it was a Linux issue, I tried to run the code on my Windows machine expecting it to work again. Unfortunately it did not.

    &#xA;

    Reduced code :

    &#xA;

    import numpy as np&#xA;import matplotlib.pylab as plt&#xA;from matplotlib.animation import FuncAnimation&#xA;import matplotlib.animation as animation&#xA;from matplotlib.pyplot import figure&#xA;from matplotlib import style&#xA;import locale&#xA;from matplotlib.ticker import (MultipleLocator, AutoMinorLocator)&#xA;# Set to German locale to get comma decimal separater&#xA;locale.setlocale(locale.LC_NUMERIC, "de_DE")&#xA;# Tell matplotlib to use the locale we set above&#xA;plt.rcParams[&#x27;axes.formatter.use_locale&#x27;] = True&#xA;&#xA;# plt.clf()&#xA;# plt.rcdefaults()&#xA;&#xA;# Style und Font definieren&#xA;&#xA;style.use(&#x27;dark_background&#x27;)&#xA;&#xA;# Pfeile erstellen&#xA;def arrowed_spines(fig, ax):&#xA;&#xA;    xmin, xmax = ax.get_xlim()&#xA;    ymin, ymax = ax.get_ylim()&#xA;&#xA;    # removing the default axis on all sides:&#xA;    for side in [&#x27;bottom&#x27;,&#x27;right&#x27;,&#x27;top&#x27;,&#x27;left&#x27;]:&#xA;        ax.spines[side].set_visible(False)&#xA;&#xA;    # removing the axis ticks&#xA;    # plt.xticks([]) # labels&#xA;    # plt.yticks([])&#xA;    # ax.xaxis.set_ticks_position(&#x27;none&#x27;) # tick markers&#xA;    # ax.yaxis.set_ticks_position(&#x27;none&#x27;)&#xA;&#xA;    # get width and height of axes object to compute&#xA;    # matching arrowhead length and width&#xA;    dps = fig.dpi_scale_trans.inverted()&#xA;    bbox = ax.get_window_extent().transformed(dps)&#xA;    width, height = bbox.width, bbox.height&#xA;&#xA;    # manual arrowhead width and length&#xA;    hw = 1./20.*(ymax-ymin)&#xA;    hl = 1./20.*(xmax-xmin)&#xA;    lw = 1. # axis line width&#xA;    ohg = 0.3 # arrow overhang&#xA;&#xA;    # compute matching arrowhead length and width&#xA;    yhw = hw/(ymax-ymin)*(xmax-xmin)* height/width&#xA;    yhl = hl/(xmax-xmin)*(ymax-ymin)* width/height&#xA;&#xA;    # draw x and y axis&#xA;    ax.arrow(xmin, 0, xmax-xmin, 0., fc=&#x27;w&#x27;, ec=&#x27;w&#x27;, lw = lw,&#xA;             head_width=hw, head_length=hl, overhang = ohg,&#xA;             length_includes_head= True, clip_on = False)&#xA;&#xA;    ax.arrow(0, ymin, 0., ymax-ymin, fc=&#x27;w&#x27;, ec=&#x27;w&#x27;, lw = lw,&#xA;             head_width=yhw, head_length=yhl, overhang = ohg,&#xA;             length_includes_head= True, clip_on = False)&#xA;&#xA;# Meine easing-Funktion&#xA;def ease(n):&#xA;    if n &lt; 0.0:&#xA;        return 0&#xA;    elif n > 1.0:&#xA;        return 1&#xA;    else:&#xA;        return 3*n**2-2*n**3&#xA;&#xA;# Meine Floor/Warte Funktion&#xA;def wait(n):&#xA;    if n &lt; 0.0:&#xA;        return 0&#xA;    else:&#xA;        return n&#xA;&#xA;# Canvas erstellen&#xA;fig = plt.figure()&#xA;ax = fig.add_subplot(111)&#xA;fig.set_size_inches([8,9])&#xA;&#xA;def f(x):&#xA;    return -0.05*x**2&#x2B;125&#xA;xlin = np.linspace(0,60,100)&#xA;&#xA;&#xA;# Beschriftung und Optik&#xA;&#xA;plt.xlabel(r"$x$ in $\rm{m}$", horizontalalignment=&#x27;right&#x27;, x=1.0)&#xA;plt.ylabel(r"$y$ in $\rm{m}$", horizontalalignment=&#x27;right&#x27;, y=1.0)&#xA;ax.set_xlim(0,100)&#xA;ax.set_ylim(0,139)&#xA;plt.grid(alpha=.4)&#xA;plt.xticks(np.arange(0, 100, 20))&#xA;plt.yticks(np.arange(0, 140, 20))&#xA;ax.yaxis.set_minor_locator(MultipleLocator(10))&#xA;ax.xaxis.set_minor_locator(MultipleLocator(10))&#xA;ax.tick_params(axis=&#x27;x&#x27;, direction = "inout", length= 10.0, which=&#x27;both&#x27;, width=3)&#xA;ax.tick_params(axis=&#x27;y&#x27;, direction = "inout", length= 10.0, which=&#x27;both&#x27;, width=3)&#xA;&#xA;&#xA;xsub = np.array([0])&#xA;&#xA;# statische Linien definieren&#xA;line2, = ax.plot(xsub,f(xsub),linewidth=5,zorder=0,c = &#x27;b&#x27;)&#xA;arrowed_spines(fig, ax)&#xA;plt.tight_layout()&#xA;&#xA;# Linien animieren&#xA;def animate(i):&#xA;&#xA;    xsub = xlin[0:wait(i-20)]&#xA;    global line2&#xA;    line2.remove()&#xA;    line2, = ax.plot(xsub, f(xsub), linewidth=5, zorder=0,c = "b")&#xA;    plt.tight_layout()&#xA;&#xA;animation = FuncAnimation(fig, animate, np.arange(0, 130, 1), interval=100)&#xA;&#xA;plt.show()&#xA;&#xA;# animation.save(r"YOUR\PATH\HERE\reduced_x-y.mov", codec="png",&#xA;         dpi=100, bitrate=-1,&#xA;         savefig_kwargs={&#x27;transparent&#x27;: True, &#x27;facecolor&#x27;: &#x27;none&#x27;})&#xA;&#xA;

    &#xA;