使用 mencoder 录制时,HDMI 到 S-Video 转换器和 Linux 产生绿色故障

使用 mencoder 录制时,HDMI 到 S-Video 转换器和 Linux 产生绿色故障

我有 HDMI 转 S-Video 转换器:适用于 PC 笔记本电脑的迷你便携式 USB 2.0 端口高清 1 路 HDMI 1080P 视频采集卡。

因此它有:

  • HDMI 输入(连接到计算机,因此我愿意从中录制视频输出)

  • USB 输出(连接到mencoder正在运行的基于 Debian 的 Linux 发行版 - Linux raspberrypi 4.14.50-v7+ #1122 SMP Tue Jun 19 12:26:26 BST 2018 armv7l GNU/Linux

/dev/video0插入 USB 后我就能看到设备。

这是dmesg设备连接时的输出:

[ 2132.394435] usb 1-1.3: new high-speed USB device number 7 using dwc2
[ 2132.527882] usb 1-1.3: config 1 interface 0 altsetting 1 bulk endpoint 0x83 has invalid maxpacket 256
[ 2132.530876] usb 1-1.3: New USB device found, idVendor=1b71, idProduct=3002
[ 2132.530898] usb 1-1.3: New USB device strings: Mfr=3, Product=4, SerialNumber=2
[ 2132.530906] usb 1-1.3: Product: usbtv007
[ 2132.530915] usb 1-1.3: Manufacturer: fushicai
[ 2132.530923] usb 1-1.3: SerialNumber: 300000000002
[ 2132.532973] usbtv 1-1.3:1.0: Fushicai USBTV007 Audio-Video Grabber

问题: 在此处输入图片描述

正常情况下应该是这样的: 在此处输入图片描述

这是 mencoder 命令:

pi@raspberrypi:/tmp $ mencoder tv:// -tv driver=v4l2:norm=NTSC:device=/dev/video0:input=1:fps=5 -nosound -ovc copy -o test.avi
MEncoder 1.3.0 (Debian), built with gcc-6.2.1 (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 ;-)
Selected device: usbtv
 Capabilities:  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-60;
 inputs: 0 = Composite; 1 = S-Video;
 Current input: 1
 Current format: YUYV
Selected input hasn't got a tuner!
v4l2: ioctl set mute failed: Invalid argument
[V] filefmt:9  fourcc:0x32595559  size:720x480  fps:5.000  ftime:=0.2000
videocodec: framecopy (720x480 24bpp fourcc=32595559)
Forcing audio preload to 0, max pts correction to 0.
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.2s      2f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.000 [0:0]

Skipping frame!
Pos:   0.2s      3f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.000 [0:0]

Invalid frame duration value (0.120/0.000 => -0.120). Defaulting to 0.040 sec.

Skipping frame!
Pos:   0.2s      4f ( 0%)  3.96fps Trem:   0min   0mb  A-V:0.000 [0:0]
v4l2: select timeout

some repeated and not relevant output removed

48 duplicate frame(s)!
Pos:  69.0s     38f ( 0%)  3.73fps Trem:   0min   0mb  A-V:0.000 [1602:0]

Skipping frame!
Pos:  69.2s     39f ( 0%)  3.81fps Trem:   0min   0mb  A-V:0.000 [1598:0]

Skipping frame!
Pos:  69.2s     40f ( 0%)  3.89fps Trem:   0min   0mb  A-V:0.000 [1598:0]

Invalid frame duration value (9.918/0.000 => -9.918). Defaulting to 0.040 sec.

Skipping frame!
^Cs:  69.2s     41f ( 0%)  3.80fps Trem:   0min   0mb  A-V:0.000 [1598:0]
v4l2: select timeout

Skipping frame!
Pos:  69.2s     42f ( 0%)  3.71fps Trem:   0min   0mb  A-V:0.000 [1598:0]
Writing index...
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.

Video stream: 1598.150 kbit/s  (199768 B/s)  size: 13824000 bytes  69.200 secs  42 frames
v4l2: ioctl set mute failed: Invalid argument
v4l2: 26 frames successfully processed, 31 frames dropped.
pi@raspberrypi:/tmp $ 

mencoder 版本: MEncoder 1.3.0 (Debian), built with gcc-6.2.1 (C) 2000-2016 MPlayer Team

HDMI 转换器似乎可以正常工作,但不知为何出现了绿线(产生了故障),导致输出几乎不可见。我尝试了两种不同的 HDMI 转 S-Video 转换器、两种不同的 HDMI 电缆和两台不同的计算机来进行 HDMI 输出 - 结果完全相同。您认为问题可能出在哪里?谢谢

答案1

就我而言,删除 dwc2 模块/boot/config.txt即可/boot/cmdline.txt解决问题。

相关内容