Mailing List Archive

.ts files
Hi

I was rearranging my recordings recently and noticed a lot of files
in the top level of my recording disks.
The default storage group has these directories
/var/lib/mythtv
/data/disk1/mythtv/
/data/disk2/mythtv/

and in e.g /data/disk1/mythtv/ there sit numerous files named like
1024_20180106082900.ts and 1024_20180106082900.ts.png.

I can see they are MPEG transport stream data and .png thumbnails,
and that the 1024_ prefix is the chanid and the rest a start date.
But the question is what creates them and what should be cleaning
them up?
I can't find counterparts in the recordings/ or livetv subdirectories.
All my recordings are DVB-T, no analog signals involved here.

I haven't found anything in the wiki but I'm happy to add something
if people can explain and steer me to the right place to edit.

Kind regards

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: .ts files [ In reply to ]
On Wed, 12 Aug 2020 18:49:20 +1000, you wrote:

>Hi
>
>I was rearranging my recordings recently and noticed a lot of files
>in the top level of my recording disks.
>The default storage group has these directories
> /var/lib/mythtv
> /data/disk1/mythtv/
> /data/disk2/mythtv/
>
>and in e.g /data/disk1/mythtv/ there sit numerous files named like
>1024_20180106082900.ts and 1024_20180106082900.ts.png.
>
>I can see they are MPEG transport stream data and .png thumbnails,
>and that the 1024_ prefix is the chanid and the rest a start date.
>But the question is what creates them and what should be cleaning
>them up?
>I can't find counterparts in the recordings/ or livetv subdirectories.
>All my recordings are DVB-T, no analog signals involved here.
>
>I haven't found anything in the wiki but I'm happy to add something
>if people can explain and steer me to the right place to edit.
>
>Kind regards

Those are recording files. MythTV changed some time ago to using the
.ts extension for transport stream recordings (DVB, ATSC, ISDB, ...).
For a long time it used to put .mpg on the files, which is slightly
misleading as .mpg implies program streams and they were actually
transport streams. But the content is what actually matters, not
whatever extension the file has on it. If you are still doing
analogue recordings using things like a PVR-500 card, those should get
the .mpg extent ion still. There are three valid extensions that
MythTV supports for recording files: .ts, .mpg and .nuv. But if you
manually put a file into the database with a different extension, it
will not have a problem with playing it. So if you have a user job
that converts your PVR-500 .mpg files to H.264 or H.265 and puts the
result in a .mp4 file, as long as the job script adjusts the file name
in the database from .mpg to .mp4, it will work fine.

To find out what one of your .ts files is, do this:

sudo mysql
use mythconverg;
select * from recorded where basename='<name of your .ts file>'\G
quit
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: .ts files [ In reply to ]
On 8/12/20 3:49 AM, lists@arewethere.net wrote:

...

> But the question is what creates them and what should be cleaning
> them up?
...

And, just for the 2nd half of the above question, see if this helps:

https://www.mythtv.org/wiki/Configuring_Frontend#General_.28Auto-Expire.29

Recordings can stay there 'til the backend needs space, but the options
in mythtv-setup allow some tuning of the process.

--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: .ts files [ In reply to ]
On Wed, Aug 12, 2020 at 10:09:40PM +1200, Stephen Worthington wrote:
>
> Those are recording files. MythTV changed some time ago to using the

...snip...
>
> To find out what one of your .ts files is, do this:
>
> sudo mysql
> use mythconverg;
> select * from recorded where basename='<name of your .ts file>'\G
> quit

Thanks for this. I suspected as much but was surprised to find them
in the top level rather than in the 'recordings' subdirectory.
On my system it looks like the transition to .ts happened in mid-2016
which is likely when I upgraded to v0.27.

I checked a few of them in the 'recorded' table and they all look
like the system knows about them, they show up in the list of
recordings in the frontend.

As to how they got there. From looking at the storagegroup table
it seems I once had these directories set for the Default storage
group:
/var/lib/mythtv
/data/disk1/mythv
/data/disk2/mythv

I checked in mythtv-setup and now I have this set:
/var/lib/mythtv/recordings
/data/disk1/mythv/recordings
/data/disk2/mythv/recordings
All the recent recordings are in one of those directories.

I stopped the backend, moved all the stray .ts files etc into the
recordings/ subdirs and started the backend again - all good now.

Cheers
Vince
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: .ts files [ In reply to ]
On Sat, 15 Aug 2020 16:29:25 +1000, you wrote:

>On Wed, Aug 12, 2020 at 10:09:40PM +1200, Stephen Worthington wrote:
>>
>> Those are recording files. MythTV changed some time ago to using the
>
>...snip...
>>
>> To find out what one of your .ts files is, do this:
>>
>> sudo mysql
>> use mythconverg;
>> select * from recorded where basename='<name of your .ts file>'\G
>> quit
>
>Thanks for this. I suspected as much but was surprised to find them
>in the top level rather than in the 'recordings' subdirectory.
>On my system it looks like the transition to .ts happened in mid-2016
>which is likely when I upgraded to v0.27.
>
>I checked a few of them in the 'recorded' table and they all look
>like the system knows about them, they show up in the list of
>recordings in the frontend.
>
>As to how they got there. From looking at the storagegroup table
>it seems I once had these directories set for the Default storage
>group:
> /var/lib/mythtv
> /data/disk1/mythv
> /data/disk2/mythv
>
>I checked in mythtv-setup and now I have this set:
> /var/lib/mythtv/recordings
> /data/disk1/mythv/recordings
> /data/disk2/mythv/recordings
>All the recent recordings are in one of those directories.
>
>I stopped the backend, moved all the stray .ts files etc into the
>recordings/ subdirs and started the backend again - all good now.
>
>Cheers
>Vince

When mythbackend is writing a new recording file, it does it in one of
the directories specified in the storage group in the recording rule.
Unless you change it, the default storage group that gets put in all
recording rules is "Default". But when it is trying to find a
recording file, it will look in all directories in all storage groups.
So you must have /data/disk1/mythtv specified in a storage group
somewhere for it to have been finding the .ts files in their old
location.

To see all your storage directories without having to run
mythtv-setup, try this:

sudo mysql
use mythconverg;
select * from storagegroup order by groupname,dirname;
quit

BTW There is no need to shut down mythbackend when you are moving
recording files. You do need to make sure it is not recording to or
playing back one of the recording files you are moving.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org