Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#547 closed defect (fixed)

mencoder and capture video with niceness < 0

Reported by: stef@… Owned by: reimar
Priority: normal Component: ao
Version: HEAD Severity: normal
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

Hi,

using mencoder to capture video with niceness < 0 results in bad performance.
The system will be completely blocked every 0.3-0.4 seconds for a short period.
Even mouse and keyboard do not respond, making it impossible to record and watch
video simultaneously.

Problem is applicable to latest SVN version 19316, too.

That's how I encode:

nice -n -10 mencoder -tv
driver=v4l2:device=/dev/video0:fps=25:width=768:height=576:amode=1:forcechan=2
tv://37 -o /mnt/bigspace/files/filme/test.avi -ovc lavc -lavcopts vcodec=mjpeg
-oac lavc

Disabling sound with -nosound shows the same CPU load but the regularly blocking
periods disappear. It looks to me that without sound this operation is executed
more regularly but blocking is not so long, hence less disturbing.

I compiled with --enable-alsa and --disable-alsa with same result.

I can only guess what this problematic operation is. Maybe active waiting with
very high precision and for too long.

thanks for your help
Stefan

Here is the output:

MEncoder dev-SVN-r19316-4.0.4 (C) 2000-2006 MPlayer Team
CPU: AMD Athlon(tm) XP 2500+ (Family: 6, Model: 10, Stepping: 0)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE

init_freetype
get_path('font/font.desc') -> '/root/.mplayer/font/font.desc'
font: can't open file: /root/.mplayer/font/font.desc
font: can't open file: /usr/share/mplayer/font/font.desc
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
STREAM: [tv] tv://37
STREAM: Description: TV Input
STREAM: Author: Benjamin Zores, Albeu
STREAM: Comment:
success: format: 9 data: 0x0 - 0x0
Selected driver: v4l2

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

Selected device: BT878 video (Hauppauge (bt878))

Tuner cap:
Tuner rxs: MONO
Capabilites: video capture video overlay VBI capture device tuner

read/write streaming

supported norms: 0 = PAL; 1 = NTSC; 2 = SECAM; 3 = PAL-Nc; 4 = PAL-M; 5 =

PAL-N; 6 = NTSC-JP; 7 = PAL-60;

inputs: 0 = Television; 1 = Composite1; 2 = S-Video; 3 = Composite3;
Current input: 0
Format GREY ( 8 bits, 8 bpp, gray): Planar Y800
Format HI240 ( 8 bits, 8 bpp, dithered color): Unknown
Format RGB555 (16 bits, 15 bpp RGB, le): BGR 15-bit
Format RGB555X (16 bits, 15 bpp RGB, be): Unknown
Format RGB565 (16 bits, 16 bpp RGB, le): BGR 16-bit
Format RGB565X (16 bits, 16 bpp RGB, be): Unknown
Format BGR24 (24 bits, 24 bpp RGB, le): BGR 24-bit
Format BGR32 (32 bits, 32 bpp RGB, le): BGRA
Format RGB32 (32 bits, 32 bpp RGB, be): RGBA
Format YUYV (16 bits, 4:2:2, packed, YUYV): Packed YUY2
Format YUYV (16 bits, 4:2:2, packed, YUYV): Packed YUY2
Format UYVY (16 bits, 4:2:2, packed, UYVY): Packed UYVY
Format YUV422P (16 bits, 4:2:2, planar, Y-Cb-Cr): Planar 422P
Format YUV420 (12 bits, 4:2:0, planar, Y-Cb-Cr): Planar I420
Format YVU420 (12 bits, 4:2:0, planar, Y-Cr-Cb): Planar YV12
Format YUV411P (16 bits, 4:1:1, planar, Y-Cb-Cr): Planar 411P
Format YUV410 ( 9 bits, 4:1:0, planar, Y-Cb-Cr): Planar IF09
Format YVU410 ( 9 bits, 4:1:0, planar, Y-Cr-Cb): Planar YVU9
Current format: YVU420

v4l2: setting audio mode
v4l2: current audio mode is : STEREO
v4l2: set format: YVU420
v4l2: set input: 0
Selected norm: pal
v4l2: set norm: PAL
v4l2: set width: 768
v4l2: set height: 576
Selected channel list: europe-east (including 133 channels)
Requested channel: 37
Selected channel: 37 (freq: 599.250)
Current frequency: 9588 (599.250)
Current frequency: 9588 (599.250)
==> Found video stream: 0
v4l2: get format: YVU420
v4l2: get fps: 25.000000
v4l2: get width: 768
v4l2: get height: 576
ioctl dsp getfmt: 0
Supported formats: 1f9
ioctl dsp setfmt: 0
ioctl dsp stereo: 0 (req: 1)
ioctl dsp speed: 0
ioctl dsp trigger: 0
trigger: 1
ioctl dsp trigger: 0
ioctl dsp getblocksize: 0
blocksize: 4096
Audio block size too low, setting to 16384!
v4l2: set audio samplerate: 44100
v4l2: get audio format: 9
==> Found audio stream: 0
v4l2: get audio samplerate: 44100
v4l2: get audio samplesize: 2
v4l2: get audio channels: 2

TV audio: 2 channels, 16 bits, 44100 Hz

Audio capture - buffer 256 blocks of 16384 bytes, skew average from 16 meas.
Using a ring buffer for maximum 398 frames, 251 MB total size.
v4l2: set Brightness: 32768 [0, 65535]
v4l2: set Hue: 32768 [0, 65535]
v4l2: set Saturation: 32768 [0, 65535]
v4l2: set Contrast: 32768 [0, 65535]
[V] filefmt:9 fourcc:0x32315659 size:768x576 fps:25.00 ftime:=0.0400
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
dec_audio: Allocating 2048 + 65536 = 67584 bytes for output buffer.
AUDIO: 44100 Hz, 2 ch, s16le, 1411.2 kbit/100.00% (ratio: 176400->176400)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
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
VDec: vo config request - 768 x 576 (preferred colorspace: Planar YV12)
Trying filter chain: expand lavc
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO Config (768x576->768x576,flags=0,'MPlayer',0x32315659)
REQ: flags=0x401 req=0x0
videocodec: libavcodec (768x576 fourcc=47504a4d [MJPG])
Selected video codec: [rawyv12] vfm: raw (RAW YV12)
==========================================================================
Building audio filter chain for 44100Hz/2ch/s16le -> 0Hz/0ch/??...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[dummy] Was reinitialized: 44100Hz/2ch/s16le
Building audio filter chain for 44100Hz/2ch/s16le -> 44100Hz/2ch/s16le...
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[dummy] Was reinitialized: 44100Hz/2ch/s16le
Forcing audio preload to 0, max pts correction to 0.
v4l2: going to capture
* [expand] Exporting mp_image_t, 768x576x12bpp YUV planar, 663552 bytes
* [lavc] Allocating mp_image_t, 768x576x12bpp YUV planar, 663552 bytes
get_path('subfont.ttf') -> '/root/.mplayer/subfont.ttf'
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
Pos: 0.0s 1f ( 0%) 0fps Trem: 0min 0mb A-V:0.000 [0:0] A/Vms 0/10
D/B/S 0/0/0
Muxer frame buffer sending 2 frame(s) to the muxer.
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.1s 2f ( 0%) 0fps Trem: 0min 0mb A-V:0.000 [0:0] A/Vms
125/12 D/B/S 0/0/0
Pos: 0.1s 3f ( 0%) 0fps Trem: 0min 0mb A-V:0.000 [0:0] A/Vms 75/13
D/B/S 0/0/0
Pos: 0.2s 4f ( 0%) 0fps Trem:

............................

Flushing video frames
Writing index...
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp
header.

Video stream: 16929.106 kbit/s (2116138 B/s) size: 3978340 bytes 1.880 secs
47 frames

Audio stream: 223.998 kbit/s (27999 B/s) size: 51931 bytes 1.855 secs
Uninit audio filters...
[libaf] Removing filter dummy
Uninit audio: pcm
Uninit video: raw
v4l2: 57 frames successfully processed, 0 frames dropped.
v4l2: up to 10 video frames buffered.

Change History (2)

comment:1 by reimar, 18 years ago

Resolution: fixed
Status: newclosed

Should be fine again with latest SVN. Please reopen if you still have issues.

comment:2 by stef@…, 18 years ago

Version: 1.0pre8HEAD

is fixed.

thanks
Stefan

Note: See TracTickets for help on using tickets.