Recherche avancée

Médias (91)

Autres articles (37)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (5739)

  • How to initialize the AV format context from NetworkStream rather than url ?

    23 juillet 2020, par Ahmad

    I'm using FFmpeg.AutoGen to encode catpured frames :
https://github.com/Ruslan-B/FFmpeg.AutoGen

    


    I send the encoded packets through NetworkStream to another program using TCP Client/Server application, using this code :

    


     //Send size and encoded packet
 _stream.Write(BitConverter.GetBytes(pPacket->size), 0, 4);
 using (var packetStream = new UnmanagedMemoryStream(pPacket->data, pPacket->size)) 
        packetStream.CopyTo(_stream);


    


    At the server-side, after UTF8 encoding, I receive content like this :

    


    


    gd ?r@ ?/ ?a 2&#xF;1 ?   h?C?,?  ????E???H??,? ?#??x264 - core 160 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - http://www.videolan.org/x264.html - options: cabac=1 ref=16 deblock=1:0:0 analyse=0x3:0x133 me=umh subme=10 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=24 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=11 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=8 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=60 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 ?  e??   ??S?T????M?.O ??Ea???Q&#xF;?OI??X?????[?P???42=h??M?K? ??{?@c;?t?&#xB;??Ke?>???? ?2 ??&#xB; ?\qXEvg ???U A ?X ??q/&#xB;(?? ?L ?_c ?g ?X ?c(To ?k ?Y ?-F ???R ?] ??U ?&#xA; ;|=r ????\U ???2 ?g ??> ??½ ?7 ?A&#xE; ?1W9 ???A ??&#xF; ?_L ??P ?) ?&#xF;M ????q/ ?L ??) : ??< ??8d/* ?&#xF; ?^ ??} ?B ?H ?_8C[y ???CY ?QM(J ???1<3% ?K ?F ;Q3Q ????&#xA; ??jy&#xF;J" ???y]k ?m ?^} ???S ????h ?&#xF;3 ????EP ???pw ???q ?jKp ???h ?????

    &#xA;

    &#xA;

    My problem is, how to initialize the AV format context with this data, and decode the received packet to recover the original frame ?

    &#xA;

    _pFormatContext = ffmpeg.avformat_alloc_context();&#xA;ffmpeg.avformat_open_input(&amp;pFormatContext, url, null, null).ThrowExceptionIfError();&#xA;

    &#xA;

    As problem exactly is, ffmpeg.avformat_open_input takes URL as an input, not byte[]. If _pFormatContext can be initialized using the received data, things are resolved, but HOW ?

    &#xA;

  • Error while adding RTSP stream to Ant media server

    28 juillet 2021, par Jacob

    I have successfully remotely viewed the stream using ffplay -rtsp_transport tcp rtsp ://streamurl.

    &#xA;

        ffplay version 4.4 Copyright (c) 2003-2021 the FFmpeg developers&#xA;  built with Apple clang version 12.0.5 (clang-1205.0.22.9)&#xA;  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&#xA;  libavutil      56. 70.100 / 56. 70.100&#xA;  libavcodec     58.134.100 / 58.134.100&#xA;  libavformat    58. 76.100 / 58. 76.100&#xA;  libavdevice    58. 13.100 / 58. 13.100&#xA;  libavfilter     7.110.100 /  7.110.100&#xA;  libavresample   4.  0.  0 /  4.  0.  0&#xA;  libswscale      5.  9.100 /  5.  9.100&#xA;  libswresample   3.  9.100 /  3.  9.100&#xA;  libpostproc    55.  9.100 / 55.  9.100&#xA;Input #0, rtsp, from &#x27;rtsp://admin:lyne1234@74.65.209.152:554/11/stream1&#x27;:&#xA;  Metadata:&#xA;    title           : 10&#xA;  Duration: N/A, start: 0.050000, bitrate: N/A&#xA;  Stream #0:0: Video: hevc (Main), yuvj420p(pc, bt709), 1920x1080, 20 fps, 20 tbr, 90k tbn, 20 tbc&#xA;[swscaler @ 0x160330000] deprecated pixel format used, make sure you did set range correctly&#xA;   5.69 M-V:  0.014 fd=   0 aq=    0KB vq=   97KB sq=    0B f=0/0   &#xA;

    &#xA;

    However, when playing the stream the a VCL player or trying to add the stream to my AWS instance of Ant media server. The stream does not go through. On ant media server there is no errors the stream connects but its just a black screen. On the VCL player I am getting the error :

    &#xA;

    VLC is unable to open the MRL &#x27;rtsp://{streamurl}&#x27;&#xA;

    &#xA;

    I currently have an identical camera setup the exact same way working fine. The only difference is there on different LAN's with different ISP's.

    &#xA;

  • bad ffmpeg performace compared to ffplay and VLC

    18 août 2021, par Abdelsalam ElTamawy

    I've been having bad performance with ffmpeg that I don't see with ffplay and VLC. I find this strange since ffplay uses ffmpeg under the hood.

    &#xA;

    Simply if I stream an HEVC/h265 stream with ffmpeg and pipe it to ffplay, it would stutter and perform worse than if it played the stream directly with ffplay.

    &#xA;

    What I'm trying to say is that I expect this command ffplay rtsp://stream-ip to perform the same as ffmpeg -i rtsp://stream-ip -f matroska - | ffplay - but it doesn't, ffplay plays noticeably smoother. Also, if I try to stream it with VLC, it is as smooth as ffplay.

    &#xA;

    here is the log for ffplay :

    &#xA;

    $ ffplay rtsp://admin:1234@192.168.1.47:554/StdCh1&#xA;ffplay version n4.4 Copyright (c) 2003-2021 the FFmpeg developers&#xA;  built with gcc 11.1.0 (GCC)&#xA;  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-shared --enable-version3&#xA;  libavutil      56. 70.100 / 56. 70.100&#xA;  libavcodec     58.134.100 / 58.134.100&#xA;  libavformat    58. 76.100 / 58. 76.100&#xA;  libavdevice    58. 13.100 / 58. 13.100&#xA;  libavfilter     7.110.100 /  7.110.100&#xA;  libswscale      5.  9.100 /  5.  9.100&#xA;  libswresample   3.  9.100 /  3.  9.100&#xA;  libpostproc    55.  9.100 / 55.  9.100&#xA;Input #0, rtsp, from &#x27;rtsp://admin:1234@192.168.1.47:554/StdCh1&#x27;:&#xA;  Metadata:&#xA;    title           : KNS-224C&#xA;    comment         : http80 rtsp554 a0 ba0 pt0 rc2 rv2 ua2 tk3 vs3 vd3 pc0 sc0 af0&#xA;  Duration: N/A, start: 0.000000, bitrate: N/A&#xA;  Stream #0:0: Video: hevc (Main), yuvj420p(pc, bt709), 1920x1080, 30.30 tbr, 90k tbn, 90k tbc&#xA;  Stream #0:1: Data: none&#xA;

    &#xA;

    and here is the log for ffmpeg piped into ffplay :

    &#xA;

    $ ffmpeg -i rtsp://admin:1234@192.168.1.47:554/StdCh1 -f matroska - | ffplay -&#xA;ffplay version n4.4ffmpeg version n4.4 Copyright (c) 2003-2021 the FFmpeg developers Copyright (c) 2000-2021 the FFmpeg developers&#xA;&#xA;  built with gcc 11.1.0 (GCC)&#xA;  built with gcc 11.1.0 (GCC)&#xA;  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-shared --enable-version3&#xA;  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-shared --enable-version3&#xA;  libavutil      56. 70.100 / 56. 70.100&#xA;  libavcodec     58.134.100 / 58.134.100&#xA;  libavutil      56. 70.100 / 56. 70.100&#xA;  libavformat    58. 76.100 / 58. 76.100&#xA;  libavcodec     58.134.100 / 58.134.100&#xA;  libavdevice    58. 13.100 / 58. 13.100&#xA;  libavformat    58. 76.100 / 58. 76.100&#xA;  libavfilter     7.110.100 /  7.110.100&#xA;  libavdevice    58. 13.100 / 58. 13.100&#xA;  libswscale      5.  9.100 /  5.  9.100&#xA;  libavfilter     7.110.100 /  7.110.100&#xA;  libswresample   3.  9.100 /  3.  9.100&#xA;  libswscale      5.  9.100 /  5.  9.100&#xA;  libpostproc    55.  9.100 / 55.  9.100&#xA;  libswresample   3.  9.100 /  3.  9.100&#xA;  libpostproc    55.  9.100 / 55.  9.100&#xA;Input #0, rtsp, from &#x27;rtsp://admin:1234@192.168.1.47:554/StdCh1&#x27;:&#xA;  Metadata:&#xA;    title           : KNS-224C&#xA;    comment         : http80 rtsp554 a0 ba0 pt0 rc2 rv2 ua2 tk3 vs3 vd3 pc0 sc0 af0&#xA;  Duration: N/A, start: 0.000000, bitrate: N/A&#xA;  Stream #0:0: Video: hevc (Main), yuvj420p(pc, bt709), 1920x1080, 30.30 tbr, 90k tbn, 90k tbc&#xA;  Stream #0:1: Data: none&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (hevc (native) -> h264 (libx264))&#xA;Press [q] to stop, [?] for help&#xA;[hevc @ 0x561e88468480] Could not find ref with POC 0&#xA;[libx264 @ 0x561e8845a480] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2&#xA;[libx264 @ 0x561e8845a480] profile High, level 4.2, 4:2:0, 8-bit0&#xA;[libx264 @ 0x561e8845a480] 264 - core 161 r3039 544c61f - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - 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=12 lookahead_threads=2 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, matroska, to &#x27;pipe:&#x27;:&#xA;  Metadata:&#xA;    title           : KNS-224C&#xA;    comment         : http80 rtsp554 a0 ba0 pt0 rc2 rv2 ua2 tk3 vs3 vd3 pc0 sc0 af0&#xA;    encoder         : Lavf58.76.100&#xA;  Stream #0:0: Video: h264 (H264 / 0x34363248), yuvj420p(pc, bt709, progressive), 1920x1080, q=2-31, 30.30 fps, 1k tbn&#xA;    Metadata:&#xA;      encoder         : Lavc58.134.100 libx264&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A&#xA;Input #0, matroska,webm, from &#x27;pipe:&#x27;: vq=    0KB sq=    0B f=0/0   /A speed=   0x&#xA;  Metadata:&#xA;    title           : KNS-224C&#xA;    COMMENT         : http80 rtsp554 a0 ba0 pt0 rc2 rv2 ua2 tk3 vs3 vd3 pc0 sc0 af0&#xA;    ENCODER         : Lavf58.76.100&#xA;  Duration: N/A, start: 0.000000, bitrate: N/A&#xA;  Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive), 1920x1080, 30.30 fps, 30.30 tbr, 1k tbn, 60.61 tbc (default)&#xA;    Metadata:&#xA;      ENCODER         : Lavc58.134.100 libx264&#xA;

    &#xA;

    I'm wondering why is this happening ? shouldn't hardware acceleration be applied in both cases ?

    &#xA;

    Beyond this I'm trying to create a video mosaic, the performance problem becomes very clear when displaying the streams together in a command like this :

    &#xA;

    $ ffmpeg -i rtsp://stream1 \&#xA;-i rtsp://stream2 \&#xA;-i rtsp://stream3 \&#xA;-filter_complex "[0:v] scale=960x540 [a0];&#xA;[1:v] scale=960x540 [a1];&#xA;[2:v] scale=960x540 [a2];&#xA;[a0][a1][a2] xstack=inputs=3:layout=0_0|0_h0|w0_0[out]" \&#xA; -map "[out]" -f matroska - | ffplay -&#xA;

    &#xA;

    This performs much worse than trying the same mosaic in VLC. Is there something I'm doing wrong ?

    &#xA;

    I want to note that it performs perfectly fine if I independently streamed all sources with ffplay at the same time.

    &#xA;