Recherche avancée

Médias (1)

Mot : - Tags -/sintel

Autres articles (78)

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

  • 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 ;

  • 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 (6410)

  • ffplay does not play an RTMP stream on VM with Ubuntu

    7 novembre 2020, par PiotrKulesza

    I am trying to run my RTMP stream on a VM with Ubuntu installed. The stream starts on the host computer from the obs program.

    


    Obs stream settings :

    


    Server: rtmp://192.168.56.102:1935/show
Stream key: stream


    


    Obs sends the stream to the nginx server on the VM with Ubuntu installed.

    


    RTMP configuration in nginx.conf

    


    rtmp {
    server {
        listen 1935; # Listen on standard RTMP port
        chunk_size 4000;

        application show {
            live on;
            # Turn on HLS
            hls on;
            hls_path /mnt/hls/;
            hls_fragment 3;
            hls_playlist_length 60;
            # disable consuming the stream from nginx as rtmp
            deny play all;
        }
    }
}


    


    When I start the stream it connects because it shows up in netstat.

    


    Output from netstat :

    


    Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 webapp-VirtualBox:1935  192.168.56.1:56924      ESTABLISHED


    


    But when I try to play stream with ffplay, it doesn't work. I am getting the following error.

    


    ffplay version 4.2.4-1ubuntu0.1 Copyright (c) 2003-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
  configuration: --prefix=/usr --extra-version=1ubuntu0.1 --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-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
rtmp://192.168.56.102:1935/show/stream: Broken pipeq=    0B f=0/0 


    


    I have tried the following commands to play a stream but each one gives the same error.

    


    ffplay -i rtmp://192.168.56.102:1935/show/stream
ffplay -i rtmp://webapp-VirtualBox:1935/show/stream
ffplay -i rtmp://localhost:1935/show/stream


    


    I also tried VLC but this program also didn't work.
Can anyone tell me what I am doing wrong or forgot to play this stream ?

    


  • Capture Video with opencv, save to ffmpeg pipe and live stream

    9 mars 2018, par Chris

    The goal is to stream an analysed live video over RTSP to some media server. To make the edits/analysis I use opencv, save the edited frames as JPEG in an FFMPEG image pipe and use the same FFMPEG to create a RTSP stream. Sorry if the terminology is not that accurate, I find it still quite confusing.

    I have the following code after quite some struggle :

    import cv2
    from subprocess import Popen, PIPE
    from PIL import Image

    # open pipe
    p = Popen('ffmpeg -y -f image2pipe -vcodec mjpeg -r 24 -i - -vcodec h264 -f rtsp -rtsp_transport tcp rtsp://localhost:8081/test.sdp', stdin=PIPE)

    video = cv2.VideoCapture(0)
    i = 0
    while video.isOpened():
       i=i+1
       ret, frame = video.read()
       if ret:
           #[...do some analysis stuff]
           im = Image.fromarray(frame)
           im.save(p.stdin, 'JPEG')

           """
           alternatively
           img_str = cv2.imencode('.jpg', frame)[1].tostring()
           p.stdin.write(img_str)
           """

       else:
           break

       print (i)
       if(i==1000):
           break


    p.stdin.close()
    p.wait()
    video.release()
    cv2.destroyAllWindows()
    print("done streaming video")

    This runs for 124 frames (i=124) then the loop hangs and I get some message from ffmpeg where I am not sure what it is about, however it does not look like an error :

    push frame
    122
    push frame
    123
    push frame
    124
    Input #0, image2pipe, from 'pipe:':
     Duration: N/A, bitrate: N/A
       Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 640x480 [SAR 1:1 DAR 4:3], 24 fps, 24 tbr, 24 tbn, 24 tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
    [libx264 @ 000002076650d980] using SAR=1/1
    [libx264 @ 000002076650d980] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 000002076650d980] profile High, level 3.0
    [libx264 @ 000002076650d980] 264 - core 155 r2893 b00bcaf - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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=6 lookahead_threads=1 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=24 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
    push frame

    The webcam seems to continue running but no more frames are pushed into the pipe. It looks like some buffer is filled or something. If I write directly to a video file instead of rtsp, it works. If I open the rtsp stream simultaneously with ffplay, it also works (although with a 5 seconds lag).
    Anyone an idea where this is coming from and how to solve it ?

  • ffmpeg low speed and wrong bitrate

    31 août 2018, par ngc3o34

    My goal is to compress video making it’s bitrate lower.
    For experiment I used following command

    ffmpeg -ss 00:00:00 -i V.mkv -to 00:10:00 -c:a copy -b:v 7500k -maxrate 7500k -minrate 5500k -bufsize 1M V7500.mkv

    1. What are possible reasons speed of conversion was close to 1.0x utilizing all 8 cores ?
    2. Bitrate of output video stream is about 4700 (5500 was set as minrate). Is there proper way to specify bitrate ?

    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
     Stream #0:1 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    [libx264 @ 0x55e54ad189a0] using SAR=1/1
    [libx264 @ 0x55e54ad189a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
    [libx264 @ 0x55e54ad189a0] profile High, level 4.0
    [libx264 @ 0x55e54ad189a0] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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=23 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=cbr mbtree=1 bitrate=7500 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=7500 vbv_bufsize=1000 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
    Output #0, matroska, to 'V7500.mkv':
     Metadata:
       title           : Valerian.and.the.City.of.a.Thousand.Planets.2017.1080p.BluRay.x264.DTS-HD.MA.7.1-FGT
       encoder         : Lavf57.83.100
       Chapter #0:0: start 0.000000, end 600.000000
       Metadata:
         title           : Chapter 01
       Stream #0:0(eng): Video: h264 (libx264) (H264 / 0x34363248), yuv420p, 1920x804 [SAR 1:1 DAR 160:67], q=-1--1, 7500 kb/s, 23.98 fps, 1k tbn, 23.98 tbc (default)
       Metadata:
         title           : Valerian.and.the.City.of.a.Thousand.Planets.2017.1080p.BluRay.x264.DTS-HD.MA.7.1-FGT
         DURATION        : 02:17:03.277000000
         encoder         : Lavc57.107.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 7500000/0/7500000 buffer size: 1000000 vbv_delay: -1
       Stream #0:1(eng): Audio: aac (LC) ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, fltp (default)
       Metadata:
         title           : Valerian.and.the.City.of.a.Thousand.Planets.2017.1080p.BluRay.x264.DTS-HD.MA.7.1-FGT
         ENCODER         : Lavc57.107.100 aac
         DURATION        : 02:17:03.317000000
    Past duration 0.994987 too large
    frame=14385 fps= 31 q=-1.0 Lsize=  363641kB time=00:09:59.99 bitrate=4964.9kbits/s speed=1.28x