Opened 3 years ago

Last modified 3 years ago

#2410 open defect

ffmpeg down with video4linux2.

Reported by: dinhka Owned by:
Priority: normal Component: avdevice
Version: git-master Keywords: v4l2
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by cehoyos)

I have Easycap DC60 card(a video capture card). it runs on kernel 3.2 with stk1160 driver. I download ffmpeg source code on 3013/03/29 and compile it.
when I run a commandline:

[root@localhost ~]# ffmpeg -f video4linux2 -pix_fmt yuv420p -i /dev/video0  -vco                                                      dec mpeg4 -b:v 1200k -y test.avi
ffmpeg version N-51426-gdd17843 Copyright (c) 2000-2013 the FFmpeg developers
  built on Mar 29 2013 00:22:28 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-3)
  configuration: --enable-version3 --enable-libopencore-amrnb --enable-libopenco                                                      re-amrwb --enable-avfilter --enable-nonfree --enable-libmp3lame --enable-gpl --e                                                      nable-libfaac --enable-libx264 --enable-pthreads --disable-stripping --enable-li                                                      bass --extra-cflags=-I/usr/local/include --disable-debug
  libavutil      52. 22.101 / 52. 22.101
  libavcodec     55.  2.100 / 55.  2.100
  libavformat    55.  0.100 / 55.  0.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 48.105 /  3. 48.105
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
'''[video4linux2,v4l2 @ 0x99704a0] ioctl(VIDIOC_G_PARM): Inappropriate ioctl for de                                                      vice
/dev/video0: Inappropriate ioctl for device'''

Change History (19)

comment:1 follow-up: Changed 3 years ago by cehoyos

  • Keywords v4l2 added; ioctl(VIDIOC_G_PARM): Inappropriate ioctl for device removed

Does it work with an older version of FFmpeg?

comment:2 Changed 3 years ago by cehoyos

  • Description modified (diff)

comment:3 in reply to: ↑ 1 Changed 3 years ago by dinhka

Replying to cehoyos:

Does it work with an older version of FFmpeg?

I try ffmpeg git master, ffmpeg 1.2, ffmpeg 1.1.4 with the same error.
I try ffmpeg 0.5.12, the result as:

[root@localhost ffmpeg-0.5.12]# ffmpeg -f video4linux2 -pix_fmt yuv420p -i /dev/video0 -vcodec mpeg4 -b:v 1200k -y test.avi
FFmpeg version 0.5.12, Copyright (c) 2000-2013 Fabrice Bellard, et al.

configuration: --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-avfilter --enable-nonfree --enable-libmp3lame --enable-gpl --enable-libfaac --enable-libx264 --enable-pthreads --disable-stripping --extra-cflags=-I/usr/local/include --disable-debug
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 1 / 52.20. 1
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
built on Mar 29 2013 11:23:13, gcc: 4.4.7 20120313 (Red Hat 4.4.7-3)

[video4linux2 @ 0xa317290]Wrong size (0x0)
/dev/video0: Error while opening file

comment:4 follow-up: Changed 3 years ago by cehoyos

  • Priority changed from important to normal

Did you already try to remove "-pix_fmt yuv420p" ?
And please add the output for the following command:
$ ffmpeg -list_formats all -f v4l2 -i /dev/video0

comment:5 in reply to: ↑ 4 Changed 3 years ago by dinhka

Replying to cehoyos:

Did you already try to remove "-pix_fmt yuv420p" ?
And please add the output for the following command:
$ ffmpeg -list_formats all -f v4l2 -i /dev/video0

Hi,

  1. remove -pix_fmt yuv420p: ffmpeg -f video4linux2 -i /dev/video0 -vcodec mpeg4 -b:v 1200k -y test.avi

ffmpeg version N-51426-gdd17843 Copyright (c) 2000-2013 the FFmpeg developers

built on Mar 29 2013 00:22:28 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-3)
configuration: --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-avfilter --enable-nonfree --enable-libmp3lame --enable-gpl --enable-libfaac --enable-libx264 --enable-pthreads --disable-stripping --enable-libass --extra-cflags=-I/usr/local/include --disable-debug
libavutil 52. 22.101 / 52. 22.101
libavcodec 55. 2.100 / 55. 2.100
libavformat 55. 0.100 / 55. 0.100
libavdevice 55. 0.100 / 55. 0.100
libavfilter 3. 48.105 / 3. 48.105
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100

[video4linux2,v4l2 @ 0x9ea2420] ioctl(VIDIOC_G_PARM): Inappropriate ioctl for device
/dev/video0: Inappropriate ioctl for device

  1. ffmpeg -list_formats all -f v4l2 -i /dev/video0 -vcodec mpeg4 -b:v 1200k -y test.avi

ffmpeg version N-51426-gdd17843 Copyright (c) 2000-2013 the FFmpeg developers

built on Mar 29 2013 00:22:28 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-3)
configuration: --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-avfilter --enable-nonfree --enable-libmp3lame --enable-gpl --enable-libfaac --enable-libx264 --enable-pthreads --disable-stripping --enable-libass --extra-cflags=-I/usr/local/include --disable-debug
libavutil 52. 22.101 / 52. 22.101
libavcodec 55. 2.100 / 55. 2.100
libavformat 55. 0.100 / 55. 0.100
libavdevice 55. 0.100 / 55. 0.100
libavfilter 3. 48.105 / 3. 48.105
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100

[video4linux2,v4l2 @ 0x93e14a0] Raw : uyvy422 : 16 bpp YUY2, 4:2:2, packed :
/dev/video0: Immediate exit requested

best regards.

comment:6 follow-up: Changed 3 years ago by cehoyos

  • Component changed from undetermined to avdevice
  • Version changed from unspecified to git-master

Could you test if version 2d777bb works?

comment:7 in reply to: ↑ 6 ; follow-up: Changed 3 years ago by dinhka

Replying to cehoyos:

Could you test if version 2d777bb works?

Hi,

How do I get 2d777bb version?

comment:8 in reply to: ↑ 7 ; follow-up: Changed 3 years ago by cehoyos

Replying to dinhka:

Replying to cehoyos:

Could you test if version 2d777bb works?

How do I get 2d777bb version?

Either with "git checkout 2d777bb" or at http://git.videolan.org/?p=ffmpeg.git;a=snapshot;h=2d777bb;sf=tgz

comment:9 in reply to: ↑ 8 ; follow-up: Changed 3 years ago by dinhka

Replying to cehoyos:

Replying to dinhka:

Replying to cehoyos:

Could you test if version 2d777bb works?

How do I get 2d777bb version?

Either with "git checkout 2d777bb" or at http://git.videolan.org/?p=ffmpeg.git;a=snapshot;h=2d777bb;sf=tgz

Hi,

I have installed 2d777bb version.

  1. test case 1

ffmpeg -f v4l2 -i /dev/video0 -vcodec mpeg4 -b:v

FFmpeg version UNKNOWN, Copyright (c) 2000-2011 the FFmpeg developers

built on Mar 29 2013 13:23:35 with gcc 4.4.7 20120313 (Red Hat 4.4.7-3)
configuration: --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-avfilter --enable-nonfree --enable-libmp3lame --enable-gpl --enable-libfaac --enable-libx264 --enable-pthreads --disable-stripping --extra-cflags=-I/usr/local/include --disable-debug
libavutil 50.36. 0 / 50.36. 0
libavcore 0.16. 0 / 0.16. 0
libavcodec 52.102. 0 / 52.102. 0
libavformat 52.92. 0 / 52.92. 0
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.72. 0 / 1.72. 0
libswscale 0.12. 0 / 0.12. 0

Unknown input format: 'v4l2'

  1. test case 2. the process hang.

ffmpeg -f video4linux2 -pix_fmt yuv420p -i /dev/video0 -vcodec mpeg4 -b:v 1200k -y test.avi

FFmpeg version UNKNOWN, Copyright (c) 2000-2011 the FFmpeg developers

built on Mar 29 2013 13:23:35 with gcc 4.4.7 20120313 (Red Hat 4.4.7-3)
configuration: --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-avfilter --enable-nonfree --enable-libmp3lame --enable-gpl --enable-libfaac --enable-libx264 --enable-pthreads --disable-stripping --extra-cflags=-I/usr/local/include --disable-debug
libavutil 50.36. 0 / 50.36. 0
libavcore 0.16. 0 / 0.16. 0
libavcodec 52.102. 0 / 52.102. 0
libavformat 52.92. 0 / 52.92. 0
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.72. 0 / 1.72. 0
libswscale 0.12. 0 / 0.12. 0



output of dmesg:

stk1160: vma=0xf3e5d3e8
stk1160: vma start=0xb74ce000, size=692224 (0)
stk1160: vma=0xf3e5d128
stk1160: vma start=0xb7425000, size=692224 (0)
stk1160: vma=0xf3e5d230
stk1160: vma start=0xb737c000, size=692224 (0)
stk1160: vma=0xf3e5d180
stk1160: vma start=0xb72d3000, size=692224 (0)
stk1160: vma=0xf3e5d390
stk1160: vma start=0xb722a000, size=692224 (0)
stk1160: vma=0xf3e5da18
stk1160: vma start=0xb7181000, size=692224 (0)
stk1160: vma=0xf218d860
stk1160: vma start=0xb70d8000, size=692224 (0)
stk1160: vma=0xf218d7b0
stk1160: vma start=0xb702f000, size=692224 (0)
stk1160: vma=0xf218db78
stk1160: vma start=0xb6f86000, size=692224 (0)
stk1160: vma=0xf218d910
stk1160: vma start=0xb6edd000, size=692224 (0)
stk1160: vma=0xf218d808
stk1160: vma start=0xb6e34000, size=692224 (0)
stk1160: vma=0xf218d968
stk1160: vma start=0xb6d8b000, size=692224 (0)
stk1160: vma=0xf218d8b8
stk1160: vma start=0xb6ce2000, size=692224 (0)
stk1160: vma=0xf218dbd0
stk1160: vma start=0xb6c39000, size=692224 (0)
stk1160: vma=0xf218dc28
stk1160: vma start=0xb6b90000, size=692224 (0)
stk1160: vma=0xf218da70
stk1160: vma start=0xb6ae7000, size=692224 (0)
stk1160: vma=0xf2151180
stk1160: vma start=0xb6a3e000, size=692224 (0)
stk1160: vma=0xf2151de0
stk1160: vma start=0xb6995000, size=692224 (0)
stk1160: vma=0xf2151bd0
stk1160: vma start=0xb68ec000, size=692224 (0)
stk1160: vma=0xf2151338
stk1160: vma start=0xb6843000, size=692224 (0)
stk1160: vma=0xf21518b8
stk1160: vma start=0xb679a000, size=692224 (0)
stk1160: vma=0xf2151c28
stk1160: vma start=0xb66f1000, size=692224 (0)
stk1160: vma=0xf2151f98
stk1160: vma start=0xb6648000, size=692224 (0)
stk1160: vma=0xf2151440
stk1160: vma start=0xb659f000, size=692224 (0)
stk1160: vma=0xf2133e38
stk1160: vma start=0xb64f6000, size=692224 (0)
stk1160: vma=0xf2133d88
stk1160: vma start=0xb644d000, size=692224 (0)
stk1160: vma=0xf21335f8
stk1160: vma start=0xb63a4000, size=692224 (0)
stk1160: vma=0xf2133860
stk1160: vma start=0xb62fb000, size=692224 (0)
stk1160: vma=0xf2133968
stk1160: vma start=0xb6252000, size=692224 (0)
stk1160: vma=0xf21334f0
stk1160: vma start=0xb61a9000, size=692224 (0)
stk1160: vma=0xf2133e90
stk1160: vma start=0xb6100000, size=692224 (0)
stk1160: vma=0xf2133ac8
stk1160: vma start=0xb6057000, size=692224 (0)
stk1160: setting alternate 5
stk1160: minimum isoc packet size: 3072 (alt=5)
stk1160: setting alt 5 with wMaxPacketSize=3072
stk1160: allocating urbs...
stk1160: urbs allocated
stk1160: streaming started


comment:10 in reply to: ↑ 9 ; follow-up: Changed 3 years ago by cehoyos

Replying to dinhka:

  1. test case 2. the process hang.

ffmpeg -f video4linux2 -pix_fmt yuv420p -i /dev/video0 -vcodec mpeg4 -b:v 1200k -y test.avi

Please confirm that 2d777bb also hangs if you remove "-pix_fmt yuv420p".
Does "-loglevel 99" show some output?
Does MPlayer work with your card?

comment:11 in reply to: ↑ 10 Changed 3 years ago by dinhka

Replying to cehoyos:

Replying to dinhka:

  1. test case 2. the process hang.

ffmpeg -f video4linux2 -pix_fmt yuv420p -i /dev/video0 -vcodec mpeg4 -b:v 1200k -y test.avi

Please confirm that 2d777bb also hangs if you remove "-pix_fmt yuv420p".
Does "-loglevel 99" show some output?
Does MPlayer work with your card?

Hi,

  1. remove "-pix_fmt yuv420p" still hang.
  2. ffmpeg -loglevel 99 -f video4linux2 -i /dev/video0 -vcodec mpeg4 -b:v 1200k -y test.avi

FFmpeg version UNKNOWN, Copyright (c) 2000-2011 the FFmpeg developers

built on Mar 29 2013 13:23:35 with gcc 4.4.7 20120313 (Red Hat 4.4.7-3)
configuration: --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-avfilter --enable-nonfree --enable-libmp3lame --enable-gpl --enable-libfaac --enable-libx264 --enable-pthreads --disable-stripping --extra-cflags=-I/usr/local/include --disable-debug
libavutil 50.36. 0 / 50.36. 0
libavcore 0.16. 0 / 0.16. 0
libavcodec 52.102. 0 / 52.102. 0
libavformat 52.92. 0 / 52.92. 0
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.72. 0 / 1.72. 0
libswscale 0.12. 0 / 0.12. 0

[video4linux2 @ 0xa7b64c0] [3]Capabilities: 5000001
[video4linux2 @ 0xa7b64c0] Querying the device for the current frame size
[video4linux2 @ 0xa7b64c0] Setting frame size to 720x480
[video4linux2 @ 0xa7b64c0] The V4L2 driver set input_id: 0, input: Composite0

  1. I test my video card on windows xp is OK. the hardware is good.

comment:12 follow-up: Changed 3 years ago by cehoyos

Is there any software on Linux (MPlayer or another one) that allows playback / recording with your video card?

comment:13 in reply to: ↑ 12 ; follow-up: Changed 3 years ago by dinhka

Replying to cehoyos:

Is there any software on Linux (MPlayer or another one) that allows playback / recording with your video card?

Yes, if I use easycap driver then ffmpeg can work with the card. but the driver has some limition. so I use stk1160 driver, that come with kernel 3.7.x.

Last edited 3 years ago by dinhka (previous) (diff)

comment:14 in reply to: ↑ 13 ; follow-up: Changed 3 years ago by cehoyos

Replying to dinhka:

Replying to cehoyos:

Is there any software on Linux (MPlayer or another one) that allows playback / recording with your video card?

Yes, if I use easycap driver then ffmpeg can work with the card. but the driver has some limition. so I use stk1160 driver, that come with kernel 3.7.x.

So if I understand correctly, you are reporting a Linux kernel driver bug to the FFmpeg bug tracker, or do I miss something?

comment:15 in reply to: ↑ 14 ; follow-up: Changed 3 years ago by dinhka

Replying to cehoyos:

Replying to dinhka:

Replying to cehoyos:

Is there any software on Linux (MPlayer or another one) that allows playback / recording with your video card?

Yes, if I use easycap driver then ffmpeg can work with the card. but the driver has some limition. so I use stk1160 driver, that come with kernel 3.7.x.

So if I understand correctly, you are reporting a Linux kernel driver bug to the FFmpeg bug tracker, or do I miss something?

Hi,

I don't know where does the bug come from. I asked the author of stk1160 driver, he said the bug is in ffmpeg, I am not sure, I am just end-user.

Please help me.

comment:16 in reply to: ↑ 15 ; follow-up: Changed 3 years ago by cehoyos

Replying to dinhka:

I asked the author of stk1160 driver, he said the bug is in ffmpeg

So there is software (any Linux software) that works with the driver?
Did you already test MPlayer?

comment:17 in reply to: ↑ 16 Changed 3 years ago by dinhka

Replying to cehoyos:

Replying to dinhka:

I asked the author of stk1160 driver, he said the bug is in ffmpeg

So there is software (any Linux software) that works with the driver?
Did you already test MPlayer?

Hi,

I use MEncoder:

mencoder tv:// -tv driver=v4l2:width=720:height=576:norm=PAL:outfmt=uyvy:device=/dev/video0:input=0:fps=25 -o test.mp4

MEncoder SVN-r31628-4.4.6 (C) 2000-2010 MPlayer Team

WARNING: OUTPUT FILE FORMAT IS _AVI_. See -of help.
success: format: 9 data: 0x0 - 0x0
TV file format detected.
Selected driver: v4l2

name: Video 4 Linux 2 input
author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
comment: first try, more to come ;-)

Selected device: stk1160

Capabilites: video capture read/write streaming
supported norms: 0 = NTSC; 1 = NTSC-M; 2 = NTSC-M-JP; 3 = NTSC-M-KR; 4 = NTSC-443; 5 = PAL; 6 = PAL-BG; 7 = PAL-H; 8 = PAL-I; 9 = PAL-DK; 10 = PAL-M; 11 = PAL-N; 12 = PAL-Nc; 13 = PAL-60; 14 = SECAM; 15 = SECAM-B; 16 = SECAM-G; 17 = SECAM-H; 18 = SECAM-DK; 19 = SECAM-L; 20 = SECAM-Lc;
inputs: 0 = Composite0; 1 = Composite1; 2 = Composite2; 3 = Composite3;
Current input: 0
Current format: UYVY

Selected input hasn't got a tuner!
Unable to open '/dev/dsp': No such file or directory
v4l2: ioctl set mute failed: Invalid argument
v4l2: 0 frames successfully processed, 0 frames dropped.
============ Sorry, this file format is not recognized/supported =============

If this file is an AVI, ASF or MPEG stream, please contact the author!

Cannot open demuxer.

Exiting...

  1. I use vlc, that work


/usr/bin/cvlc v4l2:///dev/video0:input=1:width=720:height=576 --run-time 10 --sout='#transcode{vcodec=mp4v, vb=1024}:std{access=file, mux=avi, dst=file_name.avi}';

VLC media player 1.1.13 The Luggage (revision exported)
Warning: call to srand(1364557781)
Warning: call to rand()
Blocked: call to unsetenv("DBUS_ACTIVATION_ADDRESS")
Blocked: call to unsetenv("DBUS_ACTIVATION_BUS_TYPE")
[0x96c98ec] inhibit interface error: Failed to connect to the D-Bus session daemon: /bin/dbus-launch terminated abnormally without any error message
[0x96c98ec] main interface error: no suitable interface module
[0x96cb6e4] main interface error: no suitable interface module
[0x96a38fc] main libvlc error: interface "globalhotkeys,none" initialization failed
[0x96cb6e4] dummy interface: using the dummy interface module...
[0xb22025fc] mux_avi mux: stream[0] duration:9 totalsize:1355387 frames:249 fps:25.075447 KiB/s:1066

comment:18 follow-up: Changed 3 years ago by cehoyos

  • Status changed from new to open

comment:19 in reply to: ↑ 18 Changed 3 years ago by dinhka

Replying to cehoyos:

Hi,

I have a test case then ffmpeg work with stk1160 driver.

  1. reboot my pc the stk1160 driver inits ok:


usb 2-2: New device Syntek Semiconductor USB 2.0 Video Capture Controller @ 480 Mbps (05e1:0408, interface 0, class 0)

usb 2-2: video interface 0 found
stk1160: driver ver 0.9.4 successfully loaded
stk1160: registers to NTSC like standard
AC'97 0 access is not valid [0x0], removing mixer.
stk1160 2-2:1.0: V4L2 device registered as video0
usbcore: registered new interface driver stk1160
usbcore: registered new interface driver snd-usb-audio

  1. run command ffmpeg -f video4linux2 -pix_fmt yuv420p -i /dev/video0 -f alsa -ar 22050 -ac 2 -acodec pcm_s16le -i hw:1 -vcodec mpeg4 -vtag DX50 -b 1200k -r 25 -acodec libmp3lame -ar 44100 -ac 2 -ab 128k -y test.avi

bug as:
[video4linux2,v4l2 @ 0x964f400] The V4L2 driver changed the video from 720x576 to 720x480
[video4linux2,v4l2 @ 0x964f400] ioctl(VIDIOC_G_PARM): Inappropriate ioctl for device
/dev/video0: Inappropriate ioctl for device

  1. I run next commandline

mencoder tv:// -tv driver=v4l2:width=720:height=576:norm=PAL:outfmt=uyvy:device=/dev/video0:input=0:fps=25 -o test.mp4

MEncoder SVN-r31628-4.4.6 (C) 2000-2010 MPlayer Team

WARNING: OUTPUT FILE FORMAT IS _AVI_. See -of help.
success: format: 9 data: 0x0 - 0x0
TV file format detected.
Selected driver: v4l2

name: Video 4 Linux 2 input
author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
comment: first try, more to come ;-)

Selected device: stk1160

Capabilites: video capture read/write streaming
supported norms: 0 = NTSC; 1 = NTSC-M; 2 = NTSC-M-JP; 3 = NTSC-M-KR; 4 = NTSC-443; 5 = PAL; 6 = PAL-BG; 7 = PAL-H; 8 = PAL-I; 9 = PAL-DK; 10 = PAL-M; 11 = PAL-N; 12 = PAL-Nc; 13 = PAL-60; 14 = SECAM; 15 = SECAM-B; 16 = SECAM-G; 17 = SECAM-H; 18 = SECAM-DK; 19 = SECAM-L; 20 = SECAM-Lc;
inputs: 0 = Composite0; 1 = Composite1; 2 = Composite2; 3 = Composite3;
Current input: 0
Current format: UYVY

Selected input hasn't got a tuner!
Unable to open '/dev/dsp': No such file or directory
v4l2: ioctl set mute failed: Invalid argument
v4l2: 0 frames successfully processed, 0 frames dropped.
============ Sorry, this file format is not recognized/supported =============

If this file is an AVI, ASF or MPEG stream, please contact the author!

Cannot open demuxer.

Exiting...

  1. then I run again the commandline in step 2, ffmpeg work with stk1160 driver.

ffmpeg -loglevel 99 -f video4linux2 -i /dev/video0 -vcodec mpeg4 -b 1200k -y test.avi

ffmpeg version N-51426-gdd17843 Copyright (c) 2000-2013 the FFmpeg developers

built on Mar 29 2013 00:22:28 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-3)
configuration: --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-avfilter --enable-nonfree --enable-libmp3lame --enable-gpl --enable-libfaac --enable-libx264 --enable-pthreads --disable-stripping --enable-libass --extra-cflags=-I/usr/local/include --disable-debug
libavutil 52. 22.101 / 52. 22.101
libavcodec 55. 2.100 / 55. 2.100
libavformat 55. 0.100 / 55. 0.100
libavdevice 55. 0.100 / 55. 0.100
libavfilter 3. 48.105 / 3. 48.105
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 '-loglevel' ... matched as option 'loglevel' (set libav* logging level) with argument '99'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'video4linux2'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'mpeg4'.
Reading option '-b' ... matched as option 'b' (video bitrate (please use -b:v)) with argument '1200k'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option 'test.avi' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set libav* logging level) with argument 99.
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file /dev/video0.
Applying option f (force format) with argument video4linux2.
Successfully parsed a group of options.
Opening an input file: /dev/video0.
[video4linux2,v4l2 @ 0x9df4440] fd:3 capabilities:5000001
[video4linux2,v4l2 @ 0x9df4440] Current input_channel: 0, input_name: Composite0
[video4linux2,v4l2 @ 0x9df4440] Querying the device for the current frame size
[video4linux2,v4l2 @ 0x9df4440] Setting frame size to 720x576
[video4linux2,v4l2 @ 0x9df4440] Trying to set codec:rawvideo pix_fmt:yuv420p

Last message repeated 1 times

[video4linux2,v4l2 @ 0x9df4440] Trying to set codec:rawvideo pix_fmt:yuv422p
[video4linux2,v4l2 @ 0x9df4440] Trying to set codec:rawvideo pix_fmt:yuyv422
[video4linux2,v4l2 @ 0x9df4440] Trying to set codec:rawvideo pix_fmt:uyvy422
[video4linux2,v4l2 @ 0x9df4440] The V4L2 driver is using the interlaced mode
[video4linux2,v4l2 @ 0x9df4440] Current standard: PAL, id: 255, frameperiod: 1/25
[video4linux2,v4l2 @ 0x9df4440] All info found
[video4linux2,v4l2 @ 0x9df4440] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video0':

Duration: N/A, start: 1364559870.645412, bitrate: 165888 kb/s

Stream #0:0, 1, 1/1000000: Video: rawvideo (UYVY / 0x59565955), uyvy422, 720x576, 1/1000000, 165888 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc

Successfully opened the file.
Parsing a group of options: output file test.avi.
Applying option vcodec (force video codec ('copy' to copy stream)) with argument mpeg4.
Applying option b (video bitrate (please use -b:v)) with argument 1200k.
Please use -b:a or -b:v, -b is ambiguous
Successfully parsed a group of options.
Opening an output file: test.avi.
Successfully opened the file.
[buffer @ 0x9de3380] Setting entry with key 'video_size' to value '720x576'
[buffer @ 0x9de3380] Setting entry with key 'pix_fmt' to value '17'
[buffer @ 0x9de3380] Setting entry with key 'time_base' to value '1/1000000'
[buffer @ 0x9de3380] Setting entry with key 'pixel_aspect' to value '0/1'
[buffer @ 0x9de3380] Setting entry with key 'sws_param' to value 'flags=2'
[buffer @ 0x9de3380] Setting entry with key 'frame_rate' to value '25/1'
[graph 0 input from stream 0:0 @ 0x9df5840] w:720 h:576 pixfmt:uyvy422 tb:1/1000000 fr:25/1 sar:0/1 sws_param:flags=2
[scale @ 0x9de3a20] Setting 'w' to value '0'
[scale @ 0x9de3a20] Setting 'h' to value '0'
[scale @ 0x9de3a20] Setting 'flags' to value '0x4'
[auto-inserted scaler 0 @ 0x9de3960] w:0 h:0 flags:'0x4' interl:0
[format @ 0x9de34c0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'Parsed_null_0' and the filter 'format'
[AVFilterGraph @ 0x9dee6e0] query_formats: 4 queried, 3 merged, 1 already done, 0 delayed
[auto-inserted scaler 0 @ 0x9de3960] w:720 h:576 fmt:uyvy422 sar:0/1 -> w:720 h:576 fmt:yuv420p sar:0/1 flags:0x4
[mpeg4 @ 0x9df6160] detected 2 logical cores
[mpeg4 @ 0x9df6160] intra_quant_bias = 0 inter_quant_bias = -64
Output #0, avi, to 'test.avi':

Metadata:

ISFT : Lavf55.0.100
Stream #0:0, 0, 1/25: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 720x576, 1/25, q=2-31, 1200 kb/s, 25 tbn, 25 tbc

Stream mapping:

Stream #0:0 -> #0:0 (rawvideo -> mpeg4)

Press [q] to stop, ? for help
frame= 13 fps=0.0 q=2.0 size= 212kB time=00:00:00.52 bitrate=3332.2kbits/sframe= 26 fps= 26 q=4.5 size= 322kB time=00:00:01.04 bitrate=2535.7kbits/sframe= 39 fps= 26 q=5.7 size= 416kB time=00:00:01.56 bitrate=2182.1kbits/sframe= 51 fps= 25 q=4.7 size= 502kB time=00:00:02.04 bitrate=2015.2kbits/sframe= 57 fps= 25 q=4.3 Lsize= 523kB time=00:00:02.28 bitrate=1879.2kbits/s

So I think ffmpeg or stk1160 driver has init wrong. After I set driver=v4l2:width=720:height=576:norm=PAL:outfmt=uyvy

then it worked.

Best regards.

Note: See TracTickets for help on using tickets.