Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (104)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • 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

Sur d’autres sites (13323)

  • Libavformat records RTP stream too fast (too high FPS)

    14 avril 2022, par cydonia

    I am trying to record an RTP stream using libavformat, however the FPS of recorded videos are ridiculously high, I get thousands of FPS, if not ten thousands. I tried to set the FPS to 30 making the following modifications :

    


    AVFormatContext *src; // Assume src is set here to demuxer's context
AVStream *source_stream = src->streams[i];
AVStream *dest_stream = avformat_new_stream(dest, NULL); // dest is muxer's context here
const AVCodec *pCodec = avcodec_find_decoder(source_stream->codecpar->codec_id);
AVCodecContext *avctx = avcodec_alloc_context3(pCodec);
avctx->time_base = av_make_q(1, 30000);
avcodec_parameters_to_context(avctx, source_stream->codecpar);
avcodec_parameters_from_context(dest_stream->codecpar, avctx);
dest_stream->sample_aspect_ratio = source_stream->sample_aspect_ratio;
dest_stream->time_base = avctx->time_base;
dest_stream->avg_frame_rate = av_make_q(30, 1);
dest_stream->r_frame_rate = source_stream->r_frame_rate;
dest_stream->disposition = source_stream->disposition;


    


    Then, during the recording phase, I do the following as I read a new packet :

    


    packet->pts = av_rescale_q(packet->pts, src_stream->time_base, dest_stream->time_base);
packet->dts = av_rescale_q(packet->dts, src_stream->time_base, dest_stream->time_base);
packet->duration = dest_stream->time_base.den / dest_stream->time_base.num / dest_stream->avg_frame_rate.num * dest_stream->avg_frame_rate.den;
av_interleaved_write_frame(dest, packet);


    


    The error log I get is the following, in a repeated manner :

    


    [mp4 @ 0x7fc514001d00] Application provided duration: ... / timestamp: ... is out of range for mov/mp4 format
[mp4 @ 0x7fc514001d00] pts has no value


    


    The libav version I am using is the following :

    


    ffmpeg version 4.3.3 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.2.0-8ubuntu3)
  configuration:
  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
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100


    


    P.S : Upgrading ffmpeg version won't work.

    


  • Codec h264_cuvid is not supported

    9 septembre 2019, par gn cavalry

    ======================= Environment =======================
    System : ubuntu 18.04
    Architecture : x86_64
    Display Card : NVIDIA GeForce 820m
    Display Card Driver : NVIDIA-Linux-x86_64-390.87
    gcc : 6.5.0
    CUDA : 9.1.85 (also tried 9.0.176)
    FFmpeg : 3.4 (also tried 4.0, 4.1)

    ==================== FFmpeg Compilation ====================

    ./configure \
     --prefix="$DIR_BUILD" \
     --bindir="$DIR_BIN" \
     --enable-cuda \
     --enable-cuvid \
     --enable-nvenc \
     --enable-nonfree \
     --enable-libnpp \
     --extra-cflags=-I/usr/local/cuda/include \
     --extra-ldflags=-L/usr/local/cuda/lib64

    ======================= Verification =======================
    Driver Verification :
    (I have downgrade my gcc from 7.3 to 6.5, I don’t know why there still shows gcc version 7.3)

    $ cat /proc/driver/nvidia/version
    NVRM version: NVIDIA UNIX x86_64 Kernel Module  390.87  Tue Aug 21 12:33:05 PDT 2018
    GCC version:  gcc version 7.3.0 (Ubuntu 7.3.0-27ubuntu1~18.04)

    CUDA Verification :

    $nvcc -V
    nvcc: NVIDIA (R) Cuda compiler driver
    Copyright (c) 2005-2017 NVIDIA Corporation
    Built on Fri_Nov__3_21:07:56_CDT_2017
    Cuda compilation tools, release 9.1, V9.1.85

    $./deviceQuery
    Rsult = PASS

    $./bandwidthTest
    Result = PASS

    FFmpeg Decoder Verification :

    $ ffmpeg -codecs | grep cuvid
    ffmpeg version 3.4.5 Copyright (c) 2000-2018 the FFmpeg developers
     built with gcc 6.5.0 (Ubuntu 6.5.0-2ubuntu1~18.04) 20181026
     configuration: --prefix=/home/cavalry/Downloads/compile_ffmpeg/ffmpeg_build --bindir=/home/cavalry/Downloads/compile_ffmpeg/bin --enable-cuda --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64
     libavutil      55. 78.100 / 55. 78.100
     libavcodec     57.107.100 / 57.107.100
     libavformat    57. 83.100 / 57. 83.100
     libavdevice    57. 10.100 / 57. 10.100
     libavfilter     6.107.100 /  6.107.100
     libswscale      4.  8.100 /  4.  8.100
     libswresample   2.  9.100 /  2.  9.100
    DEV.LS h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_v4l2m2m h264_vdpau h264_cuvid ) (encoders: h264_nvenc h264_v4l2m2m h264_vaapi nvenc nvenc_h264 )
    DEV.L. hevc                 H.265 / HEVC (High Efficiency Video Coding) (decoders: hevc hevc_cuvid ) (encoders: nvenc_hevc hevc_nvenc hevc_vaapi )
    DEVIL. mjpeg                Motion JPEG (decoders: mjpeg mjpeg_cuvid ) (encoders: mjpeg mjpeg_vaapi )
    DEV.L. mpeg1video           MPEG-1 video (decoders: mpeg1video mpeg1video_vdpau mpeg1_v4l2m2m mpeg1_cuvid )
    DEV.L. mpeg2video           MPEG-2 video (decoders: mpeg2video mpegvideo mpegvideo_vdpau mpeg2_v4l2m2m mpeg2_cuvid ) (encoders: mpeg2video mpeg2_vaapi )
    DEV.L. mpeg4                MPEG-4 part 2 (decoders: mpeg4 mpeg4_v4l2m2m mpeg4_vdpau mpeg4_cuvid ) (encoders: mpeg4 mpeg4_v4l2m2m )
    D.V.L. vc1                  SMPTE VC-1 (decoders: vc1 vc1_vdpau vc1_v4l2m2m vc1_cuvid )
    DEV.L. vp8                  On2 VP8 (decoders: vp8 vp8_v4l2m2m vp8_cuvid ) (encoders: vp8_v4l2m2m vp8_vaapi )
    DEV.L. vp9                  Google VP9 (decoders: vp9 vp9_v4l2m2m vp9_cuvid ) (encoders: vp9_vaapi )

    FFmpeg Encoder Verification :

    $ ffmpeg -codecs | grep nvenc
    ffmpeg version 3.4.5 Copyright (c) 2000-2018 the FFmpeg developers
     built with gcc 6.5.0 (Ubuntu 6.5.0-2ubuntu1~18.04) 20181026
     configuration: --prefix=/home/cavalry/Downloads/compile_ffmpeg/ffmpeg_build --bindir=/home/cavalry/Downloads/compile_ffmpeg/bin --enable-cuda --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64
     libavutil      55. 78.100 / 55. 78.100
     libavcodec     57.107.100 / 57.107.100
     libavformat    57. 83.100 / 57. 83.100
     libavdevice    57. 10.100 / 57. 10.100
     libavfilter     6.107.100 /  6.107.100
     libswscale      4.  8.100 /  4.  8.100
     libswresample   2.  9.100 /  2.  9.100
    DEV.LS h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_v4l2m2m h264_vdpau h264_cuvid ) (encoders: h264_nvenc h264_v4l2m2m h264_vaapi nvenc nvenc_h264 )
    DEV.L. hevc                 H.265 / HEVC (High Efficiency Video Coding) (decoders: hevc hevc_cuvid ) (encoders: nvenc_hevc hevc_nvenc hevc_vaapi )

    ================== Exec ffmepg command line ===================

    All things seem goes right, then I executed the following command :
    ffmpeg -c:v h264_cuvid -i ./holidy.mp4 output.mkv
    But it turns out :
    [h264_cuvid @ 0x55f93a512200] Codec h264_cuvid is not supported.

    Here is the whole information :

    $ ffmpeg -c:v h264_cuvid -i ./holidy.mp4 output.mkv
    ffmpeg version 3.4.5 Copyright (c) 2000-2018 the FFmpeg developers
     built with gcc 6.5.0 (Ubuntu 6.5.0-2ubuntu1~18.04) 20181026
     configuration: --prefix=/home/cavalry/Downloads/compile_ffmpeg/ffmpeg_build --bindir=/home/cavalry/Downloads/compile_ffmpeg/bin --enable-cuda --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64
     libavutil      55. 78.100 / 55. 78.100
     libavcodec     57.107.100 / 57.107.100
     libavformat    57. 83.100 / 57. 83.100
     libavdevice    57. 10.100 / 57. 10.100
     libavfilter     6.107.100 /  6.107.100
     libswscale      4.  8.100 /  4.  8.100
     libswresample   2.  9.100 /  2.  9.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './holidy.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 1
       compatible_brands: isomavc1iso6
       creation_time   : 2018-01-29T09:18:23.000000Z
       album           : Yinyuetai
       artist          : yinyuetai.com
       comment         : Yinyuetai-1TR1166
       date            : 01/29/18 17:18:23
     Duration: 00:04:15.21, start: 0.000000, bitrate: 4210 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 4087 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
       Metadata:
         creation_time   : 2018-01-29T09:18:23.000000Z
         handler_name    : 264@GPAC0.5.1-DEV-rev5472
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 120 kb/s (default)
       Metadata:
         creation_time   : 2018-01-29T09:17:31.000000Z
         handler_name    : Sound Media Handler
    [h264_cuvid @ 0x55f3e05ca1c0] Codec h264_cuvid is not supported.
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (h264_cuvid) -> mpeg4 (native))
     Stream #0:1 -> #0:1 (aac (native) -> ac3 (native))
    Error while opening decoder for input stream #0:0 : Invalid argument

    I have tried width CUDA9.0, CUDA9.1, FFmpeg3.4, FFmpeg4.0, FFmpeg 4.1, but it reports the same error. Can anyone help me ? I will appreciate you greatly !

  • FFMpeg remap_opencl filter usage

    22 février 2023, par Cole

    I am trying to use the remap_opencl filter included in FFMpeg but I keep getting errors.

    


    My FFMpeg command looks like this :

    


    ffmpeg -y -init_hw_device opencl=gpu:0.1 \
        -i recording.mp4 -i x.pgm -i y.pgm \
        -filter_complex "\
            [0:v] format=yuv420p,hwupload [gpu0], \
            [1:v] format=yuv420p,hwupload [gpu1], \
            [2:v] format=yuv420p,hwupload [gpu2], \
            [gpu0][gpu1][gpu2] remap_opencl [remapped], \
            [remapped] hwdownload" \
        -c:v libx264 -pix_fmt yuv420p output.mp4


    


    and the error I get is :

    


    [AVHWDeviceContext @ 0x5589757ea0] No image support in OpenCL driver (zero supported image formats).
[Parsed_hwupload_1 @ 0x558a84ebd0] Query format failed for 'Parsed_hwupload_1': Invalid argument
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #2:0


    


    I believe this error is telling me that there is no image support in the OpenCL drivers for the PGM files. If this is true, could someone show me how I am supposed to use the remap_opencl filter ?