[Solved, partially] TVheadend - help with buffering on Live TV

I’m on holiday still, but checking in from time to time.

The cause most definitely is not.

OP has his tuners connected via USB, and we are likely looking at an isochronous transfer issue. Your tuners are connected via a completely different interface and your content is played back via a completely different video processor using a completely different API on completely different hardware.

Start your own post, and let @james have his. Without logs, I don’t think we’ll be able to do much to solve your problem.

I had another go at this and I’m reaching the conclusion it’s either the Vero configuration / TVH Client / USB stack that is the problem (I’m not a hardware person so I may be wrong)

Reasoning behind this is that I can plug the stick into the i3 laptop referenced earlier and stream without issue to the Vero over the local network by changing the IP address in the client addon config screen.

lsusb when plugged into the laptop gives this:

Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 9 MediaTV Pro III (EU)
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1

After rereading another Sundtek support forum post (Sundtek Streaming Server (Englisch / English)), I see that the USB stick has it’s own local backend, set up by running:

/opt/bin/mediaclient --installstreamer

This provides a web frontend on port 22000 and m3u playlists (HD, SD and Radio) that can be downloaded and used on the Vero. Assume it’s doing the networking over the USB port?
On the Vero, I disabled the TVH client addon and stopped the TVH service, then enabled the Simple IPTV addon and pointed it at the single m3u playlist file I’d created from the 3 provided by the Sundtek streaming server as it only accepts one file in config.

The Vero did play the TV stream from the Sundtek streaming server for a short time then the stream just completely stopped and didn’t restart, which was worse than playing the stream via TVH.

It’s quite possible the Sundtek streaming server works on the i3 laptop but as the TV Headend setup works perfectly when the stick is plugged into the laptop I haven’t bothered trying.

The only change I’ve made recently is to invest in a signal amplifier, this had no effect when the stick was plugged into the Vero, possibly has a benefit when the stick is plugged into the laptop although haven’t tried it without it.

uname -a on the laptop returns:

Linux i3laptop 4.2.0-38-generic #45-Ubuntu SMP Wed Jun 8 21:21:49 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

/opt/bin/mediaclient --cpucheck returns for all 4 CPUs.

Sundtek CPU Check

cpu0:
current scheduler: powersave
available schedulers: performance powersave
to change the scheduler you might run following command:

echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

The laptop is 64bit with 4GB RAM.

So Vero config or USB stack ?

Thanks
James

Hi James

My suspicion is a software problem with USB, and that’s why I made some changes in the kernel in the last update, although I did not expect this to be the be all and end all of the matter.

I wonder if the Sundtek guys can show us how to get more logging from the Sundtek streaming server. What I would appreciate (for consistency), is if we can do some more testing on:

  • Either Wired or WiFi connection, but keeping it the same
  • The same streaming server (either Sundtek or TVHeadend)
  • Playing back on the same device each time.

I can build a new kernel, we can try and prioritise the isochronous tasklet higher, as well as explore the trans backoff we implemented in the last kernel and see if we can match it to the clock a little better. Until I get back from holiday and find that dongle, my ability to properly test this and work out how to fix it is limited.

Sam

Thanks Sam, have a break, no need to work on this when you are on holidays.

The m3u playlists have entries like below and thinking about it with a clearer head is that mediaclient is opening the ports and communicating with the stick over USB. Surprised I didn’t think of that earlier actually…

rtsp://localhost:55554/?freq=184&bw=7000000&msys=dvbt&mtype=qpsk&sr=0&specinv=1&pids=0,16,17,18,20,1025,161,81,41,5000,7769,7000

But that’s a moot point because trying to watch Live TV using this playlist via the Simple IPTV addon is even worse than the TVH setup, which for me rules out TVH as the issue.
Plus there is no OTA EPG and I’d have to source probably an XMLTV one in Australia which is surprisingly difficult.

What does work near-perfectly is this:

  • Vero2 running TVHeadend Client
  • Sundtek stick plugged into an i3 Laptop running TVH 4.0.9 server on Ubuntu 15.10 all up to date, TVH official packages.
  • TVH server stopped on Vero2 (using systemctl, haven’t uninstalled it)
  • The i3 laptop is connected to the same wifi extender as the Vero2 via cable
  • The TVH client on the Vero eventually gets all the EPG data from the server but I sometimes need to Disable/Enable the TV setting to force aggregation of this.
  • I can stream a channel using this setup to my phone over Wifi using the TVHClient Android App (mux=webm) … playing via VLC Android. No stuttering at all.

For me the only difference I can see is that when the stick is plugged directly into the Vero2 the video/audio quality issues surface so I think the testing should focus on that.

The sundek config file has an option to turn logging up to “full” (possibly “max” as well) (http://wiki.sundtek.de/index.php/TreiberKonfiguration) which logs to mediasrv.log

Thanks
James

That may help. I think that I will need to dig up my Sundtek and see if I can get it to work again. Once I can replicate the problem firsthand I should be able to make some progress.

Hi Sam, any headway on the live TV issues?
I noticed Sundtek released a new driver in June so I installed that on the Vero and replugged the stick back in but the problems discussed are still apparent.

Would love to get this working with Live TV.

Thanks
James

I am still on holiday. I am back in a couple of days then I will dig up my Sundtek tuner

I have been running a Vero 2 along side and R Pi 3 on a gig network with HD Homerun Prime using Homerun app. Out of the box they both exhibited this problem. After installing the MPEG 2 license on the Pi3 and putting it in turbo mode the issue was corrected. I can not see where any of this can be done on the Vero 2. The Vero 2 was advertised to be twice as fast as the Pi3. I am starting to question that. Could use some help correcting the problem.

What makes you think the issue is a question of speed?

As soon as I can get a DVB connection established I can look at solving the problem. I would also appreciate if someone can send me a problematic clip.

It seems that your issue may be a little different because it concerns using an external tuner, not a USB attached one. The first thing I would do would be try disable Hardware accel for mpeg2 (may be a decoder issue) and upload a debug log.

Speed was a bad choice of words. Probably more like not enough resources to process the live mpeg 2 video stream. I deselected the “allow hardware acceleration- amcodec” which is the only setting I could find concerning hardware acceleration. It did not seem to make a difference one way or the other. With in 60 seconds the audio stops, with in couple of minutes the video starts to pixelate.

I did try playing some video files from NAS which did show definition floating in and out and some audio glitches but nothing like live TV from HD Homerun and I did not experience any on Pi3.

I will work on getting some logs and a clip.

Should I be stating a new thread?

Thanks

I reinstalled Vero 2 release 2016.05-1 and it appears to have corrected the problem. Had to do the same thing on the RPi3.

It appears that the problem may be 2016.06-2.

Okay – that’s interesting. The Pi 3 and Vero 2 are quite different, so I wouldn’t have expected this issue to effect both platforms.

I will try and reproduce the behaviour. I have been watching with my Vero 2, and while we did have some regressions with May, I didn’t notice anything off with the June version.

Hi Sam

Any headway on the live TV buffering?

Thanks
James

Hi James

I can’t find my Sundtek tuner (and the dish needs realigning) as I haven’t watched TV via the satellite for some time. I’ve been sent some sample problematic clips by some users, so I am working on improving playback performance on these clips

Sam

Thanks Sam, can I suggest buying a Sundtek tuner and having it shipped then testing it on DVB-T with the Vero2 ?

I’ve done so much tweaking and configuring after reading multiple how-tos and the best I can come up with is plugging the stick into a laptop then streaming the signal from tvheadend over the network, which paradoxically works better than plugging the stick into the Vero and cutting out the network completely.

Live TV on the Vero2 is barely watchable, full of stuttering, buffering and constant pops and pauses of about 0.5s in the audio, sometimes every 5 seconds or so.
Skin (Confluence) elements like the TV progress get stuck on the screen and can’t be removed without heading back to the channel selection and then hitting OK on the channel again. The OSMC skin has a black line through the TV display as mentioned in another thread.

Frustratingly, the remote just stops working sometimes, the info elements about a currently running program get stuck on the screen and the remote doesn’t clear it off. The info button on the remote sometimes doesn’t work at all.
Often requires me to use the Kodi Android ‘Kore’ remote to clean things up. When that doesn’t work I ssh into the box and restart mediacenter. The remote dongle is plugged into the rear USB port as I’ve read that works better.

HD streams are completely unwatchable so I’m limited to SD streams which behave as above. I don’t even know if this related to the stick, the Vero or the Stick/Vero/TVH combo.

I’m fairly disappointed with the Live TV experience overall in OSMC, I bought the Vero as I thought the hardware would work with the Live TV interface provided and I wanted something open, but it’s lacking.

I’m happy to provide configs and the like to try and fix all of this but I think’d it’d be better if you could duplicate this on your system and go from there.

Thanks
James

Hi James

The Sundtek stick is somewhere in the house, so let me try and find it tomorrow (Sunday).

I’m working on some improvements to TV playback for Live TV streams

Sam

Thanks for the update, if you need me to update any configs or flash any images for testing, I’m happy to help.

I’ll let you know when I have made some headway. I have a few problematic clips that I want to address first. They’ve been sent to me by some users. I suspect fixing the underlying issues with these clips will improve things across the board.

Installed the August update and plugged the stick into one of the side ports on the Vero2, the live TV works and starts playing, then stops after a minute or so, the picture breaks up and audio stops. Comes back after less than a minute and the cycle repeats but with less time in between each stoppage, until the broadcast becomes unwatchable.
Oddly, when the picture stops all the broadcast information skin widgets appear on screen.

Contrast this with plugging the stick into the laptop mentioned in this thread and both SD and HD broadcasts now work pretty much perfectly.

Must be something to do with plugging stick into the Vero2 - USB ?

Thanks
James

Hi James

Just to clarify, as this post has spanned a considerable amount of time, if you chuck the stick on the laptop, but stream it to the Vero 2, the playback is OK?

Sam