?

Log in

No account? Create an account
Playing BBC HD and ITV HD on a DVBWorld DW2104 - Nick [entries|archive|friends|userinfo]
Nick

[ website | gagravarr.org ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Playing BBC HD and ITV HD on a DVBWorld DW2104 [Jun. 12th, 2010|06:07 pm]
Nick
Having got fed up with the ropey reception on Freeview, due to ongoing problems with my local transmitter (engineering works, fires, too windy for helicopters, the list of excuses is impressive...), I decided to pick up a DVB-S adapter for my mythtv box.

The snag with having a very small, low power mythtv machine is that all the adapters need to be USB, which does limit the choices of linux compatible DVB-S adapters. However, a bit of browsing of the Linux TV wiki and some patience with ebay searches paid off, and I was able to pick up a DVBWorld HD 2104.

With the help of this site, I was able to get the firmware for it, and it was quickly up and running. I followed this guide to get things running, which largely worked for the SD channels.

However, despite the scan of the Astra 28.2E and Eurobird 1 satellites showing me both BBC HD and ITV HD, I was unable to get either working with MythTV or mplayer. Trying in mplayer I saw:
nick@minimyth:/dev/dvb/adapter1$ mplayer dvb://2@"BBC HD"
MPlayer UNKNOWN-4.4.3 (C) 2000-2010 MPlayer Team
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing dvb://2@BBC HD.
dvb_tune Freq: 10847000
Cache fill: 18.85% (1581056 bytes)   
TS file format detected.
VIDEO MPEG2(pid=5500) AUDIO MPA(pid=5502) NO SUBS (yet)!  PROGRAM N. 0

But nothing played. Using szap myself to capture a bit of the stream myself, and trying with that, I got sound but no picture:
mplayer /tmp/HD
MPlayer UNKNOWN-4.4.3 (C) 2000-2010 MPlayer Team
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing /tmp/HD.
Cache fill:  0.00% (0 bytes)   
TS file format detected.
VIDEO MPEG2(pid=5500) AUDIO MPA(pid=5502) NO SUBS (yet)!  PROGRAM N. 0
MPEG: FATAL: EOF while searching for sequence header.
Video: Cannot read properties.
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 256.0 kbit/16.67% (ratio: 32000->192000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...


The key thing to spot here is that mplayer thinks it has MPEG2 video. However, both BBC HD and ITV HD are H264 when broadcast over Freesat! After some googling, it turns out that there's something up with how the dvb-s scan program outputs the channel lines. The easy option is to tell mplayer to use a workaround for this, by passing in an extra option to mplayer - -demuxer lavf

Thus, the easy way to play BBC HD on the DVBWorld card (my 2nd DVB adapter), the command is:
mplayer -demuxer lavf dvb://2@"BBC HD"

This largely seems to work fine, though the sound sometimes drifts which needs a quit and restart to work.

However, it is possible to also hack channels.conf to contain the correct details to "just work(TM)". This seems a bit black magic, but you need to run mplayer with "-identify", pick the PMT_PID (via trial and error...), and add this into the channels.conf video entry with a plus. Thus, my channels.conf entries for the HD freesat channels are:
BBC HD:10847:v:0:22000:5500+259:5502:6940
ITV1 HD:10832:h:0:22000:2362+288:2369:10000
ITV1 HD:10935:v:0:22000:513+289:641:3851

By adding in the correct PMT PIDs, I can then just do mplayer dvb://2@"BBC HD" and it picks the correct video and starts playing! Still has sound drifts though, which I think might be slightly worse than with lavf but I've yet to double-blind test...

Next up, time to make MythTV believe the stream is H264 too!
link