Stream corrupt error and then rtmpdump goes nuts

dinkypumpkin dinkypumpkin at gmail.com
Tue Jan 8 09:36:37 EST 2013


On 04/01/2013 09:51, Neill Mitchell wrote:
> To be honest, I think your Pi's processor will struggle with this. It's
> right on the edge with my quad core desktop processor. The fundamental
> problem is rtmpdump does not have any sort of flow control implemented.
> It just opens the network socket then grabs and processes the data as it
> comes in. What is really needed is for flow control to be added. This is
> beyond my very rusty C skills!

There is already some flow control in rtmpdump in the sense that it uses 
the RTMP mechanism for negotiating bandwidth.  Still, that won't matter 
much when you receive garbage data, as appeared to be the case in your 
initial report. If there is garbage data in a RTMP message, it means 
that either the server send garbage, or some packets were lost, possibly 
as a result of socket buffer overflows.  You would hope that TCP flow 
control would prevent the latter, but there is no way to know what's 
going at the server end of the connection.  Still, I can't help but 
wonder if amending rtmdump is attacking the problem from the wrong end. 
  Perhaps it might be better to start with adjusting networking 
parameters on your system.  I looked at a vanilla Ubuntu 12.10 and found 
the max socket receive buffer size is 128KiB.  I wouldn't be at all 
surprised if that was too small for 30Mb+ connections.  If anyone with a 
fibre connection is bored enough to do some experimentation, it would be 
interesting to see if some TCP tuning could solve the problem.




More information about the get_iplayer mailing list