Re: [Mjpeg-users] DC30: Natoma bug / buffer size

2005-07-24 Thread Malte Rücker

Hi Bernhard,

Which CPU do you have ? 
Do video programms like xawtv work ?


Which input do you want to use ?

What does really work ?
What is the output of lavrec ?


Sorry for being unclear: capturing (with lavrec) works perfectly for me, 
  the only thing that bothers me is the limited buffer size that 
heavily limits the bitrate in full resolution capturing.
(Just for the records, I am using a PIII 1GHz, 512MB RAM, and capturing 
using composite input)



have you tried recording with a bigger buffer size ?


You mean with the -b switch? Yes, I tried that, but lavrec still reports 
a buffer of 128KB, here's a part of the output.


lavrec -f a -i p -d 1 -q 100 -t 10 -w -m -v 1 -a 0 -l 0 -b 512 rec.avi

   INFO: [lavrec] Recording parameters:
   INFO: [lavrec] Output format:  AVI
   INFO: [lavrec] Input Source:   Composite PAL

   INFO: [lavrec] Decimation: 1
   INFO: [lavrec] Quality:100
   INFO: [lavrec] Recording time: 10 sec
   INFO: [lavrec]
   INFO: [lavrec] MJPEG buffer size:  512 KB
   INFO: [lavrec] # of MJPEG buffers: 64
   INFO: [lavrec] Audio disabled
   INFO: [lavrec] Auto detecting input and norm ...
   INFO: [lavrec] Image size will be 768x576, 2 field(s) per buffer
   INFO: [lavrec] Got 32 buffers of size 128 KB

The resulting file is about 27MB, a way too small.


Hmm, that seems to be a problem with the chipset. I never had a Intel
chipset the last 7 years. That problem was with the DC10. It might not
be a problem with the DC30. 
So you might try to change that in the zoran driver, search for Natoma,

you should fined something like that:
if (pci_pci_problems & PCIPCI_NATOMA && zr->revision <= 1) {
  zr->jpg_buffers.need_contiguous = 1;
   dprintk(1,
   KERN_INFO
   "%s: ZR36057/Natoma bug, max. MJPEG buffer size is 128K\n",
   ZR_DEVNAME(zr));
  }

remove at least the zr->jpg_buffers... line than this limit should not
be there. But I don't know what happen when you try to record with a
bigger buffer size. 


Nice, that seems to work. lavrec now reports a buffer size of 512KB and 
the captured file is around 84MB in size and seems to play without 
artifacts or crashes (or whatever would happen). I think this should 
prove that the bug is not existant here, right? Great help, thanks a 
lot! :-)


I'm just wondering a bit at the file size, as written above the recorded 
file is 84MB (250 frames or 10 s, no audio). The maximum bitrate that 
can be selected in the windows driver of the dc30 are 7100KB/s which 
would lead to a 70MB file (theoretical and practical).
So does the linux driver allow a higher bitrate or is it just some kind 
of overhead (20% seems too much) in the file?

mplayer says:
VIDEO: [MJPG]  768x576  24bpp  25.000 fps  70653.1 kbps (8624.6 kbyte/s)

Thanks for your help so far!

Regards,
Malte


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
___
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users


Re: [Mjpeg-users] DC30: Natoma bug / buffer size

2005-07-24 Thread Malte Rücker

Hi Ronald,


Highest allowed bitrate leads to 1:2 compression, so for a 768x576 at
2bpp at 25fps (full PAL), that is 768x576x2x25/2 =~ 11 MB/s max (in
theory).


ok, thanks for clarification.
Nevertheless, the linux driver seems to allow a higher bitrate (or lower 
compression) than the original driver which is quite impressive I think. 
Thanks!


Regards,
Malte


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
___
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users


Re: [Mjpeg-users] Strange error -- lavrec saying Not ready for capture

2005-07-24 Thread Vincent Yau


Ok, I got more info. And it looks like it is my sound card.  But not sure 
how I should

fix it.   (FYI, I am using mythtv to record and everything works fine
so I know my capture card + sound card can record.   I would like to try
lavrec since I want a record in  mpeg setting).


  INFO: [lavrec] Recording parameters:
  INFO: [lavrec] Output format:  AVI
  INFO: [lavrec] Input Source:   Auto detect
  INFO: [lavrec] Decimation: 4
  INFO: [lavrec] Quality:80
  INFO: [lavrec] Recording time: 60 sec
  INFO: [lavrec]
  INFO: [lavrec] MJPEG buffer size:  256 KB
  INFO: [lavrec] # of MJPEG buffers: 64
  INFO: [lavrec] Audio disabled
--DEBUG: [lavrec] Maximum size per file will be 1739 MB
  INFO: [lavrec] Auto detecting input and norm ...
--DEBUG: [lavrec] Using current input signal settings for non-MJPEG card
  INFO: [lavrec] Unmuting tuner audio...
  INFO: [lavrec] Error setting tuner audio params: Invalid argument
++ WARN: [lavrec] Not ready for capture (state = 0)!


My capture card has no TV tuner.  And I am using my sound card (line-in) to 
record.


--Vincent




From: "Ronald S. Bultje" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
CC: mjpeg-users@lists.sourceforge.net
Subject: Re: [Mjpeg-users] Strange error -- lavrec saying Not ready 
for	capture

Date: Sun, 24 Jul 2005 10:44:32 +0200

On Sun, 2005-07-24 at 07:06, Vincent Yau wrote:
> lavrec --software-encoding --format=a -in --quality=80
> --geometry=720x480+0+0 --audio-bitsize=0 --time=60  ./test.avi
> ++ WARN: [lavrec] Not ready for capture (state = 0)!

This almost certainly means that you've hit some limitation that we
haven't seen before, since the 'not ready for capture' is basically an
internal assertion. Looking at the code, this implies that lavrec_main()
most likely failed (the return value isn't being checked in
lavrec.c:main()). Can you run with -v2 so we can see all messages and
see how far it goes?

Cheers,
Ronald

--
Ronald S. Bultje <[EMAIL PROTECTED]>






---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
___
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users


Re: [Mjpeg-users] Strange error -- lavrec saying Not ready for capture

2005-07-24 Thread Bernhard Praschinger
Hallo

> Ok, I got more info. And it looks like it is my sound card.  But not sure
> how I should
> fix it.   (FYI, I am using mythtv to record and everything works fine
> so I know my capture card + sound card can record.   I would like to try
> lavrec since I want a record in  mpeg setting).
Do you have any sound deamon running ? Oder any other Programm that uses
the /dev/dsp device ?

You can check that with: fuser /dev/dsp (0-4)

Than check which programm uses the dsp and stop it befor starting
lavrec.

auf hoffentlich bald,

Berni the Chaos of Woodquarter

Email: [EMAIL PROTECTED]
www: http://www.lysator.liu.se/~gz/bernhard


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
___
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users


Re: [Mjpeg-users] Strange error -- lavrec saying Not ready for capture

2005-07-24 Thread Vincent Yau



Hi Bernhard:

I have checked and nothing else is running or using up any
relevant port (/dev/dsp 0-4   or   /dev/audio)

Just for testing, I even purposedly played an mp3 music
and then ran fuser and it did detect a process taking up
/dev/dsp.

Any other suggestion?

Again the output I am getting is:

lavrec --software-encoding -in -q 100 --time=60 -s -Rl -m --audio-volume=-1  
-v2 ./test.avi

  INFO: [lavrec] Recording parameters:
  INFO: [lavrec] Output format:  AVI
  INFO: [lavrec] Input Source:   BT8x8 1st input NTSC

  INFO: [lavrec] Decimation: 4
  INFO: [lavrec] Quality:100
  INFO: [lavrec] Recording time: 60 sec
  INFO: [lavrec]
  INFO: [lavrec] MJPEG buffer size:  256 KB
  INFO: [lavrec] # of MJPEG buffers: 64
  INFO: [lavrec] Audio parameters:
  INFO: [lavrec] Audio sample size:   16 bit
  INFO: [lavrec] Audio sampling rate: 44100 Hz
  INFO: [lavrec] Audio is STEREO
  INFO: [lavrec] Audio input recording level: Use mixer setting
  INFO: [lavrec] Level of correction for Audio/Video synchronization:
  INFO: [lavrec] Lost frame compensation and frame drop/insert
--DEBUG: [lavrec] Maximum size per file will be 1739 MB
  INFO: [lavrec] Using mmap(2) system call for capture
  INFO: [lavrec] Auto detecting input and norm ...
  INFO: [lavrec] Unmuting tuner audio...
  INFO: [lavrec] Error setting tuner audio params: Invalid argument
++ WARN: [lavrec] Not ready for capture (state = 0)!

Press enter to start recording>Recording time  :  0.00.00:00
Lost frames : 000
A/V sync ins/del: 000/000
Audio errors: 000




From: Bernhard Praschinger <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
CC: mjpeg-users@lists.sourceforge.net
Subject: Re: [Mjpeg-users] Strange error -- lavrec saying Not ready for 
capture

Date: Sun, 24 Jul 2005 17:58:17 +0200

Hallo

> Ok, I got more info. And it looks like it is my sound card.  But not 
sure

> how I should
> fix it.   (FYI, I am using mythtv to record and everything works fine
> so I know my capture card + sound card can record.   I would like to try
> lavrec since I want a record in  mpeg setting).
Do you have any sound deamon running ? Oder any other Programm that uses
the /dev/dsp device ?

You can check that with: fuser /dev/dsp (0-4)

Than check which programm uses the dsp and stop it befor starting
lavrec.

auf hoffentlich bald,

Berni the Chaos of Woodquarter

Email: [EMAIL PROTECTED]
www: http://www.lysator.liu.se/~gz/bernhard


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
___
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users





---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
___
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users


Re: [Mjpeg-users] Strange error -- lavrec saying Not ready for capture

2005-07-24 Thread Ronald S. Bultje
On Sun, 2005-07-24 at 07:06, Vincent Yau wrote:
> lavrec --software-encoding --format=a -in --quality=80  
> --geometry=720x480+0+0 --audio-bitsize=0 --time=60  ./test.avi
> ++ WARN: [lavrec] Not ready for capture (state = 0)!

This almost certainly means that you've hit some limitation that we
haven't seen before, since the 'not ready for capture' is basically an
internal assertion. Looking at the code, this implies that lavrec_main()
most likely failed (the return value isn't being checked in
lavrec.c:main()). Can you run with -v2 so we can see all messages and
see how far it goes?

Cheers,
Ronald

-- 
Ronald S. Bultje <[EMAIL PROTECTED]>



---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
___
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users