Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

If I take a snapshot with my webcam, either through right-clicking in xawtv or through streamer -o snapshot.jpeg, the image is distorted. The simplest way to explain is through an example pictures:

enter image description here enter image description here

The lower two "frames" should swap places. If I just run xawtv or vlc to watch a live feed from the webcam, this distortion does not appear and the video is just fine.

I have no idea how this happens. What could be wrong? Where should I start troubleshooting?

Update: It turns out that the upper "frame" of the picture is not from the same point in time as the rest. I've added a second picture to show this.

Debug info

xawtv is xawtv-3.101, running on Linux/x86_64 (3.6.8-1-ARCH). The above picture is generated with streamer -d -o test.jpeg, which generates this debug output:

checking writer files [multiple image files] ...
  video name=ppm ext=ppm: ext mismatch [need jpeg]
  video name=pgm ext=pgm: ext mismatch [need jpeg]
  video name=jpeg ext=jpeg: OK
files / video: JPEG (JFIF) / audio: none
vid-open: trying: libv4l... 
Using libv4l plugin
v4l2: device caps: 2, required 0
v4l2: open
v4l2: device info:
  uvcvideo 3.6.8 / Video WebCam @ usb-0000:00:1d.7-5
vid-open: ok: libv4l
movie_init_writer start
setformat: JPEG (JFIF) (320x240): failed
v4l2: new capture params (320x240, YU12, 115200 byte)
setformat: 12 bit YUV 4:2:0 (planar) (320x240): ok
v4l2: new capture params (320x240, YU12, 115200 byte)
writer_video_thread start [pid=31119]
movie_init_writer end (h=0x1808bc0)
convert_thread start [pid=31119]
movie_writer_start
convert-in : 320x240 12 bit YUV 4:2:0 (planar) (size=115200)
convert-out: 320x240 JPEG (JFIF) (size=230400)
v4l2: buf 0: video-cap 0xabcdef00+16777216, used 0
v4l2: buf 1: video-cap 0xabcdef01+16777216, used 0
v4l2: buf 2: video-cap 0xabcdef02+16777216, used 0
v4l2: buf 3: video-cap 0xabcdef03+16777216, used 0
v4l2: buf 4: video-cap 0xabcdef04+16777216, used 0
v4l2: buf 5: video-cap 0xabcdef05+16777216, used 0
v4l2: buf 6: video-cap 0xabcdef06+16777216, used 0
v4l2: buf 7: video-cap 0xabcdef07+16777216, used 0
v4l2: buf 8: video-cap 0xabcdef08+16777216, used 0
v4l2: buf 9: video-cap 0xabcdef09+16777216, used 0
v4l2: buf 10: video-cap 0xabcdef0a+16777216, used 0
v4l2: buf 11: video-cap 0xabcdef0b+16777216, used 0
v4l2: buf 12: video-cap 0xabcdef0c+16777216, used 0
v4l2: buf 13: video-cap 0xabcdef0d+16777216, used 0
v4l2: buf 14: video-cap 0xabcdef0e+16777216, used 0
v4l2: buf 15: video-cap 0xabcdef0f+16777216, used 0
v4l2: start ts=47580553178000
rec 0:00.00  -  a/r: -0.00s [0], a/v: -0.00s [0]  
movie_writer_stop
fifo conv: EOF 1/1
fifo video: EOF 1/1
convert_thread done [pid=31119]
writer_video_thread done
v4l2: buf 0: video-cap 0xabcdef00+16777216, used 115200
v4l2: buf 1: video-cap 0xabcdef01+16777216, used 0
v4l2: buf 2: video-cap 0xabcdef02+16777216, used 0
v4l2: buf 3: video-cap 0xabcdef03+16777216, used 0
v4l2: buf 4: video-cap 0xabcdef04+16777216, used 0
v4l2: buf 5: video-cap 0xabcdef05+16777216, used 0
v4l2: buf 6: video-cap 0xabcdef06+16777216, used 0
v4l2: buf 7: video-cap 0xabcdef07+16777216, used 0
v4l2: buf 8: video-cap 0xabcdef08+16777216, used 0
v4l2: buf 9: video-cap 0xabcdef09+16777216, used 0
v4l2: buf 10: video-cap 0xabcdef0a+16777216, used 0
v4l2: buf 11: video-cap 0xabcdef0b+16777216, used 0
v4l2: buf 12: video-cap 0xabcdef0c+16777216, used 0
v4l2: buf 13: video-cap 0xabcdef0d+16777216, used 0
v4l2: buf 14: video-cap 0xabcdef0e+16777216, used 0
v4l2: buf 15: video-cap 0xabcdef0f+16777216, used 0
fifo max fill: audio 0/0, video 1/16, convert 1/16  
v4l2: close
share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.