I’d like to see an option to automatically convert the .ts files into a .mkv format after recording (just change the container with ffmpeg, no transcoding). This will be useful because the .mkv file maintains a timecode index that allows quick seeking in the file.
Currently, when seeking forward or backwards in a .ts file, it takes an extremely long time. This has a negative impact on the usability of the DVR feature.
To go even further, there would also be an option to define a set of re-encoding profiles and you could set a default for the DVR or choose per-recording. E.g., transcode mpeg2 into h.265 with a certain quality setting.
This option does exist in the form of the post-processing script option in the DVR settings. However, there has been a bug with this feature since the beginning of the year (see thread) . For changing the container, a very simple bash script would work
Yeah, I’m doing this right now but I need to beef up the script to include things like error handling, logging, disk space checking, verification of output files, management of source files (retention for troubleshooting).
I’m going to attack this in Python eventually. Anyone want to collaborate?
I have fairly robust code base going on my github for converting video files. Started it when I was using MakeMKV and have been adding for plex. I have actually been working on a watchdog (to be run as a Linux service) to convet the .ts files after they are moved to their final location because I’m sick of waiting for them to fix the post-processing bug.
I have a good deal of logging implemented, no disk space checking or file verification, besides checking return codes from ffmpeg.
I do have code for Metadata tagging in mp4 files, with data grabbed from IMDb, the tv database, and the movie database. There is also capability to download subtitles from opensubtitles and/or convert vobsob or OTA subtitles to srt; this requires some external libraries.
I had started to add mkv support, but didn’t get too far as I was more interested in getting dvr processing working. Also, didn’t find a python based editor for mkv metadata; currently using Mutagen for mp4 tagging.
@c.megalodon, the DVR post bug appears when there is more than one file in the .grab directory when DVRd shows are recorded. When Plex goes to move files to their final location, all but one disappears. A more detailed discussion is in this thread .
Also, what were the ffmpeg errors when going to mp4?
NE USA - not always in WV, but it’s a total MPEG-2 fest in these parts. Will probably change very shortly - major Nationwide upgrades/overhaul underway.
BTW: I’ve been doing exactly what this thread is about for more than 10 years with MCEBuddy, so it’s not like something that pushes the envelope of common sense, or some wild idea never thought of before… seems pretty standard actually.