[mythtv-users] Commercial Flagging (UK, DVB-T and DVB-S ), and lossless cutting.

John reidjr at lineone.net
Mon Dec 3 20:51:26 UTC 2012


>     On 25 November 2012 21:30, John <reidjr at lineone.net
>     <mailto:reidjr at lineone.net>> wrote:
>
>         I have been playing around with Mythcommflag-wrapper
>         <http://www.mythtv.org/wiki/Mythcommflag-wrapper>. It needed
>         some simple changes to work on 0.26. It also lost the 
>         dependency on myth-export ( In fact I couldn't get it to work
>         properly with myth-export to find total no frames). I've moved
>         what I can to mythutil, and deleted the comments that are no
>         longer relevent. I added a few callsigns to the whitelist, but
>         you need to make sure your own callsigns match !! [ on
>         Freeview its ITV1 +1, on Freesat its ITV1+1 ]
>
>         I've added my edited version to . I have been testing on 0.26,
>         but it probably works on 0.25.
>
>         My changes are superficial, and are just an update of the
>         previous script(s). It works for me, and on some programs its
>         excellent, others its not so lucky, but its a great deal
>         better than the built in mythcommflag for UK TV.
>
>         John
>

For those interested, I have updated 
http://www.mythtv.org/wiki/Mythcommflag-wrapper with a few minor changes:

The final cut was being set as x-0, as i couldn't work out how to get 
the final frame value. This worked for skipping, but caused lossless_cut 
to fail. Now set to x-999999, which seems to do no harm.

It does work on HD, as long as the HD has an full mpa sound track. 
DVB-S2 (Freesat) in the UK has a secondary mpa channel on ITV/Channel 4 
HD, so I have added them to the whitelist.

I have found where the channel has main program and adverts, (ITV3 for 
instance) silence detect is spot on, as the silences are right at the 
"back soon" " welcome back" screens they often use on ITV3.

advert-(silence)-program part 
1-backsoon-(silence)-adverts-(silence)-welcome back-[program part 2]

which skips/cuts to

program part 1-backsoon-welcome back-program part 2

Other channels such as E4 tend to have a lot of trailers around the 
programs I am recording, and these are treated as main program. They 
also often have "sponsored by" clips before and after

advert - (silence) - Trailer - sponsored by - program part 1 - sponsored 
by - Trailer - silence - advert-silence - sponsored by - program part 2

which skips/cuts to:

Trailer - sponsored by - program part 1 - sponsored by - Trailer - 
sponsored by - program part 2

Not as clean, but you still lose the real adverts, but you have to 
manually skip the trailers and sponsorship statements.


I assume from other comments that the DVB-T2 (Freeview) versions are AC3 
only, and will need to be removed from the whitelist for DVB-T2 users. I 
don't have a DVB-T2 card so can't test.

I have replaced ffmpeg -i with avconv -i . DVB-S channels usually have 2 
audio channels. main mpa and audio descriptive mpa, or AC3 and mpa. 
Occasionally ffmpeg -i was picking the audio descriptive track, which is 
mostly silence. No idea why, but changing to avconv seems to fix it, and 
ffmpeg is deprecated in favor of avconv, so its all good.

I have been experimenting with this updated mythcommflag-wrapper script 
in conjunction with the lossless_cut script from Doug Vaughan. I am 
getting good results, but it needed a few tweaks due to peculiarities of 
UK TV, and my DVB-T card. I am getting good results flagging and cutting 
HD on DVB-S2.

Lossless_cut needs a tweak to ensure the audio descriptive track present 
on UK DVB-S channels doesn't become the default after cutting. The tweak 
can be applied from the conf file (documented in the conf file), thanks 
to additional work from Doug.

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20121203/c665fb0d/attachment.html>


More information about the mythtv-users mailing list