V
V
Vladislav Vasiliev2016-11-19 22:05:53
Nginx
Vladislav Vasiliev, 2016-11-19 22:05:53

RTMP_ReadPacket, failed to read RTMP packet header, what's the problem?

Hello! In VLC, the stream works successfully, but the http output does not want to work. I rummaged through everything for this error, but did not find a solution, so I am writing here. Help me please.

~$ ffmpeg -re -i rtmp://***.***.****.***/hls/test -c:v libx264 -b:v 5M -pix_fmt yuv420p -c:a:0 aac -b:a:0 480k -f flv rtmp://localhost:1935/hls/test;
ffmpeg version 2.8.8-0ubuntu0.16.04.1 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.2) 20160609
  configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
Metadata:
  Server                NGINX RTMP (github.com/arut/nginx-rtmp-module)
  width                 1280.00
  height                720.00
  displayWidth          1280.00
  displayHeight         720.00
  duration              0.00
  framerate             30.00
  fps                   30.00
  videodatarate         2500.00
  videocodecid          0.00
  audiodatarate         160.00
  audiocodecid          0.00
Input #0, live_flv, from 'rtmp://***.***.****.***/hls/test':
  Metadata:
    Server          : NGINX RTMP (github.com/arut/nginx-rtmp-module)
    displayWidth    : 1280
    displayHeight   : 720
    fps             : 30
    profile         :
    level           :
  Duration: 00:00:00.00, start: 48.552000, bitrate: N/A
    Stream #0:0: Video: h264 (Main), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 2560 kb/s, 30.30 fps, 30 tbr, 1k tbn, 60 tbc
    Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp, 163 kb/s
RTMP_ReadPacket, failed to read RTMP packet header

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
ngoral, 2016-12-15
@ngoral

HLS transmits the stream not via the rtmp protocol, but via http, which, in general, is implied in the name: HLS = Http Live Streaming.
Therefore, therefore, you need to look not at the address rtmp://..., but at the address, in your case, most likely this (it may be different due to server settings):http://***/hls/test.m3u8

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question