Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP 0.2

Autres articles (24)

  • 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

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

Sur d’autres sites (4361)

  • FFmpeg overlay PNG after scaling has not necessary black borders

    24 mars 2021, par Mikołaj Henklewski

    I have two PNG files that I want to add to the video :

    


    


    but on the final video, they have black borders (they do not have it originally !) Actual Result.. The question is why FFmpeg is adding it on scale effect, and how to avoid adding it ? Command is :

    


    ffmpeg -i 3d9678e2e58c4d08a24363468d0cfd3e.mp4 -i caption-1616544596077-d.png -i caption-1616544596080-d.png -filter_complex 
[1:v]rotate=6.178465552059927:c=none:ow=rotw(6.178465552059927):oh=roth(6.178465552059927)[1_rot];
[1_rot]scale=iw/2:ih/2[1_rot_scale];
[0:v][1_rot_scale]overlay=x=288:y=50:enable='between(t,0,3.2)':format=auto[1_out];
[2:v]rotate=0.0:c=none:ow=rotw(0.0):oh=roth(0.0)[2_rot];[2_rot]scale=iw/2:ih/2[2_rot_scale];
[1_out[2_rot_scale]overlay=x=589:y=71:enable='between(t,0,3.2)':format=auto" -preset ultrafast -crf 23 out.mp4


    


    Here is also log from ffmpeg :

    


    ffmpeg version 4.3.2 Copyright (c) 2000-2021 the FFmpeg developers
  built with Apple clang version 12.0.0 (clang-1200.0.32.29)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.2_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-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox
  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 '3d9678e2e58c4d08a24363468d0cfd3e.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.77.100
  Duration: 00:00:03.72, start: 0.000000, bitrate: 2333 kb/s
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 2331 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
Input #1, png_pipe, from 'caption-1616544596077-d.png':
  Duration: N/A, bitrate: N/A
    Stream #1:0: Video: png, rgba(pc), 1382x884, 25 tbr, 25 tbn, 25 tbc
Input #2, png_pipe, from 'caption-1616544596080-d.png':
  Duration: N/A, bitrate: N/A
    Stream #2:0: Video: png, rgba(pc), 612x612, 25 tbr, 25 tbn, 25 tbc
File 'out.mp4' already exists. Overwrite? [y/N] y
Stream mapping:
  Stream #0:0 (h264) -> overlay:main
  Stream #1:0 (png) -> rotate
  Stream #2:0 (png) -> rotate
  overlay -> Stream #0:0 (libx264)
Press [q] to stop, [?] for help
[libx264 @ 0x7f8999025c00] using SAR=1/1
[libx264 @ 0x7f8999025c00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7f8999025c00] profile High 4:4:4 Predictive, level 3.1, 4:4:4, 8-bit
[libx264 @ 0x7f8999025c00] 264 - core 161 r3048 b86ae3c - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.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=6 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
Output #0, mp4, to 'out.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.45.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv444p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
    Metadata:
      encoder         : Lavc58.91.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame=   93 fps=0.0 q=-1.0 Lsize=     967kB time=00:00:03.68 bitrate=2152.5kbits/s speed=8.66x
video:966kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.122451%
[libx264 @ 0x7f8999025c00] frame I:1     Avg QP:20.00  size: 85204
[libx264 @ 0x7f8999025c00] frame P:92    Avg QP:18.23  size:  9817
[libx264 @ 0x7f8999025c00] mb I  I16..4: 100.0%  0.0%  0.0%
[libx264 @ 0x7f8999025c00] mb P  I16..4:  1.7%  0.0%  0.0%  P16..4: 19.9%  0.0%  0.0%  0.0%  0.0%    skip:78.4%
[libx264 @ 0x7f8999025c00] coded y,u,v intra: 33.6% 3.0% 4.9% inter: 8.6% 0.9% 0.8%
[libx264 @ 0x7f8999025c00] i16 v,h,dc,p: 30% 33% 18% 18%
[libx264 @ 0x7f8999025c00] kb/s:2125.53


    


  • Green overlay with multiply blend mode using FFMPEG

    25 mars 2014, par Barto

    I'm currently working on a project which needs video editing.
    Here for I'm using ffmpeg, which is working pretty well, except for 1 filter.
    Every video should get an overlay with the Photoshop multiply blend mode.
    I'm using the ffmpeg blend mode, but unfortunately the video gets a green overlay as you can see in the screenshots.

    Original Image
    Original Image

    Edited with ffmpegFFMPEG

    What I'm trying to achieve
    Edited

    Does this has something to do with the mode I'm working in ?
    Below is my current code

    #!/bin/bash
    vagrant ssh -c "./ffmpeg \
    -i /vagrant/public/uploads/video/bw_RzWecVH02p.avi -i /vagrant/public/img/red_ellipse.png \
    -filter_complex "blend=all_mode='multiply'" \
    /vagrant/public/uploads/video/overlay_RzWecVH02p.mp4"

    Here is my ffmpeg output

    $ overlay_edit.sh
    ffmpeg version N-61445-gdded5ed Copyright (c) 2000-2014 the FFmpeg developers
     built on Mar 14 2014 05:12:40 with gcc 4.6 (Debian 4.6.3-1)
     configuration: --prefix=/root/ffmpeg-static/32bit --arch=x86_32 --extra-cflags
    ='-m32 -I/root/ffmpeg-static/32bit/include -static' --extra-ldflags='-m32 -L/roo
    t/ffmpeg-static/32bit/lib -static' --extra-libs='-lxml2 -lexpat -lfreetype' --en
    able-static --disable-shared --disable-ffserver --disable-doc --enable-bzlib --e
    nable-zlib --enable-postproc --enable-runtime-cpudetect --enable-libx264 --enabl
    e-gpl --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-gray --
    enable-libass --enable-libfreetype --enable-libopenjpeg --enable-libspeex --enab
    le-libvo-aacenc --enable-libvo-amrwbenc --enable-version3 --enable-libvpx
     libavutil      52. 66.101 / 52. 66.101
     libavcodec     55. 52.102 / 55. 52.102
     libavformat    55. 34.101 / 55. 34.101
     libavdevice    55. 11.100 / 55. 11.100
     libavfilter     4.  3.100 /  4.  3.100
     libswscale      2.  5.101 /  2.  5.101
     libswresample   0. 18.100 /  0. 18.100
     libpostproc    52.  3.100 / 52.  3.100
    Input #0, avi, from '/vagrant/public/uploads/video/bw_RzWecVH02p.avi':
     Metadata:
       comment         : Converted by www.scriptcam.com
       encoder         : Lavf55.34.101
     Duration: 00:00:06.10, start: 0.000000, bitrate: 315 kb/s
       Stream #0:0: Video: mpeg4 (Simple Profile) (FMP4 / 0x34504D46), yuv420p, 320
    x240 [SAR 1:1 DAR 4:3], 268 kb/s, 30 tbr, 30 tbn, 30 tbc
       Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 16000 Hz, mono, s16p, 24 kb/s

    Input #1, image2, from '/vagrant/public/img/red_ellipse.png':
     Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
       Stream #1:0: Video: png, rgb24, 320x240 [SAR 11811:11811 DAR 4:3], 25 tbr, 2
    5 tbn, 25 tbc
    [libx264 @ 0xa9c70c0] using SAR=1/1
    [libx264 @ 0xa9c70c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle Ca
    che64
    [libx264 @ 0xa9c70c0] profile High, level 1.3
    [libx264 @ 0xa9c70c0] 264 - core 129 r2230 1cffe9f - H.264/MPEG-4 AVC codec - Co
    pyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 de
    block=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 chr
    oma_qp_offset=-2 threads=1 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 scene
    cut=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 '/vagrant/public/uploads/video/overlay_RzWecVH02p.mp4':
     Metadata:
       comment         : Converted by www.scriptcam.com
       encoder         : Lavf55.34.101
       Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 320x24
    0 [SAR 1:1 DAR 4:3], q=-1--1, 15360 tbn, 30 tbc (default)
       Stream #0:1: Audio: aac (libvo_aacenc) ([64][0][0][0] / 0x0040), 16000 Hz, m
    ono, s16, 128 kb/s
    Stream mapping:
     Stream #0:0 (mpeg4) -> blend:top (graph 0)
     Stream #1:0 (png) -> blend:bottom (graph 0)
     blend (graph 0) -> Stream #0:0 (libx264)
     Stream #0:1 -> #0:1 (mp3 -> libvo_aacenc)
    Press [q] to stop, [?] for help
    frame=   91 fps=0.0 q=29.0 size=      42kB time=00:00:02.90 bitrate= 117.7kbits/
    frame=  140 fps=135 q=29.0 size=     105kB time=00:00:04.57 bitrate= 187.3kbits/
    frame=  182 fps=106 q=29.0 Lsize=     178kB time=00:00:06.04 bitrate= 241.9kbits
    /s dup=52 drop=0
    video:158kB audio:16kB subtitle:0 data:0 global headers:0kB muxing overhead 2.25
    8588%
    [libx264 @ 0xa9c70c0] frame I:1     Avg QP:21.21  size:  9865
    [libx264 @ 0xa9c70c0] frame P:128   Avg QP:25.34  size:  1149
    [libx264 @ 0xa9c70c0] frame B:53    Avg QP:28.50  size:    88
    [libx264 @ 0xa9c70c0] consecutive B-frames: 59.3%  3.3%  6.6% 30.8%
    [libx264 @ 0xa9c70c0] mb I  I16..4:  1.3% 69.3% 29.3%
    [libx264 @ 0xa9c70c0] mb P  I16..4:  1.0%  5.8%  0.3%  P16..4: 35.1%  9.9%  5.6%
     0.0%  0.0%    skip:42.4%
    [libx264 @ 0xa9c70c0] mb B  I16..4:  0.1%  0.4%  0.0%  B16..8: 11.8%  0.5%  0.1%
     direct: 0.1%  skip:86.9%  L0:48.6% L1:47.7% BI: 3.7%
    [libx264 @ 0xa9c70c0] 8x8 transform intra:80.6% inter:80.1%
    [libx264 @ 0xa9c70c0] coded y,uvDC,uvAC intra: 73.1% 14.6% 5.3% inter: 13.2% 2.4
    % 0.4%
    [libx264 @ 0xa9c70c0] i16 v,h,dc,p: 14% 49% 28%  9%
    [libx264 @ 0xa9c70c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 28% 32%  4%  4%  4%  4%
     4%  6%
    [libx264 @ 0xa9c70c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 30% 14%  5%  6%  8%  5%
     5%  6%
    [libx264 @ 0xa9c70c0] i8c dc,h,v,p: 76% 13% 11%  1%
    [libx264 @ 0xa9c70c0] Weighted P-Frames: Y:0.8% UV:0.0%
    [libx264 @ 0xa9c70c0] ref P L0: 72.7% 16.4%  8.1%  2.8%  0.0%
    [libx264 @ 0xa9c70c0] ref B L0: 84.7% 13.1%  2.1%
    [libx264 @ 0xa9c70c0] ref B L1: 95.2%  4.8%
    [libx264 @ 0xa9c70c0] kb/s:213.09
    [libvo_aacenc @ 0xa9c82c0] 1 frames left in the queue on closing
    Connection to 127.0.0.1 closed.
  • ffmpeg blured bars on vertical movie - Error while opening encoder

    14 mars 2021, par hexedecimal

    I'm trying to use ffmpeg to prepare a mp4 file which is vertical recorded for upload to youtube.
(on a synology DS220+)
In the output file I want to have no black bars on the side but blured sodebars of the movie itself.
This I'm trying to do whit this code (in the end I want to automate this process, but maybe there is a better way to do this) :

    


    ffmpeg -i input.mp4 -lavfi "[0:v]scale=1920*2:1080*2,boxblur=luma_radius=min(h\,w)/20:luma_power=1:chroma_radius=min(cw\,ch)/20:chroma_power=1[bg];[0:v]scale=-1:1080[ov];[bg][ov]overlay=(W-w)/2:(H-h)/2,crop=w=1920:h=1080" output.mp4 


    


    unfortunaly i get a error message :

    


    Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height


    


    In mine search on the internet I have tried multiple ways to get this done but whit all the same error result.
This was making me think that the ffmpeg install is faulty or I was trying wrong code.

    


    Could somebody help me whit this "project"

    


    full responce below :

    


    username@ip:/volume1/location$ ffmpeg -i input.mp4 -lavfi "[0:v]scale=1920*2:1080*2,boxblur=luma_radius=min(h\,w)/20:luma_power=1:chroma_radius=min(cw\,ch)/20:chroma_power=1[bg];[0:v]scale=-1:1080[ov];[bg][ov]overlay=(W-w)/2:(H-h)/2,crop=w=1920:h=1080" output.mp4
ffmpeg version 2.7.7 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.9.3 (crosstool-NG 1.20.0) 20150311 (prerelease)
  configuration: --prefix=/usr --incdir='${prefix}/include/ffmpeg' --arch=i686 --target-os=linux --cross-prefix=/usr/local/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu- --enable-cross-compile --enable-optimizations --enable-pic --enable-gpl --enable-shared --disable-static --enable-version3 --enable-nonfree --enable-libfaac --enable-encoders --enable-pthreads --disable-bzlib --disable-protocol=rtp --disable-muxer=image2 --disable-muxer=image2pipe --disable-swscale-alpha --disable-ffserver --disable-ffplay --disable-doc --disable-devices --disable-bzlib --disable-altivec --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libmp3lame --disable-vaapi --disable-decoder=amrnb --disable-decoder=ac3 --disable-decoder=ac3_fixed --disable-encoder=zmbv --disable-encoder=dca --disable-encoder=ac3 --disable-encoder=ac3_fixed --disable-encoder=eac3 --disable-decoder=dca --disable-decoder=eac3 --disable-decoder=truehd --disable-decoder=hevc --disable-muxer=hevc --disable-demuxer=hevc --disable-parser=hevc --cc=/usr/local/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ccache-gcc --enable-yasm --enable-libx264 --enable-encoder=libx264
  libavutil      54. 27.100 / 54. 27.100
  libavcodec     56. 41.100 / 56. 41.100
  libavformat    56. 36.100 / 56. 36.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 16.101 /  5. 16.101
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.100 /  1.  2.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf56.36.100
  Duration: 00:00:36.12, start: 0.000000, bitrate: 2529 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, smpte170m/bt709/bt709), 406x720 [SAR 405:406 DAR 9:16], 2394 kb/s, 30 fps, 30 tbr, 12k tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
File 'output.mp4' already exists. Overwrite ? [y/N] y
[libx264 @ 0x1cdc4a0] using SAR=81/256
[libx264 @ 0x1cdc4a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x1cdc4a0] profile High, level 4.0
[libx264 @ 0x1cdc4a0] 264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - 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=3 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 'output.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf56.36.100
    Stream #0:0: Video: h264 (libx264), yuv420p, 1920x1080 [SAR 81:256 DAR 9:16], q=-1--1, 30 fps, 30 tbn, 30 tbc (default)
    Metadata:
      encoder         : Lavc56.41.100 libx264
    Stream #0:1(und): Audio: aac, 0 channels, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      encoder         : Lavc56.41.100 libfaac
Stream mapping:
  Stream #0:0 (h264) -> scale (graph 0)
  Stream #0:0 (h264) -> scale (graph 0)
  crop (graph 0) -> Stream #0:0 (libx264)
  Stream #0:1 -> #0:1 (aac (native) -> aac (libfaac))
Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height