Recherche avancée

Médias (91)

Autres articles (3)

  • Menus personnalisés

    14 novembre 2010, par

    MediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
    Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
    Menus créés à l’initialisation du site
    Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)

  • Selection of projects using MediaSPIP

    2 mai 2011, par

    The examples below are representative elements of MediaSPIP specific uses for specific projects.
    MediaSPIP farm @ Infini
    The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

Sur d’autres sites (3508)

  • How to add BGM when pipe opencv images to ffmpeg - python

    23 mars 2020, par karobben

    Basically, I know how to stream by Pipe opencv to ffmpeg using python.
    But my problem is I can’t add an audio file (BGM) for it. Does anyone know how to make it with python ?

    my python code is :

    import cv2 as cv
    import subprocess as sp

    # ffmpeg command

    command = ['ffmpeg',
           #'-re', '-stream_loop', '-1',
           #'-i', '/home/pi/scrpt/Blive/StarBucks_BGN.mp3',
           '-y',
           '-f', 'rawvideo',
           '-vcodec','rawvideo',
           '-pix_fmt', 'bgr24',
           '-s', "{}x{}".format(width, height),
           '-r', str(fps),
           '-i', '-',
           '-c:v', 'libx264',
           '-pix_fmt', 'yuv420p',
           '-preset', 'ultrafast',
           '-f', 'flv',
           rtmpUrl]

    I know that I can achieve this by :

    sudo raspivid -o - -t 0 -w 1280 -h 720 -fps 24 -b 1000000 |
                   ffmpeg  -re -stream_loop -1 -i  "/home/pi/scrpt/Blive/StarBucks_BGN.mp3" \
           -f h264 -i - -vcodec copy -r 30 -acodec aac -b:a 100k -preset ultrafast \
           -tune zerolatency -f flv "rtmp://"

    So, I tried to add -re -stream_loop -1 -i  "/home/pi/scrpt/Blive/StarBucks_BGN.mp3" into the python pipe, but it crashed with :

    [libx264 @ 0x1952aa0] using cpu capabilities: ARMv6 NEON
    [libx264 @ 0x1952aa0] profile Constrained Baseline, level 3.1
    [libx264 @ 0x1952aa0] 264 - core 148 r2748 97eaef2 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - 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=0 threads=6 lookahead_threads=1 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
    [flv @ 0x1951d00] FLV does not support sample rate 48000, choose from (44100, 22050, 11025)
    [flv @ 0x1951d00] Audio codec mp3 not compatible with flv
    Could not write header for output file #0 (incorrect codec parameters ?): Function not implementedStream mapping:
     Stream #1:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
     Stream #0:0 -> #0:1 (mp3 (native) -> mp3 (libmp3lame))
       Last message repeated 1 times
    Traceback (most recent call last):
     File "With_BG.py", line 57, in <module>
       p.stdin.write(BG.tostring())
    BrokenPipeError: [Errno 32] Broken pipe
    </module>
  • ffmpeg stream segmenting loses some frames after initialization

    17 février 2020, par zerociudo

    I use this ffmep command to get stream from usb camera and segment videos of 1 seconds

    ffmpeg -i /dev/video0 -pix_fmt yuv420p -vcodec libx264 \
                     -r 15 -x264opts keyint=15:min-keyint=15 -crf 19 \
                     -vf drawtext='expansion=strftime:fontfile='/usr/share/fonts/cantarell/Cantarell-Light.otf':fontsize=28:fontcolor=white:shadowcolor=black:shadowx=2:shadowy=1:text='%Y-%m-%d\ %H\\\\:%m\\\\:%S':x=200:y=200'" \
                     -f segment -reset_timestamps 1 -segment_time 1 -segment_format mp4 \
                     -strftime 1 -map 0 output/%Y-%m-%d-%H:%M:%S.mp4 \

    The output that I get is

    Parsed_drawtext_0 @ 0x5633950a66c0] Using "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"
    [Parsed_drawtext_0 @ 0x5633950a66c0] expansion=strftime is deprecated.
    [libx264 @ 0x5633950a1680] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
    [libx264 @ 0x5633950a1680] profile High, level 3.1
    [libx264 @ 0x5633950a1680] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - 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=18 lookahead_threads=3 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=10 keyint_min=6 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=crf mbtree=1 crf=19.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    [segment @ 0x56339509fac0] Opening 'output/2020-02-17-13:39:14.mp4' for writing
    Output #0, segment, to 'output/%Y-%m-%d-%H:%M:%S.mp4':
     Metadata:
       encoder         : Lavf58.20.100
       Stream #0:0: Video: h264 (libx264), yuv420p, 1280x720, q=-1--1, 10 fps, 10240 tbn, 10 tbc
       Metadata:
         encoder         : Lavc58.35.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    [segment @ 0x56339509fac0] Opening 'output/2020-02-17-13:39:18.mp4' for writing
    [segment @ 0x56339509fac0] Opening 'output/2020-02-17-13:39:19.mp4' for writing
    [segment @ 0x56339509fac0] Opening 'output/2020-02-17-13:39:20.mp4' for writing

    You can clearly see that first video is output/2020-02-17-13:39:14.mp4, then something happens and the next video is output/2020-02-17-13:39:18.mp4. After this I lose 3 seconds and my whole videos are delayed by 3 seconds.

    Is my command incorrect or is there something else could cause it ?

  • How to solve the incremental delay in ffplay streaming ?

    26 avril 2021, par Nilton Garcia

    Problem : Incremental streaming runtime delay with FFPLAY

    &#xA;

    Question : Is there a way to clear the delay buffer at run time ?

    &#xA;

    I'm using FFPLAY to play an RTP stream. In the first few minutes the delay is constant however, after 1h the delay increases by a few milliseconds generating in the end seconds of delayed increases.

    &#xA;

    I have tested several protocols : SRT, RTP and UDP, RTMP and the behavior is the same with FFPLAY.

    &#xA;

    Command used to play an RTP audio stream :

    &#xA;

    ffplay -max_delay 100000 -flags low_delay -probesize 32 -fflags nobuffer&#x2B;fastseek&#x2B;flush_packets -analyzeduration 0 -protocol_whitelist file,rtp,udp -i audio.sdp -loglevel info -nodisp&#xA;

    &#xA;

    I have tested and made several combinations of flags and so far without success.

    &#xA;

    Arquivo .SDP

    &#xA;

    SDP:&#xA;v=0&#xA;o=- 0 0 IN IP4 10.50.50.14&#xA;s=FONTE DE AUDIO&#xA;c=IN IP4 10.50.50.14&#xA;t=0 0&#xA;a=tool:libavformat 58.29.100&#xA;m=audio 3029 RTP/AVP 127&#xA;b=AS:1536&#xA;a=rtpmap:127 L16/32000/2&#xA;

    &#xA;

    My version FFPLAY

    &#xA;

    ffplay version 4.2.2-0york0~18.04 Copyright (c) 2003-2019 the FFmpeg developers&#xA;  built with gcc 7 (Ubuntu 7.4.0-1ubuntu1~18.04.1)&#xA;  configuration: --prefix=/usr --extra-version=&#x27;0york0~18.04&#x27; --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared&#xA;  libavutil      56. 31.100 / 56. 31.100&#xA;  libavcodec     58. 54.100 / 58. 54.100&#xA;  libavformat    58. 29.100 / 58. 29.100&#xA;  libavdevice    58.  8.100 / 58.  8.100&#xA;  libavfilter     7. 57.100 /  7. 57.100&#xA;  libavresample   4.  0.  0 /  4.  0.  0&#xA;  libswscale      5.  5.100 /  5.  5.100&#xA;  libswresample   3.  5.100 /  3.  5.100&#xA;  libpostproc    55.  5.100 / 55.  5.100&#xA;

    &#xA;