Recherche avancée

Médias (9)

Mot : - Tags -/soundtrack

Autres articles (105)

  • 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

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

Sur d’autres sites (8051)

  • What is the best way to make a video with images using node js

    8 juillet 2021, par Pavan Karumuri

    I tried to make a video with multiple images using

    


    


    ffmpeg-stream

    


    


    and

    


    


    fluent-ffmpeg

    


    


    but, its not working properly and sometimes throwing error as follows

    


    > UnhandledPromiseRejectionWarning: Error: Converting failed   Input #0,&#xA;> image2pipe, from &#x27;pipe:3&#x27;:&#xA;>     Duration: N/A, bitrate: N/A&#xA;>     Stream #0:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 259x194 [SAR 1:1 DAR 259:194], 30 fps, 30&#xA;> tbr, 30 tbn   Stream mapping:&#xA;>     Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))   Incompatible pixel format &#x27;yuyv422&#x27; for codec &#x27;libx264&#x27;,&#xA;> auto-selecting format &#x27;yuv422p&#x27;   [swscaler @ 000001d492a47f80]&#xA;> deprecated pixel format used, make sure you did set range correctly  &#xA;> [libx264 @ 000001d4929c0e00] width not divisible by 2 (259x194)  &#xA;> Error initializing output stream 0:0 -- Error while opening encoder&#xA;> for output stream #0:0 - maybe incorrect parameters  such as bit_rate,&#xA;> rate, width or height   Conversion failed!&#xA;>     at ChildProcess.<anonymous> (E:\Desktop\node\meeting_poc\node_modules\ffmpeg-stream\lib\index.js:281:24)&#xA;>     at ChildProcess.emit (events.js:376:20)&#xA;>     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)&#xA;</anonymous>

    &#xA;

    and following is my code

    &#xA;

    const fs = require(&#x27;fs&#x27;)&#xA;  const frames = [&#x27;./uploads/1.jpg&#x27;, &#x27;./uploads/2.jpg&#x27;, &#x27;./uploads/3.jpg&#x27;]&#xA;  const { Converter } = require("ffmpeg-stream")&#xA;&#xA;  // create converter&#xA;  const converter = new Converter()&#xA;&#xA;  // create input writable stream (the jpeg frames)&#xA;  const converterInput = converter.createInputStream({ f: "image2pipe", r: 30 })&#xA;&#xA;  // create output to file (mp4 video)&#xA;  converter.createOutputToFile("out.mp4", {&#xA;    vcodec: "libx264",&#xA;    pix_fmt: "yuyv422"&#xA;  })&#xA;&#xA;  // start the converter, save the promise for later&#xA;  const convertingFinished = converter.run()&#xA;&#xA;  // pipe all the frames to the converter sequentially&#xA;  for (const filename of frames) {&#xA;    // create a promise for every frame and await it&#xA;    await new Promise((resolve, reject) => {&#xA;      return fs.&#xA;      createReadStream(filename)     //&lt;--- here&#x27;s the main difference&#xA;      .on(&#x27;end&#x27;, resolve)&#xA;      .on(&#x27;error&#x27;, reject)&#xA;      .pipe(converterInput, { end: false })&#xA;    })&#xA;  }&#xA;  converterInput.end()&#xA;&#xA;  // await until the whole process finished just in case&#xA;  await convertingFinished&#xA;

    &#xA;

    and the same working for some images. Please, help me to resolve this issue or suggest other best practice to make it using any other module

    &#xA;

  • (WinError 2) combining video (.mp4) and audio (.mp4) using Python ffmpeg

    28 mai 2021, par Leon

    I'm new to using ffmpeg, and I'm trying to use ffmpeg to combine an audio only (.mp4 format) and a video only (also .mp4 format)

    &#xA;

    I've tried reinstall FFmpeg, ffmpeg, and ffmpeg-python :

    &#xA;

    import ffmpeg&#xA;&#xA;def main():&#xA;    video_stream = ffmpeg.input(&#x27;Video.mp4&#x27;)&#xA;    audio_stream = ffmpeg.input(&#x27;Audio.mp4&#x27;)&#xA;    ffmpeg.output(audio_stream, video_stream, &#x27;result.mp4&#x27;).run()&#xA;&#xA;&#xA;if __name__ == "__main__":&#xA;    main() &#xA;

    &#xA;

    It returns me this error :

    &#xA;

    Traceback (most recent call last):&#xA;  File "C:\Users\leon\Downloads\Youtube_Project\Youtube_Combine.py", line 15, in <module>&#xA;    main()&#xA;  File "C:\Users\leon\Downloads\Youtube_Project\Youtube_Combine.py", line 11, in main&#xA;    ffmpeg.output(audio_stream, video_stream, &#x27;result.mp4&#x27;).run()&#xA;  File "C:\Users\leon\Downloads\Youtube_Project\venv\Downloads\lib\site-packages\ffmpeg\_run.py", line 313, in run&#xA;    process = run_async(&#xA;  File "C:\Users\leon\Downloads\Youtube_Project\venv\Downloads\lib\site-packages\ffmpeg\_run.py", line 284, in run_async&#xA;    return subprocess.Popen(&#xA;  File "C:\Users\leon\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 951, in __init__&#xA;    self._execute_child(args, executable, preexec_fn, close_fds,&#xA;  File "C:\Users\leon\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1420, in _execute_child&#xA;    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,&#xA;FileNotFoundError: [WinError 2] The system cannot find the file specified&#xA;</module>

    &#xA;

  • Combining three or more videos with ffmpeg and the xfade filter

    25 février 2021, par sil

    As of 2020 ffmpeg has the xfade filter which can combine videos with a transition. Combining two videos is easy enough :

    &#xA;

    ffmpeg -i vid1.mp4 -i vid2.mp4 \&#xA;  -filter_complex [0][1]xfade=transition=pixelize:duration=1:offset=4,format=yuv420p" \&#xA;  out.mp4&#xA;

    &#xA;

    But I don't understand how to combine three videos (so that v1 fades into v2 and v2 then fades into v3. I tried something like this :

    &#xA;

    ffmpeg -i vid1.mp4 -i vid2.mp4 -i vid3.mp4 \&#xA;  -filter_complex [0][1]xfade=transition=pixelize:duration=1:offset=4,format=yuv420p[0n1];[0n1][2]xfade=transition=pixelize:duration=1:offset=9,format=yuv420p" \&#xA;  out.mp4&#xA;

    &#xA;

    but that doesn't work. My idea was that 0 and 1, or vid1 and vid2, would be combined into a [0n1] stream with a transition by xfade, and then that 0n1 stream could be combined with vid3 with another filter. As far as I can tell, this includes the first two videos but not the third. What this of course means is that I don't understand how to specify a filtergraph correctly !

    &#xA;

    How should I use xfade to combine 3 or more videos with transitions between them ?

    &#xA;

    A full example is as follows. Here I'll use three images (because then issues with combining videos at different frame rates are avoided), and smash them all to 500x500 for ease (in the final version they would be letterboxed to keep resolution and so on).

    &#xA;

    ffmpeg \&#xA;  -loop 1 -t 5 -i tests/p1.jpg \&#xA;  -loop 1 -t 5 -i tests/p2.jpg \&#xA;  -loop 1 -t 5 -i tests/p3.jpg \&#xA;  -filter_complex "[0]scale=500:500[s0];[1]scale=500:500[s1];[2]scale=500:500[s2];[s0][s1]xfade=transition=pixelize:duration=1:offset=4,format=yuv420p[s01];[s01][s2]xfade=transition=pixelize:duration=1:offset=9,format=yuv420p" out.mp4&#xA;

    &#xA;

    I would expect this to create a video which was :

    &#xA;

      &#xA;
    • 4 seconds of p1.jpg
    • &#xA;

    • a pixelise transition into p2.jpg lasting 1 second
    • &#xA;

    • 4 seconds of p2.jpg
    • &#xA;

    • a pixelise transition into p3.jpg lasting 1 second
    • &#xA;

    • 4 seconds of p3.jpg
    • &#xA;

    &#xA;

    but what I actually get is

    &#xA;

      &#xA;
    • 4 seconds of p1.jpg
    • &#xA;

    • a pixelise transition into p2.jpg lasting 1 second
    • &#xA;

    • 4 seconds of p2.jpg
    • &#xA;

    &#xA;

    and then the video ends. p3 is not included at all.

    &#xA;

    The output is as follows :

    &#xA;

    ffmpeg version N-53546-g5eb4405fc5-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2020 the FFmpeg developers&#xA;  built with gcc 8 (Debian 8.3.0-6)&#xA;  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --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-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg&#xA;  libavutil      56. 56.100 / 56. 56.100&#xA;  libavcodec     58. 97.100 / 58. 97.100&#xA;  libavformat    58. 49.100 / 58. 49.100&#xA;  libavdevice    58. 11.101 / 58. 11.101&#xA;  libavfilter     7. 87.100 /  7. 87.100&#xA;  libswscale      5.  8.100 /  5.  8.100&#xA;  libswresample   3.  8.100 /  3.  8.100&#xA;  libpostproc    55.  8.100 / 55.  8.100&#xA;Input #0, image2, from &#x27;tests/p1.jpg&#x27;:&#xA;  Duration: 00:00:00.04, start: 0.000000, bitrate: 44845 kb/s&#xA;    Stream #0:0: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 820x1270 [SAR 150:150 DAR 82:127], 25 fps, 25 tbr, 25 tbn, 25 tbc&#xA;Input #1, image2, from &#x27;tests/p2.jpg&#x27;:&#xA;  Duration: 00:00:00.04, start: 0.000000, bitrate: 22325 kb/s&#xA;    Stream #1:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 960x600 [SAR 1:1 DAR 8:5], 25 fps, 25 tbr, 25 tbn, 25 tbc&#xA;Input #2, image2, from &#x27;tests/p3.jpg&#x27;:&#xA;  Duration: 00:00:00.04, start: 0.000000, bitrate: 15266 kb/s&#xA;    Stream #2:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 728x669 [SAR 96:96 DAR 728:669], 25 fps, 25 tbr, 25 tbn, 25 tbc&#xA;File &#x27;out.mp4&#x27; already exists. Overwrite? [y/N] y&#xA;Stream mapping:&#xA;  Stream #0:0 (mjpeg) -> scale&#xA;  Stream #1:0 (mjpeg) -> scale&#xA;  Stream #2:0 (mjpeg) -> scale&#xA;  format -> Stream #0:0 (libx264)&#xA;Press [q] to stop, [?] for help&#xA;[swscaler @ 0x8228040] deprecated pixel format used, make sure you did set range correctly&#xA;[swscaler @ 0x8258640] deprecated pixel format used, make sure you did set range correctly&#xA;[swscaler @ 0x827df40] deprecated pixel format used, make sure you did set range correctly&#xA;[swscaler @ 0x829f800] deprecated pixel format used, make sure you did set range correctly&#xA;[swscaler @ 0x82c13c0] deprecated pixel format used, make sure you did set range correctly&#xA;[swscaler @ 0x82e8340] deprecated pixel format used, make sure you did set range correctly&#xA;[libx264 @ 0x77b7600] using SAR=82/127&#xA;[libx264 @ 0x77b7600] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2&#xA;[libx264 @ 0x77b7600] profile High, level 3.0, 4:2:0, 8-bit&#xA;[libx264 @ 0x77b7600] 264 - core 161 r3018 db0d417 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - 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=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&#xA;Output #0, mp4, to &#x27;out.mp4&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf58.49.100&#xA;    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 500x500 [SAR 82:127 DAR 82:127], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)&#xA;    Metadata:&#xA;      encoder         : Lavc58.97.100 libx264&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A&#xA;frame=  101 fps=100 q=28.0 size=       0kB time=00:00:01.92 bitrate=   0.2kbits/s speed=[swscaler @ 0x8291d80] deprecated pixel format used, make sure you did set range correctly&#xA;    Last message repeated 2 times&#xA;[swscaler @ 0x82b3000] deprecated pixel format used, make sure you did set range correctly&#xA;    Last message repeated 2 times&#xA;[swscaler @ 0x82fc200] deprecated pixel format used, make sure you did set range correctly&#xA;    Last message repeated 2 times&#xA;frame=  153 fps=101 q=28.0 size=       0kB time=00:00:04.00 bitrate=   0.1kbits/s speed=[swscaler @ 0x82fc200] deprecated pixel format used, make sure you did set range correctly&#xA;    Last message repeated 2 times&#xA;frame=  225 fps=111 q=28.0 size=     256kB time=00:00:06.88 bitrate= 304.9kbits/s dup=0 frame=  225 fps= 95 q=-1.0 Lsize=     267kB time=00:00:08.88 bitrate= 245.9kbits/s dup=0 drop=125 speed=3.74x    &#xA;video:263kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.293847%&#xA;[libx264 @ 0x77b7600] frame I:2     Avg QP:21.03  size: 19928&#xA;[libx264 @ 0x77b7600] frame P:66    Avg QP:21.18  size:  2453&#xA;[libx264 @ 0x77b7600] frame B:157   Avg QP:29.72  size:   427&#xA;[libx264 @ 0x77b7600] consecutive B-frames:  5.3%  4.4%  1.3% 88.9%&#xA;[libx264 @ 0x77b7600] mb I  I16..4: 29.0% 27.8% 43.2%&#xA;[libx264 @ 0x77b7600] mb P  I16..4: 10.8%  3.2%  7.5%  P16..4:  2.6%  0.9%  0.3%  0.0%  0.0%    skip:74.8%&#xA;[libx264 @ 0x77b7600] mb B  I16..4:  1.1%  0.5%  1.6%  B16..8:  1.0%  0.5%  0.1%  direct: 0.3%  skip:94.9%  L0:37.4% L1:43.5% BI:19.1%&#xA;[libx264 @ 0x77b7600] 8x8 transform intra:16.5% inter:55.3%&#xA;[libx264 @ 0x77b7600] coded y,uvDC,uvAC intra: 31.4% 71.7% 31.8% inter: 1.1% 1.4% 0.1%&#xA;[libx264 @ 0x77b7600] i16 v,h,dc,p: 45% 46%  9%  1%&#xA;[libx264 @ 0x77b7600] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 30% 27%  6%  1%  1%  2%  1%  7%&#xA;[libx264 @ 0x77b7600] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 56% 31%  9%  1%  1%  1%  1%  1%  1%&#xA;[libx264 @ 0x77b7600] i8c dc,h,v,p: 46% 27% 23%  4%&#xA;[libx264 @ 0x77b7600] Weighted P-Frames: Y:10.6% UV:7.6%&#xA;[libx264 @ 0x77b7600] ref P L0: 61.9% 17.1% 13.9%  6.8%  0.3%&#xA;[libx264 @ 0x77b7600] ref B L0: 76.3% 22.8%  0.9%&#xA;[libx264 @ 0x77b7600] ref B L1: 97.6%  2.4%&#xA;[libx264 @ 0x77b7600] kb/s:238.88&#xA;

    &#xA;