quattrofoto
Posts: 4
Joined: Fri Jul 06, 2018 9:33 am

Kodi, RPi3 and DVB-T

Fri Jul 13, 2018 3:16 pm

Hi all,

So I'm finally getting somewhere with my Land Rover system - Openauto works as it should at last, reversing camera works great (or will when I find a hdmi cable that works with the adaptors I have for the camera interface, that is long enough to reach the back of a S2a 109) and I have my DVB-T usb dongle working, sort of. Mplayer works but the video is all squashed, and it's just way too clunky (I can't really be using a cli in a car, even if it's stationary. Also, don't worry the tv is only to be used while stationary at camp sites) VLC works after importing the mplayer channels.conf file as a playlist but although the audio is perfect the video takes a million years to load, and instantly freezes, so is pretty much unusable.

So I installed Kodi (sudo apt-get install Kodi) but I just cannot get it to work with the dongle. I have read a LOT of guides online, but I think they must all be outdated as none of them have worked at all. I've followed about ten different guides on installing tvheadend but my particular pi does not want tvheadend installing on it, and refuses to allow it whichever guide I follow. I am at a loss, can anyone help me and explain, from the beginning, how to get Kodi to spit out live tv via a usb DVB-T stick?

All I want is to be able to put my young daughter in front of the screen, press a desktop shortcut (which I will create when I've got it working) and have Kodi start, then simply navigate to live TV and let her watch CBeebies while I pitch the tent etc. Oh and so the other half can watch her Hollyoaks too. Priorities, etc...

Thanks in advance,
Ste

tvjon
Posts: 618
Joined: Mon Jan 07, 2013 9:11 am

Re: Kodi, RPi3 and DVB-T

Fri Jul 13, 2018 7:16 pm

Personally, after reading your needs:

"All I want is to be able to put my young daughter in front of the screen, press a desktop shortcut (which I will create when I've got it working) and have Kodi start, then simply navigate to live TV and let her watch CBeebies while I pitch the tent etc. Oh and so the other half can watch her Hollyoaks too"

I wouldn't use any of your mentioned tools for tv.

I did similarly to you several years ago with RPi1, along with some help with the USB exception handling at the time from

jdb

Now, there are newer versions of the tools, so:

sudo apt install dvb-tools dtv-scan-tables

You doubtless have a different tv dongle than I (dvb/t2) but you should see similar results.

[email protected]:~ $ dvb-fe-tool

Device Sony CXD2820R (/dev/dvb/adapter0/frontend0) capabilities:
CAN_2G_MODULATION
CAN_FEC_1_2
CAN_FEC_2_3
CAN_FEC_3_4
CAN_FEC_5_6
CAN_FEC_7_8
CAN_FEC_AUTO
CAN_GUARD_INTERVAL_AUTO
CAN_HIERARCHY_AUTO
CAN_INVERSION_AUTO
CAN_MULTISTREAM
CAN_MUTE_TS
CAN_QAM_16
CAN_QAM_32
CAN_QAM_64
CAN_QAM_128
CAN_QAM_256
CAN_QAM_AUTO
CAN_QPSK
CAN_TRANSMISSION_MODE_AUTO
DVB API Version 5.10, Current v5 delivery system: DVBT
Supported delivery systems:
[DVBT]
DVBT2
DVBC/ANNEX_A


You also probably won't be using the same transmitter, so those

dtv-scan-tables

cover most of Earth's DVB-T sources, handy for your camping. We cycle camp usually, & I keep meaning to see how well a Brompton performs as an aerial :)

I imagine you'll want to test all this from home, so:

[email protected]:~ $ ls /usr/share/dvb/dvb-t

uk-Aberdare uk-Fenton uk-Preseli
uk-BeaconHill uk-Guildford uk-Reigate
uk-Belmont uk-Hannington uk-RidgeHill
uk-Bilsdale uk-Hastings uk-Rosemarkie
uk-BlackHill uk-Heathfield uk-Rosneath
uk-Blaenplwyf uk-HemelHempstead uk-Rowridge
uk-BluebellHill uk-HuntshawCross uk-RumsterForest
uk-Bressay uk-Idle uk-Saddleworth
uk-BrierleyHill uk-KeelylangHill uk-Salisbury
uk-BristolIlchesterCrescent uk-Keighley uk-SandyHeath
uk-BristolKingsWeston uk-KilveyHill uk-Selkirk
uk-Bromsgrove uk-KnockMore uk-Sheffield
uk-BrougherMountain uk-Lancaster uk-StocklandHill
uk-Caldbeck uk-LarkStoke uk-Storeton
uk-CaradonHill uk-Limavady uk-Sudbury
uk-Carmel uk-Llanddona uk-SuttonColdfield
uk-Chatton uk-Malvern uk-Tacolneston
uk-Chesterfield uk-Mendip uk-TheWrekin
uk-Craigkelly uk-Midhurst uk-Torosay
uk-CrystalPalace uk-MoelyParc uk-TunbridgeWells
uk-Darvel uk-Nottingham uk-Waltham
uk-Divis uk-OliversMount uk-Wenvoe
uk-Dover uk-Oxford uk-WhitehawkHill
uk-Durris uk-PendleForest uk-WinterHill
uk-Eitshal uk-Plympton uk-EmleyMoor
uk-PontopPike uk-Fenham uk-Pontypool
uk-Ferryside uk-Redruth

[email protected]:~ $

So pick your nearest transmitter from that lot, &

[email protected]:~ $ sudo cp /usr/share/dvb/dvb-t/uk-Angus ~/initial_data_v5.conf

Next:

[email protected]:~ $ dvbv5-scan ~/initial_data_v5.conf

which will automagically create

/home/pi/dvb_channel.conf

& you can browse through that to find Cbeebies & whatever Hollyoaks is on.

Next tune your dongle to one of those channels:

[email protected]:~ $ dvbv5-zap -c dvb_channel.conf -r 'Channel 4+1 HD'

using demux 'dvb0.demux0'
reading channels from file 'dvb_channel.conf'
service has pid type 06: 303
tuning to 562000000 Hz
video pid 301
dvb_set_pesfilter 301
audio pid 302
dvb_set_pesfilter 302
Sync (0x0f) Signal= 80.00% C/N= 14.45dB
(0x00)
Lock (0x1f) Signal= 79.51% C/N= 17.98dB
Lock (0x1f) Signal= 79.51% C/N= 17.98dB
DVR interface '/dev/dvb/adapter0/dvr0' can now be opened
Lock (0x1f) Signal= 78.22% C/N= 21.90dB
[email protected]:~ $

Ok, that's tuned & locked. Now let's watch tv.

Open another terminal, & using my favourite (already installed) media player,

[email protected]:~ $ omxplayer /dev/dvb/adapter0/dvr0

Video codec omx-h264 width 1920 height 1080 profile 100 fps 25.000000
Audio codec aac_latm channels 2 samplerate 48000 bitspersample 16
Subtitle count: 0, state: off, index: 1, delay: 0
V:PortSettingsChanged: [email protected] interlace:0 deinterlace:0 anaglyph:0 par:1.00 display:0 layer:0 alpha:255 aspectMode:0
Stopped at: 00:00:32
have a nice day ;)

On this Stretch µSD card, I don't have a mpeg2 license, so omxplayer will only allow H264 (mpeg4) to display.

Here's another example:

[email protected]:~ $ dvbv5-zap -c dvb_channel.conf -r 'CBBC HD'

using demux 'dvb0.demux0'
reading channels from file 'dvb_channel.conf'
service has pid type 05: 7108
tuning to 474167000 Hz
video pid 7001
dvb_set_pesfilter 7001
audio pid 7002
dvb_set_pesfilter 7002
Lock (0x1f) Signal= 100.00% C/N= 21.56dB
Lock (0x1f) Signal= 100.00% C/N= 21.48dB
DVR interface '/dev/dvb/adapter0/dvr0' can now be opened
Lock (0x1f) Signal= 100.00% C/N= 24.55dB

& a couple of screenshots.

I did try tvheadend etc., but was never happy with the results. The above cli options allow testing to ensure the setup actually works, rather than wasting time with complex means.

These commands can of course be put into a shell script, you could click on an icon to watch Cbeebies, another icon for another channel etc., as I note your comment about cli.

HTH.
bbc4.jpg
bbc4.jpg (53.11 KiB) Viewed 84 times
The attachment bbc4.jpg is no longer available
Last edited by tvjon on Sat Jul 14, 2018 8:28 am, edited 3 times in total.

quattrofoto
Posts: 4
Joined: Fri Jul 06, 2018 9:33 am

Re: Kodi, RPi3 and DVB-T

Fri Jul 13, 2018 8:03 pm

I've actually just got it working, at last, no thanks to the official tvheadend online guide (which makes very little sense). I found a good two part guide on YouTube (some guy in the Netherlands) which, together with the (un)helpful online guide and lots of head scratching got me going. However, reading your reply, I think I will also do what you said so I can have quick shortcuts on the desktop too, as that sounds so much more convenient. I'm not afraid to use a cli, it's just not suitable for an in car system (especially a 55 year old 'truck') and a quick jab at the touchscreen for instant ('ish' I'm guessing...) results will be great. Thank you for your help.

Return to “Media centres”

Who is online

Users browsing this forum: No registered users and 2 guests