Recherche avancée

Médias (91)

Autres articles (79)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

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

Sur d’autres sites (9327)

  • Attaching audio to video stream using ffmpeg

    5 novembre 2023, par lazarea

    My goal is to build a simple 10-second long video with a grey background, a simple text, and a simple mp3 audio to be played. I believe it should be a simple enough task ; yet, I am unable to get it right, as the audio is not attached to the video stream.

    


    My code is as follows :

    


    import subprocess
from pathlib import Path

folder_path = Path(__file__).parent.absolute()
assert folder_path / "i_have_a_cat.mp3"

ffmpeg_command = [
    'ffmpeg',
    '-y',  # Force override without prompting
    '-f', 'lavfi',
    '-i', 'color=c=gray:s=640x480:d=10',
    '-i', str(folder_path / 'i_have_a_cat.mp3'),
    '-vf', 'drawtext=text=\'I have a cat\':fontsize=24:fontcolor=white:x=(w-text_w)/2:y=(h-text_h)/3*2:enable=\'between(t,2,5)\'',
    '-t', '10',
    str(folder_path / 'output.mp4')
]

subprocess.run(ffmpeg_command)


    


    Checking the ffmpeg logs, I don't see anything extraordinary but I'll paste them here nevertheless because I might be overlooking something.

    


    Input #0, lavfi, from 'color=c=gray:s=640x480:d=10':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc

[mp3 @ 000001d271db1140] Estimating duration from bitrate, this may be inaccurate
Input #1, mp3, from 'c:\Users\myfolder\ffmpeg_poc\i_have_a_cat.mp3':
  Metadata:
    encoder         : Lavf58.76.100
  Duration: 00:00:00.86, start: 0.000000, bitrate: 48 kb/s
    Stream #1:0: Audio: mp3, 22050 Hz, mono, fltp, 48 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
  Stream #1:0 -> #0:1 (mp3 (mp3float) -> aac (native))


    


    Output #0, mp4, to 'c:\Users\myfolder\ffmpeg_poc\output.mp4':
  Metadata:
    encoder         : Lavf58.29.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p(progressive), 640x480 [SAR 1:1 DAR 4:3], q=-1--1, 25 fps, 12800 tbn, 25 tbc     
    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: Audio: aac (LC) (mp4a / 0x6134706D), 22050 Hz, mono, fltp, 69 kb/s
    Metadata:
      encoder         : Lavc58.54.100 aac
[Parsed_color_0 @ 000001d271c6b040] EOF timestamp not reliable
frame=  250 fps=0.0 q=-1.0 Lsize=      24kB time=00:00:09.88 bitrate=  19.9kbits/s speed=31.3x    
video:7kB audio:12kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 23.716467%
[libx264 @ 000001d271d058c0] frame I:1     Avg QP: 9.00  size:   104
[libx264 @ 000001d271d058c0] frame P:63    Avg QP: 9.21  size:    41
[libx264 @ 000001d271d058c0] frame B:186   Avg QP:12.67  size:    21
[libx264 @ 000001d271d058c0] consecutive B-frames:  0.8%  0.0%  0.0% 99.2%
[libx264 @ 000001d271d058c0] mb I  I16..4: 100.0%  0.0%  0.0%
[libx264 @ 000001d271d058c0] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  0.0%  0.0%  0.0%  0.0%  0.0%    skip:100.0%
[libx264 @ 000001d271d058c0] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.0%  0.0%  0.0%  direct: 0.0%  skip:100.0%  L0:50.0% L1:50.0% BI: 0.0%      
[libx264 @ 000001d271d058c0] 8x8 transform intra:0.0%
[libx264 @ 000001d271d058c0] coded y,uvDC,uvAC intra: 0.7% 0.0% 0.0% inter: 0.0% 0.0% 0.0%
[libx264 @ 000001d271d058c0] i16 v,h,dc,p: 97%  0%  3%  0%
[libx264 @ 000001d271d058c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 58% 10% 17%  2%  4%  2%  2%  2%  2%
[libx264 @ 000001d271d058c0] i8c dc,h,v,p: 100%  0%  0%  0%
[libx264 @ 000001d271d058c0] Weighted P-Frames: Y:1.6% UV:0.0%
[libx264 @ 000001d271d058c0] kb/s:5.26
[aac @ 000001d271d071c0] Qavg: 24689.965


    


    Edit

    


    The output of ffprobe -i output.mp4 is as follows :

    


    ffprobe version 6.0-essentials_build-www.gyan.dev Copyright (c) 2007-2023 the FFmpeg developers
  built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth 
--enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
  libavutil      58.  2.100 / 58.  2.100
  libavcodec     60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter     9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample   4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
  Duration: 00:00:04.00, start: 0.000000, bitrate: 37 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 640x480 [SAR 1:1 DAR 4:3], 6 kb/s, 25 fps, 25 tbr, 12800 tbn 
(default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 22050 Hz, mono, fltp, 111 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]


    


  • lavu/hwcontext_qsv : use mfxImplDescription instead of mfxExtendedDeviceId on Linux

    27 novembre 2023, par Haihao Xiang
    lavu/hwcontext_qsv : use mfxImplDescription instead of mfxExtendedDeviceId on Linux
    

    mfxExtendedDeviceId mightn't be supported in certain configurations of
    oneVPL on Linux, so we can't ensure a property filter for
    mfxExtendedDeviceId.DeviceID or mfxExtendedDeviceId.VendorID works as
    expected. This fixed the issue mentioned in [1]

    [1] http://ffmpeg.org/pipermail/ffmpeg-user/2023-October/056983.html

    Signed-off-by : Haihao Xiang <haihao.xiang@intel.com>

    • [DH] libavutil/hwcontext_qsv.c
  • FFmpeg - Overlay multiple layers of transparent webm files [closed]

    27 octobre 2023, par Jens

    I am trying to overlay multiple layers ( up to 8 layers ) of transparent webm files to an mp4 file.

    &#xA;

    If I do this for 2 layers, it works but ignores the alpha channel.

    &#xA;

    ffmpeg  -i 1.webm -i 2.webm  -c:a copy -filter_complex "[0:v][1:v] overlay=0:0:enable=&#x27;between(t,0,20)&#x27;" output.mp4&#xA;

    &#xA;

    I specify libvpx-vp9 to get the alpha channel as well

    &#xA;

    ffmpeg -c:v libvpx-vp9 -i 1.webm -c:v libvpx-vp9 -i 2.webm -c:a copy -filter_complex "[0:v][1:v] overlay=0:0:enable=&#x27;between(t,0,20)&#x27;" output.mp4&#xA;

    &#xA;

    Then I get an error.

    &#xA;

    [libvpx-vp9 @ 0x7f9bd8d04840] Failed to decode frame: Unspecified internal error&#xA;    Last message repeated 3 times&#xA;[libvpx-vp9 @ 0x7f9bd8d04840] Failed to decode frame: Bitstream not supported by this decoder&#xA;    Last message repeated 8 times&#xA;[matroska,webm @ 0x7f9bd8f04880] Could not find codec parameters for stream 0 (Video: vp9 (libvpx-vp9) (Profile 3), none, 1080x1080): unspecified pixel format&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; (0) and &#x27;probesize&#x27; (5000000) options&#xA;Input #0, matroska,webm, from &#x27;1.webm&#x27;:&#xA;  Metadata:&#xA;    encoder         : WS Matroska Muxer&#xA;    creation_time   : 2023-09-11T14:55:34.000000Z&#xA;  Duration: 00:00:20.00, start: 0.000000, bitrate: 1775 kb/s&#xA;  Stream #0:0: Video: vp9 (Profile 3), none, 1080x1080, SAR 1:1 DAR 1:1, 30 fps, 30 tbr, 1k tbn (default)&#xA;    Metadata:&#xA;      alpha_mode      : 1&#xA;  Stream #0:1: Audio: vorbis, 44100 Hz, stereo, fltp (default)&#xA;&#xA;and&#xA;&#xA;Failed to decode frame: Unspecified internal error&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;Cannot determine format of input stream 0:0 after EOF&#xA;

    &#xA;

    I have tried to increasing the value for the 'analyzeduration' and 'probesize', but it makes no difference.

    &#xA;

    ffprobe of 1.webm

    &#xA;

    ffprobe version 6.0 Copyright (c) 2007-2023 the FFmpeg developers&#xA;  built with Apple clang version 14.0.3 (clang-1403.0.22.14.1)&#xA;  configuration: --prefix=/usr/local/Cellar/ffmpeg/6.0-with-options_4 --enable-shared --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libaom --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-demuxer=dash --enable-opencl --enable-audiotoolbox --enable-videotoolbox --disable-htmlpages --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfdk-aac --enable-libgme --enable-libgsm --enable-libmodplug --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-libsvtav1 --enable-librist --enable-librsvg --enable-librtmp --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtesseract --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libwebp --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-openssl --enable-nonfree --enable-libjack --enable-indev=jack --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb&#xA;  libavutil      58.  2.100 / 58.  2.100&#xA;  libavcodec     60.  3.100 / 60.  3.100&#xA;  libavformat    60.  3.100 / 60.  3.100&#xA;  libavdevice    60.  1.100 / 60.  1.100&#xA;  libavfilter     9.  3.100 /  9.  3.100&#xA;  libswscale      7.  1.100 /  7.  1.100&#xA;  libswresample   4. 10.100 /  4. 10.100&#xA;  libpostproc    57.  1.100 / 57.  1.100&#xA;Input #0, matroska,webm, from &#x27;1.webm&#x27;:&#xA;  Metadata:&#xA;    encoder         : WS Matroska Muxer&#xA;    creation_time   : 2023-09-11T14:55:34.000000Z&#xA;  Duration: 00:00:20.00, start: 0.000000, bitrate: 1775 kb/s&#xA;  Stream #0:0: Video: vp8, yuv420p(progressive), 1080x1080, SAR 1:1 DAR 1:1, 30 fps, 30 tbr, 1k tbn (default)&#xA;    Metadata:&#xA;      alpha_mode      : 1&#xA;  Stream #0:1: Audio: vorbis, 44100 Hz, stereo, fltp (default)&#xA;

    &#xA;

    Any ffmpeg wizards with an idea ?

    &#xA;