Project

General

Profile

how to play all parts of a broken recording?

Added by Reggie Burnett about 7 years ago

Last night during Designated Survivor tvheadend seemed to "restart". not sure what happened. It just quit responding and then a few moments later it was back. It resumed recording the show. After the show was over I had 2 .ts files for the show. one of the had the ending -1. however, only the last part appeared in the web ui as a finished recording. I'm also using kodi as a front end and only the last part appeared in the kodi UI.

This thread is not about kodi. Am I supposed to see both parts in the webui? Could my recording naming rules be causing some problem with that?


Replies (5)

RE: how to play all parts of a broken recording? - Added by Robert Cameron about 7 years ago

No, Tvheadend creates successive files in case of errors/restarts. Then, only the file that completed is referenced.

You can probably concatenate all the files into one and it'll play back as a continuous file. However, the way that Tvheadend monitors the filesystem means that modifying recorded files while it is running can be problematic. You can stop Tvheadend, cat the files into a new one, and then rename that new file to match the name of the completed recording. Then, when Tvheadend is restarted it will see the completed file and serve that as the recording, which is now your new concatenated file.

I don't know of a way to do this while Tvheadend is running (for example, to make a post-processing script to join broken files), so taking it offline is the only solution I see right now. I've recently been having this problem more frequently than in the past, so I'm looking for a better solution, too.

RE: how to play all parts of a broken recording? - Added by Reggie Burnett about 7 years ago

Robert Cameron wrote:

No, Tvheadend creates successive files in case of errors/restarts. Then, only the file that completed is referenced.

You can probably concatenate all the files into one and it'll play back as a continuous file. However, the way that Tvheadend monitors the filesystem means that modifying recorded files while it is running can be problematic. You can stop Tvheadend, cat the files into a new one, and then rename that new file to match the name of the completed recording. Then, when Tvheadend is restarted it will see the completed file and serve that as the recording, which is now your new concatenated file.

I don't know of a way to do this while Tvheadend is running (for example, to make a post-processing script to join broken files), so taking it offline is the only solution I see right now. I've recently been having this problem more frequently than in the past, so I'm looking for a better solution, too.

I think I would be looking for a simpler solution in that tvheadend should simply show me all the playable parts in the web ui and be able to report them all to front ends like kodi. I'm fine with watching both parts if I have a broken recording but as it is now my wife (who is not going to go to file explorer to play the missing part in vlc) simply wouldn't be able to play the first part.

RE: how to play all parts of a broken recording? - Added by Em Smith about 7 years ago

I raised a bug last week (#4635) about this since the information about the separate files isn't tracked when tvheadend crashes so can't be reported to the UI or Kodi.

The way I work around it is to point Kodi at the recording filesystem and either browse and play the parts directly from there, or let Kodi scrape them to its library. So if I record movies and shows to separate folders and let Kodi scrape them then for failed recordings I end up with two copies in the Kodi library, one for each part.

I have a patch I use to add a format string to generate kodi-friendly file names (automatically separate directories for movies/shows, include season/episode only for tvshows, add year for movies), but I've not yet submitted it.

RE: how to play all parts of a broken recording? - Added by Reggie Burnett about 7 years ago

Em Smith wrote:

I raised a bug last week (#4635) about this since the information about the separate files isn't tracked when tvheadend crashes so can't be reported to the UI or Kodi.

The way I work around it is to point Kodi at the recording filesystem and either browse and play the parts directly from there, or let Kodi scrape them to its library. So if I record movies and shows to separate folders and let Kodi scrape them then for failed recordings I end up with two copies in the Kodi library, one for each part.

I have a patch I use to add a format string to generate kodi-friendly file names (automatically separate directories for movies/shows, include season/episode only for tvshows, add year for movies), but I've not yet submitted it.

Yeah, using kodi to look directly at the filesystem certainly works. not very user friendly for computer noobs in the family. I prefer the way HD-DVR handles it by just continuing to record to the same file. When you play it back you simply see a glitch where the recording break happened.

RE: how to play all parts of a broken recording? - Added by Em Smith about 7 years ago

Although I often play direct from the directory, perhaps I didn't make it clear that on a day-to-day basis you can just go to Kodi's "recent movies" or "recent episodes" and new programmes will show up there without having to do any file directory browsing.

You set the content of the directories once to "tvshow" or "movie" in Kodi. You do this by calling up the Kodi context menu with a long-press of your select key if you have an IR remote, or I think 'c' button otherwise; then choose set-content. Kodi will scrape them straight in to your movies/tvshows library and fetches all the metadata, cast list, pictures, etc.

There's a Kodi add-on called something like Library Update that will automatically scan the directories for updates, or you can send a command to Kodi to scan as part of the tvheadend post-record command.

    (1-5/5)