xref: /OK3568_Linux_fs/kernel/Documentation/admin-guide/media/faq.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun.. SPDX-License-Identifier: GPL-2.0
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunFAQ
4*4882a593Smuzhiyun===
5*4882a593Smuzhiyun
6*4882a593Smuzhiyun.. note::
7*4882a593Smuzhiyun
8*4882a593Smuzhiyun     1. With Digital TV, a single physical channel may have different
9*4882a593Smuzhiyun	contents inside it. The specs call each one as a *service*.
10*4882a593Smuzhiyun	This is what a TV user would call "channel". So, in order to
11*4882a593Smuzhiyun	avoid confusion, we're calling *transponders* as the physical
12*4882a593Smuzhiyun	channel on this FAQ, and *services* for the logical channel.
13*4882a593Smuzhiyun     2. The LinuxTV community maintains some Wiki pages with contain
14*4882a593Smuzhiyun        a lot of information related to the media subsystem. If you
15*4882a593Smuzhiyun        don't find an answer for your needs here, it is likely that
16*4882a593Smuzhiyun        you'll be able to get something useful there. It is hosted
17*4882a593Smuzhiyun	at:
18*4882a593Smuzhiyun
19*4882a593Smuzhiyun	https://www.linuxtv.org/wiki/
20*4882a593Smuzhiyun
21*4882a593SmuzhiyunSome very frequently asked questions about Linux Digital TV support
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun1. The signal seems to die a few seconds after tuning.
24*4882a593Smuzhiyun
25*4882a593Smuzhiyun	It's not a bug, it's a feature. Because the frontends have
26*4882a593Smuzhiyun	significant power requirements (and hence get very hot), they
27*4882a593Smuzhiyun	are powered down if they are unused (i.e. if the frontend device
28*4882a593Smuzhiyun	is closed). The ``dvb-core`` module parameter ``dvb_shutdown_timeout``
29*4882a593Smuzhiyun	allow you to change the timeout (default 5 seconds). Setting the
30*4882a593Smuzhiyun	timeout to 0 disables the timeout feature.
31*4882a593Smuzhiyun
32*4882a593Smuzhiyun2. How can I watch TV?
33*4882a593Smuzhiyun
34*4882a593Smuzhiyun	Together with the Linux Kernel, the Digital TV developers support
35*4882a593Smuzhiyun	some simple utilities which are mainly intended for testing
36*4882a593Smuzhiyun	and to demonstrate how the DVB API works. This is called DVB v5
37*4882a593Smuzhiyun	tools and are grouped together with the ``v4l-utils`` git repository:
38*4882a593Smuzhiyun
39*4882a593Smuzhiyun	    https://git.linuxtv.org/v4l-utils.git/
40*4882a593Smuzhiyun
41*4882a593Smuzhiyun	You can find more information at the LinuxTV wiki:
42*4882a593Smuzhiyun
43*4882a593Smuzhiyun	    https://www.linuxtv.org/wiki/index.php/DVBv5_Tools
44*4882a593Smuzhiyun
45*4882a593Smuzhiyun	The first step is to get a list of services that are transmitted.
46*4882a593Smuzhiyun
47*4882a593Smuzhiyun	This is done by using several existing tools. You can use
48*4882a593Smuzhiyun	for example the ``dvbv5-scan`` tool. You can find more information
49*4882a593Smuzhiyun	about it at:
50*4882a593Smuzhiyun
51*4882a593Smuzhiyun	    https://www.linuxtv.org/wiki/index.php/Dvbv5-scan
52*4882a593Smuzhiyun
53*4882a593Smuzhiyun	There are some other applications like ``w_scan`` [#]_ that do a
54*4882a593Smuzhiyun	blind scan, trying hard to find all possible channels, but
55*4882a593Smuzhiyun	those consumes a large amount of time to run.
56*4882a593Smuzhiyun
57*4882a593Smuzhiyun	.. [#] https://www.linuxtv.org/wiki/index.php/W_scan
58*4882a593Smuzhiyun
59*4882a593Smuzhiyun	Also, some applications like ``kaffeine`` have their own code
60*4882a593Smuzhiyun	to scan for services. So, you don't need to use an external
61*4882a593Smuzhiyun	application to obtain such list.
62*4882a593Smuzhiyun
63*4882a593Smuzhiyun	Most of such tools need a file containing a list of channel
64*4882a593Smuzhiyun	transponders available on your area. So, LinuxTV developers
65*4882a593Smuzhiyun	maintain tables of Digital TV channel transponders, receiving
66*4882a593Smuzhiyun	patches from the community to keep them updated.
67*4882a593Smuzhiyun
68*4882a593Smuzhiyun	This list is hosted at:
69*4882a593Smuzhiyun
70*4882a593Smuzhiyun	    https://git.linuxtv.org/dtv-scan-tables.git
71*4882a593Smuzhiyun
72*4882a593Smuzhiyun	And packaged on several distributions.
73*4882a593Smuzhiyun
74*4882a593Smuzhiyun	Kaffeine has some blind scan support for some terrestrial standards.
75*4882a593Smuzhiyun	It also relies on DTV scan tables, although it contains a copy
76*4882a593Smuzhiyun	of it internally (and, if requested by the user, it will download
77*4882a593Smuzhiyun	newer versions of it).
78*4882a593Smuzhiyun
79*4882a593Smuzhiyun	If you are lucky you can just use one of the supplied channel
80*4882a593Smuzhiyun	transponders. If not, you may need to seek for such info at
81*4882a593Smuzhiyun	the Internet and create a new file. There are several sites with
82*4882a593Smuzhiyun	contains physical channel lists. For cable and satellite, usually
83*4882a593Smuzhiyun	knowing how to tune into a single channel is enough for the
84*4882a593Smuzhiyun	scanning tool to identify the other channels. On some places,
85*4882a593Smuzhiyun	this could also work for terrestrial transmissions.
86*4882a593Smuzhiyun
87*4882a593Smuzhiyun	Once you have a transponders list, you need to generate a services
88*4882a593Smuzhiyun	list with a tool like ``dvbv5-scan``.
89*4882a593Smuzhiyun
90*4882a593Smuzhiyun	Almost all modern Digital TV cards don't have built-in hardware
91*4882a593Smuzhiyun	MPEG-decoders. So, it is up to the application to get a MPEG-TS
92*4882a593Smuzhiyun	stream provided by the board, split it into audio, video and other
93*4882a593Smuzhiyun	data and decode.
94*4882a593Smuzhiyun
95*4882a593Smuzhiyun3. Which Digital TV applications exist?
96*4882a593Smuzhiyun
97*4882a593Smuzhiyun	Several media player applications are capable of tuning into
98*4882a593Smuzhiyun	digital TV channels, including Kaffeine, Vlc, mplayer and MythTV.
99*4882a593Smuzhiyun
100*4882a593Smuzhiyun	Kaffeine aims to be very user-friendly, and it is maintained
101*4882a593Smuzhiyun	by one of the Kernel driver developers.
102*4882a593Smuzhiyun
103*4882a593Smuzhiyun	A comprehensive list of those and other apps can be found at:
104*4882a593Smuzhiyun
105*4882a593Smuzhiyun	    https://www.linuxtv.org/wiki/index.php/TV_Related_Software
106*4882a593Smuzhiyun
107*4882a593Smuzhiyun	Some of the most popular ones are linked below:
108*4882a593Smuzhiyun
109*4882a593Smuzhiyun	https://kde.org/applications/multimedia/org.kde.kaffeine
110*4882a593Smuzhiyun		KDE media player, focused on Digital TV support
111*4882a593Smuzhiyun
112*4882a593Smuzhiyun	https://www.linuxtv.org/vdrwiki/index.php/Main_Page
113*4882a593Smuzhiyun		Klaus Schmidinger's Video Disk Recorder
114*4882a593Smuzhiyun
115*4882a593Smuzhiyun	https://linuxtv.org/downloads and https://git.linuxtv.org/
116*4882a593Smuzhiyun		Digital TV and other media-related applications and
117*4882a593Smuzhiyun		Kernel drivers. The ``v4l-utils`` package there contains
118*4882a593Smuzhiyun		several swiss knife tools for using with Digital TV.
119*4882a593Smuzhiyun
120*4882a593Smuzhiyun	http://sourceforge.net/projects/dvbtools/
121*4882a593Smuzhiyun		Dave Chapman's dvbtools package, including
122*4882a593Smuzhiyun		dvbstream and dvbtune
123*4882a593Smuzhiyun
124*4882a593Smuzhiyun	http://www.dbox2.info/
125*4882a593Smuzhiyun		LinuxDVB on the dBox2
126*4882a593Smuzhiyun
127*4882a593Smuzhiyun	http://www.tuxbox.org/
128*4882a593Smuzhiyun		the TuxBox CVS many interesting DVB applications and the dBox2
129*4882a593Smuzhiyun		DVB source
130*4882a593Smuzhiyun
131*4882a593Smuzhiyun	http://www.nenie.org/misc/mpsys/
132*4882a593Smuzhiyun		MPSYS: a MPEG2 system library and tools
133*4882a593Smuzhiyun
134*4882a593Smuzhiyun	https://www.videolan.org/vlc/index.pt.html
135*4882a593Smuzhiyun		Vlc
136*4882a593Smuzhiyun
137*4882a593Smuzhiyun	http://mplayerhq.hu/
138*4882a593Smuzhiyun		MPlayer
139*4882a593Smuzhiyun
140*4882a593Smuzhiyun	http://xine.sourceforge.net/ and http://xinehq.de/
141*4882a593Smuzhiyun		Xine
142*4882a593Smuzhiyun
143*4882a593Smuzhiyun	http://www.mythtv.org/
144*4882a593Smuzhiyun		MythTV - analog TV and digital TV PVR
145*4882a593Smuzhiyun
146*4882a593Smuzhiyun	http://dvbsnoop.sourceforge.net/
147*4882a593Smuzhiyun		DVB sniffer program to monitor, analyze, debug, dump
148*4882a593Smuzhiyun		or view dvb/mpeg/dsm-cc/mhp stream information (TS,
149*4882a593Smuzhiyun		PES, SECTION)
150*4882a593Smuzhiyun
151*4882a593Smuzhiyun4. Can't get a signal tuned correctly
152*4882a593Smuzhiyun
153*4882a593Smuzhiyun	That could be due to a lot of problems. On my personal experience,
154*4882a593Smuzhiyun	usually TV cards need stronger signals than TV sets, and are more
155*4882a593Smuzhiyun	sensitive to noise. So, perhaps you just need a better antenna or
156*4882a593Smuzhiyun	cabling. Yet, it could also be some hardware or driver issue.
157*4882a593Smuzhiyun
158*4882a593Smuzhiyun	For example, if you are using a Technotrend/Hauppauge DVB-C card
159*4882a593Smuzhiyun	*without* analog module, you might have to use module parameter
160*4882a593Smuzhiyun	adac=-1 (dvb-ttpci.o).
161*4882a593Smuzhiyun
162*4882a593Smuzhiyun	Please see the FAQ page at linuxtv.org, as it could contain some
163*4882a593Smuzhiyun	valuable information:
164*4882a593Smuzhiyun
165*4882a593Smuzhiyun	    https://www.linuxtv.org/wiki/index.php/FAQ_%26_Troubleshooting
166*4882a593Smuzhiyun
167*4882a593Smuzhiyun	If that doesn't work, check at the linux-media ML archives, to
168*4882a593Smuzhiyun	see if someone else had a similar problem with your hardware
169*4882a593Smuzhiyun	and/or digital TV service provider:
170*4882a593Smuzhiyun
171*4882a593Smuzhiyun	    https://lore.kernel.org/linux-media/
172*4882a593Smuzhiyun
173*4882a593Smuzhiyun	If none of this works, you can try sending an e-mail to the
174*4882a593Smuzhiyun	linux-media ML and see if someone else could shed some light.
175*4882a593Smuzhiyun	The e-mail is linux-media AT vger.kernel.org.
176*4882a593Smuzhiyun
177*4882a593Smuzhiyun5. The dvb_net device doesn't give me any packets at all
178*4882a593Smuzhiyun
179*4882a593Smuzhiyun	Run ``tcpdump`` on the ``dvb0_0`` interface. This sets the interface
180*4882a593Smuzhiyun	into promiscuous mode so it accepts any packets from the PID
181*4882a593Smuzhiyun	you have configured with the ``dvbnet`` utility. Check if there
182*4882a593Smuzhiyun	are any packets with the IP addr and MAC addr you have
183*4882a593Smuzhiyun	configured with ``ifconfig`` or with ``ip addr``.
184*4882a593Smuzhiyun
185*4882a593Smuzhiyun	If ``tcpdump`` doesn't give you any output, check the statistics
186*4882a593Smuzhiyun	which ``ifconfig`` or ``netstat -ni`` outputs. (Note: If the MAC
187*4882a593Smuzhiyun	address is wrong, ``dvb_net`` won't get any input; thus you have to
188*4882a593Smuzhiyun	run ``tcpdump`` before checking the statistics.) If there are no
189*4882a593Smuzhiyun	packets at all then maybe the PID is wrong. If there are error packets,
190*4882a593Smuzhiyun	then either the PID is wrong or the stream does not conform to
191*4882a593Smuzhiyun	the MPE standard (EN 301 192, http://www.etsi.org/). You can
192*4882a593Smuzhiyun	use e.g. ``dvbsnoop`` for debugging.
193*4882a593Smuzhiyun
194*4882a593Smuzhiyun6. The ``dvb_net`` device doesn't give me any multicast packets
195*4882a593Smuzhiyun
196*4882a593Smuzhiyun	Check your routes if they include the multicast address range.
197*4882a593Smuzhiyun	Additionally make sure that "source validation by reversed path
198*4882a593Smuzhiyun	lookup" is disabled::
199*4882a593Smuzhiyun
200*4882a593Smuzhiyun	  $ "echo 0 > /proc/sys/net/ipv4/conf/dvb0/rp_filter"
201*4882a593Smuzhiyun
202*4882a593Smuzhiyun7. What are all those modules that need to be loaded?
203*4882a593Smuzhiyun
204*4882a593Smuzhiyun	In order to make it more flexible and support different hardware
205*4882a593Smuzhiyun	combinations, the media subsystem is written on a modular way.
206*4882a593Smuzhiyun
207*4882a593Smuzhiyun	So, besides the Digital TV hardware module for the main chipset,
208*4882a593Smuzhiyun	it also needs to load a frontend driver, plus the Digital TV
209*4882a593Smuzhiyun	core. If the board also has remote controller, it will also
210*4882a593Smuzhiyun	need the remote controller core and the remote controller tables.
211*4882a593Smuzhiyun	The same happens if the board has support for analog TV: the
212*4882a593Smuzhiyun	core support for video4linux need to be loaded.
213*4882a593Smuzhiyun
214*4882a593Smuzhiyun	The actual module names are Linux-kernel version specific, as,
215*4882a593Smuzhiyun	from time to time, things change, in order to make the media
216*4882a593Smuzhiyun	support more flexible.
217