Re: [Freevo-users] Re: Better DVB support (C programmers needed)

2004-07-13 Thread Matthieu Weber
On Wed 07.07.2004 at 02:45:55PM +0200, Dirk Meyer wrote:
 It would be nice if you could put all your dvb stuff on a website or
 something like that. I would like to take a look at it and maybe
 improve it. Maybe someone else, too.

Here is a modified version of tzap that records one channel to either a
file or Thomas' timeshift buffer (and also records subtitles if there
are some: put the subtitle PID to ~/.tzap/channels.conf just after the
audio PID; separate them with a :, as usual).

http://www.mit.jyu.fi/~mweber/leffakone/software/dvbrecord/dvbrecord-1.0.tar.gz

I tested the timeshift buffer, and it works well (except when it
crashes while seeking, I don't know exactly why :) But I think that it
would be better to use a plain file for timeshifting, since 256 MB of
buffer gives a timeshift of about 7 minutes in DVB, which is not much.
Since the thingy uses memory mapped IO, I don't know how it would
perform if the buffer is much bigger than the available memory (e.g.
set a buffer of 1GB when you have 256 MB or RAM); I don't know if RAM is
actually used in the process, or if the file is simply mapped to virtual
memory, but no real memory is used (except for normal disk buffering).

The .tar.gz alos contains an attempt to modify ts2ps (from libmpegdvb)
so that it takes into account the subtitle stream if there is one.
It's not perfect yet, and it should be modified to accept several audio
streams and several subtitle streams.

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


Re: [Freevo-users] Time Shifting AND commercial Breakdetection?

2004-07-13 Thread Matthieu Weber
(This message was rejected by sourceforge yesterday, so I resend it)

On Sat 10.07.2004 at 10:54:01AM -0400, Jason Tackaberry wrote:
 On Sat, 2004-07-10 at 10:00 +0200, Fons van der Beek wrote:
  3. When the player reaches a black frame, the controlling
 (timeshift) process can tell it to seek to the appropriate
 place
 (either to the next black frame, or end of buffer, whichever
 is
 first), and since timeshift also knows what timestamps are
 where
 in the buffer, seeking will be a lot closer to the mark, since
 MPlayer's mpeg seeking is hopeless.

MPlayer seeking can be fixed. I managed to get precise position seeking
in MPEG TS yesterday (even thouhg the stream contains a PTS reset), and
the same procedure can be applied to MPEG PS. It needs a bit fine
tuning, but the main thing is there.

 If you can send me your latest black frame detection patch, I'll see
 about working this up.

As soon as it's ready for release!

Update: It's ready now:
http://www.mit.jyu.fi/~mweber/leffakone/software/mplayer/MPlayer-1.0pre4+TS_seek+Black_frames_detection

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


Re: [Freevo-users] Commercial break detection

2004-07-13 Thread Matthieu Weber
(This message was rejected by sourceforge yesterday, I resend it)

On Sat 10.07.2004 at 01:33:03AM +0200, Fons van der Beek wrote:
 Hi all,
 
 I did some work on detection of commercial breaks:
 i tried several methods:
 
 - Black frame detection from Matthieu Weber, i tried this one on
 recordings from dutch channels,  it worked EXTREMELY well: on 6 hours
 of recorded shows not one error, a smooth detection!, it takes some
 time, but what the heck, that's why the nice command was invented.
 
 -Logo detection, i created a program which detects a Logo transmitted
 by the serviceprovider, some screenshots of detected logo's are
 available on http://213.10.252.115/commercial.pdf
 .but as i watched the shows, i noticed that even
 when te logo detection would be 100% error free:
 1) The service providers blend in logos seconds after the show starts!
 or the service providers starts with an animated logo, after seconds
 it went static
 2) The service providers use logo's WITHIN commercials to promote
 their own marchandise or show previews of upcoming shows.
 The only time logo detection would be usefull is when it can be used
 to forecast if a given period is a movie:
 suppose the minimum commercial length = 3 minutes, take a shot each
 three minutes, if on consequent shots there is a logo, then the
 timespan between the shots is 99,9% for certain not a commercial.
 (Taking a screenshot every 3 minutes takes allmost no time (1 hour
 movie, 2-3 minutes)) black frame detection takes more time (of course
 depending on cpu speed)

We could sample the recording and find areas with a higher probability
of commercials, and then use the black frame detection to find the
precise location of the commercial breaks. If you can send me the code
of your logo detection, I could merge it with my black frame detection
filter.

 -Soundlevel, the simple method I used was not usable and i doubt if
 this would ever work (a war scene might be detected as commercial. if
 a more suffisticated method would work, i dont know. it's also more
 time/cpu consuming as i thought.

I'm no expert in sound processing, but I suppose that measuring simply
the soundlevel is not enough, you must also (or rather ?) measure the
variation of the sound around the average level (some kind of standard
deviation of the sound level). My guess is that during the commercials,
the standard deviation is much lower than during the show (i.e. the
sound is equally loud all the time, whereas during the show it is
varying much more). But what about talk-shows?

http://toonarchive.com/karin/ uses all 3 methods and merges the results
in order to determine where the commercials are. It's for Windows, but
the software is GPL, is someone cares to take a look at it and take the
algorithms out...

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


RE: [Freevo-users] Blue screen with mplayer when rebooting.

2004-07-13 Thread Wan Tat Chee

On Mon, 12 Jul 2004, Jon Morris wrote:


  I have a small issue with Mplayer in Freevo.  When I first reboot, and
  try to use Mplayer to either watch TV or record a show, the screen is
  only blue.  If I load tvtime and exit before loading freevo, mplayer
  works just fine.

 Thanks,

 I just checked the lsmod and it is in there:

 Module  Size  Used by
 snd_pcm_oss40740  0
 tuner  15380  0
 tda9887 6020  0
 bttv  129292  0


Hmm, any clues in the dmesg related to bttv?

What distro  kernel version are you using? I see v4l2 enabled. Try using
TV_DRIVER='v4l2' (redefine in /etc/freevo/local_config.py). V4l2-based
drivers have some issues when called using v4l interface (mplayer
default).

Check also the freevo.conf file in /etc/freevo that the norm and chanlist
values are correct (e.g., ntsc/pal, us-cable/europe-west, etc.)

Also, what was the command sent to mplayer? I assume it's using the TV
input. A blue screen suggests that mplayer wasn't able to tune into the
channel correctly the first time.

T.C.

Wan Tat Chee (Lecturer)
School of Computer Science, Univ. of Science Malaysia,
11800 USM, Penang, Malaysia.  Rm.625 Ofc Ph: +604 653-3888 x 3617
NRG Lab Admin: +604 659-4757   Rm.601-E Ofc Ph: +604 653-4396
Internet: [EMAIL PROTECTED]Web: http://nrg.cs.usm.my/~tcwan
GPG Key : http://nrg.cs.usm.my/~tcwan/tcw_gpg-20030322.asc
F'print : DCF2 B9B2 FA4D 1208 AD59  14CA 9A8F F54D B2C4 63C7


---
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


[Freevo-users] Re: Better DVB support (C programmers needed)

2004-07-13 Thread Dirk Meyer
Matthieu Weber wrote:
 On Mon 12.07.2004 at 10:04:10PM +0200, Dirk Meyer wrote:
 Matthieu Weber wrote:
  http://www.mit.jyu.fi/~mweber/leffakone/software/mplayer/mplayer-commercial_removal.tar.gz
 
 Hi, it's not working for me. The detection looks good, I have an edl
 with the correct timestamps. Maybe...they seem to start at 0, but the
 recording isn't. Also mplayer doesn't skip the commercials. I used it
 with the -edl parameter of mplayer. Anything else?

 This older version would not work if the recording doesn't start at 0
 (i.e. if you are using e.g. a TS from DVB). Use the newest version:
 http://www.mit.jyu.fi/~mweber/leffakone/software/mplayer/MPlayer-1.0pre4+TS_seek+Black_frames_detection
 Apply the patch with 
   patch -p1  MPlayer-1.0pre4+TS_seek+Black_frames_detection
 from within the MPlayer-1.0pre4 directory. This patch must be applied to
 MPlayer sources which were *NOT* patched with the older patch.

The edl is not written. I see some output of your plugin, but there is
no edl :-(


Dischi

-- 
And now for something completely different.


---
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


[Freevo-users] Re: Better DVB support (C programmers needed)

2004-07-13 Thread Dirk Meyer
Matthieu Weber wrote:
 I tested the timeshift buffer, and it works well (except when it
 crashes while seeking, I don't know exactly why :) 

I maybe know, more later in this mail. 

 But I think that it would be better to use a plain file for
 timeshifting, since 256 MB of buffer gives a timeshift of about 7
 minutes in DVB, which is not much. 

OK, there is a small plugin in WIP/Dischi called
mplayer_dvb_timeshift.py. Put it into src/tv/plugins, activate it and
remove the old tv.mplayer plugin. It is a mix between video.player and
tv.mplayer, only using dvb.

It calls mplayer dumpstream to dump the stream and than mplayer to
play it (after 1 MB buffer to be save). It works good, you can seek
and pause. One problem: you may not seek forward. I use mmpython to
get the maximum position to seek to to avoid seeking behind the
stream. But your seek patch has a small big which may also cause
Thomas ringbuffer to crash: first mplayer seeks and after that you
correct the position (I guess). That is bad, because mplayer seeks
after the end and you get no chance to correct it.

So what we need here is a seek patch that seeks correct in the first
place. Later we could make it possible to define the dump program
(making all dump-to-mpeg programs working) and maybe also the show
program, make it possible to choose between xine and mplayer. 


Try it,


Dischi

-- 
Software isn't released, it's allowed to escape.


---
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


[Freevo-users] recording server

2004-07-13 Thread skeeterskip
Where is recording server file located?


---
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


RE: [Freevo-users] Blue screen with mplayer when rebooting.

2004-07-13 Thread Jon Morris
-Original Message- 
From: [EMAIL PROTECTED] on behalf of Wan Tat Chee 
Sent: Tue 7/13/2004 1:20 AM 
To: [EMAIL PROTECTED] 
Cc: 
Subject: RE: [Freevo-users] Blue screen with mplayer when rebooting.


Hmm, any clues in the dmesg related to bttv?

What distro  kernel version are you using? I see v4l2 enabled. Try using
TV_DRIVER='v4l2' (redefine in /etc/freevo/local_config.py). V4l2-based
drivers have some issues when called using v4l interface (mplayer
default).

Check also the freevo.conf file in /etc/freevo that the norm and chanlist
values are correct (e.g., ntsc/pal, us-cable/europe-west, etc.)

Also, what was the command sent to mplayer? I assume it's using the TV
input. A blue screen suggests that mplayer wasn't able to tune into the
channel correctly the first time.

T.C.

Wan Tat Chee (Lecturer)
School of Computer Science, Univ. of Science Malaysia,
11800 USM, Penang, Malaysia.  Rm.625 Ofc Ph: +604 653-3888 x 3617
NRG Lab Admin: +604 659-4757   Rm.601-E Ofc Ph: +604 653-4396
Internet: [EMAIL PROTECTED]Web: http://nrg.cs.usm.my/~tcwan
GPG Key : http://nrg.cs.usm.my/~tcwan/tcw_gpg-20030322.asc
F'print : DCF2 B9B2 FA4D 1208 AD59  14CA 9A8F F54D B2C4 63C7
--

There are a few errors in the dmesg output, but nothing that stands out as a problem 
to me:

Linux video capture interface: v1.00
bttv: driver version 0.9.14 loaded
bttv: using 8 buffers with 2080k (520 pages) each for capture
bttv: Bt8xx card found (0).
bttv0: Bt878 (rev 17) at :00:08.0, irq: 11, latency: 32, mmio: 0xde00
bttv0: detected: Pinnacle PCTV [card=39], PCI subsystem ID is 11bd:0012
bttv0: using: Pinnacle PCTV Studio/Rave [card=39,insmod option]
bttv0: gpio: en=, out= in=00ffefff [init]
bttv0: i2c: checking for MSP34xx @ 0x80... not found
bttv0: pinnacle/mt: id=5 info=NTSC / mono radio=no
bttv0: using tuner=33
bttv0: i2c: checking for MSP34xx @ 0x80... not found
bttv0: i2c: checking for TDA9875 @ 0xb0... not found
bttv0: i2c: checking for TDA7432 @ 0x8a... not found
tda9887: chip found @ 0x86
tuner: chip found at addr 0xc0 i2c-bus bt878 #0 [sw]
tuner: type set to 33 (MT20xx universal) by bt878 #0 [sw]
tuner: microtune: companycode=3cbf part=42 rev=99
tuner: microtune MT2050 found, OK
bttv0: registered device video0
bttv0: registered device vbi0
bttv0: PLL: 28636363 = 35468950 .. ok
bttv0: PLL can sleep, using XTAL (28636363).

I am using Fedorca Core 2, Kernel 2.6.5-1.358.  I am using the v4l2 driver in Freevo.  
I have all the settings in the local_config.py set to ntsc and us-cable...

Here is the command sent to mplayer when the recordserver kicks off:
 [*RecordServer*] popen  /usr/bin/mencoder tv:// -tv 
driver=v4l2:input=0:norm=ntsc:channel=1:chanlist=
us-cable:width=640:height=480:outfmt=yuy2:device=/dev/video0:adevice=/dev/dsp:audiorate=32000:forceaudio:forcechan=1:buffe
rsize=64 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1200:keyint=30 -oac mp3lame 
-lameopts br=128:cbr:mode=3 -ffourcc divx -
endpos 147 -o /usr/share/freevo/record/07-13_06:20_Manual_Record.avi

I am currently setup to use tvtime for watching TV in Freevo.  I found that if I try 
to watch TV using tvtime in Freevo, I also get a blue screen, and the message No 
Signal.  If I run tvtime from the shell, I get a picture.  When I exit, both tvtime 
and mplayer work fine in Freevo...

Thanks again for the help...  It is greatly appreciated.

Jon