tutorials:command_line_dvb
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
tutorials:command_line_dvb [2012/03/03 19:46] – rmiles | tutorials:command_line_dvb [2012/03/03 21:59] – rmiles | ||
---|---|---|---|
Line 1: | Line 1: | ||
**Command line dvb-t by example** | **Command line dvb-t by example** | ||
- | I have two budget dvb-t pci cards in a linux box that I use for saving dvb TV programs and, since I am a minimalist, sometimes viewing in real time using xine. In this brief tutorial I will explain how to access DVB broadcasts on the command line and introduce a bare bones example script that will tune a channel, encode a broadcast on the fly and save it to disk. | + | I have two budget dvb-t pci cards in a linux box that I use for saving dvb TV programs< |
- | You might wonder | + | You might ask why in the age of Myth TV would I bother |
---- | ---- | ||
- | If you want to try any of this on your own machine you will need to install dvb-apps. If a package is not available for your distro or if you want the latest version go to [[http:// | + | If you want to try any of this on your own machine you will need to install |
+ | |||
+ | Note that some distros package // | ||
- | Note that some distros package dvb-apps as dvb-utils and that there is another bundle of dvb related utilities named DVBapps. If you have installed or built the correct dvb-apps, in addition to some include files, libraries and frequency listings you should have installed the follwing command line utilities | ||
< | < | ||
rick[~]$ ls saves/ | rick[~]$ ls saves/ | ||
Line 18: | Line 19: | ||
I will only discuss the use of //scan// and //tzap// in this tutorial. | I will only discuss the use of //scan// and //tzap// in this tutorial. | ||
- | In order to tune a channel with //tzap// or indeed other applications including //mplayer// and //xine// you will first need a // | + | In order to tune a channel with //tzap// or indeed other applications including //mplayer// and //xine// you will first need a // |
< | < | ||
Line 36: | Line 37: | ||
</ | </ | ||
- | To create my channels.conf I run scan with the path to au-Melbourne and redirect stdout to a file. | + | To create my //channels.conf// I run scan with the path to //au-Melbourne// and redirect stdout to a file. |
< | < | ||
Line 94: | Line 95: | ||
</ | </ | ||
- | Tzap uses // | + | Tzap uses // |
< | < | ||
Line 109: | Line 110: | ||
</ | </ | ||
- | Once tzap has tuned the channel it will remain tuned until the process is terminated. | + | Once tzap has tuned the channel it will remain tuned until the process is terminated. |
< | < | ||
Line 126: | Line 127: | ||
</ | </ | ||
- | Using cat to stdout is pretty useless but dvr0 can be redirected and saved as a transport stream (.ts) on disk or accessed by an application and viewed in real time by opening up another terminal and running the second command. The following will redirect stdout from dvr0 to a file that can be either viewed or encoded to some other format. | + | Using cat to stdout is pretty useless but dvr0 can be redirected and saved as a transport stream (.ts) on disk or accessed by an application and viewed in real time by opening up another terminal and running the second command. The following will redirect stdout from dvr0 to a file that can be either viewed |
< | < | ||
Line 132: | Line 133: | ||
</ | </ | ||
- | As can be seen, the above command redirects stdout from dvr0 to stdin xine. | + | The next command redirects stdout from dvr0 to stdin xine which will then open up in a window. |
< | < | ||
Line 169: | Line 170: | ||
</ | </ | ||
- | As I mentioned above, I sometimes watch dvb in real time with xine but using tzap in one terminal and then running xine in a second is overkill. However, I do use mplayer' | + | As I mentioned above, I sometimes watch dvb in real time with xine but using tzap in one terminal and then running xine from a second |
- | Except for the inclusion of encoding instructions and a path/name for the out file, the command is the same as for mplayer. | + | Except for the inclusion of encoding instructions and a path/name for the out file, the mencoder |
< | < | ||
Line 197: | Line 198: | ||
</ | </ | ||
- | I could just save every thing I want to watch as a transport stream but the overhead running mencoder is very minimal. Additionally i prefer to save shows as mpeg-ps videos and I can edit commercials from using a very fast minimalist | + | I could just save every thing I want to watch as a transport stream but the overhead running mencoder is very minimal. Additionally i prefer to save shows as mpeg-ps videos and I can edit out commercials from using a very fast no frills |
- | Using two terminals and remembering commands and syntax gets to be a bit too much so I'll close this tutorial with a little | + | Using two terminals and remembering commands, options |
- | I'll present that script later in my series of bash tutorials. | + | I'll present that script later on in my series of bash tutorials. |
<code bash> | <code bash> | ||
Line 222: | Line 223: | ||
# Encode on the fly | # Encode on the fly | ||
- | mencoder -oac copy -ovc copy -of mpeg -mpegopts format=dvd / | + | mencoder -oac copy -ovc copy -of mpeg -mpegopts format=dvd / |
mencoder_pid=$! | mencoder_pid=$! | ||
Line 231: | Line 232: | ||
# end of script | # end of script | ||
+ | ################################################## | ||
# Note: | # Note: | ||
- | # The ampersand "&" | + | # The ampersand "&" |
- | # so that they will run in the background | + | # the script will never proceed |
- | # in order, to the next command. | + | # mencoder command is follwed by an ampersand else the script will never |
+ | # proceed past that command | ||
+ | # down. | ||
</ | </ | ||
+ | ---- | ||
+ | Rick Miles | ||
+ | |||
+ | 03 March 2012 | ||
+ | |||
+ | ---- | ||
+ | |||
+ | //< | ||
+ | |||
+ | //< | ||
+ | //< | ||
tutorials/command_line_dvb.txt · Last modified: 2017/10/12 21:58 by 127.0.0.1