
126
PA R T II
B U I L DI N G A M E DI A C E N T R E , PRO D U C T I V I T Y M AC H I N E OR W E B S E R V E R
ONE OF THE
most popular tasks for a Pi to carry out is that of a home theatre PC, or HTPC.
The Broadcom BCM2835 at the Pi’s heart is specifically designed as a multimedia power-
house, originally developed for use in HTPCs.
The graphics portion of the BCM2835 system-on-chip (SoC) design, a Broadcom VideoCore
IV module, is capable of full-speed high-definition video playback using the popular H.264
format. The chip is also able to play back audio files in a variety of formats, both through the
analogue 3.5 mm audio output and digitally via the HDMI port.
The small size, low power draw and silent operation combine to make the Pi a tempting
device for home theatre enthusiasts. A variety of distributions and software packages
designed to turn the Pi into a user-friendly home theatre PC have appeared since its launch,
but you don’t necessarily need to give up your existing operating system to get started.
Playing Music at the Console
If you’re a developer, you will likely spend most of your time at the Pi’s console. With the major-
ity of music playback software being aimed at desktop use, it can be a quiet experience—but it
doesn’t have to be.
The Pi supports a powerful text-based music playback package called
moc
(which stands for
music on console
). Unlike other tools (such as
LXMusic
),
moc
can be installed and used even
when there is no graphical user interface (GUI) installed on the Pi.
To get started, install the
moc
package from your distribution’s repositories. For the Raspbian
distribution, this is as simple as typing the following command at the console or in a terminal
window:
sudo apt-get install moc
TIP
Some distributions already have another tool called
moc
, which has nothing to do with audio
playback. If you find that installing
moc
doesn’t give you the result you’re expecting, try
substituting
mocp
as the package name.
If you spend a lot of time outside of the graphical user interface and working at the console,
moc
is a great choice for music playback. Unlike other tools, it runs in the background, mean-
ing there’s no interruption to your music if you start doing something else.
To load
moc
, the command is
mocp
rather than
moc
. The reason for this is that there’s
another tool which uses the command
moc
, so a different name was chosen to prevent the
operating system from getting confused between the two packages.
Содержание A
Страница 1: ......
Страница 2: ......
Страница 3: ...Raspberry Pi User Guide 2nd Edition...
Страница 4: ......
Страница 5: ...Raspberry Pi User Guide 2nd Edition Eben Upton and Gareth Halfacree...
Страница 10: ......
Страница 26: ...R A S P B E R R Y P I U S E R G U I D E S E C O N D E D I T I O N 10...
Страница 28: ......
Страница 29: ...Chapter 1 Meet the Raspberry Pi...
Страница 37: ...Chapter 2 Getting Started with the Raspberry Pi...
Страница 56: ......
Страница 57: ...Chapter 3 Linux System Administration...
Страница 79: ...Chapter 4 Troubleshooting...
Страница 89: ...Chapter 5 Network Configuration...
Страница 109: ...Chapter 6 The Raspberry Pi Software Configuration Tool...
Страница 122: ......
Страница 123: ...Chapter 7 Advanced Raspberry Pi Configuration...
Страница 140: ......
Страница 141: ...Chapter 8 The Pi as a Home Theatre PC...
Страница 151: ...Chapter 9 The Pi as a Productivity Machine...
Страница 159: ...C H A P T E R 9 T H E P I A S A P R O D U C T I V I T Y M A C H I N E 143 Figure 9 4 Exporting a file from The Gimp...
Страница 160: ......
Страница 161: ...Chapter 10 The Pi as a Web Server...
Страница 171: ...Part III Programming with the Raspberry Pi Chapter 11 An Introduction to Scratch Chapter 12 An Introduction to Python...
Страница 172: ......
Страница 173: ...Chapter 11 An Introduction to Scratch...
Страница 189: ...Chapter 12 An Introduction to Python...
Страница 216: ......
Страница 218: ......
Страница 219: ...Chapter 13 Learning to Hack Hardware...
Страница 234: ......
Страница 235: ...Chapter 14 The GPIO Port...
Страница 249: ...Chapter 15 The Raspberry Pi Camera Module...
Страница 265: ...Chapter 16 Add on Boards...
Страница 279: ...Part V Appendixes Appendix A Python Recipes Appendix B Camera Module Quick Reference Appendix C HDMI Display Modes...
Страница 280: ......
Страница 281: ...Appendix A Python Recipes...
Страница 287: ...Appendix B Raspberry Pi Camera Module Quick Reference...
Страница 293: ...Appendix C HDMI Display Modes...