A lot of the visitors to this site seem to be looking for information about downloading and converting video from BBC iPlayer. So I’ve updated and extended my pages about this. I hope you find them useful - all comments gratefully received.
There have been several improvements to get_iplayer recently. It can now download HD video from BBC HD (1280×720 resolution, 3.2Mbps), and can also do Channels 4 and 5. So that means it can do all UK terrestrial channels.
Looks like my iPlayer page needs updating - get_iplayer is, without a doubt, the definitive UK video downloader now.
A couple of useful utilities for finding the details of titles on a DVD (lsdvd), then extracting the ones you want (tccat from the Transcode suite). I have put binaries for both of them on the download page.
To see the details of the titles on the DVD, use:
lsdvd /dev/rdisk2
(replace /dev/rdisk2 with the path to your DVD drive, if it’s different). This gives output like this:
Title: 01, Length: 01:59:37.130 Chapters: 51, Cells: 76, Audio streams: 03, Subpictures: 08
Title: 02, Length: 00:00:03.000 Chapters: 01, Cells: 01, Audio streams: 03, Subpictures: 08
Title: 03, Length: 00:00:27.090 Chapters: 02, Cells: 02, Audio streams: 01, Subpictures: 00
Title: 04, Length: 00:00:02.000 Chapters: 01, Cells: 01, Audio streams: 03, Subpictures: 08
Longest track: 01
From which we can see that the main movie is title 1. We can get a lot more information about that title including details about the audio streams, chapter timings, subtitles, etc with:
lsdvd -x -t 1 /dev/rdisk2
To extract & decrypt that title from the DVD, we can use
tccat -i /dev/rdisk2 -T 1,-1 > movie.mpg
-T 1,-1 means all chapters from the first title. We could just extract, for example, chapters 5 & 6 with -T 1,5-6
I had been looking for a while for a reliable way of merging MP3 files together, and had tried mp3wrap but never been very happy with the results (because of an audible gap between each merged file, and the fact that the resulting files seemed to be incompatible with some players).
But I have recently realised what a pointless exercise this was, as you can just cat them together:
cat file1.mp3 file2.mp3 file3.mpg > output.mp3
I need this to stick together individual tracks of an audiobook CD (typically 5 minutes long), into one long file. I also reencode the output to a lower bit rate (64k) with lame, like this:
cat infile*.mp3 | lame -b 64 -h –mp3input - outfile.mp3
There’s an lame Intel binary on the download page if you need one.
I’ve always got on very well with iplayer-dl as a means of downloading the iPhone versions of videos from BBC iPlayer. But I recently discovered get_iplayer, which does the same thing with several notable additions:
- It can download the higher resolution Flash streaming video, not just the iPhone version. The flash version is 640×360 whereas the iPhone version is 480×272.
- It can download ITV programmes.
- It can search schedules (so you can use it to find what to download, instead of the iPlayer web page).
- It feels a bit faster than iplayer-dl, at least for downloading the iPhone versions.
It’s the first of these which is most interesting to me. But in order to get get_iplayer to download the Flash stream, you need two additional tools: rtmpdump and ffmpeg.
rtmpdump is used to capture the Flash stream. This is potentially rather handy for other things, so a useful tool to have around. I’ve compiled a version for Mac OS X 10.5 and put it on the download page.
ffmpeg is, of course, the video conversion tool used in SmallDVD and discussed in many articles on this site. get_iplayer uses it to convert the container format of the downloaded video from Flash to MP4 to make it easier to play (the actual video is H.264, so compatible with both containers).
I realised that the version of ffmpeg included in SmallDVD was actually compiled around two years ago, and is now a very long way from being up to date. So I’ve compiled a new one and put it on the download page. I also realised that this is the first time I’ve compiled one of the binaries for SmallDVD since I upgraded to 10.5, and that they are not downward-compatible with 10.4. So for the moment this version is only for Intel & Mac OS X 10.5.
It also made me realise how old many of the other packaged versions of ffmpeg included in other apps are. ffmpegX’s version was compiled in April 2006; PunyVid’s in September 2006. If you read the news and changelog for ffmpeg, you see that there have been a lot of new formats supported since then, such as the later versions of Flash and WMV. So if you are having trouble getting ffmpeg to read your file, try the latest version.
I’m not saying you should copy DVDs… but if you really want to, and you find that the copy protection is proving a little too challenging for your favourite DVD ripper, then mplayer has a very simple way of extracting video from the DVD.
For example, to extract the first title, and save it in a file called out.mpg:
mplayer dvd://1 -dumpstream -dumpfile out.mpg
In an earlier post, I mentioned the problem I had streaming from a Slingbox to anything other than the Sling Player software. Ralph Irving kindly pointed out that he had got the beta 5 release of the VLC Slingbox plugin working with his Slingbox Solo. I gave it a try, and it worked for me too.
Only one problem… the distribution of the plugin only has a Windows binary, you have to build from source for other platforms. So I gave it a go for MacOSX.
I failed to build VLC entirely (instructions here for those of you with more patience than me), but I did enough to be able to compile the Slingbox plugin. I’ve tested it on VLC 0.8.6a + MacOSX 10.4 and VLC 0.8.6c + MacOSX 10.5 and both seem to work OK. Of course that’s no guarantee it will work for you, but you can download the binary and try it.
To install it, just put libaccess_slingbox_plugin.dylib in /Applications/VLC.app/Contents/MacOS/modules and restart VLC.
To configure it, read the readme that comes with the distribution. But here are some additional comments I’d make from my usage of it.
You can tell if the plugin has been loaded because it will add a configuration menu. Go to VLC/Preferences and select the Input / Access modules / Slingbox configuration. I have mine set to use the admin user so I enter my admin password here. I have the input source and channel both set to 0 (my Slingbox takes uses the composite video input; if you use one of the others you will probably need to specific a different input source number). In the advanced settings, I specify the IP address of my Slingbox, and have left all the other settings as default.
Then to start the video, I do File / Open Network, and just type sling:
You can also specify some of these input options in the URL, e.g. sling://192.168.0.94/input0 - see the readme for the plugin for more details.
If you try my compiled version of the plugin, I’d be interested to hear how you get on - leave a comment if you succeed (or fail).
The BBC iPlayer was recently upgraded to allow Mac and Linux machines to download files for later playback. Previously you could only stream directly from the server, which I often found would stall in the middle of a programme, making it unusable.
To access the download functionality, you need to sign up for access to the iPlayer “labs”, but it’s very simple and instantaneous to do this. The iPlayer Desktop app is built with Adobe AIR, and integrates reasonably well with browsing the iPlayer site in a web browser.
The advantages of this approach over downloading files with iPlayer Downloader (discussed here) are that you get a fairly nice GUI for managing the files, and (more importantly) higher quality video. The files I’ve seen are 640×360, whereas the iPhone versions acquired by the iPlayer Downloader are 480×272.
However… (and it’s a big however) they are also infected with DRM encoding to limit playback to a certain time period. This also prevents them being played with any video player other than the iPlayer Desktop. I can’t see any obvious way of removing this. ffmpeg is able to report on the file statistics, but not able to convert it. Media Info Mac (which I’ve just discovered) is also able to read the stats. And none of VLC, MPEGStreamClip or Quicktime are able to play it.
So while it’s nice of the BBC to think of us Mac users, it still fails my basic requirement of watching TV on a TV, not a computer (is this really such a strange request???). So I’m sticking to iPlayer Downloader for now. Needless to say, any suggestions on how to remove the DRM, very gratefully received.
In short, you can’t. Well, at least not with the more recent Slingboxes as far as I can see. If anyone wants to tell me how to do it, I’d be very grateful.
Some background…
After getting fed up with the complexity of my previous way of streaming video around the house with EyeTV and VLC (details here), I gave in and bought a Slingbox. I’d been interested in the Slingbox since it first came out, but was put off by the reputation that Sling Media acquired for being rather too optimistic about when the product would actually work with a Mac (they seemed to claim it was ready about a year before it actually was).
Anyway, by this time, this had all been resolved, so I bought a Slingbox Solo. And it’s great - it’s plugged into the back of my Sky+ box, and can stream video to other PCs and Macs in the house.
But it requires the Sling Player software to view the stream. I find this hugely annoying, as I would like to read the stream with VLC and transcode it to allow a couple of other non PC/Mac video boxes I’ve got.
The is a Slingbox plug-in for VLC that someone has built, but as far as I can see, this only works with the original Slingboxes; the later ones encode the video stream so the VLC playback is garbled.
But if anyone knows how to do it, I’d be very interested to hear.
I have a Mac Mini under the TV running EyeTV to record the DVB signal. Normally, it just sits there recording stuff, which I then copy off and put on DVD. But sometimes I want to stream the live signal to other computers in my house.
First, you need to set the program you want to stream recording. Then, run this script which will stream the current recording using VLC (you need to have VLC installed, of course)
#! /bin/bash
# change this to the location of where VLC is installed
vlc=/Applications/VLC.app/Contents/MacOS/clivlc# change this to the location of your EyeTV archive
cd "/Users/rhughes/Movies/EyeTV Archive"eyetvr=`osascript -e ‘tell application "EyeTV"’ -e "repeat with r in recordings"
-e "if busy of r then set a to path of r" -e "end repeat" -e "end tell" -e "PO
SIX path of a"`
mpg=${eyetvr%*.eyetvr}.mpgecho Streaming $mpg
$vlc "$mpg" –sout "#standard{access=http,mux=ps,dst=}" –intf=http –http-host 192.168.0.91:8081 vlc:quit # &
You should also change 192.168.0.91 to the address of the machine running EyeTV.
To view the stream, use VLC (or other compatible player) on a remote machine and point it to http://192.168.0.91:8080 (changing it to your EyeTV machine’s IP address).
The script also starts the VLC web interface on http://192.168.0.91:8081 – you can connect to this from a web browser and control the playback.
It all works OK, but I have to admit I got fed up with the complexity of it all, and bought a Slingbox. More on that another time