[mythtv-users] How do you handle double episode metadata in mythvideo?

Raymond Wagner raymond at wagnerrp.com
Mon Jun 21 22:39:49 UTC 2010


On 6/21/2010 16:43, Another Sillyname wrote:
> For example Touching Evil (US Version) is getting retransmitted here
> in HD and I'm transcoding them and dumping them in the library.
>    

MythTV records output from digital tuners as TS files.  One of the neat 
properties of TS files is that they can be chopped up at will, without 
breaking the file.  There should be a logical split between the two 
episodes, so go into edit mode in the 'Watch Recordings' screen, and 
find a keyframe close to that split.  Add a start cutpoint there.

Now exit out of the frontend and go into the database.  You want to find 
a datapoint in the table 'recordedmarkup' of mark type '1'.

mysql> SELECT * FROM recordedmarkup WHERE chanid=1122 AND 
starttime='2010-06-20 19:00:00' AND type=1;
+--------+---------------------+-------+------+------+
| chanid | starttime           | mark  | type | data |
+--------+---------------------+-------+------+------+
|   1122 | 2010-06-20 19:00:00 | 53330 |    1 | NULL |
+--------+---------------------+-------+------+------+
1 rows in set (0.00 sec)

Now find a matching keyframe in 'recordedseek'.

mysql> SELECT * FROM recordedseek WHERE chanid=1122 AND 
starttime='2010-06-20 19:00:00' AND mark>53300 AND mark<53400;
+--------+---------------------+-------+-----------+------+
| chanid | starttime           | mark  | offset    | type |
+--------+---------------------+-------+-----------+------+
|   1122 | 2010-06-20 19:00:00 | 53310 | 765083484 |    9 |
|   1122 | 2010-06-20 19:00:00 | 53325 | 765284456 |    9 |
|   1122 | 2010-06-20 19:00:00 | 53340 | 765501972 |    9 |
|   1122 | 2010-06-20 19:00:00 | 53355 | 765590520 |    9 |
|   1122 | 2010-06-20 19:00:00 | 53370 | 765731144 |    9 |
|   1122 | 2010-06-20 19:00:00 | 53385 | 765864624 |    9 |
+--------+---------------------+-------+-----------+------+
6 rows in set (0.12 sec)

So your cutpoint is 765501972 bytes in.  Lets round it out to an even 
1KB and split.  Watch for the small bit of overlap below.

#dd if=1122_20100620190000.mpg of=part1.mpg bs=1K count=747561
#dd if=1122_20100620190000.mpg of=part2.mpg bs=1K seek=747560

Now you've got your recording split into two parts, and you can 
transcode it as you did previously.


More information about the mythtv-users mailing list