Beaglebone Media Center - David Lewin - E-Book

Beaglebone Media Center E-Book

David Lewin

0,0
20,39 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Whether you are a hobbyist or a professional, this book will get you fully equipped to resolve the most commonly occurring media-related challenges. If you want to expand your horizons beyond lighting an LED and push the limits of your board, this is just the book for you. Working knowledge of BeagleBone is assumed.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 145

Veröffentlichungsjahr: 2015

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

BeagleBone Media Center
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Errata
Piracy
Questions
1. Transforming Your BeagleBone Black into a Media Server
The choice that is not yours
You'll still be restricted by their proposals
You hardly manage your own content
Your server, your rules
Powerful and straightforward software installations
Using dedicated hardware
Looking at daily scenarios for media usage
Down in the cave is a server without a head – headless servers
Preparing BeagleBone to be a server
Booting from an SD Card or flash (eMMC)
Extending the root limitations on a fresh installation
Extending your root's partition
Let's get acquainted with our friend – MediaDrop
MediaDrop installation steps
BBB Debian – prerequisites
Setting up a dedicated database
Step 1 – set up a Python virtual environment
Step 2 – installing MediaDrop
Step 3 – basic configuration file
Step 4 – copying content from the initial data
Step 5 – filling the server database and contents
Step 6 (optional) – full-text searching
Testing time – "Hello Server"
Switching from development to production
Let's take a walk in our new MediaDrop server
Your first administrator action
General settings
Site name
Default language
Appearance
Categories
Comments
Notification e-mails
Players
Popularity
Tags
Upload
File size limit
Storage engines
Self-test questions
Summary
2. Media Management, Shares, and Social Activities
How to use MediaDrop through workflows
Why approvals are required
Publishing your media
Auto administrated contents
Administrator tasks
Exploring different ways to access your media
Self-test questions
Summary
3. Examples of Real-world Situations
Introducing the security role
An everyday use case – a house in Springfield
Defining your users list
Understanding role attributions
Group management
Applying groups and users
Second use case – media management in a company
Managing policies and groups
Self-test questions
Summary
4. Getting Your Own Video and Feeds
Detecting the hardware device and installing drivers and libraries for a webcam
How to know your webcam
Setting up your webcam
Installing and running MJPG-Streamer
Installing MJPG-Streamer
Starting the application
Let's add some security
"I'm famous" – your first stream
Using our stream across the network
Starting the streaming service automatically on boot
Exploring new capabilities to install
Plugins
Another tool for the webcam
Configuring RSS feeds with Leed
Creating the environment for Leed in three steps
Creating a database for Leed
Downloading the project code and setting permissions
Installing Leed
Setting up a cron job for feed updates
Using Leed to add your RSS feed
Some Leed preferences settings in a server environment
Extending Leed with plugins
Summary
5. Building Your Media Player
Introducing BeagleBone capes
Exploring capes' categories
Considering a personal Palm Media player
Functional description
Physical description
Installing a system for the expansion board
Looking at the available operating systems
Retrieving the latest files, images, documentation, or software
Installing drivers
Prerequisites for installing any system
Considering a virtual machine
Finding your SD card device
Listing devices with lsblk
Using the dmesg utility
Checking your investigation
Adapting foreign systems for the installer script
Installing your system
Installing and using Android
Installing and using Debian
Installing and using TI EZSDK
Taking a look at TI's linux unique tools
TI's website
Developing with Qt
Using the expansion board with Android
Using files from a computer
Installing applications
Games
Watching and listening to media
Summary
6. Illuminate Your Imagination with Your Own Projects
Presenting the "matrix revolution"
The LED matrix
Introducing I2C
Wiring the matrix to the board
Diving into the software
Example 1 – our first client server application
Installing the requirements
Running the example
Jumping into the code
Description of the data packet
Describing the server code
Questions and suggestions related to this example
Example 2 – improving the first example by adding functionalities
From the client side
From the server side
Improving the client with Kivy
Questions and thoughts related to this example
Example 3 – creating animated graphical patterns
Following the project's requirements
Where to find help on the Internet
Looking at the differences from the previous example
Looking at the concepts of the matrix edition
Browsing the code
Compilation time
Describing the GUI
A quick tour of the code
Looking at the main functions
Questions and thoughts related to this example
Summary
A. Troubleshooting and Tricks to Improve Your Server
Ease your life with the command line
Package management
Get to know what you did previously
Different ways to find your files
All you need to know about open network ports
B. Ideas to Improve Your Server
MiniDLNA
Introducing MiniDLNA
What a DLNA server can do for you
Installing miniDLNA
Configuring and customizing miniDLNA
Subsonic
Installing Subsonic
Administering Subsonic
Changing users
Restarting the service to apply changes
Accessing configuration settings
Advanced configuration
Troubleshooting
Index

BeagleBone Media Center

BeagleBone Media Center

Copyright © 2015 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing and its dealers and distributors, will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: January 2015

Production reference: 1220115

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham B3 2PB, UK.

ISBN 978-1-78439-999-3

www.packtpub.com

Credits

Author

David Lewin

Reviewers

Eric Feuilleaubois

Naoya Hashimoto

Pei JIA

Chidananda Matada Shivananda

Commissioning Editor

Amarabha Banerjee

Acquisition Editor

Larissa Pinto

Content Development Editor

Neeshma Ramakrishnan

Technical Editor

Faisal Siddiqui

Copy Editors

Dipti Kapadia

Rashmi Sawant

Project Coordinator

Danuta Jones

Proofreaders

Ameesha Green

Lawrence A. Herman

Indexer

Hemangini Bari

Production Coordinator

Manu Joseph

Cover Work

Manu Joseph

About the Author

David Lewin was introduced early to electronics and computers by TRS-80, Atari, and Commodore 64; he has never quit since then. He spends his free time watching out for technology for the next generation of embedded systems when he is not exploring philosophy.

David is a passionate and creative embedded developer who spent 20 years working for automotive companies such as Renault, Peugeot, and Faurecia, as well as for satellites with Thales Alenia Space. He currently works in Sophia Antipolis, the French Riviera Silicon Valley, designing industrial embedded systems.

A book is a real personal investment, and I'd like to thank Lisa for her patience, support, and advice. Thanks to my parents for supporting me in my early days; it is also thanks to them that I found the way to write to this book. Thanks to Sarah and Lisa as well. Thanks to Eric and Carol for their time and efforts. I'd like also to thank Neeshma and Larissa at Packt Publishing for their precious help. Besides, I'd also like to thank the open source community as they allow you to benefit from the BeagleBone hardware and software.

I would also like to thank Naoya, Rachel, and Jason (the syntaxic killer) for their great work as I really appreciate what they brought to the book.

About the Reviewers

Naoya Hashimoto has been working on system design and integration with open source software for years. In the past few years, his career and interests have been shifting toward cloud engineering mainly for AWS with orchestration tools such as Chef or CloudFormation.

He has reviewed Icinga Network Monitoring, Home Security System with BeagleBone, and Building networks and servers using BeagleBone, both by Packt Publishing:

Thanks to the author and project coordinator Danuta, who gave me this opportunity to review the book. I am very impressed with her work and this project because we can create a media center device with BeagleBone and open source software. I hope that we get more such opportunities to work with BeagleBone and other open source software.

Pei JIA holds a PhD degree in computer science from the University of Essex, with full financial aid by Overseas Research Studentship (ORS). He specializes in various computer vision algorithms (particularly, 2D and 3D morphable models) and has extensive embedded machine vision experience. He is the pioneer of advocating all kinds of open source, both software and hardware. He has just designed his own smart house in beautiful British Columbia using a BeagleBone Black-based control center. Recently, he launched his enterprise, Longer Vision Tech., in ShenZhen, China, which focuses on designing intelligent vision systems. He has been keeping a close eye on the electronics market and a cooperating closely with the connections with in Seattle and Silicon Valley.

It is my pleasure to be invited to review this book, BeagleBone Media Center, whose title attracted me at first sight. Various single-board computers (SBC) have now emerged, such as BeagleBone Black, Raspberry Pi, Banana Pi Pro, and so on. It's certain that BeagleBone Black has been playing an important role in the development of SBCs. This book elaborates on how to design a media center based on a BeagleBone Black SBC and it comes down to some open source software, such as MediaDrop. I strongly suggest that you read this book (in particular, open source advocators).

Chidananda Matada Shivananda is an electrical engineering graduate who specializes in system dynamics and controls at Villanova University. He has 2 years of industry experience that involves automotive engine management software development at Robert Bosch, India. His interests lie in embedded systems, mobile robotics, and control systems.

I would like to thank Packt Publishing for giving me this wonderful opportunity.

www.PacktPub.com

Support files, eBooks, discount offers, and more

For support files and downloads related to your book, please visit www.PacktPub.com.

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at <[email protected]> for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

https://www2.packtpub.com/books/subscription/packtlib

Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.

Why subscribe?

Fully searchable across every book published by PacktCopy and paste, print, and bookmark contentOn demand and accessible via a web browser

Free access for Packt account holders

If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access.

Preface

The still young market of embedded boards is growing each day, owing to the Raspberry Pi effect. These single-board computers help you solve common problems, such as analyzing a network, programming without a PC, and others. The BeagleBone Black has all of these features, but at the same time, you can broaden your horizons to perform interesting tasks using the expansion capability of the board. Whether you use the basic version of the board or improve it with different accessories available in the market, this board will come in handy to help you decide and create the various tasks you want to perform with it. This book is designed to provide you with the knowledge to explore the world of BeagleBone Black.

Welcome aboard!

What this book covers

Chapter 1, Transforming Your BeagleBone Black into a Media Server, begins with an introduction to help you better understand why it is in your interest to have your own personal server. This chapter then describes the steps required for the installation of an improved multimedia server on steroids.

Chapter 2, Media Management, Shares, and Social Activities, gives indications to use your new server in a connected world. It begins with an explanation of the workflow that needs to be followed; there are also indications to understand what an administrator should do. The chapter ends with social sharing to let you share your contents with your friends or members of your family.

Chapter 3, Examples of Real-world Situations, deals with security because a connected server also needs to safely manage your publications. This chapter introduces you to the security role followed by two scenarios based on real-life experiences: one for a house, and another for professional activities.

Chapter 4, Getting Your Own Video and Feeds, discusses how to improve the existing server by giving you the opportunity to provide your own personal video streams. This chapter gives you the keys for hardware detection. It also presents a different topic that is still based on multimedia: configuring the server for RSS feeds.

Chapter 5, Building Your Media Player, describes the real USP of the BeagleBone Black: capes. Thus, it gives you a way to extend your board in order to create funnier and useful projects. In addition, with this exciting chapter, you will be able to build a device that can display movies and play music without making your imagination compromise because you can also extend this extension board through connectors and additional networks.

Chapter 6, Illuminate Your Imagination with Your Own Projects, lets you enter into the software part of the book using "Matrix Revolution," a fun project with funny tools: you'll use the 8 x 8 bicolor LEDs matrix from Adafruit connected to the BeagleBone Black. After a good introduction to the hardware of the board, the remaining part of this chapter is then split into three examples, starting with a simple example that allows beginners to start smoothly in Python and understand the main programming concepts related to a server and a client. This is followed by an improved version of the first example with a GUI as a laboratory for your experiments. It finally ends with a totally different example written in C++, which is a pattern generator, so you'll be able to display every disco pattern you like.

Appendix A, Troubleshooting and Tricks to Improve Your Server, covers the topics that will help you resolve issues that you might face while working with your servers, including some useful tools and troubleshooting steps.

Appendix B, Ideas to Improve Your Server, introduces some ideas to improve your server functionality.

What you need for this book

To run the book's examples, you will need a running Python environment, including the virtualenv package. The source code will be available from the dedicated GitHub repository and website as well. In all cases, Chapter 5, Building Your Media Player,and Chapter 6, Illuminate Your Imagination with Your Own Projects,will discuss how to install, compile, and run the examples.

Who this book is for

This book is intended for those who want to overcome the limitations of standard projects by learning electronics and programming and by using their imagination, knowledge, and passion.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to <[email protected]>, and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Errata