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

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Announcements, Info, and General Discussion (/forumdisplay.php?fid=85)
+--- Forum: Tips, tricks, and step by step guides (/forumdisplay.php?fid=110)
+--- Thread: [Linux] HOW-TO watch Live TV in XBMC for Linux with Tvheadend, the easy way! (/showthread.php?tid=91716)



- _BJ1 - 2011-04-19 19:40

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 20:18

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


- kdevane - 2011-04-20 00:44

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 01:03

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 02:14

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 08:44

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 09:24

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 15:22

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 15:33

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 19:46

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.