Opened 7 years ago

Last modified 7 years ago

#6357 open defect

An error in decoding RTMP (h264&aac) live streaming for a long time

Reported by: xyzero Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: rtmp
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

I use ffplay to play a RTMP live streaming (url is "rtmp://live.hkstv.hk.lxdns.com/live/hks").

After 16819 seconds of receiving, the decoding function returns error, and the error info is as follows.
I tried ffmpeg version 3.0, 3.1, 3.3, and it has the same problem. I hope you can tell me where is wrong or how to slove this problem.

D:\ffmpeg-20170425-b4330a0-win32-static\bin>ffplay.exe rtmp://live.hkstv.hk.lxdn
s.com/live/hks
ffplay version N-85653-gb4330a0 Copyright (c) 2003-2017 the FFmpeg developers

built with gcc 6.3.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --e

nable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --
enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-li
bfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug -
-enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enabl
e-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-li
bsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolam
e --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx

--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable

-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib

libavutil 55. 61.100 / 55. 61.100
libavcodec 57. 93.100 / 57. 93.100
libavformat 57. 72.101 / 57. 72.101
libavdevice 57. 7.100 / 57. 7.100
libavfilter 6. 87.100 / 6. 87.100
libswscale 4. 7.101 / 4. 7.101
libswresample 2. 8.100 / 2. 8.100
libpostproc 54. 6.100 / 54. 6.100

Metadata: : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0

author PowerSmart
duration 3600.00
datarate 500.00
livetime 1489071037.00
timeshift 0.00
width 640.00
height 480.00
videodatarate 0.00
framerate 25.00
videocodecid 7.00
audiosamplerate 32000.00
audiosamplesize 0.00
stereo TRUE
audiocodecid 10.00
filesize 0.00

Input #0, flv, from 'rtmp://live.hkstv.hk.lxdns.com/live/hks':0/0

Metadata:

author : PowerSmart 0KB vq= 0KB sq= 0B f=0/0
copyright :
description :
datarate : 500
livetime : 1489071037
timeshift : 0

Duration: 01:00:00.00, start: 0.000000, bitrate: N/A

Stream #0:0: Audio: aac (LC), 32000 Hz, stereo, fltp
Stream #0:1: Video: h264 (Constrained Baseline), yuv420p(progressive), 640x4

80, 25 fps, 15 tbr, 1k tbn, 30 tbc
Metadata:-V: 0.075 fd= 238 aq= 0KB vq= 0KB sq= 0B f=14/14

author PowerSmart
duration 3600.00
datarate 500.00
livetime 1489071037.00
timeshift 0.00
width 640.00
height 480.00
videodatarate 0.00
framerate 25.00
videocodecid 7.00
audiosamplerate 32000.00
audiosamplesize 0.00
stereo TRUE
audiocodecid 10.00
filesize 0.00

[h264 @ 094e5180] P sub_mb_type 13 out of range at 23 25 0B f=15/15
[h264 @ 094e5180] error while decoding MB 23 25
[h264 @ 094e5180] concealing 226 DC, 226 AC, 226 MV errors in P frame
HandleInvoke, Sanity failed. no string method in invoke packet=15/15
[flv @ 08772fe0] DTS 16808050 < 2353520185 out of order 0B f=15/15
[aac @ 09527a60] This decoder does not support parameter changes, but PARAM_CHAN
GE side data was sent to it.
[h264 @ 087c9880] [aac @ 09527a60] mb_type 34 in P slice too large at 33 24
Error applying parameter changes.
[h264 @ 087c9880] error while decoding MB 33 24
[h264 @ 087c9880] concealing 256 DC, 256 AC, 256 MV errors in P frame
[flv @ 08772fe0] Audio codec (e) is not implemented. Update your FFmpeg version
to the newest one from Git. If the problem still occurs, it means that your file

has a feature which has not been implemented.

[flv @ 08772fe0] If you want to help, upload a sample of this file to ftp://uplo
ad.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel
@ffmpeg.org)
[aac @ 09527a60] This decoder does not support parameter changes, but PARAM_CHAN
GE side data was sent to it.
[aac @ 09527a60] Error applying parameter changes.
[aac @ 09527a60] This decoder does not support parameter changes, but PARAM_CHAN
GE side data was sent to it.
[aac @ 09527a60] 16819.03 A-V:-2336735.363 fd= 259 aq= 1KB vq= 0KB sq=
Error applying parameter changes.

Attachments (1)

log (225.0 KB ) - added by xyzero 7 years ago.
ffmpeg -v 9 -loglevel 99 -ss 16750 -i rtmp://live.hkstv.hk.lxdns.com/live/hks -f null - 2>./log

Download all attachments as: .zip

Change History (3)

comment:1 by Carl Eugen Hoyos, 7 years ago

Component: ffplayavformat
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

Maybe an issue in rtmp_packet_read_one_chunk().

$ ffmpeg -ss 16750 -i rtmp://live.hkstv.hk.lxdns.com/live/hks -f null -
ffmpeg version N-85727-gd61f93b Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.3.0 (GCC)
  configuration: --enable-gpl
  libavutil      55. 61.100 / 55. 61.100
  libavcodec     57. 93.100 / 57. 93.100
  libavformat    57. 72.101 / 57. 72.101
  libavdevice    57.  7.100 / 57.  7.100
  libavfilter     6. 88.100 /  6. 88.100
  libswscale      4.  7.101 /  4.  7.101
  libswresample   2.  8.100 /  2.  8.100
  libpostproc    54.  6.100 / 54.  6.100
Input #0, flv, from 'rtmp://live.hkstv.hk.lxdns.com/live/hks':
  Metadata:
    author          : PowerSmart
    copyright       :
    description     :
    datarate        : 500
    livetime        : 1489071037
    timeshift       : 0
  Duration: 01:00:00.00, start: 0.000000, bitrate: N/A
    Stream #0:0: Audio: aac (LC), 32000 Hz, stereo, fltp
    Stream #0:1: Video: h264 (Constrained Baseline), yuv420p(progressive), 640x480, 25 fps, 15 tbr, 1k tbn, 30 tbc
Stream mapping:
  Stream #0:1 -> #0:0 (h264 (native) -> wrapped_avframe (native))
  Stream #0:0 -> #0:1 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[flv @ 0x40083e0] New subtitle stream 0:2 at pos:213277 and DTS:33497.3s
Output #0, null, to 'pipe:':
  Metadata:
    author          : PowerSmart
    copyright       :
    description     :
    datarate        : 500
    livetime        : 1489071037
    timeshift       : 0
    encoder         : Lavf57.72.101
    Stream #0:0: Video: wrapped_avframe, yuv420p(progressive), 640x480, q=2-31, 200 kb/s, 15 fps, 15 tbn, 15 tbc
    Metadata:
      encoder         : Lavc57.93.100 wrapped_avframe
    Stream #0:1: Audio: pcm_s16le, 32000 Hz, stereo, s16, 1024 kb/s
    Metadata:
      encoder         : Lavc57.93.100 pcm_s16le
[tcp @ 0x4008c60] RTMP packet size mismatch 2844 != 10564501=N/A speed=1.06x
[tcp @ 0x4008c60] RTMP packet size mismatch 11132902 != 9917494
[tcp @ 0x4008c60] RTMP packet size mismatch 12385551 != 15931647
[tcp @ 0x4008c60] RTMP packet size mismatch 5514591 != 12710304A speed=0.997x
[tcp @ 0x4008c60] RTMP packet size mismatch 15080379 != 36684
[tcp @ 0x4008c60] RTMP packet size mismatch 16251558 != 14306237
[flv @ 0x40083e0] Packet mismatch -1139395889 11 2059179
[tcp @ 0x4008c60] RTMP packet size mismatch 8190494 != 3912756
[tcp @ 0x4008c60] RTMP packet size mismatch 16324791 != 9749786
[tcp @ 0x4008c60] RTMP packet size mismatch 4919497 != 14226931
[tcp @ 0x4008c60] RTMP packet size mismatch 8219603 != 4360900
[flv @ 0x40083e0] Packet mismatch -1137942194 11 2059212rate=N/A speed=0.957x
[tcp @ 0x4008c60] RTMP packet size mismatch 2621404 != 4509089
[tcp @ 0x4008c60] RTMP packet size mismatch 5543389 != 902670
frame=  433 fps= 14 q=-0.0 Lsize=N/A time=00:00:28.35 bitrate=N/A speed=0.902x
video:210kB audio:3540kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

The seek has no effect except allowing to easily reproduce the issue.

in reply to:  1 comment:2 by xyzero, 7 years ago

Replying to cehoyos: Thanks very much. That saves me a lot of time to reproduce this issue.

Maybe an issue in rtmp_packet_read_one_chunk().

Last edited 7 years ago by xyzero (previous) (diff)

by xyzero, 7 years ago

Attachment: log added

ffmpeg -v 9 -loglevel 99 -ss 16750 -i rtmp://live.hkstv.hk.lxdns.com/live/hks -f null - 2>./log

Note: See TracTickets for help on using tickets.