[Libav-user] reliability issues when streaming RTMP with H.264

ctetrick at satx.rr.com ctetrick at satx.rr.com
Fri Jun 17 21:15:11 CEST 2011


Hello all, 
I have code that I've written that can successfully encode H.264 using the Intel Media SDK (Windows) with the Sandybridge HW acceleration, and write it to an MP4 file.

With a few modifications I can encode the same to an flv container, output an RTMP stream to Flash Media Server 4, and view it on a browser.
However, the FMS server eventually stops with an error like the following:

Fri 11:52:39 AM: Bad network data; terminating connection : chunkstream error:message length 10955453 is longerthan max rtmp packet length
Fri 11:52:39 AM: Bad network data; terminating connection : (Adaptor: _defaultRoot_, VHost: _defaultVHost_, IP: 10.28.1.165, App: live/_definst_, Protocol: rtmp, Client: 4702111234508538223, Handle: 2147614720) : D3 EB 99 92 00 11 92 9B AA 0C A9 DA 9A Y DE 1A $ B4 Y BB 8 D1 $ 08 4 8 D6 p 07 90 80 P CD Q 80 Z B8 E5 E0 C9 09 0B 9 i B5 DB Z DB 16 E 3 u F6 . CE 8D ] E2 BF F 93 CD 93 AC < F3 u i O { : u BC 07 Y 93 ) 16 x 8C # s 15 EE A4 F5 FC D4 04 I h D4 A6 88 C2 DB 19 1 3 93 S A4 X AF 2 06 E6 8C } 9C 91 E6 _ R u = B5 ; 7F EF 14 C6 , 9 f R P D5 FF 7 > 1E > l 08 A9 11 O D3 D9 P FA . CE y R U ) 9E E1 BA 8F A2 AC 06 C9 R A7 ! 87 M F1 B1 C8 EF C2 % DC D4 B3 86 86 AA ! \ j AC 01 94 D3 P 0F L { 1C 84 FA l 83 99 B8 CB D7 04 A7 D 13 B9 B4 D5 0C D6 D9 F9 ED $ 0E C4 98 8F D6 : A4 X L AC 7F Q 9 02 E5 < DC g 86 DD 18 08 Q B6 5 f 9F FF F6 O BE C0 86 BD C6 v = 81 A0 04 88 J C1 A1 9F EB B8 FD D2 k 83 0A X 7F 0C 96 w 86 A3 DD u 85 C4 M > 07 C5 C4 F8 C4 92 9A 1F M DE F E F5 a a f ? 16 13 DB C5 AB ( BC H CC A5 89 F6 DE $ f c DD DE ~ J > DE 95 ? 6 DB B8 + 1B AD 8E E3 F5 92 9 F4 m 90 8A ; ! 1D FF F8 AC l 18 U DE... ect

This seems to happen most often when the source video is noisy.

I am using a build that is based on the .6 branch, and using the built-in rtmp protocol rather than librtmp.

(FWIW, I can get the same errors with ffmpeg.exe if I stream the same video using something like: ffmpeg -i noisyvid.mp4 -vcodec copy -acodec copy -re -f flv rtmp://10.28.1.165/live/video)

1. Are there any known issues with the rtmp protocol that might cause this, or anyone know where I should look (i.e., H.264 compatibilbity, rtmp or flv limitations or bugs)?

2. I get no indication from rtmp_write or tcp_write that the server had dropped me, should there be a way to detect this?

3. I have read that the flv container can support H.264/AAC, but that there are unspecified limitations. Does anyone know what the specific limitations are? (I'll post this question on Adobe as well.) Does that issue apply here with rtmp?


More information about the Libav-user mailing list