[mythtv-users] using mythtranscode to keep commercials?

Richard Shaw hobbes1069 at gmail.com
Mon Jun 23 18:16:18 UTC 2008


On Mon, Jun 23, 2008 at 12:11 AM, Graham Stead <gstead at cox.net> wrote:
> This may seem unusual, but I want to keep commercials and throw away
> programs, rather than the other way around! I've tried to do this 2 ways
> without success.
>
> Method 1: I take the commercial marks from mythcommflag:
> mythcommflag --getskiplist --file 1003_20080621210000.mpg
> Commercial Skip List:
> 8335-12241,19811-23440,33609-35889,46537-50609,63787-66492
>
> And I pass them to mythtranscode --inversecut:
>
> mythtranscode --infile 1003_20080621210000.mpg --showprogress -p autodetect
> --inversecut 8335-12241,19811-23440,33609-35889,46537-50609,63787-66492
>
> Unfortunately mythtranscode works a bit and then dies with error #-84:
>
> Cutting from: 0 to the end
> 2008-06-22 17:11:18.291 Using runtime prefix = /usr, libdir = /usr/lib
> 2008-06-22 17:11:18.292 Empty LocalHostName.
> 2008-06-22 17:11:18.300 New DB connection, total: 1
> 2008-06-22 17:11:18.305 Closing DB connection named 'DBManager0'
> 2008-06-22 17:11:18.305 Enabled verbose msgs: important
> 2008-06-22 17:11:18.307 New DB connection, total: 2
> 2008-06-22 17:11:18.310 New DB connection, total: 3
> 2008-06-22 17:11:18.327 Using protocol version 40
> 2008-06-22 17:11:18.584 Transcode: Looking for autodetect profile:
> Autodetect from 480i
> 2008-06-22 17:11:18.594 Transcode: Using autodetect profile: MPEG2
> 2008-06-22 17:11:18.595 Switching to MPEG-2 transcoder.
> 2008-06-22 17:11:23.655 16.6% complete
> 2008-06-22 17:11:28.656 27.6% complete
> 2008-06-22 17:11:33.658 38.7% complete
> 2008-06-22 17:11:38.660 49.4% complete
> 2008-06-22 17:11:43.661 60.1% complete
> 2008-06-22 17:11:48.662 71.1% complete
> 2008-06-22 17:11:53.664 81.8% complete
> 2008-06-22 17:11:58.667 92.5% complete
> Mux rate: 6.49 Mbit/s
> 2008-06-22 17:12:02.015 Couldn't open input file, error #-84
>
> I've tried this a number of different ways, and no matter what I do, I
> always receive error #-84 when using the --inversecut option. Has anyone
> else tried this?
>
> Method #2: I've tried to invert a file's commercial markings and transcode:
>
> mythcommflag --getskiplist --file 1003_20080621220000.mpg
> Commercial Skip List:
> 10949-15451,24927-29427,39218-43720,53231-57733,72002-76504,88107-93508
>
> # set the cut list to the inverse of the skip list
> mythcommflag --setcutlist
> 1-10949,15451-24927,29427-39218,43720-53231,57733-72002,76504-88107 --file
> 1003_20080621220000.mpg
> # prove to myself the cutlist is really set
> mythcommflag --getcutlist --file 1003_20080621220000.mpg
> Cutlist: 1-10949,15451-24927,29427-39218,43720-53231,57733-72002,76504-88107
>
> # transcoding should remove the program and leave the commercials, right?
> mythtranscode --honorcutlist --infile 1003_20080621220000.mpg --showprogress
> -p autodetect
>
> Unfortunately mythtranscode does not replace the original file, but creates
> a 1003_20080621220000.mpg.tmp that is only slightly smaller than the
> original:
>
> -rw-r--r-- 1 mythtv mythtv 2333595648 2008-06-21 23:00
> 1003_20080621220000.mpg
> -rw-r--r-- 1 gstead mythtv 2229884932 2008-06-22 22:03
> 1003_20080621220000.mpg.tmp
>
> Is this a lost cause, or do am I not using the command line correctly?
>
> Any insight would be appreciated.
>
> best regards,
> -Graham

You can do a manual cutlist by editing the recording, then to a
mythtranscode -l --outfile $FILE (I believe) which should honor the
cutlist...

Richard


More information about the mythtv-users mailing list