ivtv.rst 6.5 KB

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