Запись потока через ffmpeg

Discussion in 'Web Call Server 5' started by Ivan, May 15, 2017.

  1. Ivan

    Ivan Member

    Пытаюсь записать поток из rtmp через ffmpeg:
    Code:
    ffmpeg -loglevel debug  -probesize 5M -analyzeduration 20M -i "rtmp://fws.vichatter.com:1935/flashStreamingApp/a47dead0cc4c38afcf163c6f7fd64e91" -c:v copy -acodec libfaac -ab 192k -ar 44100  -f flv -y /tmp/test123.mp4 
    получаю вот такую ошибку:
    Code:
    ffmpeg version N-79236-g6518cbc Copyright (c) 2000-2016 the FFmpeg developers
      built with gcc 4.9.2 (Debian 4.9.2-10)
      configuration: --enable-gpl --disable-debug --enable-libmp3lame --enable-libspeex --enable-libx264 --enable-nonfree --enable-pic --enable-static --extra-libs=-static --extra-cflags=--static --disable-shared --disable-ffplay --disable-ffserver --enable-libfaac --enable-libopus --enable-libvpx --disable-htmlpages
      libavutil      55. 20.100 / 55. 20.100
      libavcodec     57. 33.100 / 57. 33.100
      libavformat    57. 29.101 / 57. 29.101
      libavdevice    57.  0.101 / 57.  0.101
      libavfilter     6. 40.102 /  6. 40.102
      libswscale      4.  1.100 /  4.  1.100
      libswresample   2.  0.101 /  2.  0.101
      libpostproc    54.  0.100 / 54.  0.100
    Splitting the commandline.
    Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
    Reading option '-probesize' ... matched as AVOption 'probesize' with argument '5M'.
    Reading option '-analyzeduration' ... matched as AVOption 'analyzeduration' with argument '20M'.
    Reading option '-i' ... matched as input file with argument 'rtmp://fws.vichatter.com:1935/flashStreamingApp/a47dead0cc4c38afcf163c6f7fd64e91'.
    Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'copy'.
    Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'libfaac'.
    Reading option '-ab' ... matched as option 'ab' (audio bitrate (please use -b:a)) with argument '192k'.
    Reading option '-ar' ... matched as option 'ar' (set audio sampling rate (in Hz)) with argument '44100'.
    Reading option '-f' ... matched as option 'f' (force format) with argument 'flv'.
    Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
    Reading option '/tmp/test123.mp4' ... matched as output file.
    Finished splitting the commandline.
    Parsing a group of options: global .
    Applying option loglevel (set logging level) with argument debug.
    Applying option y (overwrite output files) with argument 1.
    Successfully parsed a group of options.
    Parsing a group of options: input file rtmp://fws.vichatter.com:1935/flashStreamingApp/a47dead0cc4c38afcf163c6f7fd64e91.
    Successfully parsed a group of options.
    Opening an input file: rtmp://fws.vichatter.com:1935/flashStreamingApp/a47dead0cc4c38afcf163c6f7fd64e91.
    [rtmp @ 0x2c267c0] No default whitelist set
    [tcp @ 0x2c26a20] No default whitelist set
    [rtmp @ 0x2c267c0] Handshaking...
    [rtmp @ 0x2c267c0] Type answer 3
    [rtmp @ 0x2c267c0] Server version 3.5.1.1
    [rtmp @ 0x2c267c0] Proto = rtmp, path = /flashStreamingApp/a47dead0cc4c38afcf163c6f7fd64e91, app = flashStreamingApp, fname = a47dead0cc4c38afcf163c6f7fd64e91
    [rtmp @ 0x2c267c0] Server bandwidth = 2500000
    [rtmp @ 0x2c267c0] Client bandwidth = 2500000
    [rtmp @ 0x2c267c0] New incoming chunk size = 4096
    [rtmp @ 0x2c267c0] Creating stream...
    [rtmp @ 0x2c267c0] Sending play command for 'a47dead0cc4c38afcf163c6f7fd64e91'
    rtmp://fws.vichatter.com:1935/flashStreamingApp/a47dead0cc4c38afcf163c6f7fd64e91: Input/output error
    В это время в серверный лог пишется вот такая ошибка:
    Code:
    9:39:24,314 ERROR                 Peer - RTMP-pool-2-thread-44 com.flashphoner.server.client.handler.wcs4.FlashStreamingHandler.getStreamLength(com.flashphoner.server.client.IClient, com.flashphoner.server.client.CallArguments)
    09:39:24,315 ERROR                    G - RTMP-pool-2-thread-44 RTMP error java.lang.NoSuchMethodException: com.flashphoner.server.client.handler.wcs4.FlashStreamingHandler.getStreamLength(com.flashphoner.server.client.IClient, com.flashphoner.server.client.CallArguments)
  2. Max

    Max Administrator Staff Member

    Похожая проблема есть при воспроизведении RTMP потока с помощью VLC, в сборке сервера 2201.
    Добавили в багтрекер. Если удастся исправить, отпишу в этой теме.
  3. Max

    Max Administrator Staff Member

    Исправлено в сборке 2224
    Проверено с VLC.
  4. Ivan

    Ivan Member

    Спасибо, заработало!

Share This Page