随笔-167  评论-8  文章-0  trackbacks-0
Guide now available in PDF format! (see thread attachments)
Quote:
Originally Posted by Silpheed2K
Before you read this guide, I would like to point out that I've been working hard on this guide. I can not stress how long I've spent figuring out and coming up with solutions for the problems I encountered. (and frustration at times) I recommend you go through the ENTIRE guide so everything gets done. I also put the uninstall part in the beginning so we can have a clean start. I really hope this guide helps a lot of you. I also hope this guide lasts a while. This guide is subject to change and be updated. Thank you.
P.S. PulseAudio team please get it right. I can't be around to fix everything, especially after what this distro put me through.

This tutorial is going to explain how to fix pulseaudio completely and the video/audio playback issues of VLC Media Player. Hope this helps. The time scheduling function is still a bit bugged and gives off audio issues I noticed. So unless you want 5 seconds of chopping, skipping, and garbling each time you start an audio app, we're not going to use it. Also, if you're fine with that, can live with the issue and like how it makes PulseAudio less CPU intensive, then skip the step where we disable time scheduling in this tutorial. (You can disable it later if needed after you're done)
So let's get started.

Fixing PulseAudio: We want no less than perfection.

Fresh off of an upgraded install I noticed many things were broken with the audio, so we're going to uninstall PulseAudio first.

In a terminal, type the following:
Code:
su -
yum remove pulseaudio
Restart your computer completely now.

Now that you're back, open a terminal and type the following:
Code:
su -
yum install pulseaudio alsa-plugins-pulseaudio pulseaudio-esound-compat pulseaudio-libs pulseaudio-libs-glib2 pulseaudio-module-zeroconf pulseaudio-libs-zeroconf xmms-pulse pulseaudio-module-gconf wine-pulseaudio xine-lib-pulseaudio pulseaudio-utils pulseaudio-module-bluetooth gst-mixer padevchooser paman paprefs pavucontrol pavumeter
This will reinstall PulseAudio and all the extras we need to work with.

[Skip this step if you can live with time-scheduling, skipping is not recommended]
Next, run the following as root: (or open "/etc/pulse/default.pa" manually as root)
Code:
gedit /etc/pulse/default.pa
and replace the line:
Quote:
load-module module-hal-detect
with:
Quote:
load-module module-hal-detect tsched=0
save your changes. This will disable time-scheduling.

Next, run the following as root: (or open "/etc/pulse/daemon.conf" manually as root)
Code:
gedit /etc/pulse/daemon.conf
then change the line:
Quote:
; realtime-scheduling = no
to
Quote:
realtime-scheduling = yes
also, change the line:
Quote:
; default-fragment-size-msec = 25
to
Quote:
default-fragment-size-msec = 10
save your changes.

Restart your computer completely again.

Now, open System > Preferences > Advanced Volume Control and make sure that PCM, Master, and the various PulseAudio devices under the "Device:" menu aren't muted and are raised to adequate volume levels.


Next, open Applications > Sound & Video > PulseAudio Device Chooser
and make sure the Default Server, Default Sink, and Default Source are all set to Default.


After that, in the device chooser, select the "Volume Control" option in the menu and go through each tab making sure none of the streams are muted.



Now, go to the Configuration tab and for Internal Audio - Profiles set it to the appropriate profile until you hear audio from an audio file. If you're hearing audio already then it is probably set to the proper profile already. Experiment with the profiles using an audio file of some sort, playing it. I used Michael Jackson's (R.I.P) Beat It.


The wrong profile means no audio will come from your sound card at all. Example: I didn't hear any sound because my profile was set to digital and not analogue, because analogue is what my sound card supports.

If you are not hearing any audio at all then you need to check the last 3 routines we just went through. (The advanced volume controls for mutes, Defaults of the Device Chooser, volume control in the device chooser for wrong settings)

You're done! Now you can finally enjoy your audio in Fedora.

sidenote: I also noticed the time-scheduling feature can also cause lagging in video playback; which is why I like it better disabled.

If you're still having PulseAudio issues then please open a support thread and ask for help. Now, I shall continue to the next part of my guide.


Fixing video playback issues with VLC Media Player

Before we start to fix VLC Media Player, I would like to ask you to Download this file as we're going to use it, for testing, later. I chose this file because it is going to give you a fair amount of problems playing it with the default settings.

We are going to fix the chopping, skipping and stutter of the audio with VLC Media Player that some of you been experiencing.

First, open VLC and go to Tools > Preferences. (CTRL+P for those who cant find it)
The options should already be set to simple; hit the Audio tab and change Output: Type to Pulseaudio audio output; As shown in the picture below.


Now, change the Show settings option to All and go to Input / Codecs > Access Modules > File; Change the caching value to 1500 (there are 1000 milliseconds in a second)

You can adjust this a little higher or lower later. As long as it's 1000 or above, it should be fine. (I ultimately ended up lowering mine to around 1300, personally)

Now, that video I had you download? Now it's time to test VLC. Open the video file in VLC and press play, watching it from beginning to end. You are watching it for things like glitches in the audio and the audio cutting off half way through the video. If everything is fine with the audio and video, you're done! If not, continue to the next part of this tutorial.
(If it's an audio issue still then you may want to check your settings or open a support thread)
You can try playing the video and skipping around back-and-forth to see if the audio crashes out, but it shouldn't with the settings in this tutorial.


If there is screen tearing in the video (slices in the video images) you may want to try changing the video output settings. (assuming your CPU/GPU is fast enough to handle the video)
In Tools > Preferences (Simple) go to the Video tab and change Display: Output to various options and play the video until the tearing stops. (experiment) I have mine set to OpenGL because I have OpenGL drivers installed for my video card.

(If it's an issue still after your experimentation, then you may want to open a support thread)

There are more things you can do in-depth, which can degrade video quality, but those are better left for a support thread.

Hope this guide has solved your audio and video issues.
posted on 2009-12-04 21:22 老马驿站 阅读(239) 评论(0)  编辑 收藏 引用 所属分类: linux