Project

General

Profile

Recordings: Inplace exchange of files so TVH doesn't notice

Added by Bernd Hohmann almost 2 years ago

Environment: Debian 11, tvheadend, ffmpeg etc. latest releases & self compiled.

I wrote a bash script for striping unneeded data and compress video/audio of recordings further.

Now I want to replace the original TS recording with the compressed version in a way tvheadend doesn't notice.

I tried "mv compressed.ts $recordings/originalfilename.ts" and "cp" too.

In both cases, the recording isn't visible in tvheadend (and Kodi too) anymore.

Any idea or pointers to solve this? (I searched forum and the net already, there was a suggestion to use "mv" - but this failed).

Bernd


Replies (3)

RE: Recordings: Inplace exchange of files so TVH doesn't notice - Added by Dave Pickles almost 2 years ago

Do the recordings reappear if you stop and restart Tvheadend?

TVH uses inotify to monitor the filesystem so it will notice if a file is altered or replaced. However the only information TVH keeps about a recording is the file path and name, so it should find the new version on restart.

I believe the correct way to postprocess recordings is to use the "post-processor command" option in Configuration -> Recording, however I've never tried it.

RE: Recordings: Inplace exchange of files so TVH doesn't notice - Added by Bernd Hohmann almost 2 years ago

After a restart, the recording is visible again. Thanks a lot!

I think the postprocessing feature isn't an option for me because there is no queueing and I don't think, the little machine can bear more than one compression task at once.

Bernd

RE: Recordings: Inplace exchange of files so TVH doesn't notice - Added by Bernd Hohmann almost 2 years ago

Supplement:

My workflow was wrong (forgot the real disk layout):

I was compressing the source file from a fast SSD to the boot partition on a slow CF card used for Booting and OS.

After compressing, it was "moved" (copied in reality) from CF card to SSD. Thats why tvheadend lost track of the file.

Changed it in a way that source and destination of the "mv" command are on the same disk and same partition.

Thanks again for your help Dave!

Bernd

    (1-3/3)