Re: lml33+lavtools video imperfections

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



I found I can get rid of the pauses in lavrec's status output by adding 
the option --file-flush to the lavrec command line.

But I still record .avi files that contain periodic bad frames or
interlaced fields that are both noticable on screen and that produce
messages like this when played back with lavplay or glav:

++: Corrupt JPEG data: 201 extraneous bytes before marker 0xd9
++: Corrupt JPEG data: 87 extraneous bytes before marker 0xd9

Here is a bad field extracted from one of these .avi's from a videodisc:
	http://www.telltronics.org/~tell/image004.jpg
(notice the bar at the bottom where the video is shifted over and perhaps
lower in intensity).

So I repeat my reqest for help - v4l2 and mjpegtools are almost working
for me except for this one problem that makes recordings annoying to 
watch.

thanks!
Steve


On Sat, 15 Nov 2003, Steve Tell wrote:
 
> I'm trying to get mjpegtools/lavtools and my LML33 zoran card in shape to 
> do some live video recording from a camera to avi files.
> 
> Setup is a P4 with 845E chipset and 1GB ram.
> Redhat 9 with vanilla 2.4.22 kernel plus
> the v4l2 patch set from http://bytesex.org/patches/   (as of 6 or 8 weeks 
> ago)
> The zoran driver is CVS driver-zoran-new from 
> "cvs -d:pserver:anonymous@xxxxxxxxxxxxxxxx:/cvsroot/mjpeg co -d 
> driver-zoran-new -r ZORAN_VIDEODEV_2 driver-zoran"
> 
> mjpegtools is mjpegtools-1.6.1.90, with the 1-line patch to fix the
> "maxdiff" computation that I mentioned here some weeks back.
> 
> 
> What I'm seeing:
> 1. The per-frame status output lines from lavrec pauses every two seconds 
> for about a quarter second, exactly while displaying 
> "x:xn:59:29"  where n is odd.   When the output resumes, there is a 
> bump in the inter-interrupt interval reported, a long interval followed by
> several short ones.  
> (dump of the lavrec -v1  output attached below)
> 
> Note that I don't seem to lose any video frames.  I've been recording a
> camera pointed at a heath "most accurate clock" that has a 10ths of second
> display.  I haven't checked the audio sync carefully though.
> 
> Is this normal? or does it indicate that the recording process is 
> just barely keeping up and isn't long-term reliable?
> 
> 2. Occasionaly when playing back avi files recorded this way (using 
> lavplay or glav) I get a visual glitch in the picture, and a message like:
> 	Corrupt JPEG data: 159 extraneous bytes before marker 0xd9
> 
> The glitch looks a little like an analog vtr timing error, perhaps with 
> the whole frame shifted right or left and a change in brightness.
> Its hard to tell for sure, because I can't see the glitch or message when
> single-stepping frames with glav.
> 
> The glitch and error messages seem to be at particular points in the 
> recording, often at a time that is a few frames after one of the 
> every-two-second pauses reported by lavrec.  But they don't occur every
> two seconds, nor does every "bad" point in the recording elicit the error 
> and glitch every time it is played back.
> 
> 
> Questions for the group:
> Any idea what might cause this?  Where should I look for fixes?
> 
> How to others audit the performance of their video-capture setups?
> How do you analyze a recording to determine if any frames were lost or if
> the audio sync is correct?
> 
> Along these lines, I'm looking around for a cheap used SMPTE time-code
> generator.  Has anyone written any code to decode and check timecode
> recorded as audio along with their captured video?  Can the zoran chip (or
> a bt878) be configured to capture enough of the vertical interval such
> that VITC timecode could be captured intact?
> 
> thanks!
> Steve
> 
> 
> here's an excerpt of lavrec output
> 
> #  time lavrec -t60 -fa -in -d1 -q80 -l70 -a16 -r44100 -Rl -c2 -v1  -U ./dxc-clk6.avi
>    INFO: [lavrec] Recording parameters:
>    INFO: [lavrec] Output format:      AVI
>    INFO: [lavrec] Input Source:       Composite NTSC
>    INFO: [lavrec] Decimation:         1
>    INFO: [lavrec] Quality:            80
>    INFO: [lavrec] Recording time:     60 sec
>    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 MONO
>    INFO: [lavrec] Audio input recording level: 70%
>    INFO: [lavrec] Don't mute audio output during recording
>    INFO: [lavrec] Recording source: l
>    INFO: [lavrec] Level of correction for Audio/Video synchronization:
>    INFO: [lavrec] Lost frame compensation and frame drop/insert
>    INFO: [lavrec] Using read(2) system call for capture
>    INFO: [lavrec] Auto detecting input and norm ...
>    INFO: [lavrec] Image size will be 720x480, 2 field(s) per buffer
>    INFO: [lavrec] Got 32 buffers of size 256 KB
>    INFO: [lavrec] Getting audio ...
>    INFO: [lavrec] Opening output file ./dxc-clk6.avi
> 0.00.00:01 int:151 lst:  0 ins:  0 del:  0 ae:  0 td1=0.000 td2=0.000
> 0.00.00:02 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.058 td2=0.058
> ...
> 0.00.01:16 int:032 lst:  0 ins:  0 del:  0 ae:  0 td1=0.007 td2=0.007
> 0.00.01:17 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.027 td2=0.027
> 0.00.01:18 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.027 td2=0.027
> 0.00.01:19 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.048 td2=0.048
> 0.00.01:20 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.035 td2=0.035
> 0.00.01:21 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.021 td2=0.022
> 0.00.01:22 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.008 td2=0.009
> 0.00.01:23 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.008 td2=0.009
> 0.00.01:24 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.029 td2=0.029
> 0.00.01:25 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.016 td2=0.016
> 0.00.01:26 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.016 td2=0.016
> 0.00.01:27 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.036 td2=0.036
> 0.00.01:28 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.023 td2=0.023
> 0.00.01:29 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.023 td2=0.023
> 0.00.02:00 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.043 td2=0.043
> 0.00.02:01 int:232 lst:  0 ins:  0 del:  0 ae:  0 td1=0.030 td2=0.030
> 0.00.02:02 int:002 lst:  0 ins:  0 del:  0 ae:  0 td1=0.017 td2=0.017
> 0.00.02:03 int:002 lst:  0 ins:  0 del:  0 ae:  0 td1=0.004 td2=0.004
> 0.00.02:04 int:002 lst:  0 ins:  0 del:  0 ae:  0 td1=0.004 td2=0.004
> 0.00.02:05 int:002 lst:  0 ins:  0 del:  0 ae:  0 td1=0.024 td2=0.025
> 0.00.02:06 int:002 lst:  0 ins:  0 del:  0 ae:  0 td1=0.011 td2=0.011
> 0.00.02:07 int:002 lst:  0 ins:  0 del:  0 ae:  0 td1=0.011 td2=0.011
> 0.00.02:08 int:020 lst:  0 ins:  0 del:  0 ae:  0 td1=0.031 td2=0.032
> 0.00.02:09 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.018 td2=0.018
> 0.00.02:10 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.005 td2=0.006
> 0.00.02:11 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.005 td2=0.006
> 0.00.02:12 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.026 td2=0.026
> 0.00.02:13 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.026 td2=0.026
> 0.00.02:14 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.046 td2=0.046
> 0.00.02:15 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.033 td2=0.033
> 0.00.02:16 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.020 td2=0.020
> 0.00.02:17 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.007 td2=0.007
> 0.00.02:18 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.007 td2=0.007
> 0.00.02:19 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.027 td2=0.027
> 0.00.02:20 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.027 td2=0.027
> 0.00.02:21 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.047 td2=0.048
> 0.00.02:22 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.034 td2=0.034
> 0.00.02:23 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.021 td2=0.021
> 0.00.02:24 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.008 td2=0.008
> 0.00.02:25 int:032 lst:  0 ins:  0 del:  0 ae:  0 td1=0.008 td2=0.008
> 0.00.02:26 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.028 td2=0.029
> 0.00.02:27 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.028 td2=0.029
> 0.00.02:28 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.049 td2=0.049
> 0.00.02:29 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.036 td2=0.036
> 0.00.03:00 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.022 td2=0.023
> 0.00.03:01 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.009 td2=0.010
> 0.00.03:02 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.009 td2=0.010
> 0.00.03:03 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.030 td2=0.030
> ...
> 0.00.59:26 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.011 td2=0.019
> 0.00.59:27 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.011 td2=0.019
> 0.00.59:28 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.031 td2=0.039
> 0.00.59:29 int:033 lst:  0 ins:  0 del:  0 ae:  0 td1=0.018 td2=0.026
>    INFO: [lavrec] Recording time reached, stopping
> 
> Recording time  :  0.00.59:29
> Lost frames     : 000
> A/V sync ins/del: 000/000
> Audio errors    : 000
> 
> real    1m0.503s
> user    0m0.520s
> sys     0m2.800s
> 
> at start glav says 0:00:00:00 and clock in picture picture says 16:24:46.0 
> at end   glav says 0:00:59:28 clock in picture says 16:25:47.0	
> 
> 
> 
> 
> 
> 
> 
> --
> video4linux-list mailing list
> Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/video4linux-list
> 




[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux