Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (35)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Emballe Médias : Mettre en ligne simplement des documents

    29 octobre 2010, par

    Le plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
    Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
    D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (6424)

  • lavfi/dnn : Add OpenVINO API 2.0 support

    15 août 2023, par Wenbin Chen
    lavfi/dnn : Add OpenVINO API 2.0 support
    

    OpenVINO API 2.0 was released in March 2022, which introduced new
    features.
    This commit implements current OpenVINO features with new 2.0 APIs. And
    will add other features in API 2.0.
    Please add installation path, which include openvino.pc, to
    PKG_CONFIG_PATH mannually for new OpenVINO libs config.

    Signed-off-by : Ting Fu <ting.fu@intel.com>
    Signed-off-by : Wenbin Chen <wenbin.chen@intel.com>

    • [DH] configure
    • [DH] libavfilter/dnn/dnn_backend_openvino.c
  • Pipe opencv frames into ffmpeg

    25 juin 2023, par Dmytro Soltusyuk

    I am trying to pipe opencv frames into ffmpeg, but it does not work.

    &#xA;

    After the research, I found this answer (https://stackoverflow.com/a/62807083/10676682) to work the best for me, so I have the following :

    &#xA;

    def start_streaming_process(rtmp_url, width, height, fps):&#xA;    # fmt: off&#xA;    cmd = [&#x27;ffmpeg&#x27;,&#xA;           &#x27;-y&#x27;,&#xA;           &#x27;-f&#x27;, &#x27;rawvideo&#x27;,&#xA;           &#x27;-vcodec&#x27;, &#x27;rawvideo&#x27;,&#xA;           &#x27;-pix_fmt&#x27;, &#x27;bgr24&#x27;,&#xA;           &#x27;-s&#x27;, "{}x{}".format(width, height),&#xA;           &#x27;-r&#x27;, str(fps),&#xA;           &#x27;-i&#x27;, &#x27;-&#x27;,&#xA;           &#x27;-c:v&#x27;, &#x27;libx264&#x27;,&#xA;           &#x27;-pix_fmt&#x27;, &#x27;yuv420p&#x27;,&#xA;           &#x27;-preset&#x27;, &#x27;ultrafast&#x27;,&#xA;           &#x27;-f&#x27;, &#x27;flv&#x27;,&#xA;           &#x27;-flvflags&#x27;, &#x27;no_duration_filesize&#x27;,&#xA;           rtmp_url]&#xA;    # fmt: on&#xA;&#xA;    return subprocess.Popen(cmd, stdin=subprocess.PIPE)&#xA;

    &#xA;

    def main():&#xA;    width, height, fps = get_video_size(SOURCE_VIDEO_PATH)&#xA;    streaming_process = start_streaming_process(&#xA;        TARGET_VIDEO_PATH,&#xA;        width,&#xA;        height,&#xA;        fps,&#xA;    )&#xA;&#xA;    model = load_yolo(WEIGHTS_PATH)&#xA;    frame_iterator = read_frames(video_source=SOURCE_VIDEO_PATH)&#xA;    processed_frames_iterator = process_frames(&#xA;        model, frame_iterator, ball_target_area=400&#xA;    )&#xA;&#xA;    for processed_frame in processed_frames_iterator:&#xA;        streaming_process.communicate(processed_frame.tobytes())&#xA;&#xA;    streaming_process.kill()&#xA;

    &#xA;

    processed_frame here is an annotated OpenCV frame.

    &#xA;

    However, after I do my first streaming_process.communicate call, the ffmpeg process exits with code 0 (meaning everything was ok), but it is not. I can not feed the rest of the frames into ffmpeg, because the process exited.

    &#xA;

    Here are the logs :

    &#xA;

    Input #0, rawvideo, from &#x27;fd:&#x27;:&#xA;  Duration: N/A, start: 0.000000, bitrate: 663552 kb/s&#xA;  Stream #0:0: Video: rawvideo (BGR[24] / 0x18524742), bgr24, 1280x720, 663552 kb/s, 30 tbr, 30 tbn&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))&#xA;[libx264 @ 0x132e05570] using cpu capabilities: ARMv8 NEON&#xA;[libx264 @ 0x132e05570] profile High, level 3.1, 4:2:0, 8-bit&#xA;[libx264 @ 0x132e05570] 264 - core 164 r3095 baee400 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - h&#xA;ttp://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme&#xA;=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 &#xA;fast_pskip=1 chroma_qp_offset=-2 threads=15 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 inter&#xA;laced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=&#xA;1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbt&#xA;ree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00&#xA;Output #0, flv, to &#x27;rtmp://global-live.mux.com:5222/app/9428e064-e5d3-0bee-dc67-974ba53ce164&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf60.3.100&#xA;  Stream #0:0: Video: h264 ([7][0][0][0] / 0x0007), yuv420p(tv, progressive), 1280x720, q=2-31, 30 fps&#xA;, 1k tbn&#xA;    Metadata:&#xA;      encoder         : Lavc60.3.100 libx264&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A&#xA;frame=    1 fps=0.0 q=29.0 Lsize=      41kB time=00:00:00.00 bitrate=N/A speed=   0x    eed=N/A    &#xA;video:40kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.678311%&#xA;[libx264 @ 0x132e05570] frame I:1     Avg QP:25.22  size: 40589&#xA;[libx264 @ 0x132e05570] mb I  I16..4: 37.7% 33.4% 28.9%&#xA;[libx264 @ 0x132e05570] 8x8 transform intra:33.4%&#xA;[libx264 @ 0x132e05570] coded y,uvDC,uvAC intra: 51.1% 53.2% 14.4%&#xA;[libx264 @ 0x132e05570] i16 v,h,dc,p: 32% 38% 20% 10%&#xA;[libx264 @ 0x132e05570] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 36% 28%  3%  2%  2%  3%  3%  6%&#xA;[libx264 @ 0x132e05570] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 37% 17%  4%  4%  4%  5%  4%  7%&#xA;[libx264 @ 0x132e05570] i8c dc,h,v,p: 46% 37% 12%  4%&#xA;[libx264 @ 0x132e05570] kb/s:9741.36&#xA;

    &#xA;

    That's all. Exit code 0.

    &#xA;

  • How to resize an animated webp?

    23 mai 2023, par shsf

    I want to be able to change the size of a dynamic webp.&#xA;Sample picture address : https://postimg.cc/2qpx5bQm&#xA;I found this website to do just that : https://ezgif.com/resize

    &#xA;

    So how can I implement something similar in my own program ?&#xA;I tried using ImageMagick7 or ffmpeg5, but failed.

    &#xA;

    environment :

    &#xA;

    [developer@Dev_Payment_229 ~]$ cat /etc/redhat-release

    &#xA;

    CentOS Linux release 7.8.2003 (Core)

    &#xA;

    1. tried ffmpeg :

    &#xA;

    [developer@Dev_Payment_229 ~]$ /opt/ffmpeg-5/ffmpeg -i b.webp -vf "scale=320:-1" b_320.webp&#xA;ffmpeg version 5.1.1-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2022 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      57. 28.100 / 57. 28.100&#xA;  libavcodec     59. 37.100 / 59. 37.100&#xA;  libavformat    59. 27.100 / 59. 27.100&#xA;  libavdevice    59.  7.100 / 59.  7.100&#xA;  libavfilter     8. 44.100 /  8. 44.100&#xA;  libswscale      6.  7.100 /  6.  7.100&#xA;  libswresample   4.  7.100 /  4.  7.100&#xA;  libpostproc    56.  6.100 / 56.  6.100&#xA;[webp @ 0x7686f40] skipping unsupported chunk: ANIM&#xA;[webp @ 0x7686f40] skipping unsupported chunk: ANMF&#xA;    Last message repeated 10 times&#xA;[webp @ 0x7686f40] image data not found&#xA;[webp_pipe @ 0x7685700] Could not find codec parameters for stream 0 (Video: webp, none): unspecified size&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; (0) and &#x27;probesize&#x27; (5000000) options&#xA;Input #0, webp_pipe, from &#x27;b.webp&#x27;:&#xA;  Duration: N/A, bitrate: N/A&#xA;  Stream #0:0: Video: webp, none, 25 fps, 25 tbr, 25 tbn&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (webp (native) -> webp (libwebp_anim))&#xA;Press [q] to stop, [?] for help&#xA;[webp @ 0x7697600] skipping unsupported chunk: ANIM&#xA;[webp @ 0x7697600] skipping unsupported chunk: ANMF&#xA;    Last message repeated 10 times&#xA;[webp @ 0x7697600] image data not found&#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;Error marking filters as finished&#xA;Conversion failed!&#xA;

    &#xA;

    It seems that ffmpeg cannot recognize this dynamic webp image.

    &#xA;

    2. tried ImageMagick7

    &#xA;

    install :

    &#xA;

     yum -y install libwebp-devel libwebp-tools&#xA;[root@Dev_FTP_241 developer]# yum list installed | grep webp&#xA;libwebp.x86_64                         0.3.0-11.el7               @updates&#xA;libwebp-devel.x86_64                   0.3.0-11.el7               @updates&#xA;libwebp-tools.x86_64                   0.3.0-11.el7               @updates&#xA;&#xA;

    &#xA;

    source code: https://github.com/ImageMagick/ImageMagick/archive/refs/tags/7.1.1-0.tar.gz&#xA;tar -xvf ImageMagick-7.1.1-0.tar.gz&#xA;./configure --with-webp --prefix=/usr/local/imagemagick&#xA;make&#xA;make install&#xA;

    &#xA;

    single webp can be resized :

    &#xA;

    [root@Dev_FTP_241 developer]#  /usr/local/imagemagick/bin/convert -resize 480  simple.webp simple_480.webp&#xA;Decoded /tmp/magick-LNPdXgk2zDpiuU6Qv9CpDups3560EATh. Dimensions: 2160 x 608. Now saving...&#xA;Saved file /tmp/magick-Q8JHRZZOXdp1r1x187eftzsFlw8AqAuo&#xA;

    &#xA;

    but animated webp failed :

    &#xA;

    [root@Dev_FTP_241 developer]#  /usr/local/imagemagick/bin/convert -resize 480  b.webp b_480.webp&#xA;Error! Decoding of an animated WebP file is not supported.&#xA;       Use webpmux to extract the individual frames or&#xA;       vwebp to view this image.&#xA;Decoding of /tmp/magick-jMiy7ytmAnBzpS8UpafCQ5B44BjDTUSD failed.&#xA;Status: 4 (UNSUPPORTED_FEATURE)&#xA;convert: delegate failed `&#x27;dwebp&#x27; -pam &#x27;%i&#x27; -o &#x27;%o&#x27;&#x27; @ error/delegate.c/InvokeDelegate/1924.&#xA;convert: unable to open file &#x27;/tmp/magick-D-NMEGWU_a0IypZWwTpYiWIE61nteoig&#x27;: No such file or directory @ error/constitute.c/ReadImage/786.&#xA;convert: no images defined `b_480.webp&#x27; @ error/convert.c/ConvertImageCommand/3342.&#xA;

    &#xA;