Advert/commercial removing

darkflare

Member
Hi Guys

Before investing in a humax box I was using a pc with a freesat card to get and record shows. I tried windows and linux, mythtv(linux) and mediaportal(windows). One feature I really miss is advert skipping. Has anyone conducted any research into this area?

Alec
 
There is no way we could implement anything like that on the HDR-FOX - too much processing required to recognise the programme start/stop slide frames. The custom software does have editing abilities - you can manually set bookmarks at the beginning and end of advert breaks, and then crop them out with nicesplice.
 
Did you want to edit them out or just skip them? If it's just skipping as you watch you can program the trick play buttons to jump forward certain intervals so assuming the ad breaks are usually 3 or 4 minutes long (or whole numbers of minutes at least) having a jump forward of 1 min per press makes it pretty quick to get through ads on the fly. Not quite what you were looking for but this is my nearest workaround!
 
Hi Guys
Before investing in a humax box I was using a pc with a freesat card ... I really miss is advert skipping
Alec

It looks like the Humax HDR FREESAT receiver has Advert Skip as a built-in feature, Please note However that this thread is for the Humax HDT Fox T2 (NOT FreeSat) so the replys you get may not be applicable, The HDR Fox T2 does have a 'time skip' of 1,2 4 Mins. as detailed above
 
I keep writing out posts and forgetting to submitt them! So this post may be a monster, my apologies

It looks like the Humax HDR FREESAT receiver has Advert Skip as a built-in feature, Please note However that this thread is for the Humax HDT Fox T2 (NOT FreeSat) so the replys you get may not be applicable, The HDR Fox T2 does have a 'time skip' of 1,2 4 Mins. as detailed above

The skip feature in the freesat box sounds exactly like the hdr skip feature just described a little differently.

Did you want to edit them out or just skip them? If it's just skipping as you watch you can program the trick play buttons to jump forward certain intervals so assuming the ad breaks are usually 3 or 4 minutes long (or whole numbers of minutes at least) having a jump forward of 1 min per press makes it pretty quick to get through ads on the fly. Not quite what you were looking for but this is my nearest workaround!

I didnt know the jumps where configurable, interesting but still not ideal as shows on itv have adverts every 15 minutes and so really interupts the flow of the tv programme.

There is no way we could implement anything like that on the HDR-FOX - too much processing required to recognise the programme start/stop slide frames. The custom software does have editing abilities - you can manually set bookmarks at the beginning and end of advert breaks, and then crop them out with nicesplice.
Nicesplice is a good idea however manually setting bookmarks is too much effort for every program and means you have to watch the show first before enjoying the seemless show.

What I am aiming for is something like media portal had where it would detect adverts and write a sidecar file which would hold chapters. It uses these chapter markers to jump at certain parts of the video. This way leaves the file intact and so if the advert detection is imperfect you dont miss anything and manually rewind.

I dont think it would take too much processing power as I am not after a realtime or even quick procedure. I imagine a background task that runs over night.

I've done some research on the subject and a few things may be possible:

  • Use ComSkip and wine to find the adverts (this depends on the difficulty of running wine on the humax box)
  • look into porting mythtv advert detection code (as mythtv is linux based)
Personally I think the best way would be to try and use comskip but it depends on Wine.
Thoughts?
 
I wanted to post this in:

http://hummy.tv/forum/threads/advert-commercial-removing.1239/

..but that didn't work for some reason.

Thoughts?

How about some more ramblings from me... Although I tried specifically to look into commercial removing, this just ends up being a question/bug-report about GCC mips 4.5.2 and another about uclibc, so sorry in advance that I end up hijacking this thread; however, if I can get to the bottom of the problems I'll be able to proceed with commercial removal investigation! One thing I will say in direct response is that Wine can't be run on mips (Windows is not Emulated) and would be massive overkill even if it could.

tl;dr:
Why does uclibc think sizeof sigset_t is 128 bytes (that's how many bytes sigemptyset clears anyway) when /mod/include/asm/signal.h says it's 16 (128 signals/8 bits)?

I started to look at mp3splt as per mythtv and managed to get it to compile (it was a bit of a pain), however the plugins are not enabled or built which was disappointing. Also, making an mp3 just to do silence detect is overkill IMHO.

So I looked into alternatives involving ffmpeg and it seems that recently silencedetect was added as a filter:

http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2012-January/118587.html

...I tried to compile this as well, and got quite far through the process, however I ran into a known mips GCC bug compiling h264.c:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50380

...so it looks like I need GCC 4.7 for ffmpeg.

...I tried to compile that, for which I need m4, flex, bison, mpfr, mpc, gmp etc etc.

I built m4, but get a stack overflow when I tried to run it. I debugged this and the error comes from a stack overflow caused by:
int
main (int argc, char *const *argv)
{
struct sigaction act;
...
sigemptyset(&act.sa_mask);
...
(which is in uclibc)

I traced into this and it ends up calling memset(addr,0,128) to do the clear, however, from gdb, print sizeof(act.sa_mask)=16.

Further digging turns up /mod/include/asm/signal.h

#define _NSIG 128
#define _NSIG_BPW (sizeof(unsigned long) * 8)
#define _NSIG_WORDS (_NSIG / _NSIG_BPW)

typedef struct {
unsigned long sig[_NSIG_WORDS];
} sigset_t;

...which would be why my m4 compile has the size of sa_mask as 16 bytes, so what's going on with our uclibc?

Can anyone provide any insight into this? (Or just a newer GCC and/or ffmpeg ;-))
 
...which would be why my m4 compile has the size of sa_mask as 16 bytes, so what's going on with our uclibc?

According to Mr Google it happens when you link without the -muclibc option.
I haven't experimented though.

Can anyone provide any insight into this? (Or just a newer GCC and/or ffmpeg ;-))

ffmpeg 0.10 is on its way up to the repository.


(I had to use Safari, FF not working for me either)
 
...
I built m4, but get a stack overflow when I tried to run it. I debugged this and the error comes from a stack overflow caused by [sigemptyset] (which is in uclibc).

I traced into this and it ends up calling memset(addr,0,128) to do the clear, however, from gdb, print sizeof(act.sa_mask)=16.

Further digging turns up /mod/include/asm/signal.h

#define _NSIG 128
#define _NSIG_BPW (sizeof(unsigned long) * 8)
#define _NSIG_WORDS (_NSIG / _NSIG_BPW)

typedef struct {
unsigned long sig[_NSIG_WORDS];
} sigset_t;

...which would be why my m4 compile has the size of sa_mask as 16 bytes, so what's going on with our uclibc?

Can anyone provide any insight into this? (Or just a newer GCC and/or ffmpeg ;-))

According to Mr Google it happens when you link without the -muclibc option.
I haven't experimented though.
...

Well, more than 5 years on and Google seems to have forgotten anything it knew about this.

Anyhow, -muclibc made no difference for me: building LibreSSL using the current hpkg toolchain (overnight builds - takes me back) => Bus error in explicit_bzero test.

If it was necessary, shouldn't it be built into the gcc settings? It seems to me that the uClibc-dev headers don't match the uClibc.so, which apparently doesn't know that it's going to be on MIPS where there are 128 signals rather than 1024.

What does work until uClibc gets rebuilt is adding a sigset.c like this (similar to @mingw.android's memset solution which of course I found after already having gone through the same sort of debugging process):
Code:
#include <signal.h>
#include <string.h>
#include <stddef.h>

int sigemptyset(sigset_t *set)                                       
{                                      
        memset( set, 0, sizeof(*set));                              
        return 0;                                                  
}                                                                      
                                                                         
int sigfillset(sigset_t *set)                                             
{                                                                         
        size_t sigsz;                                                      
        int sig;                                                           
                                                                       
        sigsz = NSIG/(8*(sizeof(unsigned long)));                         
                                                                        
        if (sigsz > 1)
               /* set all the full (ul) words */
               memset( set, 0xff, sigsz*sizeof(unsigned long));           

        /* clear the final word, then set the remaining bits */
        ((unsigned long*)set)[sigsz] = 0;                                    
        for (sig = sigsz*sizeof(unsigned long)+1; sig <= NSIG; ++sig)   
                ((unsigned long*)set)[sigsz] |= __sigmask(sig);              
                                                                            
        return 0;                                                        
}

In fact <asm/signal.h> is only included from <linux/signal.h>. When you include <signal.h>, you get definitions similar to the ones quoted above from <bits/sigset.h>, which comes from https://git.uclibc.org/uClibc/tree/libc/sysdeps/linux/common/bits/sigset.h
 
Well, more than 5 years on and Google seems to have forgotten anything it knew about this.
Well this is a very old thread and we have had detectads on the humax for several years now so what are you trying to compile and why?
 
Back
Top