Kodi Community Forum
Linux 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: Linux HOW-TO watch Live TV in XBMC for Linux with Tvheadend, the easy way! (/showthread.php?tid=91716)



- opdenkamp - 2011-04-18

bas.t Wrote:In addition I have some feature requests.
you could add them on trac if you like

Quote:Once deleting of a recording from within the television->recordings section results in deleting the actual .mkv file, I whould like it to be so that:
(might be done in a simple way by checking if the actual mkv file exists and otherwise don't show the log entry as a recording? So when I delete it outside of the pvr addon there whould be no problem)
that's a feature request for tvheadend, not xbmc. xbmc just displays what tvheadend tells it to display.

Quote:If I stop playback of a recording, or when it reaches the end of the file, I should get a simple popup dialog which gives me the choise to either keep the recording, or delete it, or mark it as watched.
nah, no popups. recordings will be added to the library later and will get watched flags.

Quote:Furthermore, when I instruct tvheadend to store it's recordings in a particular way, like in a separate directory for every day, I whould like the television->recordings section to show it to me in that way too (like the videos->files->etc.. section allready does).
Or it should at least give me the opportunity to let me configure the way it shows the recordings, thus possibly overriding the settings in tvheadend.
(mayby simply take ..../.hts/tvheadend/dvr/config as an argument?)
not supported by tvheadend at the moment.

Quote:Well.., there is of course the time shift, but for now I just use my humax when I really want timeshift.
it's very unlikely that I'll spend time on that before pvr merged with mainline.


- bas.t - 2011-04-18

dushmaniac Wrote:that's a feature request for tvheadend, not xbmc. xbmc just displays what tvheadend tells it to display.

Do you mean deleting of the actual mkv file is also a tvheadend issue? Or just displaying the recordings?


- opdenkamp - 2011-04-18

deleting the mkv.


- Nemphys - 2011-04-19

Just wanted to inform you that this commit:

https://github.com/opdenkamp/xbmc/commit/c80f44694e9ca18185967027af641cc81ad3414d

still has not fixed the deleting of recordings (recording is deleted in tvheadend,
not removed from the list of XBMC and after that, any action hangs XBMC).
Also, I am wondering why deleting (when it used to work in the past) a recording from XBMC does not delete the mkv file, whereas doing the same thing from the TvHeadend webui does...

PS. since today, on the EPG OSD, when scrolling over a scheduled programme, the scheduled icon disappear (and reappears when scrolling out).


- opdenkamp - 2011-04-19

ok thanks. will have to check that out then.

about deleting the recording (which never deleted the actual files): to communicate with tvheadend, xbmc uses the htsp protocol and there's nothing in there that lets you delete the recording. if you look in tvheadend's implementation, you can see that it only cancels a timer (there's no difference between a timer and a recording in tvheadend).

the web interface doesn't use htsp ofc, so if something is implemented in the webif, it doesn't mean it's available in htsp too. adding the possibility to delete files via htsp isn't much work, so feel free to implement it and send a pull request to andoma.


- _BJ1 - 2011-04-19

Today I've updated to the last ppa. When I start a record with the record button (I have to search for it, because it has moved to the bottom by redesign of confluence Wink), xbmc crash immedately. Since I use xbmc-live, it comes up after a few seconds and crashes again and again until I stop the recording via webinterface of tvheadend...

HD-Recordings are still not editable (demuxing/remuxing) by 3rd-party tools (e.g. ffmpeg), but thats an issue of tvheadend.

_BJ1


- opdenkamp - 2011-04-19

please create a ticket on trac for that issue and include a full debug log.


- kdevane - 2011-04-20

Just updated to the latest PVR copy xbmc and tvheadend from PPA this evening.

The server running tvheadend has a dual DVB-S2 tuner.

If i have tvheadend recording a program and try to access another channel from the Live TV menu xbmc just quits and restarts, this is from the log just as i select the second channel to when xbmc restarts.

http://pastebin.com/dYTSpQ0c

The problem doesn't happen when i select a channel from the vidoe menu where I have a source setup using htsp://xx.xx.xx.xx:9982/

Didn't have this problem up till i did the update this evening.


- kdevane - 2011-04-20

danz0l Wrote:Does anyone have any transcoding scripts they have written or found to convert the mkv automatically to xvid upon successful recording ?
This is the bones of a post script i use as part of removing commercial breaks.

I started from this script : Tvheadend_post_recording_scripts and working on using mencoder + comskip to remove ads and output to xvid avi.

Code:
#!/bin/bash

fext=${#f}    # length of the full path to the recording
let fext-=4    # length - extension

# Transcode to mpg
/bin/sync
output=${f:0:fext}.mpg    # add new extention to filename
edlfile=${f:0:fext}.edl
avifile=${f:0:fext}.avi

/usr/bin/ffmpeg -v 10 -i "$f" -vcodec copy -acodec copy -map 0:0 -map 0:1 -r 25 "$output"
wine "/home/xbmc/comskip/comskip.exe" "$output"

mencoder "$f" -ovc xvid -xvidencopts bitrate=1800 -oac mp3lame -lameopts vbr=5 -vf scale=624:352 -edl "$edlfile" -o "$avifile"



- danz0l - 2011-04-20

kdevane Wrote:This is the bones of a post script i use as part of removing commercial breaks.

I started from this script : Tvheadend_post_recording_scripts and working on using mencoder + comskip to remove ads and output to xvid avi.

Code:
#!/bin/bash

fext=${#f}    # length of the full path to the recording
let fext-=4    # length - extension

# Transcode to mpg
/bin/sync
output=${f:0:fext}.mpg    # add new extention to filename
edlfile=${f:0:fext}.edl
avifile=${f:0:fext}.avi

/usr/bin/ffmpeg -v 10 -i "$f" -vcodec copy -acodec copy -map 0:0 -map 0:1 -r 25 "$output"
wine "/home/xbmc/comskip/comskip.exe" "$output"

mencoder "$f" -ovc xvid -xvidencopts bitrate=1800 -oac mp3lame -lameopts vbr=5 -vf scale=624:352 -edl "$edlfile" -o "$avifile"

kdevane thank you so much for posting this. After compiling and recompiling mencoder, ffmpeg etc etc and following countless guides i just about to give up then I tried your settings. The ffmpeg trancode to mpeg seems to work perfectly and mencoder options seem near perfect. However on some im getting audo sync issues and many 1 duplicate frame(s)! from mencoder, have you had those ? I am wondering if its a interlacing issue perhaps ?

How are you finding comskip, is it working as expected or hit and miss ? And do you pass any parameters to this script ?

Thanks again mate.


- kdevane - 2011-04-20

Hi danz0l,

danz0l Wrote:kdevane thank you so much for posting this. After compiling and recompiling mencoder, ffmpeg etc etc and following countless guides i just about to give up then I tried your settings. The ffmpeg trancode to mpeg seems to work perfectly and mencoder options seem near perfect. However on some im getting audo sync issues and many 1 duplicate frame(s)! from mencoder, have you had those ? I am wondering if its a interlacing issue perhaps ?

Glad to hear you got it to work. To be honest i've only used the script a few times and not noticed any sync issues. Most my of my recordings are SD, i don't have a HD sub and there are only few HD channels available on freeview. Most of what is in the script are bits i've picked up here and there from google searches and modifying setting to suit my needs. I think i should have been able to use ffmpeg to create the xvid file, but for some reason it was giving me errors and i switched to mencoder.

danz0l Wrote:How are you finding comskip, is it working as expected or hit and miss ? And do you pass any parameters to this script ?

Just got it working in the last week, it's a bit hit and miss. Been pretty ok with most channels i've tried. Tried a recording off discovery the other night, it didn't locate a single ad break. And after too much time adjusting settings it didn't get close to mathcing the ad breaks. All the settings are store in a comskip.ini file.

Best of luck
Kevin


- danz0l - 2011-04-20

kdevane Wrote:Hi danz0l, Glad to hear you got it to work. To be honest i've only used the script a few times and not noticed any sync issues. Most my of my recordings are SD, i don't have a HD sub and there are only few HD channels available on freeview. Most of what is in the script are bits i've picked up here and there from google searches and modifying setting to suit my needs. I think i should have been able to use ffmpeg to create the xvid file, but for some reason it was giving me errors and i switched to mencoder.

Hi kevin, and thanks again mate.

Yes its skipping one frame in two and i think i read somewhere there is a flaw with the mkv container that tvheadend writes to. The conversion to mpg keeps the audio sync issues and mencoder then has issues as reported above (pushing the audio out of sync). My stuff is recorded from SD freesat.

I have been able to fix this by using VideoReDo in windows and saving out the mpg (after cutting out the ads etc) but was hoping a solution of encode and ad removal on linux would be better. FFmpeg gets me mixed results to be honest and your settings for mencoder would be fantastic if could just fix these sync issues with the stream.

Quote:Just got it working in the last week, it's a bit hit and miss. Been pretty ok with most channels i've tried. Tried a recording off discovery the other night, it didn't locate a single ad break. And after too much time adjusting settings it didn't get close to mathcing the ad breaks. All the settings are store in a comskip.ini file.

Best of luck
Kevin

Ah yes i assumed it would be hit and miss. Shame, looks like a manual edit is the only sure fire way of achieving this.

I'll keep working on it and let you know if i come up with further, better solutions. Thanks mate.


- bas.t - 2011-04-20

Hi to all.

Does anyone recognise this: when playing "Nederland 1 HD" in livetv, it shows subtitles from TT page 888 (for people with hearing problems).
I tried disabling teletext altogether, but no luck.
As far as I know, no other channel does this, SD or HD.

When I record a program from "Nederland 1 HD", Dutch language of course, and play it later, I don't see the TT subtitles.

Well, I'd love to hear from anyone who found the trick to stop this behaviour.


Cheers!

Bas.


- opdenkamp - 2011-04-20

while playing the stream, press M, go to the audio settings and disable subtitles. there's some keyboard shortcut for it too. once you disabled it, xbmc will remember those channel settings.

the reason why only ned.1 is showing that behaviour is that it's one of the only channels here in holland that is using TT888 subtitles.


- bas.t - 2011-04-20

dushmaniac Wrote:while playing the stream, press M, go to the audio settings and disable subtitles. there's some keyboard shortcut for it too. once you disabled it, xbmc will remember those channel settings.

the reason why only ned.1 is showing that behaviour is that it's one of the only channels here in holland that is using TT888 subtitles.

Thanks alot again!

Bas.