← Documents Documentation/admin-guide/media/ivtv.rst GitHub 원문 ↗

Linux 6.18.37 · Administration / Media

The ivtv Driver

CX23415/16 hardware MPEG encoding·decoding 기능과 ivtv의 video, audio, radio, VBI 장치 번호 및 데이터 방향을 설명합니다.

Source pathDocumentation/admin-guide/media/ivtv.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

ivtv 장치 구조

ivtv.rst:1-218

`ivtv`는 CX23415/16 기반 capture card에서 hardware MPEG-2 encoding을 제공하고, CX23415 기반 PVR-350에서는 decoding과 OSD·framebuffer도 제공합니다. 장치 번호는 base minor에 card index를 더하며 각 node의 읽기·쓰기 방향이 고정되어 있습니다.

ivtv 주요 데이터 경로
TV/FM/S-Video/Composite + audioCX23415/CX23416 hardware encoder/dev/video0 MPEG-1/2 program streamMPEG application or file
Audio input/dev/video2448 kHz stereo PCMapplication
Video input/dev/video32NV12_16L16 YUVapplication
MPEG-2 file/dev/video16CX23415 decoderA/V output
VBI input/output/dev/vbi0 · /dev/vbi8 · /dev/vbi16VBI services

Encoding, raw capture, decoder playback, VBI 처리는 서로 다른 V4L device node로 노출됩니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 The ivtv driver
4 ===============
5
6 Author: Hans Verkuil <hverkuil@kernel.org>
7
8 This is a v4l2 device driver for the Conexant cx23415/6 MPEG encoder/decoder.
9 The cx23415 can do both encoding and decoding, the cx23416 can only do MPEG
10 encoding. Currently the only card featuring full decoding support is the
11 Hauppauge PVR-350.
12
13 .. note::
14
15 #) This driver requires the latest encoder firmware (version 2.06.039, size
16 376836 bytes). Get the firmware from here:
17
18 https://linuxtv.org/downloads/firmware/#conexant
19
20 #) 'normal' TV applications do not work with this driver, you need
21 an application that can handle MPEG input such as mplayer, xine, MythTV,
22 etc.
23
24 The primary goal of the IVTV project is to provide a "clean room" Linux
25 Open Source driver implementation for video capture cards based on the
26 iCompression iTVC15 or Conexant CX23415/CX23416 MPEG Codec.
27
28 Features
29 --------
30
31 * Hardware mpeg2 capture of broadcast video (and sound) via the tuner or
32 S-Video/Composite and audio line-in.
33 * Hardware mpeg2 capture of FM radio where hardware support exists
34 * Supports NTSC, PAL, SECAM with stereo sound
35 * Supports SAP and bilingual transmissions.
36 * Supports raw VBI (closed captions and teletext).
37 * Supports sliced VBI (closed captions and teletext) and is able to insert
38 this into the captured MPEG stream.
39 * Supports raw YUV and PCM input.
40
41 Additional features for the PVR-350 (CX23415 based)
42 ---------------------------------------------------
43
44 * Provides hardware mpeg2 playback
45 * Provides comprehensive OSD (On Screen Display: ie. graphics overlaying the
46 video signal)
47 * Provides a framebuffer (allowing X applications to appear on the video
48 device)
49 * Supports raw YUV output.
50
51 IMPORTANT: In case of problems first read this page:
52 https://help.ubuntu.com/community/Install_IVTV_Troubleshooting
53
54 See also
55 --------
56
57 https://linuxtv.org
58
59 IRC
60 ---
61
62 irc://irc.freenode.net/#v4l
63
64 ----------------------------------------------------------
65
66 Devices
67 -------
68
69 A maximum of 12 ivtv boards are allowed at the moment.
70
71 Cards that don't have a video output capability (i.e. non PVR350 cards)
72 lack the vbi8, vbi16, video16 and video48 devices. They also do not
73 support the framebuffer device /dev/fbx for OSD.
74
75 The radio0 device may or may not be present, depending on whether the
76 card has a radio tuner or not.
77
78 Here is a list of the base v4l devices:
79
80 .. code-block:: none
81
82 crw-rw---- 1 root video 81, 0 Jun 19 22:22 /dev/video0
83 crw-rw---- 1 root video 81, 16 Jun 19 22:22 /dev/video16
84 crw-rw---- 1 root video 81, 24 Jun 19 22:22 /dev/video24
85 crw-rw---- 1 root video 81, 32 Jun 19 22:22 /dev/video32
86 crw-rw---- 1 root video 81, 48 Jun 19 22:22 /dev/video48
87 crw-rw---- 1 root video 81, 64 Jun 19 22:22 /dev/radio0
88 crw-rw---- 1 root video 81, 224 Jun 19 22:22 /dev/vbi0
89 crw-rw---- 1 root video 81, 228 Jun 19 22:22 /dev/vbi8
90 crw-rw---- 1 root video 81, 232 Jun 19 22:22 /dev/vbi16
91
92 Base devices
93 ------------
94
95 For every extra card you have the numbers increased by one. For example,
96 /dev/video0 is listed as the 'base' encoding capture device so we have:
97
98 - /dev/video0 is the encoding capture device for the first card (card 0)
99 - /dev/video1 is the encoding capture device for the second card (card 1)
100 - /dev/video2 is the encoding capture device for the third card (card 2)
101
102 Note that if the first card doesn't have a feature (eg no decoder, so no
103 video16, the second card will still use video17. The simple rule is 'add
104 the card number to the base device number'. If you have other capture
105 cards (e.g. WinTV PCI) that are detected first, then you have to tell
106 the ivtv module about it so that it will start counting at 1 (or 2, or
107 whatever). Otherwise the device numbers can get confusing. The ivtv
108 'ivtv_first_minor' module option can be used for that.
109
110
111 - /dev/video0
112
113 The encoding capture device(s).
114
115 Read-only.
116
117 Reading from this device gets you the MPEG1/2 program stream.
118 Example:
119
120 .. code-block:: none
121
122 cat /dev/video0 > my.mpg (you need to hit ctrl-c to exit)
123
124
125 - /dev/video16
126
127 The decoder output device(s)
128
129 Write-only. Only present if the MPEG decoder (i.e. CX23415) exists.
130
131 An mpeg2 stream sent to this device will appear on the selected video
132 display, audio will appear on the line-out/audio out. It is only
133 available for cards that support video out. Example:
134
135 .. code-block:: none
136
137 cat my.mpg >/dev/video16
138
139
140 - /dev/video24
141
142 The raw audio capture device(s).
143
144 Read-only
145
146 The raw audio PCM stereo stream from the currently selected
147 tuner or audio line-in. Reading from this device results in a raw
148 (signed 16 bit Little Endian, 48000 Hz, stereo pcm) capture.
149 This device only captures audio. This should be replaced by an ALSA
150 device in the future.
151 Note that there is no corresponding raw audio output device, this is
152 not supported in the decoder firmware.
153
154
155 - /dev/video32
156
157 The raw video capture device(s)
158
159 Read-only
160
161 The raw YUV video output from the current video input. The YUV format
162 is a 16x16 linear tiled NV12 format (V4L2_PIX_FMT_NV12_16L16)
163
164 Note that the YUV and PCM streams are not synchronized, so they are of
165 limited use.
166
167
168 - /dev/video48
169
170 The raw video display device(s)
171
172 Write-only. Only present if the MPEG decoder (i.e. CX23415) exists.
173
174 Writes a YUV stream to the decoder of the card.
175
176
177 - /dev/radio0
178
179 The radio tuner device(s)
180
181 Cannot be read or written.
182
183 Used to enable the radio tuner and tune to a frequency. You cannot
184 read or write audio streams with this device. Once you use this
185 device to tune the radio, use /dev/video24 to read the raw pcm stream
186 or /dev/video0 to get an mpeg2 stream with black video.
187
188
189 - /dev/vbi0
190
191 The 'vertical blank interval' (Teletext, CC, WSS etc) capture device(s)
192
193 Read-only
194
195 Captures the raw (or sliced) video data sent during the Vertical Blank
196 Interval. This data is used to encode teletext, closed captions, VPS,
197 widescreen signalling, electronic program guide information, and other
198 services.
199
200
201 - /dev/vbi8
202
203 Processed vbi feedback device(s)
204
205 Read-only. Only present if the MPEG decoder (i.e. CX23415) exists.
206
207 The sliced VBI data embedded in an MPEG stream is reproduced on this
208 device. So while playing back a recording on /dev/video16, you can
209 read the embedded VBI data from /dev/vbi8.
210
211
212 - /dev/vbi16
213
214 The vbi 'display' device(s)
215
216 Write-only. Only present if the MPEG decoder (i.e. CX23415) exists.
217
218 Can be used to send sliced VBI data to the video-out connector.
219

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

ivtv 드라이버

1-11

이 문서는 GPL-2.0 라이선스를 따르며, 저자는 Hans Verkuil <hverkuil@kernel.org>입니다.

`ivtv`는 Conexant `cx23415/6` MPEG encoder/decoder를 위한 V4L2 장치 드라이버입니다. `cx23415`는 encoding과 decoding을 모두 수행할 수 있지만 `cx23416`은 MPEG encoding만 지원합니다. 현재 완전한 decoding 지원을 제공하는 카드는 Hauppauge PVR-350뿐입니다.

Firmware와 응용 프로그램 요구 사항

12-27

이 드라이버에는 최신 encoder firmware, 즉 version `2.06.039`, 크기 `376836 bytes`인 파일이 필요합니다. Firmware는 https://linuxtv.org/downloads/firmware/#conexant 에서 받을 수 있습니다.

일반적인 TV 응용 프로그램은 이 드라이버와 함께 동작하지 않습니다. `mplayer`, `xine`, `MythTV`처럼 MPEG 입력을 처리할 수 있는 응용 프로그램이 필요합니다.

IVTV 프로젝트의 주된 목표는 iCompression `iTVC15` 또는 Conexant `CX23415/CX23416` MPEG Codec 기반 video capture card를 위한 깨끗한 방인식(clean-room) Linux Open Source 드라이버 구현을 제공하는 것입니다.

기능

28-40
  • Tuner 또는 S-Video/Composite와 audio line-in을 통한 broadcast video 및 sound의 hardware MPEG-2 capture
  • Hardware가 지원하는 경우 FM radio의 hardware MPEG-2 capture
  • Stereo sound를 포함한 NTSC, PAL, SECAM 지원
  • SAP와 bilingual transmission 지원
  • Closed caption과 teletext를 위한 raw VBI 지원
  • Closed caption과 teletext를 위한 sliced VBI 지원 및 capture된 MPEG stream 안으로 삽입하는 기능
  • Raw YUV와 PCM input 지원

PVR-350의 추가 기능

41-53

CX23415 기반 PVR-350은 다음과 같은 추가 기능을 제공합니다.

  • Hardware MPEG-2 playback
  • Video signal 위에 graphics를 겹치는 포괄적인 OSD(On Screen Display)
  • X application이 video device에 나타날 수 있게 하는 framebuffer
  • Raw YUV output

문제가 생기면 먼저 https://help.ubuntu.com/community/Install_IVTV_Troubleshooting 페이지를 읽으십시오.

장치

65-91

현재 허용되는 `ivtv` board 수는 최대 12개입니다.

Video output 기능이 없는 카드, 즉 PVR-350이 아닌 카드는 `vbi8`, `vbi16`, `video16`, `video48` 장치가 없습니다. 또한 OSD용 framebuffer 장치 `/dev/fbx`도 지원하지 않습니다.

`radio0` 장치는 카드에 radio tuner가 있는지에 따라 존재할 수도 있고 없을 수도 있습니다.

기본 V4L 장치 목록은 다음과 같습니다.

crw-rw----    1 root     video     81,   0 Jun 19 22:22 /dev/video0
crw-rw----    1 root     video     81,  16 Jun 19 22:22 /dev/video16
crw-rw----    1 root     video     81,  24 Jun 19 22:22 /dev/video24
crw-rw----    1 root     video     81,  32 Jun 19 22:22 /dev/video32
crw-rw----    1 root     video     81,  48 Jun 19 22:22 /dev/video48
crw-rw----    1 root     video     81,  64 Jun 19 22:22 /dev/radio0
crw-rw----    1 root     video     81, 224 Jun 19 22:22 /dev/vbi0
crw-rw----    1 root     video     81, 228 Jun 19 22:22 /dev/vbi8
crw-rw----    1 root     video     81, 232 Jun 19 22:22 /dev/vbi16
기본 장치방향주요 역할조건
/dev/video0읽기MPEG-1/2 encoding capture항상
/dev/video16쓰기MPEG-2 decoder outputCX23415
/dev/video24읽기Raw PCM audio capture항상
/dev/video32읽기Raw YUV video capture항상
/dev/video48쓰기Raw YUV displayCX23415
/dev/radio0제어Radio tunerRadio tuner 장착 시
/dev/vbi0읽기Raw 또는 sliced VBI capture항상
/dev/vbi8읽기Decoded MPEG의 VBI feedbackCX23415
/dev/vbi16쓰기Sliced VBI displayCX23415
ivtv encoding과 playback 경로
TV/FM/S-Video/Composite + audioCX23415/CX23416 hardware encoder/dev/video0 MPEG-1/2 program streamMPEG application or file
MPEG-2 stream/dev/video16CX23415 hardware decodervideo display + audio line-out
Raw YUV stream/dev/video48CX23415 hardware decodervideo output

CX23415/16은 입력을 MPEG stream으로 encoding하며, CX23415 카드만 MPEG 또는 YUV를 video/audio output으로 decoding할 수 있습니다.

기본 장치 번호

92-110

카드를 하나 추가할 때마다 기본 장치 번호에 1을 더합니다. 예를 들어 `/dev/video0`이 기본 encoding capture 장치이므로 첫 번째 카드(card 0)는 `/dev/video0`, 두 번째 카드(card 1)는 `/dev/video1`, 세 번째 카드(card 2)는 `/dev/video2`를 사용합니다.

첫 번째 카드에 어떤 기능이 없더라도 번호 규칙은 바뀌지 않습니다. 예를 들어 첫 번째 카드에 decoder가 없어 `video16`이 없더라도 두 번째 카드는 여전히 `video17`을 사용합니다. 간단한 규칙은 '기본 장치 번호에 card 번호를 더한다'입니다.

WinTV PCI 같은 다른 capture card가 먼저 감지되었다면 `ivtv` module이 1, 2 또는 필요한 값부터 세도록 알려야 합니다. 그렇지 않으면 장치 번호가 혼란스러워질 수 있으며, 이때 `ivtv_first_minor` module option을 사용할 수 있습니다.

Card index에 따른 장치 번호
video0 + card 0/dev/video0첫 번째 card encoding capture
video0 + card 1/dev/video1두 번째 card encoding capture
video16 + card 1/dev/video17두 번째 card decoder output

모든 장치 계열은 고정된 base minor에 card index를 더해 해당 card의 node를 정합니다.

/dev/video0: encoding capture

111-124

`/dev/video0` 계열은 encoding capture 장치이며 read-only입니다. 이 장치에서 읽으면 MPEG-1/2 program stream을 얻습니다.

다음 예제는 stream을 `my.mpg`에 저장하며, 종료하려면 Ctrl-C를 누릅니다.

cat /dev/video0 > my.mpg (you need to hit ctrl-c to exit)

/dev/video16: decoder output

125-139

`/dev/video16` 계열은 decoder output 장치이며 write-only입니다. MPEG decoder, 즉 `CX23415`가 있을 때만 존재합니다.

이 장치에 보낸 MPEG-2 stream은 선택한 video display에 나타나고 audio는 line-out/audio out으로 출력됩니다. 따라서 video out을 지원하는 카드에서만 사용할 수 있습니다.

cat my.mpg >/dev/video16

/dev/video24: raw audio capture

140-153

`/dev/video24` 계열은 raw audio capture 장치이며 read-only입니다. 현재 선택된 tuner 또는 audio line-in에서 raw audio PCM stereo stream을 읽습니다.

읽기 결과는 signed 16-bit Little Endian, 48000 Hz, stereo PCM 형식의 raw capture입니다. 이 장치는 audio만 capture하며 향후 ALSA 장치로 대체되어야 합니다.

이에 대응하는 raw audio output 장치는 없습니다. Decoder firmware가 이 기능을 지원하지 않기 때문입니다.

/dev/video32: raw video capture

154-166

`/dev/video32` 계열은 raw video capture 장치이며 read-only입니다. 현재 video input에서 raw YUV video output을 제공합니다.

YUV format은 16x16 linear tiled NV12 형식인 `V4L2_PIX_FMT_NV12_16L16`입니다.

YUV stream과 PCM stream은 동기화되지 않으므로 활용 범위가 제한됩니다.

/dev/video48: raw video display

167-176

`/dev/video48` 계열은 raw video display 장치이며 write-only입니다. MPEG decoder, 즉 `CX23415`가 있을 때만 존재하며, 기록한 YUV stream을 카드의 decoder로 보냅니다.

/dev/radio0: radio tuner

177-188

`/dev/radio0` 계열은 radio tuner 장치이며 data stream을 읽거나 쓸 수 없습니다. Radio tuner를 활성화하고 주파수를 맞추는 데 사용합니다.

이 장치 자체로 audio stream을 읽거나 쓸 수는 없습니다. Radio를 맞춘 뒤 raw PCM stream은 `/dev/video24`에서 읽고, 검은 video가 포함된 MPEG-2 stream은 `/dev/video0`에서 얻습니다.

/dev/vbi0: VBI capture

189-200

`/dev/vbi0` 계열은 vertical blank interval, 즉 teletext, closed caption(CC), WSS 등을 capture하는 read-only 장치입니다.

Vertical Blank Interval 동안 전송되는 raw 또는 sliced video data를 capture합니다. 이 data는 teletext, closed caption, VPS, widescreen signalling, electronic program guide 정보와 그 밖의 service를 encoding하는 데 사용됩니다.

/dev/vbi8: processed VBI feedback

201-211

`/dev/vbi8` 계열은 처리된 VBI feedback 장치이며 read-only입니다. MPEG decoder, 즉 `CX23415`가 있을 때만 존재합니다.

MPEG stream에 포함된 sliced VBI data가 이 장치에 재현됩니다. 따라서 `/dev/video16`에서 recording을 재생하는 동안 `/dev/vbi8`에서 내장 VBI data를 읽을 수 있습니다.

/dev/vbi16: VBI display

212-218

`/dev/vbi16` 계열은 VBI display 장치이며 write-only입니다. MPEG decoder, 즉 `CX23415`가 있을 때만 존재하며, sliced VBI data를 video-out connector로 보내는 데 사용할 수 있습니다.