Recherche avancée

Médias (1)

Mot : - Tags -/biomaping

Autres articles (111)

  • 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

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

  • Changer son thème graphique

    22 février 2011, par

    Le thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
    Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
    Modifier le thème graphique utilisé
    Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
    Il suffit ensuite de se rendre dans l’espace de configuration du (...)

Sur d’autres sites (9253)

  • Can't use OpenCV to decode video on GPU with cv2.CAP_FFMPEG

    19 juillet 2021, par Reza

    I'm trying to get all frames of list of videos(lots of .mp4 videos) using OpenCV. In order to speed up the process I was thinking may be I can use FFMPEG with Nvidia Video Codec SDK to use hardware-accelerated decoding(I have T4 cards on my machine). My code is something like this :

    


    import os
os.environ["OPENCV_FFMPEG_CAPTURE_OPTIONS"]="video_codec;h264_cuvid"
import cv2

ret = cv2.VideoCapture("input.mp4", cv2.CAP_FFMPEG)
while True:
    x, y = ret.read()
    if x:
        continue
    break


    


    but I get these errors when I run my script.

    


    [ERROR:0] global /tmp/pip-req-build-afu9cjzs/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp (1086) open Could not find decoder 'h264_cuvid'
[ERROR:0] global /tmp/pip-req-build-afu9cjzs/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp (1109) open VIDEOIO/FFMPEG: Failed to initialize VideoCapture


    


    My ffmpeg configs, ffmpeg :

    


    ffmpeg version N-102965-gf531a1a4e8 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
  configuration: --enable-nonfree --enable-cuda --enable-cuvid --enable-nvdec --enable-cuda-nvcc --enable-nvenc --enable-libnpp --enable-shared --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64
  libavutil      57.  0.100 / 57.  0.100
  libavcodec     59.  3.101 / 59.  3.101
  libavformat    59.  4.100 / 59.  4.100
  libavdevice    59.  0.100 / 59.  0.100
  libavfilter     8.  0.103 /  8.  0.103
  libswscale      6.  0.100 /  6.  0.100
  libswresample   4.  0.100 /  4.  0.100
Hyper fast Audio and Video encoder


    


    and ffmpeg -hwaccels :

    


    ffmpeg version N-102965-gf531a1a4e8 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
  configuration: --enable-nonfree --enable-cuda --enable-cuvid --enable-nvdec --enable-cuda-nvcc --enable-nvenc --enable-libnpp --enable-shared --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64
  libavutil      57.  0.100 / 57.  0.100
  libavcodec     59.  3.101 / 59.  3.101
  libavformat    59.  4.100 / 59.  4.100
  libavdevice    59.  0.100 / 59.  0.100
  libavfilter     8.  0.103 /  8.  0.103
  libswscale      6.  0.100 /  6.  0.100
  libswresample   4.  0.100 /  4.  0.100
Hardware acceleration methods:
cuda


    


    OpenCV version opencv-python==4.5.3.56

    


  • Streaming an IP camera through node.js

    18 juillet 2021, par Jacob

    I am trying to get an IP camera stream to run in the browser, and eventually phones. However, I am running into a problem accessing the RTSP stream through ffmpeg.
I am running the command below, substituting the correct info. I changed the camera to a static IP address and copied the IP address to STATIC_IP.

    


    /opt/homebrew/bin/ffmpeg -i rtsp://USER:PASS@STATIC_IP:554/stream1 -fflags flush_packets -max_delay 5 -flags -global_header -hls_time 5 -hls_list_size 3 -vcodec copy -y .\videos\ipcam\index.m3u8


    


    The build is logging the following :

    


    ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
  built with Apple clang version 12.0.5 (clang-1205.0.22.9)
  configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/4.4_2 --enable-shared --enable-pthreads --enable-version3 --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-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-avresample --enable-videotoolbox
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[rtsp @ 0x11b008200] CSeq 2 expected, 1 received.
rtsp://USER:PASS@STATIC_IP:554/stream1: Server returned 400 Bad Request


    


    I do not know what the CSeq 2 expected 1 received line is referring to so I am having trouble diagnosing the problem. Any help is appreciated.

    


  • ffmpeg : concat videos with different number of streams

    3 juillet 2021, par qurban

    I'm having trouble with concatenating two videos with different number of streams. Please see the number of streams in both the videos below :

    


    video 1 :

    


      Metadata:
    creation_time   : 2021-07-02T10:23:13.000000Z
  Duration: 00:00:08.38, start: 0.000000, bitrate: 24739 kb/s
    Stream #0:0(eng): Video: mjpeg (Baseline) (jpeg / 0x6765706A), yuvj420p(pc, bt470bg/unknown/unknown), 1920x1080 [SAR 1:1 DAR 16:9], 24736 kb/s, 24 fps, 24 tbr, 2400 tbn, 2400 tbc (default)
    Metadata:
      creation_time   : 2021-07-02T10:23:13.000000Z
      handler_name    : Libquicktime Video Media Handler
      encoder         : libquicktime-1.1.1
      timecode        : 00:00:30:15
    Stream #0:1(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
    Metadata:
      creation_time   : 2021-07-02T10:23:13.000000Z
      handler_name    : Libquicktime Time Code Media Handler
      reel_name       : Untitled
      timecode        : 00:00:30:15


    


    Video 2 :

    


    Metadata:
    creation_time   : 2021-07-02T10:23:28.000000Z
  Duration: 00:00:08.33, start: 0.000000, bitrate: 26411 kb/s
    Stream #0:0(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, 2 channels, s16, 1536 kb/s (default)
    Metadata:
      creation_time   : 2021-07-02T10:23:28.000000Z
      handler_name    : Libquicktime Sound Media Handler
    Stream #0:1(eng): Video: mjpeg (Baseline) (jpeg / 0x6765706A), yuvj420p(pc, bt470bg/unknown/unknown), 1920x1080 [SAR 1:1 DAR 16:9], 24872 kb/s, 24 fps, 24 tbr, 2400 tbn, 2400 tbc (default)
    Metadata:
      creation_time   : 2021-07-02T10:23:28.000000Z
      handler_name    : Libquicktime Video Media Handler
      encoder         : libquicktime-1.1.1
      timecode        : 00:00:39:00
    Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
    Metadata:
      creation_time   : 2021-07-02T10:23:28.000000Z
      handler_name    : Libquicktime Time Code Media Handler
      reel_name       : Untitled
      timecode        : 00:00:39:00


    


    So, clearly the video 1 has two streams and video 2 has three streams. Could someone please let me know how can I concatenate them ?

    


    I have tried :
ffmpeg -y -f concat -safe 0 -i /path/to/files.txt -codec copy /path/to/output.mov

    


    But it gives the following error :

    


    [concat @ 0x12dfd00] Could not find codec parameters for stream 1 (Unknown: none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, concat, from '/path/to/files.txt':
  Duration: N/A, start: 0.000000, bitrate: 24736 kb/s
    Stream #0:0(eng): Video: mjpeg (Baseline) (jpeg / 0x6765706A), yuvj420p(pc, bt470bg/unknown/unknown), 1920x1080 [SAR 1:1 DAR 16:9], 24736 kb/s, 24 fps, 24 tbr, 2400 tbn, 2400 tbc
    Metadata:
      creation_time   : 2021-07-02T10:23:13.000000Z
      handler_name    : Libquicktime Video Media Handler
      encoder         : libquicktime-1.1.1
      timecode        : 00:00:30:15
    Stream #0:1: Unknown: none
Output #0, mov, to '/path/to/output.mov':
  Metadata:
    encoder         : Lavf58.29.100
    Stream #0:0(eng): Video: mjpeg (Baseline) (jpeg / 0x6765706A), yuvj420p(pc, bt470bg/unknown/unknown), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 24736 kb/s, 0.04 fps, 24 tbr, 19200 tbn, 2400 tbc
    Metadata:
      creation_time   : 2021-07-02T10:23:13.000000Z
      handler_name    : Libquicktime Video Media Handler
      encoder         : libquicktime-1.1.1
      timecode        : 00:00:30:15
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[concat @ 0x12dfd00] New (null) stream 0:2 at pos:27508735 and DTS:0.223333s
frame=  601 fps=0.0 q=-1.0 Lsize=   26856kB time=00:05:33.90 bitrate= 658.9kbits/s speed=1.07e+04x    
video:26852kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.015271%


    


    In my situation, sometimes the videos have same number of streams and sometimes different number of streams (with only video stream or with both video and audio streams). Ideally, I'm looking for an ffmpeg command which works in both situations. Is it possible ?