linux tv tuner card recommendations

10 views
Skip to first unread message

Malcolm Herbert

unread,
Jun 13, 2022, 6:06:14 AM6/13/22
to mlug-au
I'm wondering if anyone that uses a Myth TV back-end (or similar) to receive digital TV would provide any suggestions for models they use with their systems? I'm looking to buy a USB 2 or USB 3 tuner but what I've seen online seems to imply that the chipsets inside them change without notice and linux kernel support is patchy at best ... is that the case?

--
Malcolm Herbert
mj...@mjch.net

Nic Baxter

unread,
Jun 13, 2022, 7:00:28 AM6/13/22
to Malcolm Herbert, mlug-au
Hi Malcolm
I have a MiniTV-DVB-T digital Terresyial TV stick that I bought on ebay a few years ago. It comes up as Afatech Technologies, Inc. AF9015 DVB-T USB2.0 stick. Works fine with Kodi. I have no use for it any longer so you can have it if you want.
Cheers
Nic
>--
>You received this message because you are subscribed to the Google Groups "mlug-au" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to mlug-au+u...@googlegroups.com.
>To view this discussion on the web visit https://groups.google.com/d/msgid/mlug-au/7db53280-525e-4b25-b399-fd0aff5754fa%40www.fastmail.com.

Malcolm Herbert

unread,
Jun 21, 2022, 2:40:52 AM6/21/22
to Nic Baxter, mlug-au
Nic - thanks for the offer. my brother had a spare Elgato device which he got ages ago for his mac which turned out to work fine with Kaffeine and with a bit of work also works with dvbv5-zap which gives me access to the mpeg transport stream I was interested in, ta

Regards,
Malcolm
--
Malcolm Herbert
mj...@mjch.net

Rick Miles

unread,
Jun 25, 2022, 6:34:52 PM6/25/22
to mlu...@googlegroups.com
Linda late to the party, however, if you are using a desktop Cmedia PCI
cards will do the trick, either terrestrial or satellite. I've been
using them for yonks for saving to HDD or streaming live. I don't use
any gui apps to view. Just a script to select station, schedule to save
or save in real time... dvbstream is the tuner. To view live I use an
icon to open a Yad pop up, select station, and then the script opens the
live stream in mplayer on my desktop. I have never used a DVB TV dongle
, don't know anything about them. Cmedia cards need an antennae and
coaxial in.

Cheers Rick

On 6/21/22 16:40, Malcolm Herbert wrote

AJ

unread,
Jun 26, 2022, 8:57:13 AM6/26/22
to mlu...@googlegroups.com, Malcolm Herbert
my cheap set top box, has a USB.. i stick a portable HDD on it.  i can
then record any program,  it saves to the the HDD as a .mts file.   move
the HDD to the desktop pc, all the files are easily accessible, with the
edited name i give them view the set top box.
a PC and PCI card set-up just to record the stream seems overkill when
the cheapest of set top boxes ($50) can do it all for you.  i suspect
some TVs with USB record feature do the same?! obviously the PCI
card/dongle is better if you want live access to the stream.

i have one of these on my shelf,
https://www.dlink.ru/mn/products/150/381.html
i have no idea how i'd go about testing it.


also have one of these on my shelf:
https://www.pcworld.idg.com.au/review/avermedia/avertv_dvb-t_volar/219054/
comment section on that page says "no Linux support" :(


some hacking i did today:
http://visualsynth.com/proj/mpeg_ts/


aj.

Malcolm Herbert

unread,
Jun 27, 2022, 12:52:38 AM6/27/22
to AJ, mlug-au
AJ, Rick, All - I've found that the Elgato device I have is a re-re-branded Hauppauge stick which seems to work mostly ok running on an rPi, but for the fact that it won't get a lock every second time, which I've had to script around.

The intent was to get at the stream live and put it to disk as an HLS stream - for those who haven't met this format, it's something that Apple invented as a means to allow clients to get at time-delayed content from otherwise "live" streams, but is very nice for what I'm wanting to do.

It works by carving up the incoming mpeg transport into 1-2s chunks, usually split at the I-frame boundary and continually writing out a precisely-timed playlist so that the client can seek more-or-less arbitrarily within the playlist from content saved on disk. It's mostly designed for dumping the content into a webserver and then distributed using a CDN to wherever it's needed.

Once I have the stream as HLS, I can then use my other workflow to download and categorise each individual chunk and determine how interesting it is ... hopefully I've got enough CPU grunt on the new laptop now that I can mostly keep up with the stream and do things "nearly live"

The end goal is to be able to produce a similar playlist to the first but with all the non-interesting items removed and then use any video client that understands how to display HLS streams and things should ... Just Work ... I hope ... experiments thus far are a bit mixed ...

Regards,
Malcolm

--
Malcolm Herbert
mj...@mjch.net

AJ

unread,
Jun 27, 2022, 2:01:04 AM6/27/22
to Malcolm Herbert, mlug-au

i understood most of that.
i'll be adding more info/details about mostly this topic on my project
page :
http://visualsynth.com/proj/mpeg_ts/
in the next few days..   (added a little at the bottom this morning)
..trying to find sufficient meta data to id the
program-content/advertising  signalling.
i'm convinced the broadcasters aren't stripping *all* of that out, i
think theres going to something in there to use for signalling the
content changes.



there are extra metadata streams you can embed in mpeg-ts  that can
describe teh content of the other streams..
i think this is a good way to manage this meta data...    having it in
an external system (HLS) makes it harder to keep it all in sync.


is HLS also for providing the same content at different resolutions for
streaming to different bandwidths ?    ala MPEG-DASH?


aj.

Malcolm Herbert

unread,
Jun 27, 2022, 2:31:22 AM6/27/22
to AJ, mlug-au
AJ - responses inline

On Mon, 27 Jun 2022, at 16:00, AJ wrote:
> i understood most of that.
> i'll be adding more info/details about mostly this topic on my project
> page :
> http://visualsynth.com/proj/mpeg_ts/
> in the next few days..   (added a little at the bottom this morning)

nice

> ..trying to find sufficient meta data to id the
> program-content/advertising  signalling.
> i'm convinced the broadcasters aren't stripping *all* of that out, i
> think theres going to something in there to use for signalling the
> content changes.

could be, at that - I think the PAT codes you mentioned earlier might be the program guide, that seems to be inlined somehow

> there are extra metadata streams you can embed in mpeg-ts  that can
> describe teh content of the other streams..
> i think this is a good way to manage this meta data...    having it in
> an external system (HLS) makes it harder to keep it all in sync.

yeees, however otherwise I'd have to wait until the end of the broadcast to get at the content of the stream

> is HLS also for providing the same content at different resolutions for
> streaming to different bandwidths ?    ala MPEG-DASH?

yes, this is discussed in one of the articles I've been looking at, however I don't have that with me as I'm at work at the moment

The brief testing I did last night involved randomising the playlist and seeing how the player coped ... not well, is the answer, but I think that's because I was keeping the video and audio still muxed at that point, so I was thinking I might need to segregate it further into distinct HLS streams so that each can be cut at their respective frame boundaries (or whatever makes sense for the format) ... I ran out of time last night to try that, but as long as the player knows how to reconstitute it later then it *should* be ok ... maybe ...

the human ear can tolerate roughly 100-200ms of delay between audio and video stream before it gets noticeable, so if various streams get out of whack time-wise, that's my budget - audio should be easier to slice thinner in any case, at the risk of ballooning numbers of files to deal with

AJ

unread,
Jun 27, 2022, 3:20:43 AM6/27/22
to Malcolm Herbert, mlug-au

*"Seamless splice flag" *
*  --   https://en.wikipedia.org/wiki/MPEG_transport_stream

*i'm guessing this is what would be indicating where the next clean
split can occur.
  "DTS next access unit"   is a 33bit value.... which is suspiciously
33bits like the PCR/OPCR (timestamps).

hopefully a well written encoder would put these in periodically..  in
your case every few seconds.

i've written my pkt disassembler to show that data.... just need a few
test videos now.



as per:   http://visualsynth.com/proj/mpeg_ts/
in the grey section,   where it says:   " pcr seen: 609"
that's timestamps...   over a ~47sec clip is about  77ms apart..    so
seeking would be accurate enough, but i think teh video decoder would
still have to wait for a splice point to start a new GoP (i-frame start)
i think i-frames would be inside the video stream, they might not get
elevated to the TS stream meta data.
i think that's the purpose of the splice flag, but not all encoders
would use it.

Malcolm Herbert

unread,
Jun 27, 2022, 6:02:56 AM6/27/22
to mlug-au
Folks - as below, this is the current setup

* Hauppauge Nova-T (branded as an Elgato something)
* dvb stick connected to a raspberry pi
* dvbv5-zap talking to the Nova-T and sending via stdout to ffmpeg
* ffmpeg streaming via udp to media server
* ffmpeg listening on media server and writing mpegts as hls to disk
* disk directory shared via nginx and available to internal network clients

Client side:

* ffplay works fine
* snap version of vlc works, older package version, not so much (am on ubuntu)
* android vlc - works nicely on my phone
* mpv fails because of Issues with Wayland
* mplayer seems to start ok but trips over quite quickly due to some stream hiccup, unsure why

Goal is to get this running on the Chromecast which might be possible as the HD SBS stream seems to be h264 which Chromecast should support ...

In more detail:

* dmesg from the USB dongle

[ 3086.608223] usb 1-1.4: Manufacturer: Hauppauge
[ 3086.712181] dvb-usb: found a 'Hauppauge Nova-T Stick' in cold state, will try to load a firmware
[ 3087.297300] dvb-usb: found a 'Hauppauge Nova-T Stick' in warm state.
[ 3087.298114] dvbdev: DVB: registering new adapter (Hauppauge Nova-T Stick)
[ 3088.525732] rc rc0: Hauppauge Nova-T Stick as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/rc/rc0
[ 3088.526127] input: Hauppauge Nova-T Stick as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/rc/rc0/input0
[ 3088.526171] dvb-usb: Hauppauge Nova-T Stick successfully initialized and connected.

* raspberry pi initial setup:
- install dvbv5-tools and dtv-scan-tables
- scan for channels:

dvbv5-scan /usr/share/dvb/dvb-t/au-Melbourne

* on the raspberry pi:

dvbv5-zap -c dvb_channel.conf -o - "SBS ONE HD" |
ffmpeg -re -i - -c:a copy -c:v copy -f mpegts udp://media.internal:1749

* on the media server:

ffmpeg \
-i udp://media.internal:1749?listen -codec copy -map 0 \
-hls_init_time 0 \
-hls_time 2 \
-hls_list_size 86400 \
-hls_start_number_source generic \
-hls_allow_cache 1 \
-hls_base_url http://media.internal:7000/video/tour-de-france/data/ \
-hls_flags append_list+discont_start+second_level_segment_index+second_level_segment_duration \
-strftime 1 -strftime_mkdir 1 \
-hls_segment_filename '%Y/%m/%d/%Y-%m-%dT%H-%M-%S%z-%%05d-%%07t.ts' \
/mnt/raccoon1/mjch/export/root/video/tour-de-france/data/2022/06/26/2022-06-26T21-28-36+1000.m3u8

The playlist looks like this:

media.internal$ head 2022-06-26T21-28-36+1000.m3u8
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:4
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-DISCONTINUITY
#EXTINF:1.040000,
http://media.internal:7000/video/tour-de-france/data/2022/06/26/2022-06-26T21-28-48+1000-00000-1040000.ts
#EXTINF:2.320000,
http://media.internal:7000/video/tour-de-france/data/2022/06/26/2022-06-26T21-28-48+1000-00001-2320000.ts

These are the pages I'm looking at:

https://ottverse.com/hls-packaging-using-ffmpeg-live-vod
http://underpop.online.fr/f/ffmpeg/help/hls-2.htm.gz

A friend has one of these which I'm considering as a nice standalone thing:

https://vboxcomm.com/product/vbox-tv-gateway-for-terrestrial-dvb-t-t2/

Brian May

unread,
Jun 27, 2022, 6:39:49 PM6/27/22
to Malcolm Herbert, mlug-au
Years ago I had this same issue. And I would (repeatedly) research a
Linux card, purchase it, only to find I couldn't get it to work
correctly. Either due to not being Linux compatible or not being able to
get a signal[1]. Not sure which, maybe a combination of both. Which got
a bit annoying that I was accumulating a collection of these expensive
tuner cards that I couldn't use.

I ended up getting a HDHomeRun. Which is Ethernet, not USB, but has been
100% reliable since. And still 100% usable despite its age. No idea if
the recent model is just as good, I suspect so.

Recently, after doing a complete Mythtv reinstall, I noticed a problem
that mythtv couldn't connect after a reboot. I had to restart the
process manually.

This combined with the fact the box can randomly decide to reboot for no
apparent reason results in missed recordings.

No problem, Google says I just need to configure systemctl to wait for
the network to come up before starting the mythtv backend. Confirmed
this was working. But I still encountered the same problem.

$ systemctl edit mythtv-backend
[Unit]
After=network-online.target

I ended up having to delay the mythtv process by 5 seconds:

$ systemctl edit mythtv-backend
[Service]
ExecStartPre=/bin/sleep 5

Which seems to be a bit of a kludge, but it works.

Since then the network that I was using seems to have died[2]. So maybe
a dieing network switch was the real problem here. Bit doubtful. Haven't
tried removing the sleep 5.

Notes:

[1] There is something a bit strange about the signal here. We are
relatively close to the transmitter, line of sight. But some stations
come out better then others. One theory is that the signal strength is
too high for some DVB interfaces to cope with.

[2] It totally died for my MythTV setup, but if I moved it to another
computer it worked fine. Possibly shorter network cable length to
upstream network was the issue, and the fault meant it couldn't work
with longer cable stretches anymore. Still seems weird.

It was a cheap and old switch; now replaced with an older switch we had
lying around...
--
Brian May <br...@linuxpenguins.xyz>
https://linuxpenguins.xyz/brian/

AJ

unread,
Jun 29, 2022, 10:32:56 AM6/29/22
to mlu...@googlegroups.com, Malcolm Herbert


malcolm et al:

 last year, in the race centre website.. the stream that updates the
webview of teh  { race leaders | peleton group | breakaway groups } had
GPS co-ords within it..
from memory, i think the broadcast and the race-centre website were only
5~15 seconds out of sync.
would be cool to be able to add a GPS position stream to the video feed.



anyone:

how would i go about capturing a web stream for 3+ hrs and time-stamping
the data?
do i just leave wireshark running?

being a little abstract here, cause i can't recall if it was *many*
ajax/HTTP requests,  long-polling http, a websocket, or more modern
ServerSentEvents.
i'd like to capture this from Day #1 of the TdF.. which is when i also
get to find out exactly which tech they are using....
hence i think wireshark capture ALL TEH PACKETS!!11     might be a good
strategy for day #1.

AJ

unread,
Jul 2, 2022, 7:08:39 AM7/2/22
to mlu...@googlegroups.com, Malcolm Herbert

re:  TDF  live data..   with  live GPS data..

browser:   https://racecenter.letour.fr/en/riders/2
right click :  dev Tools.
Network tab.

url: https://racecenter.letour.fr/live-stream?xdt=245feyJI1NiIetc_etc_etc

$ curl {that url} > txt_file

$ head txt_file

ServerSendEvents text data..  JSON body,  including  GPS data.

Malcolm Herbert

unread,
Jul 5, 2022, 1:30:47 AM7/5/22
to Brian May, mlug-au
Brian - yes, this was what I was afraid of ...

I think I had success with the USB TV dongle I'm using now precisely because it is 10+ years old ... didn't have to upload any firmware or compile drivers or anything like that ... but yeah ...

I did end up ordering a vbox unit which is unfortunately delayed in shipping, but that's effectively an all-in-one dedicated bit of kit to do what I'm already doing with the rpi+dongle ... that should mean all I need to do is suck on the stream on my local network once the vbox has done the work of plucking it out of the air and remuxing it appropriately ... that shouldn't need drivers either
Reply all
Reply to author
Forward
0 new messages