Playing programmes (in Linux version)

dinkypumpkin dinkypumpkin at gmail.com
Fri Feb 10 07:57:52 EST 2012


On 10/02/2012 09:35, John Rose wrote:
> The problem that I was trying to point out is that get_iplayer aborts
> (i.e. terminates) after displaying "Command exit code 2 (raw code =
> 512)":
>
> 1604.972 kB / 10.48 sec (0.4%)
> ERROR: RTMP_ReadPacket, failed to read RTMP packet body. len: 50697
> 1785.513 kB / 10.92 sec (0.4%)
> INFO: Connection timed out, trying to resume.

That has nothing to do with your original topic (capturing 
stdout/stderr).  get_iplayer aborts when rtmpdump fails during streaming 
because, by definition, there should be no more programmes to process. 
As you must know by now, this is a problem with rtmpdump, not a problem 
with get_iplayer per se. Search the list archive:

http://www.mail-archive.com/search?l=get_iplayer%40lists.infradead.org&q=%22ERROR%3A+RTMP_ReadPacket%2C+failed+to+read+RTMP+packet%22

You'll see that similar problems have cropped up many times before, 
including several threads started by you.  The answer hasn't changed 
since you raised the same issue 3 weeks ago.  There is no common cause 
or common solution to rtmpdump glitches with iPlayer.  The problem will 
be something peculiar to your environment, and may only be temporary. 
As always, if anyone has better information, step up and be a hero.

In this particular case, the output provides a clue:

INFO: Connection timed out, trying to resume.

As to why that is happening, we've no way to know.  You appear have the 
latest PPA version, so upgrades probably aren't the answer.  Two very 
long-shot suggestions:

1. Point get_iplayer at alternate CDNs (e.g., try --mode=flashvhigh1 and 
then --mode=flashvhigh2).  Alternate CDNs are generally only available 
for TV programmes, and may not be available for every programme.  It's 
worth checking in case you're just hitting some duff servers.

2. Adjust the rtmpdump timeout parameter.  Ideally, you should be able 
to do this with --rtmp-tv-opts.  Unfortunately, get_iplayer overrides 
that and forces the timeout to 10 seconds, which should perhaps count as 
a bug.  For the moment you'll need to amend the get_iplayer script to 
test this.  Since you appear to have the PPA version, I would suggest 
making a local copy of the get_iplayer script and working with that.  In 
the local copy, look for the line that reads:

push @{ $binopts->{flvstreamer} }, ( '--timeout', 10 );

Change the 10 to some larger number (30, 60, 90) and see if your 
rtmpdump connection still times out.



More information about the get_iplayer mailing list