Install Ubuntu TV step by step in ubuntu11.10

Source: Internet
Author: User
Tags gstreamer

Ubuntu TV installation


Chapter 2 target platform... 2

Chapter 2 install Ubuntu TV...

2.1 Download Ubuntu TV source code... 2

2.2 compile Ubuntu TV source code... 2

2.3 download, compile, and install the unity video system... 2

2.4 download and install the gstreamer video codec component... 3

Chapter 4 start Ubuntu TV .. 4

3.1 prepare before starting... 4

3.1.1 create a video directory specified by Ubuntu TV... 4

3.1.2 generating a video playback thumbnail... 4

3.2 startup environment configuration... 4

3.2.1 set the D-conf key value of ubuntu TV... 5

3.2.2 set the system environment before startup... 5

3.3 run Ubuntu TV. 5

Chapter 5 adds the album art, posters, and our own data of the video file to javastutv.

4.1 Use xbmc to scan video files and obtain video metadata... 5

4.1.1 how to obtain video file metadata... 5

4.1.2 procedure for retrieving video file metadata using xbmc... 6

4.2 add our own data to the ui... 6

Chapter 7 Ubuntu TV remarks... 7

5.1 about Ubuntu TV... 7

Chapter 7 Ubuntu TV... 7

6.1 comment tutv. 7

Chapter 4 Target Platform

Ubuntu TV is installed on the Ubuntu operating system. Systems earlier than this version may fail to be installed.

Chapter 4 install Ubuntu tv2.1 download Ubuntu TV source code

First, we need to establish the dependency of the source code package of the unity-2d, followed by downloading the required library and components, and finally download the source code. You can run the following commands to complete the process.

$ Sudoapt-Get build-dep unity-2d

$ Sudoapt-Get install dconf-tools gnome-common libdeclarative-multime

FFmpeg bzr

$ Bzr branchlp :~ S-team/Ubuntu tutv/trunk Ubuntu-TV

2.2 compile Ubuntu TV source code

After the download is complete, the Ubuntu-TV directory is generated in the current directory. The content in this directory is the source code of ubuntu TV. We can go to the Ubuntu-TV directory for compilation.

$ Cdubuntu-TV

$ Cmake.

$ Make

$ CD ..

After compilation, some target files related to the desktop environment (unity-2d-panel, unity-2d-spread) and Ubuntu TV startup (unity-2d-shell) are generated.

2.3 download, compile, and install the unity video system

Javastutv requires the support of the Unity video system to open a video file. The following shows how to download and install the source code of the Unity video system.

$ Bzrbranch LP :~ S-team/ubuntutv/Unity-lens-video

$ Cdunity-lens-video

$./Autogen. Sh -- prefix =/usr -- sysconfdir =/etc

$ Sudo makeinstall

$ CD ..

After installation, the Unity-lens-video directory is generated under the current directory, which is the unity video system. Unity-lens-video will be generated under/usr/lib/During the installation process (mainly including the unity-video-daemon process for video playback management ), unity-lens-music and other directories, and generate the script for creating video thumbnails (for fast playback.

2.4 download and install the gstreamer video codec component

When playing a video on Ubuntu TV, you must support the gstreamer video codec component. If gstreamer is not installed, the video file may not be smooth after Ubuntu TV is started. In ubuntu, gstreamer supports most popular video formats. There are two installation methods:

Method 1: run the following command to complete installation.

$ Sudoapt-Get install libgstreamer0.10-dev gstreamer-Tools

$ Sudoapt-Get install gstreamer0.10-tools gstreamer0.10-Doc

$ Sudoapt-Get install gstreamer0.10-plugins-Base

$ Sudoapt-Get install gstreamer0.10-plugins-Good

$ Sudoapt-Get install gstreamer0.10-plugins-uugly

$ Sudoapt-Get install gstreamer0.10-plugins-bad

$ Sudoapt-Get install gstreamer0.10-plugins-bad-multiverse

After the preceding command is run, you must install FFMPEG support.

$ Sudoapt-Get install gstreamer0.10-FFMPEG

Method 2: The system is automatically installed. Open a video file with the built-in mediaplayer In ubuntu. A prompt will be prompted to install the component. Select gstreamer as prompted and install it automatically.

You can also install all the gstreamer components in one step through $ sudoapt-Get install gstreamer * & sudo apt-Get install libgstreamer.

Chapter 4 prepare 3.1.1 to create a video directory specified by Ubuntu TV before starting Ubuntu tv3.1

Create a video directory according to the following rules. Otherwise, the local video file cannot be loaded when Ubuntu TV is enabled.

Create the following directories in Ubuntu. The videos directory is the video directory that comes with ubuntu.

~ /Videos/Unity/local/featured

~ /Videos/Unity/local/rented

~ /Videos/Unity/local/purchased

~ /Videos/Unity/local/recorded

Featured, rented, purchased, and recorded are displayed in Ubuntu TV.

For Directory Creation Rules, see the unity-lens-Video/readme.txt file.

3.1.2 generating a video quick playback thumbnail

After installing the unity video system, generate the script in the/usr/lib/Unity-lens-Video/directory. The script command is used to create a thumbnail corresponding to the video file. Rules are used to add the directory where the video file is located. At this time, each video file is scaled down by a total of 10 images with the suffix of. TMB. These 10 images are used for Ubuntu TV rapid playback (playback. Select one of them to jump to the corresponding place to start playing. Run the following command to generate a video thumbnail.

$/Usr/lib/Unity-lens-Video/ ~ /Videos/

The playback test shows that the total time of the video is 10 points in the place where the 10 thumbnails are generated.

3.2 startup environment Configuration

The Unity used by javastutv conflicts with the Unity used by The GNOME environment on the left. We need to make some changes to the desktop environment to enable javastutv smoothly. In addition, you also need to set the size specification when the ubuntutv is displayed.

3.2.1 set the D-conf key value of ubuntu TV

The essence is to set the size and specification of ubuntu TV, which can be done by the following command.

$ Gsettings_schema_dir = Ubuntu-TV/Data gsettings set

Com. canonical. unity2d form-factor TV

The preceding command is a complete command, which is completed in the current user directory.

3.2.2 set the system environment before startup

If the unity-2d is currently running, we need to end the unity-2d-panel, unity-2d-places

And unity-2d-launcher, unity-2d-spread and other processes. Run the following command.

$ Killallunity-2d-{panel, places, launcher, spread }&&

Killall unity-2d {panel, places, launcher, spread}

If unity is currently running, replace compiz with metacity. The replacement command is as follows:

$ Metacity -- replace &

The preceding command is completed in the current user directory.

3.3 run Ubuntu TV

Run the shell script in the Ubuntu-TV directory to start Ubuntu TV.

$ CD Ubuntu-TV


After startup, ubuntu TV takes over the screen. The ALT + Tab key can be switched back to the terminal.

Chapter 1 adds the cover and poster of the video file and our own data for javastutv 4th uses xbmc to scan the video file and obtain the video metadata

The original tutv started in the previous step cannot display the cover and description of the video. The following is the process of obtaining video metadata.

4.1.1 principles for obtaining video file metadata

After the ubuntutv is started, the local video must be loaded and the description of the corresponding video must be obtained for display. The video metadata required by Ubuntu TV includes metadata, which is used to load the video to the playback interface for display. nfo file reading), such as directors, actors, video scores, and approximate plots.


The xbmc audio and video center is a powerful playback software that supports HD playback. We need to use xbmc to scan video files to obtain the video metadata we need above. Of course, you can also use other audio and video software that can generate video metadata. When you use xbmc to scan video files, you can use (an open-source data website that stores some video information), download video information from three websites, including tmdb, and generate a series of files, the three files we need are listed below.

Movie-fanart.jpg: equivalent to a background poster, used to load the display when you are about to play. Where

Movie. TBN: Specifies the album art of a video file.

Movie. nfo: Specifies the video information file.

In addition, if you fail to download these files from xbmc, you can make them and put them in the video directory. The naming format of each file is the video file name plus the corresponding suffix.

4.1.2 procedure for retrieving video file metadata using xbmc

For the following procedure, see the unity-lens-Video/readme.txt file.

◆ First install the xbmc audio and video center

$ Sudo apt-add-reposotoryppa: Nathan-renniewaldock/xbmc-stable

$ Sudo apt-Get update

$ Sudo apt-Get install xbmc

◆ Use xbmc's sarapers (Searcher) to scan video files

After the installation is complete, start xbmc and complete the following processes:

Ø select video, use the arrow key to select files, and then add videosource à browser, and then add the directory of the video to be opened on Ubuntu TV (for example :~ /Video/Unity/local/featured), and add the recorded and rented directories in sequence. Click OK.

When xbmc loads the video source for the first time, it will prompt to use scraper to scan the video file. We can also enter the scraper crawler in the following way. Videos à files à right-click a video directory and select changecontent. After entering the searcher, select the movidedb scraper, select the "run automatic scan" and "Scan recursively" options, and click OK. After that, xbmc will see "xbmc scanning thedirectory". After that, xbmc will get the three files we need from the website.

After the video metadata is generated, We need to export the files and images generated above to the directory where the video is located. You can complete the following steps:

Select system à settings à Videos à library à export video library in xbmc. on this page, we can also check the "scanlibrary at startup" option so that after we add a new video file, xbmc can automatically scan and obtain video metadata (after the next restart of xbmc ). After completing the preceding operations, select OK and export the required files to the corresponding video directory.

◆ In addition, TV metadata generation is similar to video metadata generation. You only need to use the TV scraper after pointing to the TV directory.

◆ Ubuntutv can load the cover of the video after it is started. When it enters the playback interface, it will load the background poster corresponding to the video and some video text information. See the attachment image folder.

4.2 add our own data to the UI

We can also add our own data to the video playback interface. For example, the rented directory describes the video rental time and rental price, and the featured directory describes the video purchase price. You can modify the. nfo file generated in the previous step as follows:

Rented movies/TV shows:



<Expires> dec 12,201 </expires>




<Expires> dec 12,201 </expires>


Featured movies/TV shows:



<Pai_price> 3.99 </pai_price>

<Buy_price> 5.99 </buy_price>

In addition, this modification method provides a possibility for us to modify the video information in our own applications.

Chapter 2 Ubuntu TV remarks 5th Ubuntu TV

After U is started, F1, F2, and F3 are used to switch the left sidebar, top sidebar, and right sidebar (during video playback) respectively ).

U Ubuntu TV .pdf create the corresponding directory as described in readme.txt in video-lensdirectory; otherwise, the local video file cannot be loaded.

The running of the u epg (TV Program Guide) column requires code support. We can add new TV programs by modifying the refreshdata. py script in the/Shell/dash/epgdata directory. In addition, different TV stations are stored in the channel directory under/Shell/dash/epgdata/. Each playable column corresponds to a directory, each directory contains two logos of this platform (for playing and not playing) and its playing rule file EPG. XML.

◆ Default playback when the EPG cannot be enabled ~ /Videos/Unity/local/EPG/epg.mkv

◆ The YouTube play button on the Left bar is only a placeholder and is not available. It only shows how a new application is integrated into Ubuntu TV. We can integrate our applications into javastutv.

◆ The epg TV column in Ubuntu TV can use the data in the BBC column offline 24 hours a day, but the channel tuner in the background is not started, so the EPG cannot be opened currently.

◆ In the top bar, only the volume and clock buttons are available, and other buttons are virtual portals.

◆ Video playback supports hw hd acceleration.

◆ Javastutv supports remote control of all hid (Human Interface Devices), including Linux kernel-supported keyboards, Bluetooth, and IR (infrared ).

◆ As an embedded TV, javastutv search is the center of the TV. Therefore, text input is an important feature.

Chapter 4 comment on Ubuntu tv6.1 comment on Ubuntu tutv

◆ Advantages:

The official announcement of the release of the javastutv version is exciting. Its features mainly include the following.

Integrate the electronic program guide to support European and American standards-ground Broadcast Standards and HD playback.

Integrate cable or satellite TV services into Ubuntu TV to provide a unified customer experience.

Integrate network content to get more movies, TV programs, and music from Internet providers. To standardize the service framework and content of partners and integrate their own services.

Ø supports intelligent search to provide more options for the audience.

Ø cross-device sharing. Pop music, photos, and videos from PC to TV. As an app for iOS, Android, and Ubuntu, ubuntu TV allows media to share TVs and use Ubuntu one's personal cloud services through portable devices.

Built-in extensible rows. Ubuntutv supports third-party applications. The applications provided by the online store are updated as necessary to form an interest chain for the Ubuntu application development ecosystem.

Ø watch the high-definition video playback supported by javastutv for the current preview version and Fast Video Playback. A wide range of electronic TV programs will give users a better experience.

◆ Disadvantage: In the current preview version, most of the functions of javastutv are not implemented.

Ø when loading a local video, you must create a specific directory to load the video. You are not provided with an interface to add your own video source.

You must create a thumbnail for fast playback during video playback (using ).

Media metadata (used to load the video cover, poster, and description of the text of the video) must also be generated by the user. The operation process is cumbersome and relies on third-party applications (xbmc ).

No instructions and examples are provided for how to add third-party applications.

After installation:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.