https://wiki.archlinux.org/api.php?action=feedcontributions&user=Nilesrogoff&feedformat=atomArchWiki - User contributions [en]2024-03-29T09:43:58ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=DVB-T&diff=442653DVB-T2016-07-23T22:10:34Z<p>Nilesrogoff: the fcc is pants on head retarded</p>
<hr />
<div>[[Category:Multimedia]]<br />
[[Category:TV cards]]<br />
[[ja:DVB-T]]<br />
{{Related articles start}}<br />
{{Related|DVB-S}}<br />
{{Related|LIRC}}<br />
{{Related|RTL-SDR}}<br />
{{Related articles end}}<br />
<br />
[[wikipedia:DVB-T|DVB-T]] is the (mostly) worldwide standard for transmitting terrestrial digital video broadcast. It is possible to receive DVB-T using several different hardware setups, however this article will focus on DVB-T USB dongles based on the RTL2832U chipset (which are also very popular as cheap software defined radios using [[RTL-SDR]]).<br />
<br />
Note that DVB-T is not used in the US.<br />
<br />
==Driver==<br />
<br />
The main driver in use is {{Ic|dvb_usb_rtl28xxu}}, and exists in the latest kernels. If it is not [[Kernel modules|loaded]], do so manually:<br />
# modprobe dvb_usb_rtl28xxu<br />
<br />
You might also need to load {{Ic|rtl2832}} or {{Ic|rtl2830}}:<br />
# modprobe rtl2830<br />
# modprobe rtl2832<br />
<br />
{{Note|If you have [[RTL-SDR]] installed, note that it conflicts with this driver, and therefore blacklists it. Make sure to remove any necessary blacklists before loading the driver. The default location for the blacklist file is in {{Ic|/etc/modprobe.d/rtlsdr.conf}}.}}<br />
<br />
After plugging the device in, {{Ic|dmesg}} should show something like this:<br />
<br />
[ 4009.326338] usb 7-5: new high-speed USB device number 4 using ehci-pci<br />
[ 4009.466712] usb 7-5: dvb_usb_v2: found a 'Realtek RTL2832U reference design' in warm state<br />
[ 4009.531594] usb 7-5: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer<br />
[ 4009.531613] DVB: registering new adapter (Realtek RTL2832U reference design)<br />
[ 4009.534554] usb 7-5: DVB: registering adapter 0 frontend 0 (Realtek RTL2832 (DVB-T))...<br />
[ 4009.534627] r820t 4-001a: creating new instance<br />
[ 4009.546177] r820t 4-001a: Rafael Micro r820t successfully identified<br />
[ 4009.552681] Registered IR keymap rc-empty<br />
[ 4009.552783] input: Realtek RTL2832U reference design as /devices/pci0000:00/0000:00:1d.7/usb7/7-5/rc/rc1/input20<br />
[ 4009.552854] rc1: Realtek RTL2832U reference design as /devices/pci0000:00/0000:00:1d.7/usb7/7-5/rc/rc1<br />
[ 4009.553275] input: MCE IR Keyboard/Mouse (dvb_usb_rtl28xxu) as /devices/virtual/input/input21<br />
[ 4009.554466] rc rc1: lirc_dev: driver ir-lirc-codec (dvb_usb_rtl28xxu) registered at minor = 0<br />
[ 4009.554474] usb 7-5: dvb_usb_v2: schedule remote query interval to 400 msecs<br />
[ 4009.565930] usb 7-5: dvb_usb_v2: 'Realtek RTL2832U reference design' successfully initialized and connected<br />
<br />
{{Note|in this case we see that the dongle has a R820T tuner, but there are several other popular tuners that you might run into. Also note the IR sensor device that was recognized that, properly configured, can be used with the device remote control. See [[LIRC]] for more information.}}<br />
<br />
Additionally, you should now see the adapter device under {{Ic|/dev/dvb/adapter0}}. Some cards need additional firmwares that are not distributed for various reasons. Usually you will find an explicit message about that in dmesg. Look for the name of the file(s) you see with your favorite search engine, and once you have them, put the required firmware(s) in /usr/lib/firmware. Possibly a package might exist in the AUR.<br />
<br />
==Utilities==<br />
<br />
Various DVB utilities can be found in the {{Pkg|linuxtv-dvb-apps}} package.<br />
<br />
===Scanning===<br />
<br />
{{AUR|w_scan}} allows for automatic scanning of channels without configuration. Install it then issue:<br />
<br />
# w_scan -ft -c [country_code] > ~/channels.conf<br />
<br />
If you do not know your country code, enter the following to get a list of codes.<br />
# w_scan -c "?"<br />
<br />
Note that country code is optional is some cases (see {{ic|man w_scan}} for details).<br />
More advanced scanning options can be found under [[DVB-S#Scanning channels]]. See also ''w_scan'''s [http://dev.man-online.org/man2/w_scan/ man page] and [http://linuxtv.org/wiki/index.php/W_scan documentation].<br />
<br />
==Clients==<br />
<br />
See also [[XScreenSaver|how to disable screensaver when playing video/TV]] by using configuration files or use {{ic|xset}} command before and after player starts to enable/disable it. If you have installed {{Pkg|xscreensaver}} then you will need to use {{ic|xscreensaver-command}} instead of {{ic|xset}} to activate/deactivate screensaver from command line.<br />
<br />
===VLC===<br />
The simplest way to watch DVB-T channels with [[VLC]] is to first generate a playlist:<br />
<br />
$ w_scan -ft -c [country_code] -L > dvb.xspf<br />
$ vlc dvb.xspf<br />
<br />
You can also specify the frequency and programs by hand. This can be done using:<br />
<br />
$ vlc dvb://frequency=543000000<br />
<br />
where the frequency is set in Hz, and should match the base frequency for the transmissions in your area. You can also explicitly specify which demodulation you would like to use, so instead of {{ic|dvb}} you can use {{ic|dvb-t}}, {{ic|dvb-t2}}, etc.<br />
<br />
VLC also accepts various command line arguments, for example if you want to tune into a different program:<br />
<br />
$ vlc dvb://frequency=543000000 :program=3<br />
<br />
===MPlayer / mpv===<br />
<br />
For DVB streaming, [[MPlayer]] (or [[mpv]]) requires a channels configuration file at {{Ic|~/.mplayer/channels.conf}}. Follow [[#Scanning]] for instructions on how to generate it, but make sure to use the {{Ic|-M}} flag to generate the proper format for MPlayer, if you're using {{Ic|w_scan}}:<br />
<br />
$ w_scan -ft -c [country_code] -M > ~/.mplayer/channels.conf<br />
<br />
For ''mpv'', use:<br />
<br />
$ w_scan -ft -c [country_code] -M > ~/.config/mpv/channels.conf<br />
<br />
Try the configuration with {{ic|mplayer dvb://}}, which should start to play the first channel. If it does not, you might need to use {{Ic|-demuxer lavf}} or {{Ic|-demuxer mpegts}} in order to properly receive the stream.<br />
<br />
If the configuration works, you can simply run:<br />
<br />
$ mplayer dvb://"STREAM NAME"<br />
<br />
with a valid {{Ic|STREAM NAME}} from the channels configuration file. <br />
<br />
{{Note|MPlayer cannot handle and play channels from a command line that contains some of Linux special symbols like {{ic|/}} in their names, but you can manually rename them by editing {{ic|~/.mplayer/channels.conf}}.}}<br />
<br />
==== Channel selector ====<br />
<br />
Here is a {{AUR|lstv}} script that will show a numbered list of channels by reading data from a {{ic|~/.mplayer/channels.conf}} file. You will be able to watch a channel by using a number associated to it by the script instead of having to type the whole channel name on the command line, e.g. {{ic|lstv 3}}. The channel number associated by the script equals to the line number with tuning configuration for it. The script disables display power saving and a screen saver before starting ''mplayer'' and enables both again after you close it to disable screensaver management in this script remove {{ic|xset ...;}} before and after [[MPlayer]].<br />
<br />
{{hc|/usr/local/bin/lstv|<nowiki><br />
#!/bin/bash<br />
if [ "$1" ];then<br />
CC='^[0-9]+$';<br />
if ! [[ "$@" =~ $CC ]];then echo Is not a channel number!;<br />
else<br />
##<br />
awk -F':' -v AA="$1" '//{ZZ++;<br />
if(AA == ZZ)system("xset -dpms s off;mplayer dvb://""\""$1"\";xset +dpms s on")}<br />
END{if(AA > ZZ)printf "The highest channel number is: "ZZ"\n"}' "$HOME/.mplayer/channels.conf"<br />
##<br />
fi;<br />
else<br />
awk -F':' '// { ZZ++; printf ZZ " | " $1 "\n"}' "$HOME/.mplayer/channels.conf"<br />
fi;<br />
</nowiki>}}<br />
<br />
{{Note|1=<nowiki></nowiki><br />
* It is assumed that the {{ic|channels.conf}} file has been created with: {{ic|w_scan -ft -c ''country_code'' -C UTF-8 -M -E 0 -O 0 > ~/.mplayer/channels.conf}}<br />
* If the list of channels is too long then you can use something like {{ic|<nowiki>lstv | less</nowiki>}} and search for channels name by pressing {{ic|/}} and writing its name. When found press {{ic|q}} for exiting of [http://unixhelp.ed.ac.uk/CGI/man-cgi?less less] and use the channel associated number with {{AUR|lstv}}.<br />
* If you have a problem with playing of video see [https://bbs.archlinux.org/viewtopic.php?id=57650 Arch Linux Forum].<br />
}}<br />
{{Warning|If there is more than one channel with the same name, ''mplayer'' will play only the closest one in the list.}}<br />
<br />
===ffmpeg===<br />
<br />
[[FFmpeg]] can take DVB-T MPEG streams as input, but requires {{Ic|tzap}} to do so.<br />
<br />
{{Note|This might not necessarily be the case, if a better method is known, please update.}}<br />
<br />
First, generate a tzap-compatible {{Ic|channels.conf}} file, using {{Ic|w_scan}}:<br />
<br />
$ w_scan -ft -A1 -X > ~/.tzap/channels.conf<br />
<br />
Then, you can run:<br />
<br />
$ tzap -r "CHANNEL NAME"<br />
<br />
which, if setup correctly should yield an output similar to:<br />
<br />
$ tzap -r "CHANNEL NAME"<br />
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'<br />
reading channels from file '/home/user/.tzap/channels.conf'<br />
Version: 5.10 FE_CAN { DVB-T }<br />
tuning to 506000000 Hz<br />
video pid 0x0a21, audio pid 0x0a22<br />
status 00 | signal 0000 | snr 0000 | ber 0000ffff | unc 00007fbd | <br />
status 1f | signal 0000 | snr 0126 | ber 00000000 | unc 00007fbd | FE_HAS_LOCK<br />
status 1f | signal 0000 | snr 0129 | ber 0000000f | unc 00007fbd | FE_HAS_LOCK<br />
status 1f | signal 0000 | snr 0120 | ber 00000003 | unc 00007fbd | FE_HAS_LOCK<br />
status 1f | signal 0000 | snr 0125 | ber 00000011 | unc 00007fbd | FE_HAS_LOCK<br />
# ....<br />
<br />
More information on {{Ic|tzap}} is available on the [http://www.linuxtv.org/wiki/index.php/Zap zap wiki page].<br />
<br />
Once {{Ic|tzap}} is encoding the stream, {{Ic|/dev/dvb/adapter0/dvr0}} should be available to {{Ic|ffmpeg}} (or any other program).<br />
<br />
A simple command to stream a program, without addditional encoding might look like so:<br />
<br />
$ ffmpeg -f mpegts -i /dev/dvb/adapter0/dvr0 out.mp4<br />
<br />
==Troubleshooting==<br />
<br />
If you bump into problems, try these tools to help debug:<br />
<br />
* {{AUR|dvbsnoop}} is an advanced tool that can show all the necessary data regarding the bandwidth, signal, frontend, etc.<br />
* {{Ic|femon -H}} shows signal statistics</div>Nilesrogoffhttps://wiki.archlinux.org/index.php?title=PuTTY&diff=434342PuTTY2016-05-08T17:30:50Z<p>Nilesrogoff: small gramatical change</p>
<hr />
<div>[[Category:Terminal emulators]]<br />
{{Merge|List of applications}}<br />
<br />
{{Pkg|Putty}} is a port of the popular GUI SSH, Telnet, Rlogin and serial port connection client for Windows. It has support for advanced logging and termcap options, as well as a very configurable appearance and the ability to forward ports or create a SOCKS tunnel through an SSH destination. To start, simply run putty, type the hostname of the host you would like to connect to and hit Open.<br />
<br />
== Installation ==<br />
<br />
[[Install]] {{Pkg|putty}}. For a menu item and icon, install {{AUR|putty-freedesktop}} from the [[AUR]].<br />
<br />
== Configuration ==<br />
<br />
The settings can be modified through the tabs on the left, however they will be reset if not saved. To save your settings type a name into the box under Saved Sessions and click save. To load it again later, click the name of your save and click load. This allows you to persist your visual, termcap and connection settings between connections and also lets you keep one save per regularly used host. The save "Default Settings" is automatically loaded every time you start putty, so save under that name with care.<br />
<br />
== 256 color support ==<br />
<br />
''Settings > Connection > Data : Terminal-type string = xterm-256color''<br />
<br />
To test color support, execute the following command: [http://www.commandlinefu.com/commands/view/5879/show-numerical-values-for-each-of-the-256-colors-in-bash reference]<br />
<br />
for code in {0..255}; do echo -e "\e[38;05;${code}m $code: Test"; done<br />
<br />
See [http://www.robmeerman.co.uk/unix/256colours 256colours] for details.<br />
<br />
== See Also ==<br />
<br />
[[ssh]]<br />
<br />
[[rlogin]]<br />
<br />
[[telnet]]<br />
<br />
[[Proxy settings|SOCKS]]</div>Nilesrogoffhttps://wiki.archlinux.org/index.php?title=PuTTY&diff=434341PuTTY2016-05-08T17:29:56Z<p>Nilesrogoff: Un-stubbed</p>
<hr />
<div>[[Category:Terminal emulators]]<br />
{{Merge|List of applications}}<br />
<br />
{{Pkg|Putty}} is a port of the popular GUI SSH, Telnet, Rlogin and serial port connection client for Windows. It has support for advanced logging and termcap options as well as a very configurable appearance and the ability to forward ports or create a SOCKS tunnel through an SSH destination. To start, simply run putty, type the hostname of the host you would like to connect to and hit Open.<br />
<br />
== Installation ==<br />
<br />
[[Install]] {{Pkg|putty}}. For a menu item and icon, install {{AUR|putty-freedesktop}} from the [[AUR]].<br />
<br />
== Configuration ==<br />
<br />
The settings can be modified through the tabs on the left, however they will be reset if not saved. To save your settings type a name into the box under Saved Sessions and click save. To load it again later, click the name of your save and click load. This allows you to persist your visual, termcap and connection settings between connections and also lets you keep one save per regularly used host. The save "Default Settings" is automatically loaded every time you start putty, so save under that name with care.<br />
<br />
== 256 color support ==<br />
<br />
''Settings > Connection > Data : Terminal-type string = xterm-256color''<br />
<br />
To test color support, execute the following command: [http://www.commandlinefu.com/commands/view/5879/show-numerical-values-for-each-of-the-256-colors-in-bash reference]<br />
<br />
for code in {0..255}; do echo -e "\e[38;05;${code}m $code: Test"; done<br />
<br />
See [http://www.robmeerman.co.uk/unix/256colours 256colours] for details.<br />
<br />
== See Also ==<br />
<br />
[[ssh]]<br />
<br />
[[rlogin]]<br />
<br />
[[telnet]]<br />
<br />
[[Proxy settings|SOCKS]]</div>Nilesrogoff