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)



- Razor_109 - 2010-08-29

hmm i'm running Tvheadend SVB-r4895.. so i guess that's not my problem.. but maybe updating does fix it.. will give it a try..

[Edit]
nope build newest SVN from tvheadend, same problem..


- bmentink - 2010-08-29

patstew Wrote:Hi Gujs,
I'd like to make a package with tvheadend pvr support for arch linux, so I was wondering what patches you have applied over the standard pvr-testing2 branch?

Hi Guys,

Another Archer here too Cool, any news on this package for Arch?

Cheers,
Bernie


- kuseman - 2010-09-01

Hi, guys.

I just installed my new AsRock 330 last nite, what i lift from my old vanilla xbox Smile

I used the xbox to watch tv from my server running tvheadend (via htsp, NOT pvr-branch), working great. The new asrock also worked great apart from one little thing. When switching to another channel xbmc sometimes starts to buffer before playing, which takes a while and is anoying, something that I never experienced with the xbox, not when watching via VLC on my desktop computer either.

Anyone know what can cause this?


- Ruud - 2010-09-02

Gujs Wrote:I already prepared a fix for that. I just don't have a time to put it on repository right now. I hope that I will manage to do it tonight.
Hi Gujs (well since this is my first post after moving over from MediaPortal to XBMC: hi everybody Wink)

I ran an apt-get update and noticed your patch dated 30-8-2010 (XBMC Pre 10.5 r33343), upgraded and now I noticed that both the EPG as well as the scheduled recordings are off +2 hours (on tvheadend a show starts at 20:00, in XBMC it starts at 22:00).
I noticed that when I schedule a recording from within XBMC it displays the wrong time, but start recording at the correct time?

What is needed to help solve this?

Thanks in advance (and thanks for this wonderful plugin!)
regards,
Ruud.


FFmpeg Transcode - Nick8888 - 2010-09-05

I've been trying to setup post process transcoding with Tvheadend just now and am struggling to find some good FFmpeg settings.

Quote:/path/to/ffmpeg -i %f -vcodec libx264 -acodec copy "/path/with white space/%b"

Is suggested here:
http://trac.lonelycoder.com/hts/wiki/tvheadend_post_recording_scripts

However doesn't seem to work. Asks for additional settings.

I'm just wondering whether anyone with a bit more experience working with video encoding has any suggestions.

http://ubuntuforums.org/showthread.php?t=786095
http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/

I've been reading through these and others but am still unable to get anything to play nicely.. videos end up very bad quality..

EDIT:
Quote:ffmpeg -i inputfile.mkv -acodec copy -vcodec libx264 -vpre veryfast -s hd480 -b 500k output.mkv
Seems to output a nice small file with decent quality for me. Still interested in hearing from experts...

On a side note, I cant get post processing within Tvheadend to work, even with minimum ffmpeg settings. Maybe a restart will do it but will leave it for another day.

EDIT2: Spoke too soon. Tvheadend is successfully transcoding after recordings now! Trick was to add the path to ffmpeg. without the path such as /usr/local/bin/ it wont work.

EDIT3: Nope not working inside Tvheadend. it outputs a file which is only a few kb. updated to new svn and problem persists


- moontan77 - 2010-09-05

does the watch tv feature work on any non free to air channels for anyone? (also google chrome does not show the channel list)


- Ruud - 2010-09-05

moontan77 Wrote:does the watch tv feature work on any non free to air channels for anyone? (also google chrome does not show the channel list)

Hi, for me it works on all channels I have a valid subscription for, o in short 'yes'
regards,
Ruud.


- pinthenet - 2010-09-05

I can't get it to work at all - the port number seems to be missing from the request so I get these errors...

Code:
Sep 05 15:13:54 HTTP: 192.168.178.133: /stream/channelid/230 -- 401

I can see wher the URL is buiklt in the source but I can't see why the port number would be missing (the ip isn't). I'm using SVN-r5327

If I try the URL with port number it works.


- Ruud - 2010-09-06

Nick8888 Wrote:EDIT3: Nope not working inside Tvheadend. it outputs a file which is only a few kb. updated to new svn and problem persists

Hi Nick,

is this similar to what I reported in the hts-devel mailing list?
If this is the same behaviour, perhaps we can 'join forces' to get this working for our setup.

Looking forward to your reply / feedback.
regards,
Ruud.


- Nick8888 - 2010-09-06

Ruud Wrote:Hi Nick,

is this similar to what I reported in the hts-devel mailing list?

Hi Ruud, that's it exactly! I read somewhere that hinted at ffmpeg having issues with running as a background process. It suggested running using something along the lines of
Code:
gnome-terminal -e "ffmpeg - i ......
but I had no luck with testing and if you've got it working with crontab then I doubt that's the issue.

I was starting to think that it may be a permissions issue, but by the sounds of things you've ruled that out as well. I'm lost for ideas but with those logs you provided the developers I'm sure they'll be on top of it.

I'm interested in commercial skipping as well so I'm sure we can work something out. That script will come in handy too. thanks!

EDIT:
Code:
gnome-terminal -x ffmpeg -i ...
Executing from the script like that works for me. The terminal will be focussed so also add
Code:
wmctrl -a xbmc
and xbmc will be focussed again.

I couldn't get logging to work doing this so I created a seperate script which runs the first one in the terminal
Code:
#!/bin/sh

f=$1
b=$2

gnome-terminal -x /path/to/first/script.sh "$f" "$b"
Run this script from tvheadend

Only thing left to do now is figure out how to make the terminal window close after it finishes transcoding


- Ruud - 2010-09-06

Hi,

just solved the 'ffmpeg not running / completing from script via post processing issue'
as it turns out when running ffmpeg, the stdin needs to be closed.

below is the ffmpeg line from my script.

/usr/bin/ffmpeg -v 0 -i "$f" -vcodec copy -acodec copy "$output" </dev/null >>/var/log/posttvheader.log 2>&1 # -v verbose level, </dev/null close STDIN, 2>&1 redirect STDERR to STDOUT

just wanted to share this for future reference: boy it was a wild goose chase on the internet Confused

regards,
Ruud.


- Razor_109 - 2010-09-06

Ruud Wrote:Hi,

just solved the 'ffmpeg not running / completing from script via post processing issue'
as it turns out when running ffmpeg, the stdin needs to be closed.

below is the ffmpeg line from my script.

/usr/bin/ffmpeg -v 0 -i "$f" -vcodec copy -acodec copy "$output" </dev/null >>/var/log/posttvheader.log 2>&1 # -v verbose level, </dev/null close STDIN, 2>&1 redirect STDERR to STDOUT

just wanted to share this for future reference: boy it was a wild goose chase on the internet Confused

regards,
Ruud.

Hmm cool.. would you be willing to share your new script? I'm also keen to get ComSkip working for my recordings Smile

I found your previous script from the HTS Mailing List but it gives me an error:

razor@tvserver:~/scripts$ ./tv_post.sh recording.mkv
./tv_post.sh: 16: let: not found
./tv_post.sh: 20: Bad substitution


- Ruud - 2010-09-06

Razor_109 Wrote:Hmm cool.. would you be willing to share your new script? I'm also keen to get ComSkip working for my recordings Smile

Sure, but currently it is stil in a proof of concept. This is what I will be making the script do:
1. after the recording convert .mkv to .mpg (as this is the format comskip can handle)
2. run comskip on the .mpg (this will create a .edl / .txt that automagically will skip commercials in xbmc)

next to that I will be running a cron script that will every night transcode 1 or 2 of the oldest .mpg's to h264 (this to make some room on my harddisk)

As I didn't find anyone who managed to compile comskip under Linux I will be running it under wine: wine comskip.exe inputfile.mpg

Only problem atm is that my ClearOS server doesn't yum wine (got some conflicting packages Stare) need to fix that before diving into scripting 'heaven' (please bare in mind that my last script attempt was in ms-dos Nerd)

Razor_109 Wrote:I found your previous script from the HTS Mailing List but it gives me an error:

razor@tvserver:~/scripts$ ./tv_post.sh recording.mkv
./tv_post.sh: 16: let: not found
./tv_post.sh: 20: Bad substitution
These error are due to certain characters not being handled very well by either my mail server or the hts-devel mailing list. I noticed this when I posted the solution above and some characters vanished into thin air Oo

regards,
Ruud..


- Nick8888 - 2010-09-07

Thanks Ruud, works perfectly. Thanks. Interested to hear how you go with wine and comskip.

@Razor_109, It's all there in the hts mailing list. you may need to do a little bit of editing. If I get some time I'll clean mine later this week and post it.


Shameless bump of my own message ;) - Ruud - 2010-09-07

Can anybody confirm this? Or am I the only one?

thanks,
Ruud.

Ruud Wrote:Hi Gujs (well since this is my first post after moving over from MediaPortal to XBMC: hi everybody Wink)

I ran an apt-get update and noticed your patch dated 30-8-2010 (XBMC Pre 10.5 r33343), upgraded and now I noticed that both the EPG as well as the scheduled recordings are off +2 hours (on tvheadend a show starts at 20:00, in XBMC it starts at 22:00).
I noticed that when I schedule a recording from within XBMC it displays the wrong time, but start recording at the correct time?

What is needed to help solve this?

Thanks in advance (and thanks for this wonderful plugin!)
regards,
Ruud.