v4l2 framerate control?
Michael Kohne <[email protected]>
| Newsgroups | gmane.comp.video.mplayer.user |
|---|---|
| Message-ID | <CA+d1zCi8m4tsjJH8L3810HYC5DWiLoc-yzBtPSp-NqFeUe2UVA@mail.gmail.com> |
I'm working with a camera that supports pretty high frame rates (Imaging Source DFX 33UX273, 596 fps @ 640x480). I don't actually need to (or want to) use it at that rate at the moment and I'm having trouble understanding how to crank it down with mencoder. (I can not presently compile mencoder 1.4 on the system in question: it's an old CentOS 6 box, and there are things missing). I've got mencoder 1.3 (freshly built), and for testing, I use the command line: mencoder -endpos 1 tv:// -tv driver=v4l2:noaudio:device=/dev/video0:outfmt=YUY2:fps=30 -o dummy.avi -ovc lavc The output file is at 30 fps, and has the right amount of data, but the input (see output listing below) clearly sucked in 596 frames. How do I get mencoder to actually set the framerate in the camera? I was under the impression that setting fps in the driver section would do so, but clearly it doesn't. If I can't do that, how do I get mencoder to not touch the output settings? I've tried running "v4l2-ctl -p 30" ahead of my mencoder call, but mencoder ends up resetting the frame rate to the default for the image size. mencoder output (trimmed for size) MEncoder 1.3.0-4.4.7 (C) 2000-2016 MPlayer Team success: format: 9 data: 0x0 - 0x0 TV file format detected. Selected driver: v4l2 name: Video 4 Linux 2 input author: Martin Olschewski <[email protected]> comment: first try, more to come ;-) v4l2: your device driver does not support VIDIOC_G_STD ioctl, VIDIOC_G_PARM was used instead. Selected device: DFK 33UX273 Capabilities: video capture streaming supported norms: inputs: 0 = Camera 1; Current input: 0 Current format: YUYV tv.c: norm_from_string(pal): Bogus norm parameter, setting default. v4l2: ioctl enum norm failed: Inappropriate ioctl for device Error: Cannot set norm! Selected input hasn't got a tuner! v4l2: ioctl set mute failed: Invalid argument v4l2: ioctl query control failed: Invalid argument [V] filefmt:9 fourcc:0x32595559 size:640x480 fps:30.000 ftime:=0.0333 libavcodec version 57.24.102 (internal) Opening video filter: [expand osd=1] Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1 ========================================================================== Opening video decoder: [raw] RAW Uncompressed Video Could not find matching colorspace - retrying with -vf scale... Opening video filter: [scale] Movie-Aspect is undefined - no prescaling applied. [swscaler @ 0xb6fb8640]bicubic scaler, from yuyv422 to yuv420p using MMXEXT [swscaler @ 0xb6fb8640]using unscaled yuyv422 -> yuv420p special converter videocodec: libavcodec (640x480 fourcc=34504d46 [FMP4]) Selected video codec: [rawyuy2] vfm: raw (RAW YUY2) ========================================================================== Forcing audio preload to 0, max pts correction to 0. [mpeg4 @ 0xb6e91360]AVFrame.format is not set [mpeg4 @ 0xb6e91360]AVFrame.width or height is not set Writing header... ODML: Aspect information not (yet?) available or unspecified, not writing vprp header. Writing header... ODML: Aspect information not (yet?) available or unspecified, not writing vprp header. Pos: 0.0s 1f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.0s 2f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.0s 3f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.0s 4f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.0s 5f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.0s 6f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.0s 7f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.0s 8f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.0s 9f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.0s 10f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.0s 11f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.0s 12f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.0s 13f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.0s 14f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.0s 15f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.0s 16f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.0s 17f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.0s 18f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.0s 19f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.0s 20f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.0s 21f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.0s 22f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.0s 23f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.0s 24f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.0s 25f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.0s 26f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] [mpeg4 @ 0xb6e91360]AVFrame.format is not set [mpeg4 @ 0xb6e91360]AVFrame.width or height is not set Pos: 0.1s 27f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.1s 28f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.1s 29f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.1s 30f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.1s 31f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] <SNIP much more of the same> Pos: 0.9s 541f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.9s 542f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.9s 543f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.9s 544f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.9s 545f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.9s 546f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.9s 547f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.9s 548f ( 0%) 546.91fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.9s 549f ( 0%) 547.36fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.9s 550f ( 0%) 548.35fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.9s 551f ( 0%) 548.80fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 0.9s 552f ( 0%) 549.80fps Trem: 0min 0mb A-V:0.000 [0:0] [mpeg4 @ 0xb6e91360]AVFrame.format is not set [mpeg4 @ 0xb6e91360]AVFrame.width or height is not set Pos: 1.0s 553f ( 0%) 546.98fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 554f ( 0%) 547.97fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 555f ( 0%) 548.42fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 556f ( 0%) 549.41fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 557f ( 0%) 550.40fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 558f ( 0%) 551.38fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 559f ( 0%) 551.83fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 560f ( 0%) 547.41fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 561f ( 0%) 547.85fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 562f ( 0%) 548.83fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 563f ( 0%) 549.80fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 564f ( 0%) 550.24fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 565f ( 0%) 551.22fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 566f ( 0%) 552.20fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 567f ( 0%) 552.63fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 568f ( 0%) 548.26fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 569f ( 0%) 548.70fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 570f ( 0%) 549.66fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 571f ( 0%) 550.63fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 572f ( 0%) 551.06fps Trem: 0min 0mb A-V:0.000 [0:0] [mpeg4 @ 0xb6e91360]AVFrame.format is not set [mpeg4 @ 0xb6e91360]AVFrame.width or height is not set Pos: 1.0s 573f ( 0%) 548.33fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 574f ( 0%) 549.28fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 575f ( 0%) 550.24fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 576f ( 0%) 551.20fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 577f ( 0%) 551.63fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 578f ( 0%) 552.58fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 579f ( 0%) 553.54fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 580f ( 0%) 548.72fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 581f ( 0%) 549.67fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 582f ( 0%) 550.09fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 583f ( 0%) 551.04fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 584f ( 0%) 551.98fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 585f ( 0%) 552.41fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 586f ( 0%) 553.35fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 587f ( 0%) 554.30fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 588f ( 0%) 549.53fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 589f ( 0%) 550.47fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 590f ( 0%) 550.89fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos: 1.0s 591f ( 0%) 551.82fps Trem: 0min 0mb A-V:0.000 [0:0] [mpeg4 @ 0xb6e91360]AVFrame.format is not set [mpeg4 @ 0xb6e91360]AVFrame.width or height is not set Pos: 1.0s 592f ( 0%) 549.17fps Trem: 0min 0mb A-V:0.000 [41368:0] Flushing video frames. Writing index... Writing header... ODML: Aspect information not (yet?) available or unspecified, not writing vprp header. Video stream: 41368.684 kbit/s (5171085 B/s) size: 5343455 bytes 1.033 secs 592 frames v4l2: ioctl set mute failed: Invalid argument v4l2: 600 frames successfully processed, 2268268 frames dropped. With best regards Michael Kohne SR. SOFTWARE ENGINEER Office +1.215.283.0860 x208 | www.moberg.com -- Now a member of _______________________________________________ MPlayer-users mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users