avidemux - trouble initializing audio device

Bug #321028 reported by liquidpele
42
This bug affects 6 people
Affects Status Importance Assigned to Milestone
avidemux (Ubuntu)
Fix Released
Medium
Unassigned
Karmic
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: avidemux

Running Avidemux (installed using apt-get) and trying to play any of the video gives the error:
Trouble initializing audio device

running from command line and doing it gives this error:

One frame : 41, err=7 ms
.. Offset ...2127 ms
[Bridge] Going to time 2127
[Bridge] Starting with time 2127, shift 0
[Bridge] Ending with time 2127, sample 0
[Bridge] Going to time 2127
1 audio frame = 205 bytes
ALSA lib pcm_dmix.c:1008:(snd_pcm_dmix_open) unable to open slave
Error opening PCM device dmix
ALSA lib pcm_dmix.c:1008:(snd_pcm_dmix_open) unable to open slave
Error opening PCM device dmix

steps to reproduce:
1) Install avidemux
2) open any video with it
3) try to play the video in the program, it can't play the audio.

Audio plays fine in all other applications.

Edit : reopened because of comment 6

Revision history for this message
liquidpele (liquidpele) wrote :

Forgot to add: avidemux version is Avidemux 2.4.3

Revision history for this message
liquidpele (liquidpele) wrote :

Trying to save the video using any kind of audio filter also fails:

**saving:**
Output format:0
 AVI family

 video process mode : 0
 not encodable, cancelling smart mode
 mux mode : 1 mux param 0
[Bridge] Going to time 0
[Bridge] Starting with time 0, shift 0
[Bridge] Ending with time 0, sample 0
[Bridge] Going to time 0
[Bridge] Going to time 0
[Lame] Creating lame

 output frequency : 5000

 mono audio mp3[Lame]Using quality of 2
[Lame] Deleting lame
[AVI] Cleaning audio

It essentially says:

Encoder initialization failed
Not activated
Error initializing audio filters

I've attached the full log from the program, where I both tried to play the clip and save it with re-encoded audio during that log.

Revision history for this message
Dean Mellas (dmellas) wrote :

It seems like the "help" is always 180 degrees backwards for Avidemux on Pulse Audio systems. At least it always is for my systems. Did you try the following:

In Avidemux do Edit -> Preferences -> Audio (and change the Audio Output to Pulse Audio). It is originally ALSA, and I know most instructions are backwards, but this always works for me. It should make your "error initializing device" go away. If not, play in that dialogue (just know how to get back to the original settings).

Now for the encoding options: You may need to use Synaptic, enable the multiverse repositories and download all the gstreamer libraries (good, bad and ugly) depending on what your are actually trying to do. You might also get the gstreamer alsa and ffmpeg packages as well.

Revision history for this message
liquidpele (liquidpele) wrote :

That fixed it, I can play and re-encode the audio now. Thanks!
very strange that the default setting would be wrong for Ubuntu like that...

Revision history for this message
Festor (festor-deactivatedaccount) wrote :

Is not a bug of avidemux

Changed in avidemux:
status: New → Invalid
Revision history for this message
André Pirard (a.pirard) wrote :

ALSA _does_ work for Avidemux 2.4.3 on Ubuntu 8.10.
But the problem is that Avidemux/Edit/Preferences/Audio/ALSA device is set to "dmix" by default.
Setting it to "default" solves the "trouble initializing" etc... problems.

dmix is an ALSA plugin.
Should it always be enabled and Avidemux is not to blame?
Or should Avidemux not assume dmix is enabled and use the system's default?
Or should it try to use dmix and revert to "default", with or without user's consent?
I don't know,.
But if it took 3 months for launchpad to determine this, I know that the general user is even more clueless and I would certainly call that a bug.
I don't know where, I leave that up to the integrator, but that's somewhere.

Changed in avidemux (Ubuntu):
status: Invalid → New
description: updated
Revision history for this message
Dean Mellas (dmellas) wrote :

Actually, I just tried your suggestion -> going back to ALSA with "default" typed-in in place of "dmix" (as there is no drop-down to choose it, like with the other options). While that got rid of the original "trouble initializing..." problems, as you said it would, it did not provide useful audio for me while working - I got very "noisy" unstable sound. I had to use Pulse Audio to clean up the sound while working, except that, now the sound "pulsed" (no pun intended) - the sound drops out briefly about every 2 seconds - like clockwork! I can at least work with that, because, the final renderings are unaffected. I could not work with the noisy audio at all. All this started with Intrepid and follows through the same way in Jaunty. No problems with Hardy or earlier.

So, somehow, this really does seem to be a problem, as I no longer have a complete work-around. All of the systems I have to work with (both laptops and desktops) have the on-board Intel audio chip sets, and this trouble seems to affect them all, though the degree of the trouble varies.

Revision history for this message
André Pirard (a.pirard) wrote :

Pity to hear about your problem 'cause avidemux is great.
Here, sound works great with all audio outputs except OSS (no init) and SDL.
SDL failure is similar to yours except that drop is hiss and clock is 1 second.
Not all the way through, though, there are nice passages.
avidemux and system audio are out of the box (no other setting change).
Hardware is Intel too :
>lshw
...
        *-multimedia
             description: Audio device
             product: 82801H (ICH8 Family) HD Audio Controller
             vendor: Intel Corporation
             physical id: 1b
             bus info: pci@0000:00:1b.0
             version: 03
             width: 64 bits
             clock: 33MHz
             capabilities: bus_master cap_list
             configuration: driver=HDA Intel latency=0 module=snd_hda_intel

affects: avidemux (Ubuntu) → ubuntu
Revision history for this message
André Pirard (a.pirard) wrote :

If Dean's problem occurs since 8.10, chances are that it's Ubuntu's.
(Although the init failure is probably attributable to avidemux)
I forgot to say that I'm using 8.10 too and I reset the package hint.
No problem for me, just bringing water to the mill.

Revision history for this message
Dean Mellas (dmellas) wrote :
Download full text (4.4 KiB)

It seems to get more interesting...

   1. Since everything worked before Intrepid, I though it might be either drivers, specifically, or systems integration (Ubuntu), in general - wasn't that the switchover from ALSA to Pulse?
   2. But since all other audio systems had no similar problems, I suspected AviDeMux - perhaps exposing a problem lower down the stack, or just mishandling it (more likely).

When André said he had similar problems with OSS and SDL (I didn't), I really began to suspect AviDeMux, even though, initially, I just swapped in the new OS under the application.

But perhaps the newer OS (both Intrepid and Jaunty) just were less efficient, exposing the problem?

   1. When I did a reinstall (vs. the original upgrade) on the problematic system) the "default" device for ALSA cleaned up the noise and distortion to the point that it was more usable than my Pulse alternative (that continued to have dropout beats every few seconds).
   2. Then, as a video was playing, I drug the window around with the mouse, leading to substantially increased audio noise!

I think this has to be AviDeMux or maybe both the application and the drivers. Notice the progression (I tested several systems since the last posting). The older Intel audio chipsets have progressively worse trouble with sound (on the newer operating systems), but the oldest, with the faster CPU, didn't have the playback noise, only the sync problem. The newer the chipset the better the audio. AND, reinstalling vs. upgrading made improvements in the playback. Perhaps this is a thread scheduling or priority (or CPU capacity) issue in the application given the newer operating systems?

Case 1 - oldest system - nice sounding audio but rapidly looses sync with the video:

$ sudo lshw -sanitize -class cpu -class multimedia
  *-cpu:0
       description: CPU
       product: Intel(R) Pentium(R) 4 CPU 2.80GHz
       width: 32 bits
       clock: 200MHz
       capabilities: boot fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pebs bts cid xtpr
  *-multimedia
       description: Multimedia audio controller
       product: 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller
       vendor: Intel Corporation
       physical id: 1f.5
       bus info: pci@0000:00:1f.5
       version: 02
       width: 32 bits
       clock: 33MHz
       capabilities: pm bus_master cap_list
       configuration: driver=Intel ICH latency=0 module=snd_intel8x0

Case 2 - newer laptop - poor audio playback, but stays in sync with video and shows no ill effects in renderings:

$ sudo lshw -sanitize -class cpu -class multimedia
  *-cpu
       description: CPU
       product: Intel(R) Pentium(R) M processor 2.00GHz
       width: 32 bits
       clock: 133MHz
       capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx up bts est tm2 cpufreq
  *-multimedia
       description: Multimedia audio controller
       product: 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller
       vendor: Intel Corporation
       physical id: 1e...

Read more...

Revision history for this message
michael37 (misha37) wrote :

Ran into this problem with Avidemux 2.5.0 on Ubuntu 9.04.

ALSA output doesn't work. The device is not selectable -- there are only two dropdowns in Edit/Preferences/Audio, one is downmixing and another is AudioDevice. ALSA tries to find dmix and fails.

[Alsa] Using device :dmix
[Alsa]Error setting format.

OSS audio output works fine (thank you backward compatible drivers).

Victor Vargas (kamus)
affects: ubuntu → avidemux (Ubuntu)
Revision history for this message
Alessio Treglia (quadrispro) wrote :

Is this still reproducible in karmic?

Changed in avidemux (Ubuntu):
status: New → Incomplete
Revision history for this message
VladimirCZ (vlabla) wrote :

(Ubuntu 9.10 64-bit fully updated)

Yes, the same failure-mode and also the missing items: there are only two dropdowns in Edit/Preferences/Audio, one is downmixing and another is AudioDevice.

Revision history for this message
Max (maxter) wrote :

Ubuntu Karmic 9.10 32 bit - yesterday fresh install
bug confirmed
the audio work only if AudioDevice is set to sdl but even with this configuration the sound is very noisy, as previously stated by dmellas:
https://bugs.launchpad.net/ubuntu/+source/avidemux/+bug/321028/comments/7

Revision history for this message
Max (maxter) wrote :

browsing the avidemux forum i found this post:

http://avidemux.org/admForum/viewtopic.php?id=6739

that suggests a patch that could solv this problem.

i'm not a developer, and i never used svn, so trying to compile avidemux with this patch is out of my possibilities, but i hope this will help to compile a working .deb :)

Changed in avidemux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
ThiloPfennig (tpfennig) wrote :

Still a problem.

Revision history for this message
Nico Zanferrari (nicozanf) wrote :

Same problem here, with 9.04 and also with 9.10 upgrade (64 bit):

Error in terminal:

[Alsa] Using device :dmix
ALSA lib pcm_dmix.c:1008:(snd_pcm_dmix_open) unable to open slave
[Alsa]Error opening PCM device dmix
[Alsa] Using device :dmix
ALSA lib pcm_dmix.c:1008:(snd_pcm_dmix_open) unable to open slave
[Alsa]Error opening PCM device dmix
[Playback] Latency : 0 ms
No accel used for rendering
[Bridge] Destroying bridge

lshw (Dell XPS M1330):

        *-multimedia
             description: Audio device
             product: 82801H (ICH8 Family) HD Audio Controller
             vendor: Intel Corporation
             physical id: 1b
             bus info: pci@0000:00:1b.0
             version: 02
             width: 64 bits
             clock: 33MHz
             capabilities: bus_master cap_list
             configuration: driver=HDA Intel latency=0
             resources: irq:21 memory:f6ffc000-f6ffffff

summary: - 8.10 - avidemux - trouble initializing audio device
+ avidemux - trouble initializing audio device
Revision history for this message
Xelis (xelis) wrote :

Yes, I confirm karmic is affected too.

Changed in avidemux (Ubuntu):
importance: Undecided → Medium
assignee: nobody → Alessio Treglia (quadrispro)
status: Confirmed → In Progress
status: In Progress → Fix Committed
assignee: Alessio Treglia (quadrispro) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package avidemux - 1:2.5.1+repack-0ubuntu3

---------------
avidemux (1:2.5.1+repack-0ubuntu3) lucid; urgency=low

  * Add 02-alsa_output.diff to make ALSA uses a different device (LP: #321028)
  * Refresh patches.
  * debian/control: Replace libxvidcore4-dev with libxvidcore-dev.
 -- Alessio Treglia <email address hidden> Mon, 23 Nov 2009 16:59:21 +0100

Changed in avidemux (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Charlie Kempson (charlie-kempson) wrote :

I note this has been released for Lucid - can we get a release for Karmic too?

Revision history for this message
Alessio Treglia (quadrispro) wrote :

avidemux (1:2.5.1+repack-0ubuntu2.1) karmic; urgency=low

  * Add 02-alsa_output.diff to make ALSA uses a different device (LP: #321028).

 -- Alessio Treglia <email address hidden> Thu, 03 Dec 2009 10:24:04 +0100

Revision history for this message
Alessio Treglia (quadrispro) wrote :

ehm...

avidemux (1:2.5.1+repack-0ubuntu2.1) karmic-proposed; urgency=low

  * Add 02-alsa_output.diff to make ALSA uses a different device (LP: #321028).

 -- Alessio Treglia <email address hidden> Thu, 03 Dec 2009 10:24:04 +0100

Changed in avidemux (Ubuntu Karmic):
importance: Undecided → Medium
Revision history for this message
Charlie Kempson (charlie-kempson) wrote :

Thanks, Alessio. Appreciated.

Revision history for this message
Alessio Treglia (quadrispro) wrote :
Revision history for this message
Alessio Treglia (quadrispro) wrote :

Also fixes bug #215560 (karmic)

Changed in avidemux (Ubuntu Karmic):
status: New → Confirmed
Revision history for this message
Alessio Treglia (quadrispro) wrote :

Uploaded.

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted avidemux into karmic-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in avidemux (Ubuntu Karmic):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
Nico Zanferrari (nicozanf) wrote :

The package is now available. Now I don't have any error using ALSA but the sound is very noisy (and on the configuration file it seems that it is still using dmix).
But there is now a new AudioDevice available on the list in the configuration: PulseAudioS. And it works perfectly for me!

Revision history for this message
Alessio Treglia (quadrispro) wrote :

I confirm, the patch works (also solves bug #215560).

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package avidemux - 1:2.5.1+repack-0ubuntu2.1

---------------
avidemux (1:2.5.1+repack-0ubuntu2.1) karmic-proposed; urgency=low

  * Add 02-alsa_output.diff to set the correect ALSA device (LP: #321028).
  * Add PulseAudio support (LP: #215560).
 -- Alessio Treglia <email address hidden> Mon, 14 Dec 2009 19:43:11 +0100

Changed in avidemux (Ubuntu Karmic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.