Linux playback via HDMI interface. How to set up HDMI playback in Linux Does not switch sound to TV in ubuntu

How to set up HDMI playback in Linux

Original: "How to Setup HDMI Digital Playback in Linux"
Author: Tavis J. Hampton
Publication date: January 5, 2011
Translation: N.Romodanov
Date of transfer: January 2011

Like many, I have an HDTV at home that can connect HDMI devices such as Blu-ray players. I also enjoy downloading videos, listening to music, and using my TV and home theater to watch internet streaming. Unfortunately I don't have a Boxee or Roku. All I have is a Netflix Blu-ray player that has very few supported video formats and very few ways to play streaming.

Fortunately, instead of buying separate computer, I can run the Boxee player on any computer, such as my Eee PC, which has an HDMI output. Many laptop manufacturers add HDMI outputs to their devices specifically for this purpose, so that customers can display content on large TV screens.

If you are among those lucky ones who have chosen for your computer that has an HDMI output, Linux system, the present quick guide help you achieve full-screen high-quality video and audio playback.

Initial preparation

Generally speaking, if your computer or laptop has an HDMI connector, then it will play full screen HD video. All you need to do is configure Linux to use this connector. From my personal experience I know that in current versions of most Linux distributions the HDMI output will be treated as a VGA output for which there is little that can be configured. Your external screen should be detected automatically even if nothing is issued for it. To make it easier to adjust the screen resolution, you can use tools such as XRandR , Disper , or nvidia-settings .

For example, your configuration string for XRandR or Disper might look like this:

xrandr -output HDMI-0 -mode 1280x720 -right-of DVI-0

or

disper -S -r 1280x720

Audio setup

Video setup for HDMI is relatively simple. Unfortunately, audio setup for HDMI is handled differently on different Linux audio systems. If you have Ubuntu or another distribution that uses PulseAudio, you must use the program Pulseaudio Volume Control . Use it like this:

1. Press Alt + F2, type "pavucontrol" and press Enter

2. Once the control window opens, click on the "Configuration" tab

By default, the profile will say something like "Analog Stereo Duplex". "Analog" refers to your device's normal speakers.

3. Click on the drop down menu.

4. Select "Digital Stereo (HDMI) Output" from the list.

Now all the sound will be directed to the TV speakers.

In KDE, any players that use Phonon, such as Dragon Player or Amarok, use the KDE configuration settings and you can specify an HDMI output in them. To do this, do the following:

1. Open System Settings.

2. Click on the "Multimedia" option.

3. Click on the side fold "Phonon"

4. For any signal, music, video or otherwise, that you want to output in HDMI, select the "Internal Audio Digital Stereo (HDMI)" option and press the "Prefer" button. ) until HDMI is at the very top of the list.

If there is no Pulseaudio or Phonon

If you only need to enable HDMI audio for a specific application, such as the XBMC media center, simply configure the application to use the HDMI output.

For other applications that do not have built-in digital playback support, you will need to manually configure Alsa. The Boxee player, for example, should work exactly like the XBMC media center, but there seems to be a bug that prevents digital output from being used. The first thing you need to do is find out what device number your HDMI output is using. Type the following in the terminal:

aplay-L

Look for the device that says "hw" first, and one of those should be an HDMI device, which will look something like this:

hw:CARD=NVidia,DEV=3 HDA NVidia, NVIDIA HDMI

As you can see from this example, my audio card is "NVidia" and the device number is "3". Suppose you have only one card, the card number will be 0.

Then in your home directory create text file named "asoundrc-hdmi", which should contain the following (replace "hw:0,3" with your actual device number):

pcm.dmixer ( type dmix ipc_key 1024 ipc_key_add_uid false ipc_perm 0660 slave( pcm "hw:0.3" rate 48000 channels 2 period_time 0 period_size 1024 buffer_time 0 buffer_size 4096 ) ) pcm. !default ( type plug slave.pcm "dmixer" )

Save the file. If you already have a file.asoundrc , which is the default, you should make it backup and copy the asoundrc-hdmi setting to a file.asoundrc :

mv .asoundrc asoundrc-backup cp asoundrc-hdmi .asoundrc

If you want to use this setting every time you start your multimedia program, you can create the following script:

#!/bin/bash mv /home/user/asoundrc-hdmi /home/user/.asoundrc sleep 3 /opt/boxee/Boxee& wait mv /home/user/.asoundrc /home/user/asoundrc-hdmi

High quality HD playback

If you have a low power device (such as an Atom Dual Core 330 processor and Nvidia ION graphics) that is advertised as capable of HD playback, but you don't think it is, you may need to configure VDPAU . Use your package manager to install the "libvdpau1" package. Then, in your video player, select the "vdpau" output, not "xv". As a result, you should switch to using hardware acceleration designed to support HD video. In Boxee, go to "Settings -> Media -> Advanced" and check the box for "Enable hardware assisted decoding when possible" ). By default, the "Render method" should be set to VDPAU.

For Adobe Flash, you can download new player Flash 10.2 Beta , which supports hardware accelerated playback. Now all your videos and audio recordings should be played through the HDMI interface without any problems and you do not need to buy a multimedia set-top box for this.

Like many, I have an HDTV at home that can connect HDMI devices such as Blu-ray players. I also enjoy downloading videos, listening to music, and using my TV and home theater to watch internet streaming. Unfortunately I don't have a Boxee or Roku. All I have is a Netflix Blu-ray player that has very few supported video formats and very few ways to play streaming.


Fortunately, instead of buying a separate computer, I can run the Boxee player on any computer, such as my Eee PC, which has an HDMI output. Many laptop manufacturers add HDMI outputs to their devices specifically for this purpose, so that customers can display content on large TV screens.

If you are among the lucky ones who have chosen a Linux system for their HDMI-equipped computer, this quick start guide will help you achieve full-screen, high-quality video and audio playback.

Initial preparation

Generally speaking, if your computer or laptop has an HDMI connector, then it will play full screen HD video. All you need to do is configure Linux to use this connector. I know from personal experience that current versions of most Linux distributions will treat the HDMI output as a VGA output for which there is little that can be configured. Your external screen should be detected automatically even if nothing is displayed on it. To make it easier to adjust the screen resolution, you can use tools such as XRandR, Disper or nvidia-settings.

For example, your configuration string for XRandR or Disper might look like this:

Xrandr –output HDMI-0 –mode 1280x720 –right-of DVI-0

or

Disper -S -r 1280x720

Audio setup

Video setup for HDMI is relatively simple. Unfortunately, audio setup for HDMI is handled differently on different Linux audio systems. If you have Mint or another distribution that uses PulseAudio, you must use the program . Use it like this:

1. Press Alt + F2, type "pavucontrol" and press Enter

2. Once the control window opens, click on the "Configuration" tab

By default, the profile will say something like "Analog Stereo Duplex". "Analog" refers to your device's normal speakers.

3. Click on the drop down menu.

4. Select "Digital Stereo (HDMI) Output" from the list.

Now all the sound will be directed to the TV speakers.

In KDE, any players that use Phonon, such as Dragon Player or Amarok, use the KDE configuration settings and you can specify an HDMI output in them. To do this, do the following:

1. Open System Settings.

2. Click on the "Multimedia" option.

3. Click on the side fold "Phonon"

4. For any signal, music, video or otherwise, that you want to output in HDMI, select the "Internal Audio Digital Stereo (HDMI)" option and press the "Prefer" button. ) until HDMI is at the very top of the list.

If there is no Pulseaudio or Phonon

If you only need to enable HDMI audio for a specific application, such as the XBMC media center, simply configure the application to use the HDMI output.

For other applications that do not have built-in digital playback support, you will need to manually configure Alsa. The Boxee player, for example, should work exactly like the XBMC media center, but there seems to be a bug that prevents digital output from being used. The first thing you need to do is find out what device number your HDMI output is using. Type the following in the terminal:

Aplay-L

Look for the device that says "hw" first, and one of those should be an HDMI device, which will look something like this:

Hw:CARD=NVidia,DEV=3 HDA NVidia, NVIDIA HDMI

As you can see from this example, my audio card is "NVidia" and the device number is "3". Suppose you have only one card, the card number will be 0.

Then, in your home directory, create a text file called "asoundrc-hdmi", which should contain the following (replace "hw:0,3" with your actual device number):

Pcm.dmixer ( type dmix ipc_key 1024 ipc_key_add_uid false ipc_perm 0660 slave( pcm "hw:0.3" rate 48000 channels 2 period_time 0 period_size 1024 buffer_time 0 buffer_size 4096 ) ) pcm. !default ( type plug slave.pcm "dmixer" )

Save the file. If you already have a file .asoundrc, which is the default, you should back it up and copy the asoundrc-hdmi setting to a file .asoundrc:

Mv .asoundrc asoundrc-backup cp asoundrc-hdmi .asoundrc

If you want to use this setting every time you start your multimedia program, you can create the following script:

#!/bin/bash mv /home/user/asoundrc-hdmi /home/user/.asoundrc sleep 3 /opt/boxee/Boxee& wait mv /home/user/.asoundrc /home/user/asoundrc-hdmi

High quality HD playback

For Adobe Flash, you can download the new player Flash 10.2 Beta , which supports hardware accelerated playback. Now all your videos and audio recordings should be played through the HDMI interface without any problems and you do not need to buy a multimedia set-top box for this.


Author: Tavis J. Hampton
Publication date: January 5, 2011
Translation: N.Romodanov
Date of transfer: January 2011

Like many, I have an HDTV at home that can connect HDMI devices such as Blu-ray players. I also enjoy downloading videos, listening to music, and using my TV and home theater to watch internet streaming. Unfortunately I don't have a Boxee or Roku. All I have is a Netflix Blu-ray player that has very few supported video formats and very few ways to play streaming.

Fortunately, instead of buying a separate computer, I can run the Boxee player on any computer, such as my Eee PC, which has an HDMI output. Many laptop manufacturers add HDMI outputs to their devices specifically for this purpose, so that customers can display content on large TV screens.

If you are among the lucky ones who have chosen a Linux system for their HDMI-equipped computer, this quick start guide will help you achieve full-screen, high-quality video and audio playback.

Initial preparation

Generally speaking, if your computer or laptop has an HDMI connector, then it will play full screen HD video. All you need to do is configure Linux to use this connector. I know from personal experience that current versions of most Linux distributions will treat the HDMI output as a VGA output for which there is little that can be configured. Your external screen should be detected automatically even if nothing is displayed on it. To make it easier to adjust the screen resolution, you can use tools such as XRandR, Disper or nvidia-settings.

For example, your configuration string for XRandR or Disper might look like this:

Xrandr –output HDMI-0 –mode 1280x720 –right-of DVI-0

Disper -S -r 1280x720

Audio setup

Video setup for HDMI is relatively simple. Unfortunately, audio setup for HDMI is handled differently on different Linux audio systems. If you have Ubuntu or another distribution that uses PulseAudio, you must use the . Use it like this:

1. Press Alt + F2, type "pavucontrol" and press Enter

2. Once the control window opens, click on the "Configuration" tab

By default, the profile will say something like "Analog Stereo Duplex". "Analog" refers to your device's normal speakers.

3. Click on the drop down menu.

4. Select "Digital Stereo (HDMI) Output" from the list.

Now all the sound will be directed to the TV speakers.

In KDE, any players that use Phonon, such as Dragon Player or Amarok, use the KDE configuration settings and you can specify an HDMI output in them. To do this, do the following:

1. Open System Settings.

2. Click on the "Multimedia" option.

3. Click on the side fold "Phonon"

4. For any signal, music, video or otherwise, that you want to output in HDMI, select the "Internal Audio Digital Stereo (HDMI)" option and press the "Prefer" button. ) until HDMI is at the very top of the list.


If there is no Pulseaudio or Phonon

If you only need to enable HDMI audio for a specific application, such as the XBMC media center, simply configure the application to use the HDMI output.


For other applications that do not have built-in digital playback support, you will need to manually configure Alsa. The Boxee player, for example, should work exactly like the XBMC media center, but there seems to be a bug that prevents digital output from being used. The first thing you need to do is find out what device number your HDMI output is using. Type the following in the terminal:

Aplay-L

Look for the device that says "hw" first, and one of those should be an HDMI device, which will look something like this:

Hw:CARD=NVidia,DEV=3 HDA NVidia, NVIDIA HDMI

As you can see from this example, my audio card is "NVidia" and the device number is "3". Suppose you have only one card, the card number will be 0.

Then, in your home directory, create a text file called "asoundrc-hdmi", which should contain the following (replace "hw:0,3" with your actual device number):

Pcm.dmixer ( type dmix ipc_key 1024 ipc_key_add_uid false ipc_perm 0660 slave( pcm "hw:0.3" rate 48000 channels 2 period_time 0 period_size 1024 buffer_time 0 buffer_size 4096 ) ) pcm. !default ( type plug slave.pcm "dmixer" )

Save the file. If you already have a file .asoundrc, which is the default, you should back it up and copy the asoundrc-hdmi setting to a file .asoundrc:

Mv .asoundrc asoundrc-backup cp asoundrc-hdmi .asoundrc

If you want to use this setting every time you start your multimedia program, you can create the following script:

#!/bin/bash mv /home/user/asoundrc-hdmi /home/user/.asoundrc sleep 3 /opt/boxee/Boxee& wait mv /home/user/.asoundrc /home/user/asoundrc-hdmi

High quality HD playback

If you have a low power device (such as an Atom Dual Core 330 processor and Nvidia ION graphics) that is advertised as capable of HD playback, but you don't think it is, you may need to configure VDPAU . Use your package manager to install the "libvdpau1" package. Then, in your video player, select the "vdpau" output, not "xv". As a result, you must switch to using hardware acceleration designed to support HD video. In Boxee, go to "Settings -> Media -> Advanced" and check the box for "Enable hardware assisted decoding when possible" ). By default, the "Render method" should be set to VDPAU.


For Adobe Flash, you can download the new Flash Player 10.2 Beta which supports hardware accelerated playback. Now all your videos and audio recordings should be played through the HDMI interface without any problems and you do not need to buy a multimedia set-top box for this.

Like many, I have an HDTV at home that can connect HDMI devices such as Blu-ray players. I also enjoy downloading videos, listening to music, and using my TV and home theater to watch internet streaming. Unfortunately I don't have a Boxee or Roku. All I have is a Netflix Blu-ray player that has very few supported video formats and very few ways to play streaming.


Fortunately, instead of buying a separate computer, I can run the Boxee player on any computer, such as my Eee PC, which has an HDMI output. Many laptop manufacturers add HDMI outputs to their devices specifically for this purpose, so that customers can display content on large TV screens.

If you are among the lucky ones who have chosen a Linux system for their HDMI-equipped computer, this quick start guide will help you achieve full-screen, high-quality video and audio playback.

Initial preparation

Generally speaking, if your computer or laptop has an HDMI connector, then it will play full screen HD video. All you need to do is configure Linux to use this connector. I know from personal experience that current versions of most Linux distributions will treat the HDMI output as a VGA output for which there is little that can be configured. Your external screen should be detected automatically even if nothing is displayed on it. To make it easier to adjust the screen resolution, you can use tools such as XRandR, Disper or nvidia-settings.

For example, your configuration string for XRandR or Disper might look like this:

Xrandr –output HDMI-0 –mode 1280x720 –right-of DVI-0

or

Disper -S -r 1280x720

Audio setup

Video setup for HDMI is relatively simple. Unfortunately, audio setup for HDMI is handled differently on different Linux audio systems. If you have Mint or another distribution that uses PulseAudio, you must use the program . Use it like this:

1. Press Alt + F2, type "pavucontrol" and press Enter

2. Once the control window opens, click on the "Configuration" tab

By default, the profile will say something like "Analog Stereo Duplex". "Analog" refers to your device's normal speakers.

3. Click on the drop down menu.

4. Select "Digital Stereo (HDMI) Output" from the list.

Now all the sound will be directed to the TV speakers.

In KDE, any players that use Phonon, such as Dragon Player or Amarok, use the KDE configuration settings and you can specify an HDMI output in them. To do this, do the following:

1. Open System Settings.

2. Click on the "Multimedia" option.

3. Click on the side fold "Phonon"

4. For any signal, music, video or otherwise, that you want to output in HDMI, select the "Internal Audio Digital Stereo (HDMI)" option and press the "Prefer" button. ) until HDMI is at the very top of the list.

If there is no Pulseaudio or Phonon

If you only need to enable HDMI audio for a specific application, such as the XBMC media center, simply configure the application to use the HDMI output.

For other applications that do not have built-in digital playback support, you will need to manually configure Alsa. The Boxee player, for example, should work exactly like the XBMC media center, but there seems to be a bug that prevents digital output from being used. The first thing you need to do is find out what device number your HDMI output is using. Type the following in the terminal:

Aplay-L

Look for the device that says "hw" first, and one of those should be an HDMI device, which will look something like this:

Hw:CARD=NVidia,DEV=3 HDA NVidia, NVIDIA HDMI

As you can see from this example, my audio card is "NVidia" and the device number is "3". Suppose you have only one card, the card number will be 0.

Then, in your home directory, create a text file called "asoundrc-hdmi", which should contain the following (replace "hw:0,3" with your actual device number):

Pcm.dmixer ( type dmix ipc_key 1024 ipc_key_add_uid false ipc_perm 0660 slave( pcm "hw:0.3" rate 48000 channels 2 period_time 0 period_size 1024 buffer_time 0 buffer_size 4096 ) ) pcm. !default ( type plug slave.pcm "dmixer" )

Save the file. If you already have a file .asoundrc, which is the default, you should back it up and copy the asoundrc-hdmi setting to a file .asoundrc:

Mv .asoundrc asoundrc-backup cp asoundrc-hdmi .asoundrc

If you want to use this setting every time you start your multimedia program, you can create the following script:

#!/bin/bash mv /home/user/asoundrc-hdmi /home/user/.asoundrc sleep 3 /opt/boxee/Boxee& wait mv /home/user/.asoundrc /home/user/asoundrc-hdmi

High quality HD playback

For Adobe Flash, you can download the new player Flash 10.2 Beta , which supports hardware accelerated playback. Now all your videos and audio recordings should be played through the HDMI interface without any problems and you do not need to buy a multimedia set-top box for this.


Top