Record live stream to MP4
Vangelis forthnet
northmedia1 at the.forthnet.gr
Fri Dec 7 08:05:58 EST 2012
On Thu Dec 6 23:17:37 GMT 2012, Craig Cockburn wrote:
>I'm wanting to record a live stream of BBC Alba to an MP4 file. Can
>someone tell me how to do this please as I've looked extensively and
>nothing works, mostly it's out of date info.
Hello :-)
Using the very latest snapshot (master, i.e. git-fa7d46f ) of get_iplayer
from git at:
http://git.infradead.org/get_iplayer.git
OS is WindowsVista 32bit SP2, using a fairly recent win32 binary of RTMPdump
2.4.
Assuming you want to capture the live stream at:
http://www.bbc.co.uk/iplayer/tv/bbc_alba/watchlive
(which is only accessible from UK IPs and would require a TV licence,
obviously...)
Optionally refresh the livetv cache by running:
get_iplayer --refresh --type=livetv
(This is what I got:
Added: 80000: BBC Alba - live
Matches:
80000: BBC Alba - live
80001: BBC Four - live
80002: BBC News - live
80003: BBC One - live
80004: BBC Parliament - live
80005: BBC Three - live
80006: BBC Two - live
80007: CBBC - live
80008: CBeebies - live
INFO: 9 Matching Programmes
C:\Program Files\get_iplayer> )
and then by running the following command:
get_iplayer --type=livetv --pid=bbc_alba --modes=flashvhigh --force --stop x
get_iplayer will save in real time the highest quality rtmp live stream
available,
which is 688x384p @1,539 Kbps, and after "x" seconds have passed,
it will stop the recording and in the end save it into a nice .mp4 file.
NB: If you are using the master version from git, you can use with
the --stop switch
the time format hh:mm (e.g. for 1 hour long recording, --stop 3600 can be
replaced
by --stop 01:00), see commit 8e662e0:
http://git.infradead.org/get_iplayer.git/commit/8e662e0af0866e8fe409f8d7998a8340e8322bce
If you don't use the --stop switch, you'll have to stop the recordind
manually,
by exiting the running command prompt window; you will end up with a partial
flv file, e.g.
BBC_Alba_live_2012-12-07_144201.partial.mp4.flv (if you have not "hidden
extentions for known file types"). Rename to
BBC_Alba_live_2012-12-07_144201.flv
and then use FFmpeg to remux losslessly to the mp4 container, just like
get_iplayer
does internally:
ffmpeg.exe -i "BBC_Alba_live_2012-12-07_144201.flv" -f mp4 -vcodec
copy -acodec copy "BBC_Alba_live_2012-12-07_144201.mp4"
And there you have your mp4 file!
Greetings, Vangelis
EDIT: When I started composing this e-mail, dinkypumpkin had not posted his
insightful ones...
English is not my native tongue, so it took me some time to finish it...
At the risk of now being redundant, I decided to still send mine,
for the benefit of the OP and others...dinkypumpkin, I hope you don't mind
:-)
More information about the get_iplayer
mailing list