Hallo zusammen,
ich habe mal wieder ein kleines Problem und hoffe, dass ihr mir vielleicht helfen könnt.
Ich versuche über das Programm mencoder Videos (mit Ton) von meiner(n) Webcam(s) aufzunehmen.
Leider habe ich dabei das Problem, dass selbst wenn ich mal beides aufgenommen bekommen, das nicht synchron läuft. Die ersten paar Sekunden ist dann auch oft das Bild nicht zu sehen, dafür läuft es dann hinterher umso schneller. Der Ton läuft in der richitgen Geschwindikeit. Ich hätte gerne beides synchron.
Ich habe zwei Webcams zur Auswahl: die Pro 9000 von Logitech und die SPZ6500 von Philips.
Nebenbei hab ich noch das Problem, dass ich mich mit dem ganzen Multimedia-Gedöhns nicht so gut auskenne ![]()
Ein Aufruf, bei dem das oben genannte Problem auftritt ist zum Beispiel folgender:
mencoder -tv driver=v4l2:normid=4:width=720:height=576:input=0:fps=25:forceaudio tv:// -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd -vf pp=lb/ha/va/dr,hqdn3d,harddup -srate 32000 -af lavcresample=32000 -lavcopts vcodec=mpeg2video:vrc_buf_size=1500:vrc_maxrate=8000:vbitrate=7000:keyint=15:acodec=mp2:abitrate=192:aspect=4/3 -o /tmp/teest.mpg -endpos 00:00:10
Interessant dabei ist auch, dass während der Aufnahme die Bildschirmausgabe zuerst folgendermaßen aussieht:
MEncoder 1.0rc4-4.5 (C) 2000-2010 MPlayer Team
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 ;-)
v4l2: your device driver does not support VIDIOC_G_STD ioctl, VIDIOC_G_PARM was used instead.
Selected device: Philips SPC 2050NC
Capabilites: video capture streaming
supported norms:
inputs: 0 = Camera 1;
Current input: 0
Current format: YUYV
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl enum norm failed: Invalid argument
Error: Cannot set norm!
Selected input hasn't got a tuner!
Video buffer shorter than 3 times audio frame duration.
You will probably experience heavy framedrops.
v4l2: ioctl set mute failed: Invalid argument
[V] filefmt:9 fourcc:0x32595559 size:800x600 fps:25.000 ftime:=0.0400
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 44100 Hz, 2 ch, s16le, 1411.2 kbit/100.00% (ratio: 176400->176400)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
PACKET SIZE: 2048 bytes, deltascr: 43885
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [harddup]
Opening video filter: [hqdn3d]
Opening video filter: [pp=lb/ha/va/dr]
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
[PP] Using external postprocessing filter, max q = 6.
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
Movie-Aspect is undefined - no prescaling applied.
[swscaler @ 0x8eb8c40]using unscaled yuyv422 -> yuv420p special converter
videocodec: libavcodec (800x600 fourcc=3267706d [mpg2])
Selected video codec: [rawyuy2] vfm: raw (RAW YUY2)
==========================================================================
Limiting audio preload to 0.4s.
Increasing audio density to 4.
Forcing audio preload to 0, max pts correction to 0.
Alles anzeigen
Danach folgt dann
Skipping frame!
v4l2: select timeout( 0%) 0.94fps Trem: 0min 0mb A-V:0.000 [0:0]
Skipping frame!
Pos: 0.0s 2f ( 0%) 1.26fps Trem: 0min 0mb A-V:0.000 [0:0]
Skipping frame!
v4l2: select timeout( 0%) 1.42fps Trem: 0min 0mb A-V:0.000 [0:0]
Skipping frame!
Pos: 0.0s 4f ( 0%) 1.58fps Trem: 0min 0mb A-V:0.000 [0:0]
video buffer full - dropping frame
18 duplicate frame(s)!
video buffer full - dropping frame
video buffer full - dropping frame
video buffer full - dropping frame
video buffer full - dropping frame
video buffer full - dropping frame
Writing header...5f ( 0%) 1.66fps Trem: 0min 0mb A-V:0.000 [0:0]
INITV: 0.200, 0.160, fps: 25.000
video buffer full - dropping frame
video buffer full - dropping frame
video buffer full - dropping frame
video buffer full - dropping frame
video buffer full - dropping frame
video buffer full - dropping frame
video buffer full - dropping frame
Pos: 0.8s 6f ( 0%) 1.75fps Trem: 0min 0mb A-V:0.000 [0:0]
video buffer full - dropping frame
Pos: 0.8s 7f ( 0%) 2.02fps Trem: 0min 0mb A-V:0.000 [0:0]
5 duplicate frame(s)!
video buffer full - dropping frame
Pos: 1.1s 9f ( 0%) 2.46fps Trem: 0min 0mb A-V:0.000 [1411:191]
video buffer full - dropping frame
Pos: 1.3s 14f ( 0%) 3.53fps Trem: 0min 0mb A-V:0.000 [1925:191]
Skipping frame!
Pos: 1.4s 16f ( 0%) 3.98fps Trem: 0min 0mb A-V:0.000 [1924:191]
Skipping frame!
Pos: 1.4s
Alles anzeigen
Das setzt sich dann fort bis die zehn Sekunden erreicht sind. Das heißt ja, dass jedes zweite Frame gedroppt wird. Ich schätz mal, dass das nicht so gut ist, oder? ![]()
Ich hoffe, mir kann jemand weiterhelfen. Vielen Dank schon mal