[mythtv-users] mythcutprojectx.sh and trunk (was: mythtranscode cutlist argument?)

Christopher Meredith chmeredith at gmail.com
Sat Jul 10 18:41:50 UTC 2010


On Sat, Jul 10, 2010 at 1:31 PM, John Pilkington <J.Pilk at tesco.net> wrote:
> On 10/07/10 18:31, Christopher Meredith wrote:
>>
>> On Sat, Jul 10, 2010 at 11:09 AM, John Pilkington<J.Pilk at tesco.net>
>>  wrote:
>>>
>>> On 10/07/10 16:06, John Pilkington wrote:
>>>>
>>>> On 10/07/10 14:55, Christopher Meredith wrote:
>>>> <snip>
>>>>
>>>>> I played around with mythcutprojectx.sh some more and there are some
>>>>> additional problems I'm finding. First of all, it seems "hardcoded"
>>>>> for only mpeg2 audio even though many DVB and firewire recordings will
>>>>> have ac3 audio. Line 143 is the remuxing line and it assumes the audio
>>>>> track will be mpeg2. If you use it on a file with ac3 audio, it dies
>>>>> at this stage.
>>>>
>>>> Yes: I'm dealing with dvb recordings in the UK, so I haven't tried it on
>>>> ac3 audio. Sorry!
>>>>>
>>>>> Perhaps the more important problem is that it seems to be working in
>>>>> reverse. In both tests I ran, it cut out the program, leaving ONLY the
>>>>> commercials. I've seen other threads on trouble with lossless
>>>>> commercial cutting in trunk (I'm running trunk, by the way) and I
>>>>> suspect this is related.
>>>>>
>>>>> I think I can probably modify the script to account for ac3 audio as
>>>>> well as hacking together a way to autodetect the video and audio
>>>>> stream IDs. But the inverse cutting is really fatal.
>>>>
>>>> That is new(ish) in trunk - not seen in 0.23-fixes, currently at 25138
>>>> from ATrpms.
>>>>
>>>> John P
>>>
>>> Here are the annotated first few lines of output for a single-section cut
>>> from the middle of a recording:
>>>
>>> ionice -c3 ./mythcutprojectx 1009_20100710015800.mpg 0xc9 0x191
>>> list0
>>> 4253 104868   # cut-in, EOF
>>>
>>> list1
>>> 0 92713       # Start of recording, cut-out
>>>
>>> list
>>> 4253 92713 104868  cut-in, cut-out, EOF
>>>
>>> CollectionPanel.CutMode=0
>>> 115486708       #   cut-in, bytes. Start of output
>>> 2060170552      #   cut-out, bytes.  End of output,  58m 57s
>>> 2337428816      #   EOF, bytes
>>>
>>> Reading GUI-Switch...
>>> Reading Help Switch...
>>>
>>> A comparison may be useful
>>>
>>> HTH
>>
>> I pasted the entire output on pastebin. This is a 30-minute program
>> with the lead-in and lead-out cut, as well as three commercial breaks
>> in the middle.
>>
>> http://pastebin.com/eNnpDxiC
>>
>> What I imagine is the relevant part is this:
>> list0
>> 1836 18207 36778 54307
>>
>> list1
>> 13700 29554 50077 55801
>>
>> list
>> 1836 13700 18207 29554 36778 50077 54307 55801
>>
>> CollectionPanel.CutMode=0
>> 0        <<<<<<<<<<<<<<<<<<<<<<<<<<
>> 77005740
>> 565834504
>> 769433616
>> 1210499852
>> 1502240132
>> 2039828200
>> 2225616380
>> 2298227056
>>
>> Reading GUI-Switch...
>> Reading Help Switch...
>> _______________________________________________
>>
>
> It looks as if the arrowed 0 is the cause of the inversion.  Until(?) trunk
> is fixed the easiest hack would be to insert a zero in this position if
> there isn't one, and remove it if there is.

I'm guessing the relevant block would be this one:


echo "CollectionPanel.CutMode=0" > cutlist$$ ;
for i in $list1 ;
do
  if [ $i = "0" ]
    then
    list=`echo "select mark from recordedmarkup
    where chanid=$chanid and starttime='$starttime' and type in (0,1)
order by mark;" |
    mysql -N -u root  -p$PASSWD mythconverg | tail -n +2 `
# tail -n +2 drops the initial zero.
  else
    echo "0" >> cutlist$$
    list=`echo "select mark from recordedmarkup
    where chanid=$chanid and starttime='$starttime' and type in (0,1)
order by mark;" |
    mysql -N -u root  -p$PASSWD mythconverg `
  fi
#  use only the first element of list1, as a switch.
  break
done

Would the change best be accomplished by negating one or more of the
conditionals or by inserting a new function?

BTW, does anyone know whether the inversion bug has been reported? I
thinks it's throwing off mythcommflag too. I also wonder if it's
related to other problems like missing dates in mythweb and the bug
where freqid values are deleted when modifying channel info in
mythweb.


More information about the mythtv-users mailing list