[mythtv-users] Need some help to convert cutlist to ogg format chapter file

belcampo belcampo at zonnet.nl
Wed Jul 8 11:50:28 UTC 2009


Hi all,

I would like to transform a cutlist like:

0-13,16549-28321,61825-72061,105517-115885,154405-166573,206713-20982

to an ogg chapterfile like:
CHAPTER01=00:00:00.000
CHAPTER01NAME=Chapter 1
CHAPTER02=00:11:01.920
CHAPTER02NAME=Chapter 2
CHAPTER03=00:18:52.800
CHAPTER03NAME=Chapter 3
CHAPTER04=00:41:12.960
CHAPTER04NAME=Chapter 4
CHAPTER05=00:48:02.400
CHAPTER05NAME=Chapter 5
CHAPTER06=01:10:20.640
CHAPTER06NAME=Chapter 6
CHAPTER07=01:17:15.360
CHAPTER07NAME=Chapter 7
CHAPTER08=01:42:56.160
CHAPTER08NAME=Chapter 8
CHAPTER09=01:51:02.880
CHAPTER09NAME=Chapter 9
CHAPTER10=02:17:48.480

I managed to transform above cutlist to a Projectx-cutlist like:

13
16549
28321
61825
72061
105517
115885
154405
166573
206713

with

mythcommflag --getcutlist -f 3005_20090508203000.mpg | grep Cutlist | 
cut -d ":" -f 2 | cut -d " " -f 2 | sed 's/,/-/g' | sed 's/^0-//g' | sed 
's/-/\n/g' | sed 'x' > cutlist

I know that by doing:

cat cutlist | sed 's/$/\*.04/g' | bc

I get the time in seconds, but I'm stuck at getting the seconds to the 
above mentioned ogg chapterfile format. Any bright chap that knows how 
to do this and willing to share ?

Henk Schoneveld


More information about the mythtv-users mailing list