Recherche avancée

Médias (91)

Autres articles (50)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Ajout d’utilisateurs manuellement par un administrateur

    12 avril 2011, par

    L’administrateur d’un canal peut à tout moment ajouter un ou plusieurs autres utilisateurs depuis l’espace de configuration du site en choisissant le sous-menu "Gestion des utilisateurs".
    Sur cette page il est possible de :
    1. décider de l’inscription des utilisateurs via deux options : Accepter l’inscription de visiteurs du site public Refuser l’inscription des visiteurs
    2. d’ajouter ou modifier/supprimer un utilisateur
    Dans le second formulaire présent un administrateur peut ajouter, (...)

  • MediaSPIP Player : les contrôles

    26 mai 2010, par

    Les contrôles à la souris du lecteur
    En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...)

Sur d’autres sites (4835)

  • Using ffmpeg and ffserver to create a 2x1 live stream fails with unconnected output error

    31 janvier 2021, par weevilknievel

    I want to combine 2 RTSP streams (CCTV cameras) into a horizontal 2x1 strip and convert to webm for use in a HTML5 webpage.

    



    I am able to convert the streams into an mpeg or avi file easily, but as soon as I try to post it to ffserver ffm feed, I hit a wall.

    



    Here is my working ffmpeg command which writes out to a file :

    



    ffmpeg -rtsp_transport tcp -thread_queue_size 12 -i "rtsp://192.168.1.132:554/user=admin&password=mypassword&channel=1&stream=1.sdp" -i "rtsp://192.168.1.132:554/user=admin&password=mypassword&channel=2&stream=1.sdp" -filter_complex "[0:v][1:v] hstack=inputs=2 [v]" -map "[v]" -r 30 output.mpg


    



    It seems the ffmpeg process is outputting two streams and one of them is MPEG ? In the above command I had to put a frame rate "-r 30" into the command otherwise I got an error which said that MPEG 1/2 did not support a framerate of 5/1 ??

    



    As soon as I try and stream to ffserver, I get an error :

    



    ffmpeg -rtsp_transport tcp -thread_queue_size 12 -i "rtsp://192.168.1.132:554/user=admin&password=mypassword&channel=1&stream=1.sdp" -i "rtsp://192.168.1.132:554/user=admin&password=mypassword&channel=2&stream=1.sdp" -filter_complex "[0:v][1:v] hstack=inputs=2 [v]" -map "[v]" -r 30 http://localhost:8090/feed5.ffm


    



    The error I get is "Filter hstack has an unconnected output" :

    



    ffmpeg version N-86111-ga441aa90e8-static http://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.4.1 (Debian 5.4.1-8) 20170304
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-5 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg
  libavutil      55. 63.100 / 55. 63.100
  libavcodec     57. 96.101 / 57. 96.101
  libavformat    57. 72.101 / 57. 72.101
  libavdevice    57.  7.100 / 57.  7.100
  libavfilter     6. 89.101 /  6. 89.101
  libswscale      4.  7.101 /  4.  7.101
  libswresample   2.  8.100 /  2.  8.100
  libpostproc    54.  6.100 / 54.  6.100
Input #0, rtsp, from 'rtsp://192.168.1.132:554/user=admin&password=mypassword&channel=1&stream=1.sdp':
  Duration: N/A, start: 0.166667, bitrate: N/A
    Stream #0:0: Video: h264 (High), yuv420p(progressive), 352x288, 6 fps, 6 tbr, 90k tbn, 180k tbc
Input #1, rtsp, from 'rtsp://192.168.1.132:554/user=admin&password=mypassword&channel=2&stream=1.sdp':
  Duration: N/A, start: 0.166667, bitrate: N/A
    Stream #1:0: Video: h264 (High), yuv420p(progressive), 352x288, 6 fps, 6 tbr, 90k tbn, 180k tbc
Filter hstack has an unconnected output


    



    My ffserver conf is very basic :

    



    HTTPPort 8090&#xA;HTTPBindAddress 0.0.0.0&#xA;MaxHTTPConnections 2000&#xA;MaxClients 1000&#xA;MaxBandwidth 100000&#xA;CustomLog -&#xA;&#xA;<feed>&#xA;File /mnt/ramdisk/feed5.ffm&#xA;Truncate&#xA;FileMaxSize 5M&#xA;ACL allow 127.0.0.1&#xA;</feed>&#xA;&#xA;<stream>&#xA;     Format webm&#xA;     Feed feed5.ffm&#xA;     VideoCodec libvpx&#xA;     VideoSize 640x360&#xA;     NoAudio&#xA;   AVOptionVideo quality realtime&#xA;   StartSendOnKey&#xA;   VideoBitRate 140&#xA;</stream>&#xA;&#xA;<stream>&#xA;Format status&#xA;ACL allow localhost&#xA;ACL allow 192.168.0.0 192.168.255.255&#xA;</stream>&#xA;<redirect>&#xA;URL http://www.ffmpeg.org/&#xA;</redirect>&#xA;

    &#xA;&#xA;

    Edit :

    &#xA;&#xA;

    Here is the debug output from the ffmpeg command above :

    &#xA;&#xA;

    ffmpeg -v debug -rtsp_transport tcp -thread_queue_size 12 -i "rtsp://192.168.1.132:554/user=admin&amp;password=mypassword&amp;channel=1&amp;stream=1.sdp" -i "rtsp://192.168.1.132:554/user=admin&amp;password=mypassword&amp;channel=2&amp;stream=1.sdp" -filter_complex "[0:v][1:v] hstack=inputs=2 [v]" -map "[v]" -r 30 http://localhost:8090/feed5.ffm&#xA;ffmpeg version N-86111-ga441aa90e8-static http://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2017 the FFmpeg developers&#xA;  built with gcc 5.4.1 (Debian 5.4.1-8) 20170304&#xA;  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-5 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg&#xA;  libavutil      55. 63.100 / 55. 63.100&#xA;  libavcodec     57. 96.101 / 57. 96.101&#xA;  libavformat    57. 72.101 / 57. 72.101&#xA;  libavdevice    57.  7.100 / 57.  7.100&#xA;  libavfilter     6. 89.101 /  6. 89.101&#xA;  libswscale      4.  7.101 /  4.  7.101&#xA;  libswresample   2.  8.100 /  2.  8.100&#xA;  libpostproc    54.  6.100 / 54.  6.100&#xA;Splitting the commandline.&#xA;Reading option &#x27;-v&#x27; ... matched as option &#x27;v&#x27; (set logging level) with argument &#x27;debug&#x27;.&#xA;Reading option &#x27;-rtsp_transport&#x27; ... matched as AVOption &#x27;rtsp_transport&#x27; with argument &#x27;tcp&#x27;.&#xA;Reading option &#x27;-thread_queue_size&#x27; ... matched as option &#x27;thread_queue_size&#x27; (set the maximum number of queued packets from the demuxer) with argument &#x27;12&#x27;.&#xA;Reading option &#x27;-i&#x27; ... matched as input url with argument &#x27;rtsp://192.168.1.132:554/user=admin&amp;password=mypassword&amp;channel=1&amp;stream=1.sdp&#x27;.&#xA;Reading option &#x27;-i&#x27; ... matched as input url with argument &#x27;rtsp://192.168.1.132:554/user=admin&amp;password=mypassword&amp;channel=2&amp;stream=1.sdp&#x27;.&#xA;Reading option &#x27;-filter_complex&#x27; ... matched as option &#x27;filter_complex&#x27; (create a complex filtergraph) with argument &#x27;[0:v][1:v] hstack=inputs=2 [v]&#x27;.&#xA;Reading option &#x27;-map&#x27; ... matched as option &#x27;map&#x27; (set input stream mapping) with argument &#x27;[v]&#x27;.&#xA;Reading option &#x27;-r&#x27; ... matched as option &#x27;r&#x27; (set frame rate (Hz value, fraction or abbreviation)) with argument &#x27;30&#x27;.&#xA;Reading option &#x27;http://localhost:8090/feed5.ffm&#x27; ... matched as output url.&#xA;Finished splitting the commandline.&#xA;Parsing a group of options: global .&#xA;Applying option v (set logging level) with argument debug.&#xA;Applying option filter_complex (create a complex filtergraph) with argument [0:v][1:v] hstack=inputs=2 [v].&#xA;Successfully parsed a group of options.&#xA;Parsing a group of options: input url rtsp://192.168.1.132:554/user=admin&amp;password=mypassword&amp;channel=1&amp;stream=1.sdp.&#xA;Applying option thread_queue_size (set the maximum number of queued packets from the demuxer) with argument 12.&#xA;Successfully parsed a group of options.&#xA;Opening an input file: rtsp://192.168.1.132:554/user=admin&amp;password=mypassword&amp;channel=1&amp;stream=1.sdp.&#xA;[tcp @ 0x58fb5e0] No default whitelist set&#xA;[rtsp @ 0x58f9700] SDP:&#xA;v=0&#xA;o=- 38990265062388 38990265062388 IN IP4 192.168.1.132&#xA;a=range:npt=0-&#xA;m=video 0 RTP/AVP 96&#xA;c=IN IP4 0.0.0.0&#xA;a=rtpmap:96 H264/90000&#xA;a=framerate:0S&#xA;a=fmtp:96 profile-level-id=640014; packetization-mode=1; sprop-parameter-sets=Z2QAFK2EAQwgCGEAQwgCGEAQwgCEK1CwSyA=,aO48sA==&#xA;a=control:trackID=3&#xA;&#xA;Failed to parse interval end specification &#x27;&#x27;&#xA;[rtsp @ 0x58f9700] video codec set to: h264&#xA;[rtsp @ 0x58f9700] RTP Profile IDC: 64 Profile IOP: 0 Level: 14&#xA;[rtsp @ 0x58f9700] RTP Packetization Mode: 1&#xA;[rtsp @ 0x58f9700] Extradata set to 0x58fb940 (size: 38)&#xA;[rtsp @ 0x58f9700] setting jitter buffer size to 0&#xA;[rtsp @ 0x58f9700] hello state=0&#xA;[h264 @ 0x58fca00] nal_unit_type: 7, nal_ref_idc: 3&#xA;[h264 @ 0x58fca00] nal_unit_type: 8, nal_ref_idc: 3&#xA;[h264 @ 0x58fca00] nal_unit_type: 7, nal_ref_idc: 3&#xA;[h264 @ 0x58fca00] nal_unit_type: 8, nal_ref_idc: 3&#xA;[h264 @ 0x58fca00] unknown SEI type 229&#xA;[h264 @ 0x58fca00] nal_unit_type: 7, nal_ref_idc: 3&#xA;[h264 @ 0x58fca00] nal_unit_type: 8, nal_ref_idc: 3&#xA;[h264 @ 0x58fca00] nal_unit_type: 6, nal_ref_idc: 0&#xA;[h264 @ 0x58fca00] nal_unit_type: 5, nal_ref_idc: 3&#xA;[h264 @ 0x58fca00] unknown SEI type 229&#xA;[h264 @ 0x58fca00] Reinit context to 352x288, pix_fmt: yuv420p&#xA;[h264 @ 0x58fca00] nal_unit_type: 1, nal_ref_idc: 3&#xA;    Last message repeated 5 times&#xA;[h264 @ 0x58fca00] unknown SEI type 229&#xA;    Last message repeated 1 times&#xA;[rtsp @ 0x58f9700] All info found&#xA;[rtsp @ 0x58f9700] Setting avg frame rate based on r frame rate&#xA;Input #0, rtsp, from &#x27;rtsp://192.168.1.132:554/user=admin&amp;password=mypassword&amp;channel=1&amp;stream=1.sdp&#x27;:&#xA;  Duration: N/A, start: 0.166667, bitrate: N/A&#xA;    Stream #0:0, 28, 1/90000: Video: h264 (High), 1 reference frame, yuv420p(progressive, left), 352x288, 0/1, 6 fps, 6 tbr, 90k tbn, 180k tbc&#xA;Successfully opened the file.&#xA;Parsing a group of options: input url rtsp://192.168.1.132:554/user=admin&amp;password=mypassword&amp;channel=2&amp;stream=1.sdp.&#xA;Successfully parsed a group of options.&#xA;Opening an input file: rtsp://192.168.1.132:554/user=admin&amp;password=mypassword&amp;channel=2&amp;stream=1.sdp.&#xA;[tcp @ 0x59f4280] No default whitelist set&#xA;[rtsp @ 0x59f7620] SDP:&#xA;v=0&#xA;o=- 38990265062388 38990265062388 IN IP4 192.168.1.132&#xA;a=range:npt=0-&#xA;m=video 0 RTP/AVP 96&#xA;c=IN IP4 0.0.0.0&#xA;a=rtpmap:96 H264/90000&#xA;a=framerate:0S&#xA;a=fmtp:96 profile-level-id=640014; packetization-mode=1; sprop-parameter-sets=Z2QAFK2EAQwgCGEAQwgCGEAQwgCEK1CwSyA=,aO48sA==&#xA;a=control:trackID=3&#xA;&#xA;Failed to parse interval end specification &#x27;&#x27;&#xA;[rtsp @ 0x59f7620] video codec set to: h264&#xA;[rtsp @ 0x59f7620] RTP Profile IDC: 64 Profile IOP: 0 Level: 14&#xA;[rtsp @ 0x59f7620] RTP Packetization Mode: 1&#xA;[rtsp @ 0x59f7620] Extradata set to 0x59f3670 (size: 38)&#xA;[rtp @ 0x59f62a0] No default whitelist set&#xA;[udp @ 0x58fb6a0] No default whitelist set&#xA;[udp @ 0x58fb6a0] end receive buffer size reported is 131072&#xA;[udp @ 0x591b940] No default whitelist set&#xA;[udp @ 0x591b940] end receive buffer size reported is 131072&#xA;[rtsp @ 0x59f7620] setting jitter buffer size to 500&#xA;[rtsp @ 0x59f7620] hello state=0&#xA;[h264 @ 0x59e4b20] nal_unit_type: 7, nal_ref_idc: 3&#xA;[h264 @ 0x59e4b20] nal_unit_type: 8, nal_ref_idc: 3&#xA;[h264 @ 0x59e4b20] nal_unit_type: 7, nal_ref_idc: 3&#xA;[h264 @ 0x59e4b20] nal_unit_type: 8, nal_ref_idc: 3&#xA;[h264 @ 0x59e4b20] unknown SEI type 229&#xA;[h264 @ 0x59e4b20] nal_unit_type: 7, nal_ref_idc: 3&#xA;[h264 @ 0x59e4b20] nal_unit_type: 8, nal_ref_idc: 3&#xA;[h264 @ 0x59e4b20] nal_unit_type: 6, nal_ref_idc: 0&#xA;[h264 @ 0x59e4b20] nal_unit_type: 5, nal_ref_idc: 3&#xA;[h264 @ 0x59e4b20] unknown SEI type 229&#xA;[h264 @ 0x59e4b20] Reinit context to 352x288, pix_fmt: yuv420p&#xA;[h264 @ 0x59e4b20] nal_unit_type: 1, nal_ref_idc: 3&#xA;    Last message repeated 5 times&#xA;[h264 @ 0x59e4b20] unknown SEI type 229&#xA;    Last message repeated 1 times&#xA;[rtsp @ 0x59f7620] All info found&#xA;[rtsp @ 0x59f7620] Setting avg frame rate based on r frame rate&#xA;Input #1, rtsp, from &#x27;rtsp://192.168.1.132:554/user=admin&amp;password=mypassword&amp;channel=2&amp;stream=1.sdp&#x27;:&#xA;  Duration: N/A, start: 0.166667, bitrate: N/A&#xA;    Stream #1:0, 28, 1/90000: Video: h264 (High), 1 reference frame, yuv420p(progressive, left), 352x288, 0/1, 6 fps, 6 tbr, 90k tbn, 180k tbc&#xA;Successfully opened the file.&#xA;detected 2 logical cores&#xA;[Parsed_hstack_0 @ 0x59f7cc0] Setting &#x27;inputs&#x27; to value &#x27;2&#x27;&#xA;Parsing a group of options: output url http://localhost:8090/feed5.ffm.&#xA;Applying option map (set input stream mapping) with argument [v].&#xA;Applying option r (set frame rate (Hz value, fraction or abbreviation)) with argument 30.&#xA;Successfully parsed a group of options.&#xA;Opening an output file: http://localhost:8090/feed5.ffm.&#xA;[http @ 0x59aa700] Setting default whitelist &#x27;http,https,tls,rtp,tcp,udp,crypto,httpproxy&#x27;&#xA;[http @ 0x59aa700] request: GET /feed5.ffm HTTP/1.1&#xA;User-Agent: Lavf/57.72.101&#xA;Accept: */*&#xA;Range: bytes=0-&#xA;Connection: close&#xA;Host: localhost:8090&#xA;Icy-MetaData: 1&#xA;&#xA;&#xA;[ffm @ 0x5917d00] Format ffm probed with size=2048 and score=101&#xA;[NULL @ 0x5bce3e0] Setting entry with key &#x27;video_size&#x27; to value &#x27;640x360&#x27;&#xA;[NULL @ 0x5bce3e0] Setting entry with key &#x27;b&#x27; to value &#x27;140000&#x27;&#xA;[NULL @ 0x5bce3e0] Setting entry with key &#x27;time_base&#x27; to value &#x27;1/5&#x27;&#xA;[NULL @ 0x5bce3e0] Setting entry with key &#x27;bt&#x27; to value &#x27;35000&#x27;&#xA;[NULL @ 0x5bce3e0] Setting entry with key &#x27;rc_eq&#x27; to value &#x27;tex^qComp&#x27;&#xA;[NULL @ 0x5bce3e0] Setting entry with key &#x27;maxrate&#x27; to value &#x27;280000&#x27;&#xA;[NULL @ 0x5bce3e0] Setting entry with key &#x27;bufsize&#x27; to value &#x27;280000&#x27;&#xA;[AVIOContext @ 0x5915b80] Statistics: 4096 bytes read, 0 seeks&#xA;[http @ 0x5915f00] Setting default whitelist &#x27;http,https,tls,rtp,tcp,udp,crypto,httpproxy&#x27;&#xA;[http @ 0x5915f00] request: POST /feed5.ffm HTTP/1.1&#xA;Transfer-Encoding: chunked&#xA;User-Agent: Lavf/57.72.101&#xA;Accept: */*&#xA;Connection: close&#xA;Host: localhost:8090&#xA;Icy-MetaData: 1&#xA;&#xA;&#xA;Successfully opened the file.&#xA;Filter hstack has an unconnected output&#xA;[AVIOContext @ 0x59ab080] Statistics: 0 seeks, 0 writeouts&#xA;

    &#xA;&#xA;

    I am stumped - any clues ?

    &#xA;&#xA;

    Thanks in advance.

    &#xA;

  • Solution for VB6 to broadcast Webcam

    11 juillet 2014, par vantrung -cuncon

    Sorry, I know VB6 is decades ago, but I’m in a situation that I have to use VB6 to deliver live webcam stream beetween 2 PC in Server - Client Model program. Vb6-code holds the connection then I have no choice but to transfer all data via that connection.

    I’ve tried weeks for this, uncountable approaches but went to nowhere.
    My efforts focused on 3 major approaches :

    1/ Use ffmpeg to record live webcam as ".avi" file on hard disk, transfer parts of file to other end & play it. But I’ve stucked with a media-player that can play a "being written" avi file.

    Windows Media Player control told me "file already in use..." & VLC Plugin can’t even be added to VB6 (axvlc.dll).

    2/ Use ffmpeg to save live webcam as avi file, transfer each bit of that file to the other end, then in other end, extract 24 images / second from the avi to display continously in a picture box.
    This approach is ok except that my hard disk get fulled of images in a time of wink and my program get very slow before hanging.

    3/ Use ffmpeg to stream the live webcam to a rtp-port like this :

    ffmpeg -f dshow -i video="Lenovo EasyCamera" -vcodec mpeg2video -pix_fmt yuv422p -f rtp -an rtp://224.1.2.3:8191

    I’ve successfully watch the stream in VLC, but VLC(axvlc.dll) refused to be integrated into ancient VB6. And more important, I don’t know how to redirect/reroute the rtp stream to other PC with VB6.

    Any one please light me up ? (Any 3rd party component is welcomed)

  • http: Stop reading after receiving the whole file for non-chunked transfers

    11 août 2014, par Martin Storsjö
    http: Stop reading after receiving the whole file for non-chunked transfers
    

    Previously this logic was only used if the server didn’t
    respond with Connection : close, but use it even for that case,
    if the server response is non-chunked.

    Originally the http code has relied on Connection : close to close
    the socket when the file/stream is received - the http protocol
    code just kept reading from the socket until the socket was closed.
    In f240ed18 we added a check for the file size, because some
    http servers didn’t respond with Connection : close (and wouldn’t
    close the socket) even though we requested it, which meant that the
    http protocol blocked for a long time at the end of files, waiting
    for a socket level timeout.

    When reading over tls, trying to read at the end of the connection,
    when the peer has closed the connection, can produce spurious (but
    harmless) warnings. Therefore always voluntarily stop reading when
    the specified file size has been received, if not using a chunked
    transfer encoding. (For chunked transfers, we already return 0
    as soon as we get the chunk header indicating end of stream.)

    Signed-off-by : Martin Storsjö <martin@martin.st>

    • [DBH] libavformat/http.c