If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post. I'd recommend not using a Yahoo or Verizon email account - the registration emails often disappear into a black hole. To start viewing messages,
select the forum that you want to visit from the selection below.

If you don't get your account activation email, check your spam folder. If it's not there, send a PM to the user account 'sub' and he'll help you out.

converting .ts files

would love to have an option to have software automatically convert recorded ts file to mpeg
wintv8 does this but i prefer using nextpvr because it can record new series, but i am having issues using videostream casting to chromecast with .ts file, cant skip ahead or go back
thanks

would love to have an option to have software automatically convert recorded ts file to mpeg
wintv8 does this but i prefer using nextpvr because it can record new series, but i am having issues using videostream casting to chromecast with .ts file, cant skip ahead or go back
thanks

I use a semi-complex setup to automatically convert all my .ts files to .mp4. I have written a Delphi application that looks at the npvr.db3 database and gets a sorted list of any .ts files in the database with the oldest first. The program then copies that file to a special directory where it will get converted to .mp4. This is something that could be done using MCEBuddy, but I had some problems with that losing the audio on some recordings.

What I have now is a separate Linux box where I copy the file to, and a cron job looks for a new file then runs a script that calls Handbrake command line to convert it to .mp4 and deletes the .ts file when done. The missing .ts file is the signal for my Delphi program to copy the .mp4 file to the NPVR video directory and then update the NPVR.DB3 database with the new filename and then deletes the .ts file.

The .mp4 files end up taking between 10 and 20% of the size of the .ts file so it greatly improves my storage of them.

I use a separate Linux box to offload the overhead of the file conversion so it doesn't affect my NPVR box which might be recording 4 shows simultaneously. There is however a Windows command line version of Handbrake that could be run on the same box.

All in all it works pretty well and is fairly automatic. The only problems is that occasionally the SQLLite database gets stuck and it messes up NPVR until I restart the recording process and sometimes need to Vacuum the database and/or reboot. The other problem is when a filename has some foreign accented characters in the name (that's you Hawaii 5-0) and the file copy functions have problems.

It's not quite foolproof enough for me to make available for general use, but if anyone that has Delphi experience is interested in experimenting with it I hope to have some time available to fiddle with it some more.

FWIW, here is the Handbrake command line that I use if you want to try manually converting any files. Note this is from a bash script so the $1 is analagous to %1 in a DOS batch file.

The missing .ts file is the signal for my Delphi program to copy the .mp4 file to the NPVR video directory and then update the NPVR.DB3 database with the new filename and then deletes the .ts file.
Steve Tyrakowski

Technically, you don't need to update the database with the new file name. Whilst doing so is obviously "neater", I was just pondering if not doing so might help you with your db locking issue.

"If a .ts file is missing, it'll check the same name with .mpg/.avi/.wtv/.dvr-ms/.mp4/.mkv/m4v. Case is important. It only looks for lower case file extensions. "

Also make sure you don't have UpdateEPGduringLiveTV enabled as that was a common cause of db locking issues.

I presume your bash script is dropping the dot and extension from the file name before calling the CLI. (for the benefit of others)

If I do not update the database with the new extension, will NPVR do it, or does it just look for the other extensions when you try to play it? I need it updated so I can find out which file I need to transcode next by looking for the *.TS files in the database.

And yes, I pass the filename with the dot and extension omitted so that the script knows how to complete the input and output filenames from it.

When it comes time for NextPVR to play a file, it take the title of the recording, adds the .ts file extension and then searches the appropriate directory for the file name. If that file name is not found, then the title of the recording and one of the following extensions - .mpg/.avi/.wtv/.dvr-ms/.mp4/.mkv/m4v is used to create a file name and the appropriate directory is searched. This file name creation/searching process is continues until either the file name is found or all of the file extensions have been exhausted.

It would be nice if all titles with multiple extensions were listed in the details pages so that a tile could be selected and played by file extension,not just the title.

The full filename is actually in the database. The Video Library is designed for playing files that are not recorded. Since non ts files can't be played on clients using the library is a better choice in most cases.