[FFmpeg-user] Unable to capture video from a cx231xx card on ubuntu 14.04

Mike Makowski mak66345 at gmail.com
Thu Jul 3 06:38:24 CEST 2014


I am running ffmpeg on ubuntu 14.04 LTS

I have a Hauppauge USB Live-2 video capture card connecting a Sony
TR33 Camcorder to a USB2 port and am trying to digitize the video.
The problem is that whenever I turn on the camcorder, ffmpeg seems
to capture a single blue frame that is somewhat distorted (skewed)
but recognizable as coming from the camcorder. While the
camcorder is on the frame count stops incrementing and the
corresponding diagnostic information (fps, q, ...) remains static.
If the camcorder is then turned off, the frame count advances and
the diagnostic information updates.

The cx231xx driver for the Hauppauge video card appears to be
installed properly.

-----------------------
v4l2-ctl --get-fmt-video -d /dev/video1 --all

Driver Info (not using libv4l2):
Driver name   : cx231xx
Card type     : Hauppauge USB Live 2
 Bus info      : usb-0000:00:14.0-11
Driver version: 3.13.11
Capabilities  : 0x85000011
 Video Capture
VBI Capture
Read/Write
Streaming
 Device Capabilities
Device Caps   : 0x05000001
Video Capture
 Read/Write
Streaming
Priority: 2
Video input : 0 (Composite1: no signal, no hsync lock.)
Video Standard = 0x000000ff
PAL-B/B1/G/H/I/D/D1/K
Format Video Capture:
Width/Height  : 720/576
 Pixel Format  : 'YUYV'
Field         : Interlaced
Bytes per Line: 1440
 Size Image    : 829440
Colorspace    : Broadcast NTSC/PAL (SMPTE170M/ITU601)
Crop Capability Video Capture:
 Bounds      : Left 0, Top 0, Width 720, Height 576
Default     : Left 0, Top 0, Width 720, Height 576
 Pixel Aspect: 54/59
Streaming Parameters Video Capture:
Frames per second: 25.000 (25/1)
Read buffers     : 2

User Controls

                     brightness (int)    : min=0 max=255 step=1 default=128
value=128 flags=slider
                       contrast (int)    : min=0 max=127 step=1 default=64
value=64 flags=slider
                     saturation (int)    : min=0 max=127 step=1 default=64
value=64 flags=slider
                            hue (int)    : min=-128 max=127 step=1
default=0 value=0 flags=slider
                         volume (int)    : min=0 max=65535 step=655
default=60928 value=60928 flags=slider
                        balance (int)    : min=0 max=65535 step=655
default=32768 value=32768 flags=slider
                           bass (int)    : min=0 max=65535 step=655
default=32768 value=32768 flags=slider
                         treble (int)    : min=0 max=65535 step=655
default=32768 value=32768 flags=slider
                           mute (bool)   : default=0 value=0
-------------------
The line "Video input : 0 (Composite1: no signal, no hsync lock.)" ->
"Video input : 0 (Composite1: ok)"if
the camcorder is turned on when v4l2-ctl is executed. Also

ls /dev/v4l/by-id
usb-046d_0809_0CE9EA59-video-index0
 usb-Hauppauge_WinTV_USB2a_0013501619-video-index0

-------------------

Output from ffmpeg is as follows:

ffmpeg -y -loglevel debug -t 7 -f rawvideo -s pal -pix_fmt yuyv422 -i
/dev/video1 -an -s pal -pix_fmt yuv420p -b:v 20.736M rawvideo.nut
ffmpeg version 1.2.6-7:1.2.6-1~trusty1 Copyright (c) 2000-2014 the FFmpeg
developers
  built on Apr 26 2014 18:52:58 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
  configuration: --arch=amd64 --disable-stripping --enable-avresample
--enable-pthreads --enable-runtime-cpudetect
--extra-version='7:1.2.6-1~trusty1' --libdir=/usr/lib/x86_64-linux-gnu
--prefix=/usr --enable-bzlib --enable-libdc1394 --enable-libfreetype
--enable-frei0r --enable-gnutls --enable-libgsm --enable-libmp3lame
--enable-librtmp --enable-libopencv --enable-libopenjpeg --enable-libopus
--enable-libpulse --enable-libschroedinger --enable-libspeex
--enable-libtheora --enable-vaapi --enable-vdpau --enable-libvorbis
--enable-libvpx --enable-zlib --enable-gpl --enable-postproc
--enable-libcdio --enable-x11grab --enable-libx264
--shlibdir=/usr/lib/x86_64-linux-gnu --enable-shared --disable-static
  libavutil      52. 18.100 / 52. 18.100
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.104 / 54. 63.104
  libavdevice    53.  5.103 / 53.  5.103
  libavfilter     3. 42.103 /  3. 42.103
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Splitting the commandline.
Reading option '-y' ... matched as option 'y' (overwrite output files) with
argument '1'.
Reading option '-loglevel' ... matched as option 'loglevel' (set libav*
logging level) with argument 'debug'.
Reading option '-t' ... matched as option 't' (record or transcode
"duration" seconds of audio/video) with argument '7'.
Reading option '-f' ... matched as option 'f' (force format) with argument
'rawvideo'.
Reading option '-s' ... matched as option 's' (set frame size (WxH or
abbreviation)) with argument 'pal'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuyv422'.
Reading option '-i' ... matched as input file with argument '/dev/video1'.
Reading option '-an' ... matched as option 'an' (disable audio) with
argument '1'.
Reading option '-s' ... matched as option 's' (set frame size (WxH or
abbreviation)) with argument 'pal'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuv420p'.
Reading option '-b:v' ... matched as option 'b' (video bitrate (please use
-b:v)) with argument '20.736M'.
Reading option 'rawvideo.nut' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option y (overwrite output files) with argument 1.
Applying option loglevel (set libav* logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file /dev/video1.
Applying option t (record or transcode "duration" seconds of audio/video)
with argument 7.
Applying option f (force format) with argument rawvideo.
Applying option s (set frame size (WxH or abbreviation)) with argument pal.
Applying option pix_fmt (set pixel format) with argument yuyv422.
Successfully parsed a group of options.
Opening an input file: /dev/video1.
[rawvideo @ 0x1000820] File position before avformat_find_stream_info() is 0
[rawvideo @ 0x1000820] All info found
[rawvideo @ 0x1000820] Estimating duration from bitrate, this may be
inaccurate
[rawvideo @ 0x1000820] File position after avformat_find_stream_info() is
829440
Input #0, rawvideo, from '/dev/video1':
  Duration: N/A, start: 0.000000, bitrate: 165888 kb/s
    Stream #0:0, 1, 1/25: Video: rawvideo (YUY2 / 0x32595559), yuyv422,
720x576, 1/25, 165888 kb/s, 25 tbr, 25 tbn, 25 tbc
Successfully opened the file.
-t is not an input option, keeping it for the next output; consider fixing
your command line.
Parsing a group of options: output file rawvideo.nut.
Applying option an (disable audio) with argument 1.
Applying option s (set frame size (WxH or abbreviation)) with argument pal.
Applying option pix_fmt (set pixel format) with argument yuv420p.
Applying option b:v (video bitrate (please use -b:v)) with argument 20.736M.
Successfully parsed a group of options.
Opening an output file: rawvideo.nut.
Successfully opened the file.
[buffer @ 0xfe4d20] Setting entry with key 'video_size' to value '720x576'
[buffer @ 0xfe4d20] Setting entry with key 'pix_fmt' to value '1'
[buffer @ 0xfe4d20] Setting entry with key 'time_base' to value '1/25'
[buffer @ 0xfe4d20] Setting entry with key 'pixel_aspect' to value '0/1'
[buffer @ 0xfe4d20] Setting entry with key 'sws_param' to value 'flags=2'
[buffer @ 0xfe4d20] Setting entry with key 'frame_rate' to value '25/1'
[graph 0 input from stream 0:0 @ 0x10006c0] w:720 h:576 pixfmt:yuyv422
tb:1/25 fr:25/1 sar:0/1 sws_param:flags=2
[scale @ 0xff6f00] Setting 'w' to value '720'
[scale @ 0xff6f00] Setting 'h' to value '576'
[scale @ 0xff6f00] Setting 'flags' to value '0x4'
[scaler for output stream 0:0 @ 0xff6e00] w:720 h:576 flags:'0x4' interl:0
[scaler for output stream 0:0 @ 0xff6e00] w:720 h:576 fmt:yuyv422 sar:0/1
-> w:720 h:576 fmt:yuv420p sar:0/1 flags:0x4
[mpeg4 @ 0xff5ba0] detected 8 logical cores
[mpeg4 @ 0xff5ba0] intra_quant_bias = 0 inter_quant_bias = -64
Output #0, nut, to 'rawvideo.nut':
  Metadata:
    encoder         : Lavf54.63.104
    Stream #0:0, 0, 1/51200: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p,
720x576, 1/25, q=2-31, 20736 kb/s, 51200 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo -> mpeg4)
Press [q] to stop, [?] for help
No more output streams to write to, finishing.=00:00:06.96 bitrate=
489.9kbits/s
frame=  175 fps=9.8 q=2.0 Lsize=     439kB time=00:00:07.00 bitrate=
514.3kbits/s
video:438kB audio:0kB subtitle:0 global headers:0kB muxing overhead
0.262922%
Statistics: 145981440 bytes read, 0 seeks(2) (xim-xlib/warning) Warning:
XCreateIC failed.

---------------------

This version of ffmpeg was obtained from the severinson website.
I have also built version 2.1.5 of ffmpeg as obtained from the
ffmpeg.org website with the same result. I was concerned about
the option --arch=amd64 and recompiled with --arch=x86_64, but this
also made no difference.

Any suggestions would be welcome.

Cheers,

Mike


More information about the ffmpeg-user mailing list