Kodi Community Forum
[OLD] HOW-TO watch Live TV in XBMC for Linux with Tvheadend, the easy way! - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Tips, tricks, and step by step guides (https://forum.kodi.tv/forumdisplay.php?fid=110)
+--- Thread: [OLD] HOW-TO watch Live TV in XBMC for Linux with Tvheadend, the easy way! (/showthread.php?tid=51945)



Video Quality/VDPau - akr884 - 2010-11-04

I read on another thread that VDPau is activated with tvheadend, but I wondered if someone could clarify because:

I've played around with VDR VNI server and it seems like the video quality is subjectively better. I don't get motion streaking that I get with tvheadend on SD and HD channels and the picture quality just generally looks better.

Also with tvheadend, if I have automatic selection under the video mode dialog (while watching a video) then I get stuttering on HD channels until I turn it to 'none', but then I have bad motion streaking (really noticeable with white scrolling text).

I have an AverTV Volar Black HD tuner and a Zotac MAG nvidia ion box under Ubuntu 10.4.1 Lucid with Dushmaniac's svn for XBMC and tvheadend up-to-date.


- opdenkamp - 2010-11-04

fl0w Wrote:Does Tvheadend use a lot of RAM?
it's currently using about 26MB of ram here

akr884 Wrote:I read on another thread that VDPau is activated with tvheadend, but I wondered if someone could clarify because:

I've played around with VDR VNI server and it seems like the video quality is subjectively better. I don't get motion streaking that I get with tvheadend on SD and HD channels and the picture quality just generally looks better.
are you deinterlacing the video? (while playing a stream, go to video setting -> interlaced handling -> vdpau)

Quote:Also with tvheadend, if I have automatic selection under the video mode dialog (while watching a video) then I get stuttering on HD channels until I turn it to 'none', but then I have bad motion streaking (really noticeable with white scrolling text).
disable deinterlacing on channels that are not interlaced


- akr884 - 2010-11-04

dushmaniac Wrote:are you deinterlacing the video? (while playing a stream, go to video setting -> interlaced handling -> vdpau)

disable deinterlacing on channels that are not interlaced

It seems like that was the default for all channels to deinterlace - I get dvb-t signal here in Spain, and I just read that deinterlacing is for analog and 1080i signals which makes me think I shouldn't need it activated.

Generally though, there's a motion blur with tvheadend + XBMC that deinterlacing helps with at the cost at producing blurrier still images (tv station logos are blurrier and sometimes 'jump' around a little bit with deinterlacing enabled).

EDIT: So I did a test with VDR + XBMC vs tvheadend + XBMC and they both have the motion blur, probably my crappy tv tuner card.


- opdenkamp - 2010-11-04

akr884 Wrote:It seems like that was the default for all channels to deinterlace - I get dvb-t signal here in Spain, and I just read that deinterlacing is for analog and 1080i signals which makes me think I shouldn't need it activated.
it's for any interlaced channels, so (most?) sd streams too.

Quote:EDIT: So I did a test with VDR + XBMC vs tvheadend + XBMC and they both have the motion blur, probably my crappy tv tuner card.
mine is set to "(VDPAU) Temporal" and the image is fine here. If I don't enable deinterlacing I get distorted images when there is a lot of movement on the screen.


- akr884 - 2010-11-05

Thanks a lot for the response dushmaniac. That helps a lot to smooth out the motion blug and it doesn't cause any stuttering on the HD channels.

I makes me wonder why 'Automatic Selection' wouldn't chose VDPAU (temporal) by default though for deinterlacing.


- opdenkamp - 2010-11-05

I don't think the autodetect thing is working (properly) at the moment.

I just put a new build of xbmc on my ppa which will be published within 30 minutes with a new setting: "EPG offset correction".

If your EPG times are off, go to the tvheadend addon options and change the "EPG offset correction" (which is in hours). After changing that setting, clear your EPG database or it won't work.

edit:
I also added builds for Karmic. Same warning as for Maverick: these builds have not been tested. The only check I did on those are installation checks. If it doesn't work for you, report it here or use the Lucid builds.

If you're not running Ubuntu, grab the updated sources from github: git://github.com/opdenkamp/xbmc.git


- Ruud - 2010-11-05

dushmaniac Wrote:I just put a new build of xbmc on my ppa which will be published within 30 minutes with a new setting: "EPG offset correction".

If your EPG times are off, go to the tvheadend addon options and change the "EPG offset correction" (which is in hours). After changing that setting, clear your EPG database or it won't work.

Hi,

just upgrade to your new version: tested it and can confirm that it works but I am not sure if it works as expected.... when I set an offset of -1 it adds 1 hour to the start time: I would expect that it would deduct 1 hour?

Also it would 'feel' more natural if the offset variable could be set in the epg part of the tv config instead of in the pvr addon... not sure if this is possible tho

regards,
Ruud.


- opdenkamp - 2010-11-05

Ruud Wrote:when I set an offset of -1 it adds 1 hour to the start time: I would expect that it would deduct 1 hour?
This is the way I expected it to work, because adding to the offset is compensated. I'l do it the otherway around in the next version so it'll "feel more natural" Smile

Quote:Also it would 'feel' more natural if the offset variable could be set in the epg part of the tv config instead of in the pvr addon... not sure if this is possible tho
everything is possible, but I put it away in the tvheadend addon because I didn't want to change anything in the other pvr sources until they are merged with trunk.

edit:
the offset correction is inverted now on git. it'll be included in the next build.


- Ruud - 2010-11-05

dushmaniac Wrote:This is the way I expected it to work, because adding to the offset is compensated. I'l do it the otherway around in the next version so it'll "feel more natural" Smile

you're right when looking from that perspective Wink but -1 for deducting and +1 for adding is more intuitive Cool

Keep up the good work!
highly appreciated Nod

regards,
Ruud.


- redstorm - 2010-11-06

When i try to watch a live TV channel i get "no input detected" This is from a machine running xbmc beta 4 remotely against the TVheadend server...

Any ideas?

DEBUG: CHTSPSession::Open - connected to server: [HTS Tvheadend], version: [2.11.99.4965], proto: 5
14:49:51 T:2861353840 M:704802816 NOTICE: Creating Demuxer
14:49:51 T:2861353840 M:704802816 DEBUG: CHTSPSession:TonguearseChannelUpdate - id:11, name:'C4', icon:'http://www.freeviewnz.tv/images/uploads/logo-opg-c4-red$
14:49:51 T:2861353840 M:704802816 DEBUG: CHTSPSession:TonguearseChannelUpdate - id:9, name:'C42', icon:'http://www.freeviewnz.tv/images/uploads/c42_107x35.jpg'$
14:49:51 T:2861353840 M:704802816 DEBUG: CHTSPSession:TonguearseChannelUpdate - id:5, name:'ChineseTV', icon:'http://www.freeviewnz.tv/images/uploads/ctv8.gif'$
14:49:51 T:2861353840 M:704802816 DEBUG: CHTSPSession:TonguearseChannelUpdate - id:8, name:'Maori Television', icon:'http://www.freeviewnz.tv/images/uploads/ma$
14:49:51 T:2861353840 M:704802816 DEBUG: CHTSPSession:TonguearseChannelUpdate - id:4, name:'PRIME', icon:'http://www.freeviewnz.tv/images/uploads/Prime_TV_107x$
14:49:51 T:2861353840 M:704802816 DEBUG: CHTSPSession:TonguearseChannelUpdate - id:7, name:'Parliament TV', icon:'http://www.freeviewnz.tv/images/uploads/parli$
14:49:51 T:2861353840 M:704802816 DEBUG: CHTSPSession:TonguearseChannelUpdate - id:16, name:'TV ONE', icon:'http://www.freeviewnz.tv/images/uploads/tv_one.jpg'$
14:49:51 T:2861353840 M:704802816 DEBUG: CHTSPSession:TonguearseChannelUpdate - id:15, name:'TV2', icon:'http://www.freeviewnz.tv/images/uploads/tv_2.jpg', eve$
14:49:51 T:2861353840 M:704802816 DEBUG: CHTSPSession:TonguearseChannelUpdate - id:12, name:'TV3', icon:'http://www.freeviewnz.tv/images/uploads/tv_3.jpg', eve$
14:49:51 T:2861353840 M:704802816 DEBUG: CHTSPSession:TonguearseChannelUpdate - id:10, name:'TV3 PLUS1', icon:'http://www.freeviewnz.tv/images/uploads/freeview$
14:49:51 T:2861353840 M:704802816 DEBUG: CHTSPSession:TonguearseChannelUpdate - id:3, name:'TV33', icon:'http://www.freeviewnz.tv/images/uploads/tv33_107x35.jp$
14:49:51 T:2861353840 M:704802816 DEBUG: CHTSPSession:TonguearseChannelUpdate - id:14, name:'TVNZ 6', icon:'http://www.freeviewnz.tv/images/uploads/tvnz_6.jpg'$
14:49:51 T:2861353840 M:704802816 DEBUG: CHTSPSession:TonguearseChannelUpdate - id:13, name:'TVNZ 7', icon:'http://www.freeviewnz.tv/images/uploads/TVNZ_7.jpg'$
14:49:51 T:2861353840 M:704802816 DEBUG: CHTSPSession:TonguearseChannelUpdate - id:1, name:'tvCentral', icon:'http://www.freeviewnz.tv/images/uploads/tvcentral$
14:49:52 T:3054442368 M:704802816 DEBUG: ------ Window Init (DialogBusy.xml) ------
14:49:52 T:3054442368 M:704802816 DEBUG: Alloc resources: 0.01ms (0.00 ms skin load)
14:50:00 T:2861353840 M:704724992 DEBUG: CHTSPSession:TonguearseChannelUpdate - id:14, name:'(null)', icon:'(null)', event:7098
14:50:03 T:2861353840 M:704724992 DEBUG: Previous line repeats 1 times.
14:50:03 T:2861353840 M:704724992 DEBUG: CDVDDemuxHTSP::SubscriptionStatus - No input detected
14:50:03 T:2861353840 M:704724992 DEBUG: CHTSPSession:TonguearseEvent - id:7081, title:'Eggheads', desc:'Quiz show champions put their reputations on the line $
14:50:03 T:2861353840 M:704724992 DEBUG: CGUIInfoManager::SetCurrentMovie(htsp://user:[email protected]:9982/tags/0/4.ts)
14:50:03 T:2861353840 M:704724992 DEBUG: CDVDPlayer::SetCaching - caching state 2
14:50:03 T:2861353840 M:704724992 WARNING: CDVDMessageQueue(audio):Tongueut MSGQ_NOT_INITIALIZED
14:50:03 T:2861353840 M:704724992 WARNING: CDVDMessageQueue(video):Tongueut MSGQ_NOT_INITIALIZED
14:50:03 T:2861353840 M:704724992 DEBUG: CDVDPlayer::SetCaching - caching state 3
14:50:03 T:2861353840 M:704724992 DEBUG: CDVDPlayer::SetCaching - caching state 0
14:50:03 T:3054442368 M:704724992 DEBUG: CGUIAudioManager:Big GrineInitialize
14:50:03 T:3054442368 M:704724992 DEBUG: CAnnouncementManager - Announcement: PlaybackStarted from xbmc
14:50:03 T:3054442368 M:704352256 DEBUG: CGUIInfoManager::SetCurrentMovie(htsp://user:[email protected]:9982/tags/0/4.ts)
14:50:03 T:3054442368 M:704352256 DEBUG: ------ Window Init (DialogKaiToast.xml) ------
14:50:03 T:3054442368 M:704352256 DEBUG: Alloc resources: 0.01ms (0.00 ms skin load)
14:50:03 T:2880854896 M:704352256 DEBUG: thread start, auto delete: 0
14:50:03 T:3054442368 M:704352256 DEBUG: ------ Window Deinit (DialogBusy.xml) ------


- opdenkamp - 2010-11-06

That error is reported by tvheadend and means that channel can't be received (bad signal?) or is not transmitting anything.

Check your tvheadend logs and check your signal (or record a couple of minutes via the webui and try to play that). Also, you might want to try upgrading your tvheadend. You're running svn rev. 4965 and tvheadend's currently at rev 5558. This problem could have been fixed already.


- CrashX - 2010-11-06

I tried to apply your patch to tvheadend trunk and got the following error:

Code:
git apply --check  0002-add-signal-status-in-HTSP.patch
error: patch failed: src/transports.c:1050
error: src/transports.c: patch does not apply
error: patch failed: src/transports.h:100
error: src/transports.h: patch does not apply



- opdenkamp - 2010-11-06

probably some change in tvheadend that prevents it from applying cleanly. I'll update them later today.

the problem with choppy sound on radio channels is fixed on git. it'll be included in the next ppa build.


- redstorm - 2010-11-06

Log message was

Code:
Nov 07 02:33:11 TS: Sundtek DVB-T/Freeview : 538,000 kHz/TV2: Transport error indicator, 997148 duplicate log lines suppressed
Nov 07 02:33:11 Transport: Sundtek DVB-T/Freeview : 538,000 kHz/TV2: Status changed to [Hardware input] [Graceperiod expired]
Nov 07 02:33:12 TS: Sundtek DVB-T/Freeview : 538,000 kHz/TV2: Transport error indicator, 1003222 duplicate log lines suppressed
Nov 07 02:33:14 Transport: Sundtek DVB-T/Freeview : 538,000 kHz/TV2: Status changed to [Hardware input]
Nov 07 02:33:14 TS: Sundtek DVB-T/Freeview : 538,000 kHz/TV2: Transport error indicator, 1005351 duplicate log lines suppressed
Nov 07 02:33:15 TS: Sundtek DVB-T/Freeview : 538,000 kHz/TV2: Transport error indicator, 1006969 duplicate log lines suppressed
Nov 07 02:33:16 TS: Sundtek DVB-T/Freeview : 538,000 kHz/TV2: Transport error indicator, 1011190 duplicate log lines suppressed
Nov 07 02:33:17 TS: Sundtek DVB-T/Freeview : 538,000 kHz/TV2: Transport error indicator, 1015184 duplicate log lines suppressed
Nov 07 02:33:18 TS: Sundtek DVB-T/Freeview : 538,000 kHz/TV2: Transport error indicator, 1019609 duplicate log lines suppressed
Nov 07 02:33:19 TS: Sundtek DVB-T/Freeview : 538,000 kHz/TV2: Transport error indicator, 1024314 duplicate log lines suppressed
Nov 07 02:33:20 TS: Sundtek DVB-T/Freeview : 538,000 kHz/TV2: Transport error indicator, 1030158 duplicate log lines suppressed
Nov 07 02:33:21 TS: Sundtek DVB-T/Freeview : 538,000 kHz/TV2: Transport error indicator, 1036033 duplicate log lines suppressed
Nov 07 02:33:22 TS: Sundtek DVB-T/Freeview : 538,000 kHz/TV2: Transport error indicator, 1043276 duplicate log lines suppressed

downloaded and compiled the svn 5582 and now the tv channels show but with no sound..

and when i say show i mean visiable but looks like vdpau may not be working as its jerky as. but i can record and play no problem (hardware is an zotac ION)

Code:
Loglevel debug: enabled
Nov 07 02:46:02 htsp: Got connection from 127.0.0.1
Nov 07 02:46:02 htsp: 127.0.0.1: Welcomed client software: XBMC Media Center
Nov 07 02:46:02 htsp: 127.0.0.1 [ XBMC Media Center ]: Identified as user tvheadend
Nov 07 02:46:02 htsp: 127.0.0.1 [ tvheadend | XBMC Media Center ]: Privileges raised
Nov 07 02:46:09 htsp: Got connection from 127.0.0.1
Nov 07 02:46:09 htsp: 127.0.0.1: Welcomed client software: XBMC Media Center
Nov 07 02:46:09 htsp: 127.0.0.1 [ XBMC Media Center ]: Identified as user tvheadend
Nov 07 02:46:09 htsp: 127.0.0.1 [ tvheadend | XBMC Media Center ]: Privileges raised
Nov 07 02:46:09 subscription: "127.0.0.1 [ tvheadend | XBMC Media Center ]" subscribing on "TV2", weight: 150, adapter: "Sundtek DVB-T", network: "Freeview ", mux: "Freeview : 538,000 kHz", provider: "TVNZ", service: "TV2", quality: 100
Nov 07 02:46:09 Transport: Sundtek DVB-T/Freeview : 538,000 kHz/TV2: Status changed to [Hardware input]
Nov 07 02:46:09 Transport: Sundtek DVB-T/Freeview : 538,000 kHz/TV2: Status changed to [Hardware input] [Input on service]
Nov 07 02:46:09 Transport: Sundtek DVB-T/Freeview : 538,000 kHz/TV2: Status changed to [Hardware input] [Input on service] [Demuxed packets]
Nov 07 02:46:10 Transport: Sundtek DVB-T/Freeview : 538,000 kHz/TV2: Status changed to [Hardware input] [Input on service] [Demuxed packets] [Reassembled packets]
Nov 07 02:47:03 htsp: 127.0.0.1 [ tvheadend | XBMC Media Center ]: Disconnected
Nov 07 02:47:36 htsp: 127.0.0.1 [ tvheadend | XBMC Media Center ]: Disconnected

from memory the no sound issue might be related to the channels having AAC audio streams, no transcoding on the fly yet... but ok if you record...

Sample of the xbmc.log
Code:
02:56:17 T:2699029392 M:1185554432   ERROR: ffmpeg[A0DFEB90]: [h264_vdpau] illegal short term buffer state detected
02:56:17 T:2699029392 M:1185554432   ERROR: ffmpeg[A0DFEB90]: [h264_vdpau] reference picture missing during reorder
02:56:17 T:2699029392 M:1185554432   ERROR: ffmpeg[A0DFEB90]: [h264_vdpau] Missing reference picture
02:56:17 T:2649734032 M:1185554432   ERROR: CDVDAudioCodecLibFaad() : unable to init faad
02:56:18 T:2699029392 M:1185656832   ERROR: Previous line repeats 3 times.
02:56:18 T:2699029392 M:1185656832   ERROR: ffmpeg[A0DFEB90]: [h264_vdpau] illegal short term buffer state detected
02:56:18 T:2649734032 M:1185656832   ERROR: CDVDAudioCodecLibFaad() : unable to init faad
02:56:18 T:2699029392 M:1185656832   ERROR: ffmpeg[A0DFEB90]: [h264_vdpau] illegal short term buffer state detected
02:56:18 T:2699029392 M:1185656832   ERROR: ffmpeg[A0DFEB90]: [h264_vdpau] mmco: unref short failure
02:56:18 T:2649734032 M:1185529856   ERROR: Previous line repeats 1 times.
02:56:18 T:2649734032 M:1185529856   ERROR: CDVDAudioCodecLibFaad() : unable to init faad
02:56:19 T:2699029392 M:1185656832   ERROR: Previous line repeats 15 times.
02:56:19 T:2699029392 M:1185656832   ERROR: ffmpeg[A0DFEB90]: [h264_vdpau] mmco: unref short failure
02:56:19 T:2649734032 M:1185656832   ERROR: CDVDAudioCodecLibFaad() : unable to init faad



- opdenkamp - 2010-11-06

redstorm Wrote:from memory the no sound issue might be related to the channels having AAC audio streams, no transcoding on the fly yet... but ok if you record...

Sample of the xbmc.log
Code:
02:56:17 T:2699029392 M:1185554432   ERROR: ffmpeg[A0DFEB90]: [h264_vdpau] illegal short term buffer state detected
02:56:17 T:2699029392 M:1185554432   ERROR: ffmpeg[A0DFEB90]: [h264_vdpau] reference picture missing during reorder
02:56:17 T:2699029392 M:1185554432   ERROR: ffmpeg[A0DFEB90]: [h264_vdpau] Missing reference picture
02:56:17 T:2649734032 M:1185554432   ERROR: CDVDAudioCodecLibFaad() : unable to init faad
02:56:18 T:2699029392 M:1185656832   ERROR: Previous line repeats 3 times.
02:56:18 T:2699029392 M:1185656832   ERROR: ffmpeg[A0DFEB90]: [h264_vdpau] illegal short term buffer state detected
02:56:18 T:2649734032 M:1185656832   ERROR: CDVDAudioCodecLibFaad() : unable to init faad
02:56:18 T:2699029392 M:1185656832   ERROR: ffmpeg[A0DFEB90]: [h264_vdpau] illegal short term buffer state detected
02:56:18 T:2699029392 M:1185656832   ERROR: ffmpeg[A0DFEB90]: [h264_vdpau] mmco: unref short failure
02:56:18 T:2649734032 M:1185529856   ERROR: Previous line repeats 1 times.
02:56:18 T:2649734032 M:1185529856   ERROR: CDVDAudioCodecLibFaad() : unable to init faad
02:56:19 T:2699029392 M:1185656832   ERROR: Previous line repeats 15 times.
02:56:19 T:2699029392 M:1185656832   ERROR: ffmpeg[A0DFEB90]: [h264_vdpau] mmco: unref short failure
02:56:19 T:2649734032 M:1185656832   ERROR: CDVDAudioCodecLibFaad() : unable to init faad

that last part of your message was not shown by the forum for some reason, saw it when I pressed the quote button Smile

Code:
02:56:17 T:2699029392 M:1185554432   ERROR: ffmpeg[A0DFEB90]: [h264_vdpau] illegal short term buffer state detected
02:56:17 T:2699029392 M:1185554432   ERROR: ffmpeg[A0DFEB90]: [h264_vdpau] reference picture missing during reorder
02:56:17 T:2699029392 M:1185554432   ERROR: ffmpeg[A0DFEB90]: [h264_vdpau] Missing reference picture
02:56:17 T:2649734032 M:1185554432   ERROR: CDVDAudioCodecLibFaad() : unable to init faad
there's something off with that stream. what kind of stream is it?