Almost too easy - watch digital TV on Linux

About 4-5 years ago I bought a dirt cheap generic USB DVB-T digital TV tuner (via e-bay)…

Had mixed success getting it working back then… the Linux app I used back then (me-tv) hasn’t been maintained since Trusty Tahr (14.04) was still wet behind the ears… I thought I’d documented the process somewhere, and saved the config file for “me-tv” but couldn’t find it anywhere…

So anyway put DVB dongle away… for a few years… the PC I got it working on orginally has probably gone through several iterations of installing Ubuntu / Fedora / elementary / Ubuntu - I remember it was quite painful…

So come late last week - I wanted to watch a game of Aussie Rules football (“AFL”) on Friday - and was unable to find a single site to stream it from, ended up listening to an audio stream - but I don’t know half the players names, so had no idea who had possession of the ball or who was defending and who offending, an which end of the ground the ball was in play…

So - anyway - the team I like to follow, The Richmond Tigers are playing an elimination final this coming Friday - and I really want to watch it - mainly because my deceased younger brother was a HUGE Richmond fan / follower, and my surviving brother is also a huge fan of Richmond too (as far as the AFL is concerned, I “used” to support Carlton, but lost interest in them a few years back)…

So bit the bullet this evening and dug out the DVB-T receiver… thinking/groaning “this is going to take me ages of painfilled anguish to get working again…”

Device shows up in lsusb :
Realtek Semiconductor Corp. RTL2838 DVB-T

But then I find out me-tv is unsupported, can’t get it to run / install from DEB package on 20.04, tried a few tricks and stuff… gave up, more groans…

A few guglefu searches later and I found some source code to a binary called “w_scan”, configured it then made it (make) and run it :

tar xvf ~/Downloads/w_scan-20170107.tar.bz2
cd w_scan-20170107
less README 
./configure
make
./w_scan -ft -c AU -L > ../vlcchans.xspf

Then :
vlc ../vlcchans.xspf
and I’m watching Free To Air Digital TV - and the channels I need to watch the footy on come up first!

Seriously - everything is getting easier and easier to do on Linux these days…

Sure - it was a bit of CLI and stuff, but no messing around with udev rules or white listing or blacklisting devices - apart from the make from source bit, and a bit of CLI startup for VLC - it was a piece of cake… a walk in the park… almost too easy…

So come Friday, I’m no longer on-call for, I’ll be necking (Aussie slang for drinking from a bottle) a few cold frothies and watching a game of marngrook (an Indigenous Aboriginal game Aussie rules was partly based on) - only issue is the tuner only seems to work with a cumbersome pair of rabbit ears antenna and cable - so it’s not exactly “portable” - but I reckon I’ll be watching the game that way on Friday, each time I duck outside for a cigarette…

3 Likes

Hi,

thanks for the informative article.

I just want to add that besides w_scan which you can also install with
sudo apt-get install w-scan
for DEB-based systems there´s also w_scan2

w_scan2 is an application which scans frequencies for ATSC, DVB-T2, DVB-C and DVB-S / S2 without region-specific data (the so-called “initial tuning data”)
and then in turn generates data that is required by many TV applications for the reception of DVB stations

(translated from: w-scan2 › Wiki › ubuntuusers.de )

Main difference seems to be:

w_scan: ATSC, DVB-T, DVB-C und DVB-S/S2
w_scan2: ATSC, DVB-T2, DVB-C und DVB-S/S2

So w_scan2 supports the newer DVB-T2 standard.

Many greetings
Rosika :smiley:

3 Likes

Thank @Rosika - ahh the old hyphen in place of an underscore trick… before I downloaded the source, I tried “sudo apt install w_scan” and got nothing, and I’d rather compile from source than inflict a PPA on my system anyway…

Why couldn’t they call the package “w_scan” - or the actual developer call it “w-scan”…

Similar deal with “lsb_release” - e.g. I want to know what release some ancient version of Linux is (e.g. a Centos or Redhat 5.x) - but “lsb_release” isn’t installed (and many of these don’t have an /etc/os-release file to query either)… unintuitively it turns out, the package to install “lsb_release” is called “lsb-release”… I should have remembered this old chestnut…

1 Like

@daniel.m.tripp:
Hi and thanks for the suggestion:

I should indeed force myself to do that as well.
Have got far too many PPAs on my system by now. :wink:

Greetings
Rosika :slightly_smiling_face:

Hi All, I recently noticed @clatterfordslim post on Topic Post Your Desktop where as be can seen he has all the UK TV digital stations ready in his top panel. I am only interested in All4 which is a free service having many World TV series devoid of any American dumbed down dross – Phew; what a relief… :upside_down_face:
I have tried and failed to get this All-4 service which I put down to distro, OS, DRM or privacy issues. Does anyone know if using such services you are obliged to give them access to all your data like having WhatsCrap on your phone? :thinking:
SFAIK you can only get this stuff to work on Mint-20 – is this true? I am using a Three-3 ZTE-MODEM getting 10GiB per month but this could be increased. Only need one or two episodes per week to supplement Freeview TV.
Freeview TV UK is being deliberately being filled with crap and endless repeat loops of crap to force all those not using pay to view streaming services on spy-on-you smartTVs to be lead by that ring through the nose to do so.
I joined the resistance or am I the only member? :supervillain:

Hi Andy2, you can set it up in any Linux Distro running XFCE environment or one that’s able to make launchers, as that is all they are. You go to their website sign in copy the URL. Below is in picture form
Right click Panel and add a launcher.



Pick Add New Empty File
Here is how I have mine setup the Icon I downloaded from Internet, had to change it’s color though.

firefox %U tells the Launcher to open Channel 4 with Firefox. After the %U the URL of Channel 4 goes in there. So every time I left click the icon, it opens All4. After you have added your Icon and filled out the form click save. It’ll pop up in your panel. Hope this helps? :grinning: PS It does not have to be Firefox you can use whatever browser you like. PPS If you are using Firefox make sure you switch off extended tracking, though if you have Ultimate Advert blocker add-on installed in Firefox it blocks All-4’s adverts.

1 Like

Hey Mark, thanks so much for your detailed help and super screenshots. I know how to set up a panel with app launchers but my problem is with All4 and DRM browser security issues. (I’m using Abrowser, Epiphany and Midori browsers.)
All4 says:-


https://www.channel4.com/4viewers/faqs/all-4/how-do-i-watch-all-4-what-are-minimum-operating-requirements

also ……

and ……
UKTV-Play for Linux PCs says “To watch you’ll need the latest version of the Google Chrome browser.” Guess that is a NO-NO for me! Do not wish to compromise my security!
Are you using a paid for or subscription bundle with your broadband come internet connection to get all those channels?
Thanks again for your help concerning my confusion – my brain hurts – and I’m turning green with envy – perhaps you will turn me to the Dark Side… :eight_pointed_black_star:
Please, please don’t show screenshot of Walter Presents series :nauseated_face::joy:

Best Wishes for New Year :new:. :new_moon_with_face:. :partying_face:

1 Like

Hi Andy2, Firefox is your best bet, as it is so security conscious, plus you don’t have to have it remembering where you’ve been on the Internet. Go into options and switch on never remember. Every time you log out of Firefox it never remembers with that setting on. Though I have it setup to remember, as Firefox does not spy on you like Chrome does, plus I use Duck Duck Go as search engine, you can switch Google off completely. The newish add-on that Firefox comes with is a password store to store all of your passwords, so if you’re like me and have around 6 billion passwords to remember? Then this password store that’s built into Firefox is a must have. Chrome and Chromium remember everything and report back to Google, using Firefox doesn’t for as long as you don’t use Google as your search engine.

No I’m using Firefox just sign up and away you go.

I’m routered up yes, pay £35.00 pound a month for free all day phone calls and unlimited Broadband. Just like any other person.

And to you too. 2021 has got to be better than 2020 as it isn’t a leap year. Lots of weird things happen in leap years let me find some examples and I’ll be right back. :grinning:
Here are five weird facts about Leap years

1 Like

Having two spare “idle” RPi3 lying around doing nothing (got 3 x RPi 4 doing everything my Pi3’s were doing now) - I shelled out $40 to my favourite online electronics store “Core Electronics” : https://core-electronics.com.au/ in my hometown of Newcastle NSW, for a RPi foundation TV Hat…

Bit tricky to get going (TVHeadend doesn’t like Buster, so I had to reformat new SD card with Stretch “Lite”) - but it works - now I just point VLC on my Linux desktop to the playlist URL of TVHeadend running on the Pi3 - and - it barely touches the sides (never maxes out RAM or cores on the Pi3) - could probably run other stuff on it too…

Specially useful this week when my city went into a full blown Covid 19 lockdown last Sunday, when a hotel quarantine worker got UK Covid “cooties” on himself - then there was a massive bushfire and it was raining ash all over my suburb (but never got close enough to my 'burb for me to get too worried) - just kept ABC (Australian Broadcasting Commission - we call her “Aunty” best TV station in this country - no ads!) News 24 hours running and getting updates…

1 Like

I have a Pi3 for my kids (6 and 9) in the living room with kodi on LibreElec (super lean Linux) as entertainment device (for YouTube Kids, TV and restricted NAS access). This was necessary as hardly any of the apps on our Samsung “Smart TV” work any more (no more updates from the company).

Works perfectly with a wireless mini keyboard/trackpad combo.

2 Likes

Actually, I learned about “Aunty” from these wonderful people:

These “Honest Government Ads” are incredible. Wish, we had them too.

3 Likes

Hmmm - not so easy!

That w_scan utility found SBS (Special Broadcasting Service, Australia, ostensibly catering to Australians of a not-necessarily English speaking background - I’m pretty much Anglo/German/Irish - but love SBS anyway, it’s not quite ad free, but better than commercial networks), in Ubuntu using my USB DVB-TV dongle, my 2nd favourite network after ABC (Aust)…

But TVHeadend didn’t find ANY frequencies or map channels to ANY SBS stations… Doh!

So I can’t watch SBS ‘live’ using TVHeadend until I get that sorted…

Oh well - I use a bunch of python scripts developed by an Aussie to “pilfer” streams from Aust online streaming TV services (e.g. SBS On Demand, ABC iView [surprised Apple haven’t threatened them of that name]):

It’s kinda like youtube-dl or bandcamp-dl (but I only use it in interactive mode)… it may not work for users outside of Aust though…

Note : The ABC is under constant threat from the far-right in Australia (I lump Rupert Murdoch in the far right bucket - his outlets are the “shoutiest” against the ABC) constantly being accused of being “far left” (they’re not - they’re balanced: i.e. humanitarian viewpoints are NOT FAR LEFT! And running current affairs stories that highlight inadequacies of the current administration is not “far left”).

2 Likes

Well - maybe not so easy… I jinxed myself!

Doh!

I stupidly wasted a 256 GB SD card on this Pi3B running tvheadend with a Pi TVHat (from Pi foundation) - which uses a Sony DVB-T muxer thingie… Spent ages trying to figure out how to clone that working image to some other media and gave up…

I was just going to go to the shop to grab another 256 GB SDcard (I want it for my phone) - but we’re (or were) in “stay at home” lockdown thanks to one unreliable state government unleashing the Deltra strain of Covid-19 on the rest of the country… So no shops…

Bit the bullet : “Can’t be too hard, I did it once before…” Famous last words…

dd’d Raspbian Stretch Lite onto a 64 GB SD-Card - booted it - updated it - installed tvheadend…

Formatted the 256 GB SDCARD with exFat, as I tried previously to copy a 6 GB 3D (SBS : side by side - for Google Cardboard) MKV file to the card in the phone, and it was fat32 and 6 GB too big… Tried using rsync with the phone mounted over MTP - too unreliable… Got a 2nd SDcard reader and used rsync - much better method!

But do you think I can get TvHEADEND to work again??? No!

– this was in draft for a week –

Finally got it working - after several purges… and re-attempts…

tvheadend running on Raspberry Pi 3B with “stretch” (Debian 9) - using Pi Foundation “TVHat” (uses a Sony DVB-T tuner doohicky)…

Anyway - would get so far - end up with being able to maybe watch two TV stations, nothing else, and of course not SBS, and worse yet, not “7Mate”, which has “the footy”, the whole thing is so I can watch the footy (AFL) from anywhere in the house with a computer or a laptop… I just point VLC to my TVHeadend network stream, if it’s good then my dad’s brother is Robert

Anyway - followed the top half of this guide (don’t want or need Kodi or LibElec) :

Then this shows how I can get SBS :
https://tvheadend.org/issues/3987

And then after several forced network searches - I’ve got SBS, and 7Mate!

By and large I just leave it on ABC News when I’m at my desk…

1 Like


I wasn’t actually drunk, or drinking, but I was root (note : in Australia, and several other Anglophone countries [like NZ] “root” is a euphemism for sexual congress - hence “can’t use this spanner, it’s rooted!”) - but I did an almost “rm -Rf /” foobar yesterday / last night…
– tangent –
Warning TL;DR, I love this acronym, it has a semi-colon for a start, and one of my favourite punctuation symbols, this time 10 years ago I was in hospital for an extended stay, bowel cancer “scare” but they ripped out my caecum from my large intestine (which also took care of my appendix - you call that “intelligent design”? Anyone who sees intelligent design in that engineering nightmare is a patent moron)… Ten days is the longest I’ve ever stayed in hospital since I was 5 and broke my thigh bone and was in traction for six weeks.
– back to main thread : TL;DR –

Powered up my Pi3 running TVHeadend last night (had been off since the weekend when I rearranged my desk to accomodate the new Macbook M1) and was having issues… So I logged in and noticed my “dfx” alias wasn’t working and that my NAS wasn’t mounted, so I mounted the NAS, and decided to append the last line of /etc/mtab to /etc/fstab, but I only used one redirect output instead of two!!! (i.e. as root “tail -1 /etc/mtab > /etc/fstab” instead of “tail -1 /etc/mtab >> /etc/fstab” and what’s a sideways caret between friends? But pparently not [and obviously - I’ve done similar foobars many years ago on Solaris using “>” instead of “|” to send an email from the CLI “echo ‘here’s an email’ > /full-path-to-mail-binary” ])…

So anyways I merrily decided to reboot and then logged in (it only took seconds), then tried pointing VLC (on the Mac) to TVHeadend and got all these hideous errors, so I tried to update and it wouldn’t… Grrrr! Tried to purge tvheadend… no! Tried to create a file in /tmp - nada - READ ONLY file system on “/”!!! Then I did a “cat /etc/fstab” and the only entry was my NFS NAS mount argument that I redirected with an overwrite “>” instead of appened “>>”…

So - power everything off… mount the Pi3 SD card on my Linux desktop machine, then take a look at the fstab file on my Pi4 (slight difference Pi4 is running Buster arm64, the pi3 is running Stretch armhf - but close enough) a few sudo lsblk and sudo blkid (to get UUID values for each partition) - create a new /media/x/root/etc/fstab file for the Pi3… unmount and “sync; sync” (I like to do this twice, for good measure, to be sure, to be sure [I have some Irish ancestry]). Then punch (I like violence metaphors with IT operations - we’re in good company e.g. “killall”) the card back into my Pi3 - boot up - and - I’m watching TV again from my Linux desktop and the Mac, via VLC.

BTW - I am drunk now :smiley: - along with the Macbook from my tax refund “windfall” - I bought myself a Segway kick scooter (Ninebot G30 Max) - just did a 5 km round trip down to the bottle shop (we call it a “bottlo” in Australia, and the franchise is actually called “Bottle-O” - “off license” in British parlance and “liquor store” in USA, why you even bother is beyond me, you can by booze and guns at supermarkets there :smiley: ) and grabbed a couple of bottles of Pinot Noir - lovely drop too. Time to celebrate, last Monday was 6 weeks since my last cigarette! I don’t think I could ever do the “so many day sober” challenge however :smiley: - but I hope to stay of the cancer sticks for good now (note I gave up for about 18 months 10 years ago when I was having bowel cancer procedures)…

1 Like

In my defence - I’m usually quite “cavalier” with my own infrastucture - if this had been a production server at a customer - I’d still be lazy (instead of using vi to edit /etc/fstab [or /etc/vfstab on Solaris]) - I’d append the end of /etc/mtab to /etc/fstab - AFTER and ONLY AFTER making a backup of /etc/fstab with either something like “cp -p /etc/fstab /etc/fstab.$(date +‘blah blah’)” or “cp -p /etc/fstab{.bkupcopy}” - but that latter syntax doesn’t work on all Linux environments / distros… so I usually just go with the former…

It’s even more intelligent to have a nerve travel almost all around the body for no reason other than evolutionary ones.

1 Like

I have an extra spleen and a weird hole in my right ear. There’s nothing intelligent about either… there are heaps of AI systems out there doing automated things without any intelligence, like if I use the word “kill” in a sentence, I’m threatening someone, but I could just be telling them to kill a $PID :smiley: - but some AI is going to snitch on me that I used threatening language).

Both are embryonic “things” (the extra spleen, and hole in my ear) - i.e. from the stage when a human embryo bears little difference from any other chordate - can’t remember the evolutionary background on the extra spleen (to be fair to myself, I only learned I had an extra spleen about 3 months ago), but the weird hole at the top of my right ear (it looks a bit like a piercing) is an evolutionary holdover that some how got miscopied during my embryonic stage (like a bit of noise on a modem link), and it would normally have metamorphosed into part of a fish’s gill, for some reason my embryonic source code got a blip in its “git pull” and I ended up with part of a a fish’s gill in my right ear :smiley: … true story…

My biggest problem with “intelligent design” is the argument that everything must have a designer, e.g. cars, and computers, and arithmetic, and cancer : is that if everything must have a creator / designer - who or what created the designer? The easiest answer is there is no meaning to anything, and I’m fine with that - and - I’d apologise if this was someone else’s thread, but I started it :smiley: … Science is science, and if you don’t like one bit of ANY branch of any of the sciences, then maybe you shouldn’t be able to reap the rewards of all the other branches of science that you’re okay with.

One thing I love about the way computer science is headed, and has been since Linus open sourced the Linux kernel, then made GIT : PEER REVIEW (yeah yeah, RMS probably started it all - I quite like the guy - but he’s a shit salesman). That thing kicks arse! Sure there was peer review in obscure academic circles about where IT should go, and we ended up with Universities replacing *Pascal with f–king Ada! Open Source and PEER REVIEW and GIT have opened up vast swathes of IT (i.e. “human knowledge”) to uneducated self taught, ‘school of hard knocks’ coders… C’EST LA VIE :smiley: :heart_eyes: It’s evolution (but not necessarily Darwinian)…

I’ve “programmed” in Pascal - but also - I’ve also used fully functional programs (in both MS-DOS and Windows) written completely in Pascal and compiled into platform binaries (e.g. even MS-DOS constrained 64K *.com files) - did anyone ever use a program written and compiled in Ada (other than in academia?). Academia has its place, but you can’t beat raw marketplace capitalism for the cut and thrust (now that is sometimes Darwinian, but even then, the selection process is more artificial than natural) process to weed out the wheat from the chaff…

1 Like

and embryology is the straw that breaks the camel’s back - if there’s no fossil that shows a shrewlike critter turning into a bat (and there aren’t) - who cares - embryology and molecular biology can demonstrate and predict stuff and make educated guesses (i.e. peer reviewed hypotheses) …

If we were “designed” then this “engineer” was a moronic optimist, as embryos we emerge from our arsesholes first, like most deuterostomes, we evolve a cornhole before a mouth - the intelligent designer thought disposing of waste was more important than the gathering of resources? Nearly everyone who knows anything about engineering would design a carburretor or fuel injection well before an exhaust manifold!

I guess my big problem is with people who pick and select which bits of science help them but don’t conflict with their world view, but DENY the rest - but science doesn’t care. It’s pretty simple - like “vaccine” it’s not even a “debate” if you’re against vaccination, you’re against all of science, even if it’s only a tiny bit of science, and you’re happy to continue to drive internal combustion engined cars and use transistors, but you deny the science of vaccination - if you’re against one bit of science - you might as well be against it all, because you’re a moron… if that offends, good, because if you’re an anti-vaxer or anti-sciencer (it’s the same thing), you should be sent out to some wilderness area and left to survive with rocks and bits of string made from your own discarded body parts…

I’m not a fan or believer in ‘intelligent design’ (not particularly a fan of Richard Dawkins either, he’s too OTT for me)
Anyway, watched a RI (Royal Institute) lecture this afternoon on You Tube.
‘Are Viruses alive?’
and the answer is -’ it’s life Jim but not as we know it’
It was actually pretty fascinating to find out how viruses are responsible for development of animals.
They still cause ‘heated discussion’ as there isn’t a definition of ‘LIFE’ except one NASA came up with around 30 years ago. That’s all, back to regular schedule :mask:

He’s a transphobic piece of shit… I still like his books though… Blind Watchmaker, Ancestor’s Tale, Selfish Gene, Climbing Mt Improbable etc… My dad was a diehard catholic, but he respected my atheism, and used to buy me Dawkins books…*
Hey! Necroposting? What gives mate :smiley: - I thought I was the only one around here doing that :smiley:

If I want to read essays by polemicists against relgion, I’d rather read Hitchens (plus he’s a lot more human, and funny, than Dawkins).

1 Like