On Sat 03.07.2004 at 02:16:33PM +0200, Dirk Meyer wrote:
> Hi,
> 
> same subject, different content. Besides timeshift, I want to watch a
> show when it starts. Sounds simple, but programs don't start at the
> given second. So I record 5 min earlier and stop 5 minutes after the
> end. But I want to start watching when the show starts, or even
> better, auto skip commercials.

I wrote a filter for mplayer that detects black frames, and makes and
EDL so that when watching the show after recording, the commercials are
skipped automatically. It doesn't skip the commercial at the beginning
of the show since it cannot tell if it is show or commercial, but after
that it works pretty well. Provided that your TV channels insert black
frames (or at least something that can be recognized easily), it should
work also for you.
The EDL can then easily be converted to a transcode command line
parameter, for editing the video before archiving it.

> I did some digging on a recorded ts from mplayer and xine. Both
> contain only the two streams from video and audio. The TS IS don't
> change (and shouldn't). The PES (or PS?) inside it also has an id,

PES. Individual ES are packetized into PES, and then PES are multiplexed
either into a PS or a TS. DVD uses PS, DVB uses TS.

> also no change. The mpeg video and audio also has an id and -- no
> change. So the recorded stream is useless to get this information. 

Not true, but it requires some heuristics. People have also implemented
this kind of feature based on the sound level, which is higher during
commercials (although it is forbidden by law, at least in France) and
more uniform (loud all the time, whereas in the show it's louder
sometimes).

> There is meta information (PSI) on the channel, tools like tv_grab_dvb
> use them to get the epg. Again, some digging: the epg has a status
> field: running, running in some secs, running later, pause. Great. But
> the information is wrong :-(

Don't count on TV channels living from commercials to tell you when to
skip the commercials :)

> 
> Next try: there is a VPS field in the VB__data_descriptor in the
> Program Map Table (PMT). Sounds great, but how to get this table? 

AFAIK, you have to tell the DVB driver to include this table. It has a
specific PID (something between 0x01 and 0x10, and this ID can be found
in the I-don't-remember-its-name packet type whose PID is 0x00.

> So, if someone has some time to dig deeper into this, please let me
> know. I con provide some docs about TS and PSI, but there are many
> more docs free on www.etsi.org. 
> 
> Anyone? Would be a cool feature!

I'll stick to my heuristic filter, it worked well on at least one movie
I recorded some time ago. The only thing is that the PTS is reset in the
middle of the movie, and my TS seek functions doesn't work well after
that. PTS resets suck, they are trouble :(

Matthieu
-- 
 (~._.~)        Matthieu Weber - Université de Jyväskylä         (~._.~)
  ( ? )                email : [EMAIL PROTECTED]                  ( ? ) 
 ()- -()               public key id : 452AE0AD                  ()- -()
 (_)-(_)  "Humor ist, wenn man trotzdem lacht (Germain Muller)"  (_)-(_)


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Freevo-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-users

Reply via email to