These forums are archived

See this post for further info

get_iplayer forums

Forum archived. Posting disabled.

Live streaming

user-69

Hi there,
get_iplayer is great and working fine for me, but for Live Streams.

Two examples:

get_iplayer --stream --type=tv "http://www.bbc.co.uk/tv/bbctwo/live" --player="mplayer -cache 512 -"
get_iplayer v2.83, Copyright (C) 2008-2010 Phil Lewis
This program comes with ABSOLUTELY NO WARRANTY; for details use --warranty.
This is free software, and you are welcome to redistribute it under certain
conditions; use --conditions for details.

MPlayer SVN-r36443-4.7 (C) 2000-2013 MPlayer Team

Playing -.
Reading from stdin...
Cache fill: 0.00% (0 bytes) INFO: Trying pid: http://www.bbc.co.uk/tv/bbctwo/live using type: tv
INFO Trying to stream pid using type tv
INFO: pid not found in tv cache
WARNING: No programmes are available for this pid with version(s): default
Cache fill: 0.00% (0 bytes) ents/get_iplayer-10b7c07 >

libavformat version 55.16.102 (internal)


Exiting... (End of file)

-----------------------------

get_iplayer --stream --type=livetv "BBC Two" --player="mplayer -cache 512 -"
get_iplayer v2.83, Copyright (C) 2008-2010 Phil Lewis
This program comes with ABSOLUTELY NO WARRANTY; for details use --warranty.
This is free software, and you are welcome to redistribute it under certain
conditions; use --conditions for details.

Matches:
80006: BBC Two - live

INFO: 1 Matching Programmes
MPlayer SVN-r36443-4.7 (C) 2000-2013 MPlayer Team

Playing -.
Reading from stdin...
Cache fill: 0.00% (0 bytes) INFO: Checking existence of default version
INFO: flashvhigh1,flashvhigh2,flashhigh1,flashhigh2,flashstd1,flashstd2,flashlow1,flashlow2 modes will be tried for version default
INFO: Trying flashvhigh1 mode to record livetv: BBC Two - live
INFO: File name prefix = BBC_Two_live_2013-09-15_152128
RTMPDump v2.4-n78-git3a1e20c-ppa8~raring
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
WARNING: You haven't specified an output file (-o filename), using stdout
Connecting ...
Cache fill: 0.00% (0 bytes) INFO: Connected...
Cache fill: 0.00% (0 bytes) ERROR: Closing connection: NetStream.Play.StreamNotFound
INFO: Command exit code 1 (raw code = 256)

INFO: Streaming failed with exit code 1
ERROR: aborting get_iplayer
Cache fill: 0.00% (0 bytes) cuments/get_iplayer-10b7c07 >

libavformat version 55.16.102 (internal)


Exiting... (End of file)



------------------


grateful for any help.

user-2

General tip - Use the code button to surround your command strings with backticks so they come out like this:

Code:
get_iplayer --stream --type=livetv "BBC Two" --player="mplayer -cache 512 -"



Unfortunately, WordPress messes up the command string otherwise.

Re: attempt 1 - To be honest, I'm not sure that command form even works any more, even though it's still in the documentation. There have been changes to the BBC site since get_iplayer was written, so functionality that relies on web scraping breaks. For live streams, stick to the form you used in attempt 2.

Re: attempt 2 - When you get StreamNotFound errors, it means that the first CDN get_iplayer accesses doesn't have the live stream available, so get_iplayer just punts and exits. There should be two CDNs available for TV programmes, so the trick is to force get_iplayer to use another CDN. Do that by adding
Code:
--modes=flashhigh2
to your command line. You can also use
Code:
flashstd2
or
Code:
flashlow2
for lower quality streams. That will point get_iplayer to CDN #2. However, since the CDNs rotate #2 may not necessarily point to the CDN where the live stream is unavailable. Just keep trying until #2 rotates onto a working CDN - it may take a number of attempts. You can also switch the "2" to "1" to access CDN #1, but it's better to leave it as "2" and keep trying. More info in "Modes and CDNs" section of:

https://squarepenguin.co.uk/wiki/modes

In my experience, live streaming or recording is problematic at best. rtmpdump often is unable to get a stream up and running, so numerous attempts are required. Once a stream is running, things are usually OK. Also, if it appears that a stream freezes after a second or two - without any other sign of error - leave it for a couple of minutes. Sometimes rtmpdump will recover and streaming will begin.

These forums are archived

See this post for further info