Game Development Reference
In-Depth Information
Using OMXPlayer
Download an MP4 file to the Pi (for example, we can use the site hd-trailers to find
some links). Use OMXPlayer to stream the video and sound to the HDMI port. You
can also use RTMP streams directly instead of video files. Replace the URL in wget
to an existing file on the Internet.
# sudo apt-get install omxplayer
# cd /tmp
# sudo wget http://videosite.com/hd.mp4
# omxplayer -o hdmi hd.mp4
Playing audio
The latest Raspbian image comes with all the sound drivers and utilities installed.
The packages that are used belong to ALSA . The Pi has no way to record audio, as
it has no microphone jack and the GPIO pins are all digital. To record audio using
GPIO, we need to use an A/D (Analogue-to-Digital) device or a USB sound device
that has a microphone input.
Using aplay
The following is a pre-installed package that plays WAV files:
# cd /tmp
# wget http://goo.gl/Ps3paV
# mv Ps3paV siren.wav
# aplay siren.wav
Using OMXPlayer
We can play back MP3 files using OMXPlayer.
# omxplayer audio-test.mp3
 
Search WWH ::




Custom Search