Howto get recording played remotely with kodi
Added by Jeee _ over 8 years ago
I am streaming from a remote tvheadend server but when I try to play a recording in kodi (TV>Recordings) it plays very buggy and without sound. The same contents plays fine if it is played live via TV>channels (as well as with timeshift on). If I download the recording by file (.ts) via the tvheadend web interface (Recordings tab) and plug it with a usb stick into the kodi box it plays flawlessly as well.
What is causing the streamed recording to play differently then the other methods and how can I fix it so it also plays fine?
thx!
Replies (15)
RE: Howto get recording played remotely with kodi - Added by Jonathan Thomson over 8 years ago
Transcoding I would guess.
Transcoding works with live TV but does not (yet) work with recorded TV. Why is beyond me but that's how it is at the moment.
I travel a lot and take a Fire TV with Kodi on and I access my TVHeadend server from the hotel room and this is a bit of a headache for me. All I can suggest is changing to a recording profile that does stream well (which obviously lowers the quality) or what I do is use Plex (again on the Fire TV) to stream recorded content as the Plex server has built in transcoding abilities.
Slightly wasteful of resources but if you have enough disk space you could also set up a second recording profile to record two copies of the same program - one in 'pass' mode (which simply dumps the raw transport stream or .ts file) and one transcoded down to a more manageable size for streaming. It's not elegant but those are the two options I can recommend until transcoding of ALL content is implemented.
RE: Howto get recording played remotely with kodi - Added by Jeee _ over 8 years ago
the same content using htsp profile without any transcoding streams fine. I would prefer to get exactly the same as with a normal live stream since that works properly. I don't get what tvheadend/kodi are doing differently when its a recording stream instead of a live (possibly timeshifted) stream.
RE: Howto get recording played remotely with kodi - Added by Jonathan Thomson over 8 years ago
I'm confused about what you're saying now (and having re-read your original post). You can't have 'the same content' via 'TV>Channels' as 'TV>Recordings' - one is live (regardless of whether you are timeshifting or not - that simply delays the packets that would have been sent if it were live) and the other is recorded to disk in transport stream format. If you mean 'it's the same program' then that's fine but technically it's not the same content and it's important to differentiate between the two for the purposes of this issue.
Can you clarify what exactly the problem is;
When you say 'remotely' - do you mean over LAN or WAN?
Is Kodi configured to use htsp (or is htsp your default streaming profile as the TVHeadend plugin for Kodi defaults to htsp if no profile is specified)?
What format is your recording profile configured to record in? I'm guessing it's set to 'pass' if you are seeing .ts files written
Live TV (timeshifted or otherwise) works fine using htsp?
The issue is if you try and play something recorded from live TV?
RE: Howto get recording played remotely with kodi - Added by Jeee _ over 8 years ago
first of all: thx for replying; I am pulling my hair out ;-)
Jonathan Thomson wrote:
I'm confused about what you're saying now (and having re-read your original post). You can't have 'the same content' via 'TV>Channels' as 'TV>Recordings' - one is live (regardless of whether you are timeshifting or not - that simply delays the packets that would have been sent if it were live) and the other is recorded to disk in transport stream format. If you mean 'it's the same program' then that's fine but technically it's not the same content and it's important to differentiate between the two for the purposes of this issue.
I was under the impression that if I did not transcode it would be the same. When I download the file (.ts format) via the recording section in the tvheadend webinterface and put it on the kodi player it plays fine. Or is that also a different format as when it streams the recording via htsp?
Can you clarify what exactly the problem is;
When you say 'remotely' - do you mean over LAN or WAN?
WAN
Is Kodi configured to use htsp (or is htsp your default streaming profile as the TVHeadend plugin for Kodi defaults to htsp if no profile is specified)?
What format is your recording profile configured to record in? I'm guessing it's set to 'pass' if you are seeing .ts files written
The user's streaming profile is set to htsp and for the DVR recording profiles I tried setting both pass and htsp.
Live TV (timeshifted or otherwise) works fine using htsp?
yes
The issue is if you try and play something recorded from live TV?
correct
RE: Howto get recording played remotely with kodi - Added by Jonathan Thomson over 8 years ago
I'm back in my hotel room tonight so have just tried a couple of things.
If I try and stream standard definition content over the internet - it mostly works (although if the bitrate of the recording ever tops out at 3meg then the upstream on my home broadband will be saturated and the program will stutter or buffer).
If I try and play high definition content over the internet, it doesn't play well at all (pixellation and it plays almost slow motion) so this is clearly exceeding the upstream bandwidth available on my connection and possibly the downstream of the hotel wifi.
There's so many variables it's hard to pin down which might be failing you but worth checking if it's SD, HD or both that gives you trouble and also checking you aren't exceeding your upload bandwidth of the connection hosting TVHeadend.
RE: Howto get recording played remotely with kodi - Added by Jeee _ over 8 years ago
It is HD. But when I stream it live it plays fine (I also tried it with SD and had the same issue). So I assume there must be something different between the tvheadend streams (live/timeshifted or from a recording) or the way the player is handling the different types.
RE: Howto get recording played remotely with kodi - Added by Jeee _ over 8 years ago
I attached a kodi log for both cases, maybe that brings some light.
kodi-tvheadend-live-error-log.txt (222 KB) kodi-tvheadend-live-error-log.txt | live HD TV stream | ||
kodi-tvheadend-recording-error-log.txt (201 KB) kodi-tvheadend-recording-error-log.txt | recorded live HD TV stream |
RE: Howto get recording played remotely with kodi - Added by Jeee _ over 8 years ago
I checked the bandwidth usage on my router and when I play the live stream it uses ~12Mbit/s while when playing the recording it uses only ~5Mbit/s. Makes sense it cannot put 12Mbit/s of content into 5Mbit/s but why is it doing that?
RE: Howto get recording played remotely with kodi - Added by Jeee _ over 8 years ago
I tried with kodi 15.2 as well; no luck. An 16.1 kodi install on my laptop gave the same results.
RE: Howto get recording played remotely with kodi - Added by Jeee _ over 8 years ago
I created a mu3 file and pasted the http link from the tvheadend webinterface in it (since that also played fine in vlc on my laptop). Then in kodi it plays fine (except that fastforwarding etc does not seem to work).
RE: Howto get recording played remotely with kodi - Added by Jonathan Thomson over 8 years ago
This seems to be a problem with how Kodi is interpreting the container format of the video. If you look in the recorded TV error log, there are lots of errors relating to buffering and there's also some ffpmeg specific errors.
I've not had time to compare both log files thoroughly but I'll take a look ASAP (probably in the morning).
RE: Howto get recording played remotely with kodi - Added by Rusty Grizwold about 8 years ago
I seem to be having the exact same issue as well. I can play streams 8-15Mbps via live tv just fine but the recordings seems to get bottle necked somewhere. I just setup a new server with the latest TVH on it and have trans-coding capability now. Have tried several profiles and once it gets to around 5Mbps it starts freezing and going slow motion. Servers are at a remote location with plenty of upstream bandwidth and my home connection does about 80mbps down. Have tried with publishing ports 9981-9982 on firewall as well as a vpn tunnel into the network, same results.
Another note. If I run kodi on the LAN where the servers are the recordings play a lot better and bandwidth is about the same as the original stream, 12-15Mbps. I can also take the stream link from the TVH webpage and throw it into vlc at home and it works perfectly. Kodi being the culprit makes sense. Too bad since it works so well with TVH as a backend otherwise.
Thanks Guys.
RE: Howto get recording played remotely with kodi - Added by blue note about 8 years ago
I'm also having this problem, and I have it local over 1gbps. I'm concerned that the trac tickets I've seen seem to misinterpret this as somehow being latency related, or WAN dependent, when obviously this is something else going on.
RE: Howto get recording played remotely with kodi - Added by Jeee _ about 8 years ago
it's a kodi bug:
RE: Howto get recording played remotely with kodi - Added by blue note about 8 years ago
Except that deinterlacing affects this, at least for me, and there's no mention of deinterlacing there..
If you turn deinterlacing off, does playback improve?