Recherche avancée

Médias (1)

Mot : - Tags -/ogg

Autres articles (7)

  • L’espace de configuration de MediaSPIP

    29 novembre 2010, par

    L’espace de configuration de MediaSPIP est réservé aux administrateurs. Un lien de menu "administrer" est généralement affiché en haut de la page [1].
    Il permet de configurer finement votre site.
    La navigation de cet espace de configuration est divisé en trois parties : la configuration générale du site qui permet notamment de modifier : les informations principales concernant le site (...)

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

Sur d’autres sites (5680)

  • Nginx RTMP "Server Error : No Such Stream"

    7 août 2024, par Tony Ruth

    I am trying to capture and stream video within my network 10.100.64.1/24 using libnginx-mod-rtmp. I followed a tutorial. I used the same URL for publishing and playing : rtmp ://10.100.64.4/lab/test But the player does not find the stream.

    


    My nginx settings :

    


    rtmp {

    server {

        listen 1935;
        chunk_size 4096;
        allow publish 127.0.0.1;
        allow publish 10.100.64.4/24;
        deny publish all;
        allow play 127.0.0.1;
        allow play 10.100.64.4/24;
        deny play all;

        application lab {

            live on;
            idle_streams off;
            record all;
            record_path /media/HLEV/GoPro/Raw;
            record_unique on;
        } 
    }
} 


    


    The server lives on 10.100.64.4, so I published a video using ffmpeg :

    


    ffmpeg -stream_loop -1 -re -i MyVideo.flv -c:v copy -c:a aac -ar 44100 -ac 1 -f flv -flvflags no_duration_filesize rtmp://10.100.64.4/lab/test


    


    The publishing looks good. Last line of the above command :

    


    frame=54030 fps= 60 q=-1.0 size=  119584kB time=00:15:01.00 bitrate=1087.3kbits/s speed=   1x 


    


    And I can see that the video is being saved locally from the record block of the nginx settings.

    


    Then I try to play the stream using ffplay :

    


    ffplay -i rtmp://10.100.64.4/lab/test
ffplay version 5.1.5-0+deb12u1 Copyright (c) 2003-2024 the FFmpeg developers
  built with gcc 12 (Debian 12.2.0-14)
  configuration: --prefix=/usr --extra-version=0+deb12u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-libjxl --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
[rtmp @ 0x7fe7940015c0] Server error: No such stream=    0B f=0/0   
rtmp://127.0.0.1/lab/test: Operation not permitted
    nan    :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0 


    


    ffplay does not find the stream.

    


    I can observe both the publish and play commands by examine the access log of nginx :

    


    sudo tail -2 /var/log/nginx/access.log 
10.100.64.4 [07/Aug/2024:12:24:56 -0500] PUBLISH "lab" "test" "" - 45365243 529 "" "FMLE/3.0 (compatible; Lavf59.27" (5m 36s)
10.100.64.4 [07/Aug/2024:12:25:03 -0500] PLAY "lab" "test" "" - 368 412 "" "LNX 9,0,124,2" (0s)


    


    I have tried using different video streams (directly from a webcam instead of from ffmpeg). I have also tried using different players (VLC instead of ffplay).

    


    How do I connect to the stream ?
Do you need different URLs for publishing versus playing ? The way I understood it, publishing is on port 1395 and playing is on port 80, so there is no conflict with using the same URL.
Is there a way to list the currently active streams on my server ?

    


  • How can I pipe JPEG files into FFMPEG and create an RTSP, H.264 stream ?

    25 janvier 2023, par Michael Schmidt

    I have an input RTSP stream that I would like to manipulate on a frame-by-frame basis using openCV. After these changes are applied, I'd like to create a separate RTSP stream from those frames. I'm piping the resulting JPEG images to FFMPEG via STDIN. I need the intermediate frame to be a JPEG.

    


    In other words, I must conform to this pattern :
RTSP IN -> Create JPEG as input -> manipulation, JPEG out -> RTSP

    


    The PROBLEM I'm trying to solve deals with a codec at this point. See the last few lines of FFMPEG's output error message.

    


    Here is what I have :

    


    def open_ffmpeg_stream_process():
    args = (
        "ffmpeg -re -stream_loop -1 "
        "-f jpeg_pipe "
        "-s 512x288 "
        "-i pipe:0 "
        "-c:v h264 "
        "-f rtsp "
        "rtsp://localhost:8100/out0"
    ).split()
    return subprocess.Popen(args, stdin=subprocess.PIPE)

video_source = cv2.VideoCapture('rtsp://localhost:9100/in0')

frame_cnt = 0
FRAME_SKIP = 30

ffmpeg_process = open_ffmpeg_stream_process()
while video_source.isOpened():

    frame_cnt += 1
    if frame_cnt % FRAME_SKIP:
      continue
    else:
      frame_cnt = 0

    _, frame = video_source.read()
    _, jpg = cv2.imencode('.jpg', frame)

    # Work on the JPEG occurs here, and the output will be a JPEG

    ffmpeg_process.stdin.write(jpg.astype(np.uint8).tobytes())

    if cv2.waitKey(1) & 0xFF == ord('q'):
        break

video_source.release()


    


    Here is FFMPEG's output :

    


    ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
  configuration: ---- noisy configuration stuff ----
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Input #0, jpeg_pipe, from 'pipe:0':
  Duration: N/A, bitrate: N/A
  Stream #0:0: Video: mjpeg, rgb24(bt470bg/unknown/unknown), 512x288, 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
[libx264 @ 0x562a1ffc5840] using SAR=1/1
[libx264 @ 0x562a1ffc5840] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x562a1ffc5840] profile High, level 3.1, 4:2:0, 8-bit
[libx264 @ 0x562a1ffc5840] 264 - core 163 r3060 5db6aa6 - 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=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=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
[tcp @ 0x562a20826c00] Connection to tcp://localhost:8100?timeout=0 failed: Connection refused
Could not write header for output file #0 (incorrect codec parameters ?): Connection refused
Error initializing output stream 0:0 -- 
Conversion failed!


    


    How does one create an H.264, RTSP stream from a series of JPEG frames using FFMPEG.

    


    Notes : The FFMPEG command/subproccess might need unrelated improvements, feel free to comment on my crappy code.

    


    Edit : Oof, I just found out the FFMPEG command doesn't even work stand alone.

    


  • Converting vob to mp4 with ffmpeg

    10 janvier 2016, par ᴜsᴇʀ

    I’m trying to convert a vob file into an mp4 file (H.264 and AAC), but I have a strange problem.

    The following are some information about the input file :

    ffmpeg -i input.vob
    ffmpeg version N-77455-g4707497 Copyright (c) 2000-2015 the FFmpeg developers
     built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
     configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libdcadec --enable-libfreetype --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvo-aacenc --enable-libvidstab
     libavutil      55. 11.100 / 55. 11.100
     libavcodec     57. 20.100 / 57. 20.100
     libavformat    57. 20.100 / 57. 20.100
     libavdevice    57.  0.100 / 57.  0.100
     libavfilter     6. 21.101 /  6. 21.101
     libavresample   3.  0.  0 /  3.  0.  0
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
    Input #0, mpeg, from '2003-05-24_01.vob':
     Duration: 01:01:34.08, start: 0.335967, bitrate: 6544 kb/s
       Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, bt470bg), 720x576 [SAR 64:45 DAR 16:9], max. 9800 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
       Stream #0:1[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 256 kb/s

    For the conversion I use the following command :

    ffmpeg -i input.vob -c:v libx264 -preset slow -crf 19 -c:a aac -b:a 256k -threads 0 output.mp4

    Some information about the output file :

    ffmpeg -i output.mp4
    ffmpeg version N-77455-g4707497 Copyright (c) 2000-2015 the FFmpeg developers
     built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
     configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libdcadec --enable-libfreetype --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvo-aacenc --enable-libvidstab
     libavutil      55. 11.100 / 55. 11.100
     libavcodec     57. 20.100 / 57. 20.100
     libavformat    57. 20.100 / 57. 20.100
     libavdevice    57.  0.100 / 57.  0.100
     libavfilter     6. 21.101 /  6. 21.101
     libavresample   3.  0.  0 /  3.  0.  0
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'OUT.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.20.100
     Duration: 01:01:34.08, start: 0.335967, bitrate: 7183 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 6916 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 260 kb/s (default)
       Metadata:
         handler_name    : SoundHandler

    After the conversion, I open the new file output.mp4 with VLC : but there is a problem with the audio ! If I skip forward the video, the sound disappears or (sometimes) it is distorted. The only way to have the right sound is to disable the audio stream in VLC, and then re-enable it.

    I have found a solution for this problem :

    ffmpeg -i input.vob -c:v libx264 -preset veryfast -crf 19 -c:a aac -b:a 256k -threads 0 output.mp4

    But obviously this isn’t a real solution, because what I obtain is not what I want.