Project

General

Profile

viderrfix post processing script for mpeg-ts recordings

Added by Number B over 7 years ago

I do a decent amount of recording OTA broadcasts and I use Kodi on a Raspberry Pi 2 frontend, and more frequently then I like the recordings have various errors that make them difficult to play back on Kodi. Usually these are just mpegts container errors and sometimes worse (but those can't be helped).

Anyway, instead of just having a one-liner command I decided to spend some time making a bash script that can be called upon by tvheadend that will do an ffmpeg stream copy of your mpegts recording when it exceeds a set threshold of errors you specify. It does the stream copy (which fixes container errors) to a temp directory and when finished & the recording is not being watch it will overwrite the original recording with the new copy (this gets around having to interact with tvheadend again). It's not perfect and if your reception is terrible there's really nothing that can be done, but it does help more than not, especially on players that seem to get easily confused.

As I couldn't find anything quite like this (maybe I didn't look hard enough?) I figured I'd share what I fixed up with the community.

The github page below contains the script has more details on what's required and how to set it up and I'd appreciate some testing and feedback!

https://github.com/NumberB/viderrfix