Closed Bug 495895 Opened 15 years ago Closed 14 years ago

ogg video won't play with some audio configurations

Categories

(Core :: Audio/Video, defect)

1.9.1 Branch
defect
Not set
critical

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: tchung, Assigned: kinetik)

References

()

Details

(Keywords: regression)

Attachments

(1 file, 2 obsolete files)

I tried playing a video from tinyvid.tv site, and it won't play on ubuntu 9.0.4 vm.  For some reason, this site was prompting for missing flash player plugin, but if i right click the video, it's an ogg file.  

This was on Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1pre) Gecko/20090601 Shiretoko/3.5pre

Steps to reproduce:
1) open clean Ubuntu 9.0.4 VM (no flash player pre-installed)
2) Download the 1.9.1 nightly
3) go to URL
4) first, notice the page is prompting for a missing plugin.  clicking the button will prompt to install flash on this page.
5) now let the video buffer, and click play
6) Verify the video stops at 0:00, it never plays

However, if you go to a site without flash, it plays.  (eg. air.mozilla.com)

See screenshot
This is not limited to the posted video. I just tried a variety of clips and they all cause the notification bar to drop down asking to install Flash. Oddly enough, I see no mention of anything Flash related in the source code for the each embedded movie's page.
still tracking down this, but it might be a regression?  I loaded the same tinyvid page on a beta 4 build in the ubuntu environment, and the video played just fine.  (no flash plugin installed)  If anyone else is on a different OS, please see if you can repro.  (don't install flash plugin, and play a tinyvid.tv video in today's nightly)
Okay i think i narroed it down to the builds between Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b5pre) Gecko/20090519 Shiretoko/3.5b5pre and Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b5pre) Gecko/20090520 Shiretoko/3.5b5pre  

Possible changeset range: http://hg.mozilla.org/mozilla-central/pushloghtml?startdate=5%2F19%2F2009&enddate=5%2F20%2F2009

To repro:
1) load the builds without flash plugin installed
2) go to http://tinyvid.tv/show/1e1c5pk6jazgp
3) let the video buffer, and click play
4) Verify the 520 build does not play at halts at 0:00
Tony, as mentioned on IRC you have to replace the changesets with the ones of your tested builds. This one was just an example I gave you.
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1pre) Gecko/20090602 Shiretoko/3.5pre

I am using Ubuntu 9.04 64-bit (native) and the video plays fine.  I had originally had flash installed, but I renamed all the libflashplayer.so files so Firefox would fail to pick them up.  Checking about:plugins shows no copies of flash and youtube.com requests me to install flash.

The tinyvid.tv video page plays the video without prompting me to install flash.

In an Ubuntu 9.04 64-bit VM where flash has never been installed, I see the warning bar to install flash.  However, I can play the video just fun (ignoring the warning bar).

Looking at their source, there is a script loaded http://js-kit.com/ratings.js.  In this file there are methods for loading flash ads.  It is possible this code is what is throwing up the flash plugin installer warning.
regression range found, testcase-wanted now.
Reproduced in an XP VM 

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1pre) Gecko/20090602 Shiretoko/3.5pre
Something on the web page itself is stopping us from playing the vids. When you open the video file itself (e.g. http://media.tinyvid.tv/1e1c5pk6jazgp.ogg) it works fine. No idea if this is really video/audio related in this case. Lets try finding a testcase and the patch which regressed this behavior. And yeah, we still don't have the right regression-window. I will watch for it.
Roc, one of the patches which was checked in with your monster checkin:
http://hg.mozilla.org/releases/mozilla-1.9.1/pushloghtml?fromchange=f4adc0451c0d&tochange=c4ba19fecb45

Do you have any idea which could have been caused this regression? The patch for the autobuffer?
I tried to build my own builds from the different changesets but it always fail with the following error: http://pastebin.mozilla.org/654981

Any change to get the compilation process finished for testing?
on 1.9.1 you want changesets 8c7f6dd7990b to d4dcb532be6e
This WFM on Mac, with or without Flash disabled.
On my Ubuntu 9 VM, I get the toolbar and the video playback hangs about 12 seconds in.
I'm pretty sure the "Missing plugins" bar is showing up because Ubuntu 9 has no Java VM and tinyvid.tv contains an <applet> element inside the <video> as fallback. So that bar is expected and should not be causing any other problems.
(In reply to comment #13)
> on 1.9.1 you want changesets 8c7f6dd7990b to d4dcb532be6e

Means I have to patch with these two changesets my tree after a hg up?
I mean you should bisect the changsets in that range.
The first set of changesets landed, caused bustage, and were backed out, which is why you can't build anywhere in that range. I relanded those changesets again to get the changesets in comment #13. Those built successfully.
Actually you probably don't need to bisect anything...

We're looping in PlayFrame on a frame that has no audio data, and hwtime is not advancing. So the playback failure is a duplicate of bug 496147.
Depends on: 496147
While it looks like the same bug, the patch in bug 496147 doesn't really fix this. We play, but very very very slowly.
So that means it will only happen in vm's? Than we should update the summary accordingly.
I think
Summary: ogg videos in a page requiring flash player won't play on Ubuntu 9.0.4 VM → ogg video won't play with some audio configurations
I can reproduce this on Fedora 11 x86_64 using alsa-plugins-pulseaudio.  When it happens, sa_stream_get_write_size starts reporting 0 for long periods of time, as if the buffer has become full but never empties.  About to go to sleep, but I'll dig into this more soon.

Possibly unrelated, but somewhat disturbingly, we crash when run under Valgrind because PulseAudio asserts, every time, with the following:

Assertion 'c->callback' failed at pulsecore/socket-client.c:139, function do_call(). Aborting.
Assertion 'pthread_mutex_unlock(&m->mutex) == 0' failed at pulsecore/mutex-posix.c:108, function pa_mutex_unlock(). Aborting.
The problem is that we're not recovering from an underrun condition, and once this happens we are stuck with the stream in a bad state.  Once the underrun occurs, snd_pcm_avail_update in sa_stream_get_position fails with EPIPE (indicating underrun), and the stream makes no progress.

Using scm_pcm_recover to recover the stream from underrun seems to fix the problem, but also seems to drop around 500ms of samples (probably whatever we had written?), so each underrun sounds quite rough.
Attached patch patch v0 (obsolete) — Splinter Review
Fix.  I'll submit a Trac bug upstream shortly.
Assignee: nobody → kinetik
Attachment #383400 - Flags: review?(chris.double)
Attached patch patch v1 (obsolete) — Splinter Review
Includes the patch and update to update.sh.
Attachment #383400 - Attachment is obsolete: true
Attachment #383406 - Flags: review?(chris.double)
Attachment #383400 - Flags: review?(chris.double)
Attachment #383406 - Flags: review?(chris.double) → review+
Filed upstream at https://trac.annodex.net/ticket/485

Chris Pearce just pointed out that the video in the bug URL still doesn't play correctly with my patch, so there are two bugs here.  I *think* this bug is really about the general problem which my patch fixes, and the problem playing back that particular video is another bug, so I'm going to open another bug for that file.
Filed bug 498564 for the other issue.
I think my patch is wrong, and maybe bug 495564 and this are the same.  While the patch seemed to solve most playback problems in my Ubuntu 8.10 VM, it doesn't solve them on my Fedora 11 machine at home.
I have encountered this on Windows 7 VM today.  This also happens with other sites, like openvideo.dailymotion.com.

Repro:
1) Launch windows 7 vm, no flash installed
2) Install latest build.  I'm running Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1) Gecko/20090616 Firefox/3.5
3) launch browser.  goto another openvideo site like http://openvideo.dailymotion.com/us/featured/video/x9ltrs_lady-gaga-paparazzi_music
4) Notice the plugin toolbar warning drops down.
5) Attempt to play the Lady Gaga - Paparazzi test clip.  Verify nothing plays.

Changing platform to all
OS: Linux → All
Hardware: x86 → All
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1) Gecko/20090616 Firefox/3.5

From a fresh installation of Ubuntu 9.04 32-bit, I installed the above build and went to the test site.  I see the Install Plugins warning bar and the video plays automatically.  I suggest this could be an issue with the VMs.  We should test on all platforms native.
Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-US; rv:1.9.1) Gecko/20090616 Firefox/3.5
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1) Gecko/20090616 Firefox/3.5
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1) Gecko/20090616 Firefox/3.5

I cannot reproduce the bug on any of the above platforms when running native (non-VM).  Looks like a VM-only issue.
This bug is getting confusing.  The bug I'm looking at here is Linux only and only when PulseAudio is involved, as I understand it so far.  I can reproduce it on a real machine and a VM.

I think the plugin dropdown is a red herring...  It should have no effect on playback unless something *very* strange is going on.  If you want to verify that, please try reproducing this problem, then installing Flash, then attempt to reproduce again.

The Windows problem sounds like a new bug, but it's also possible I've misclassified this bug so far.  I can't view that video from my country, but it sounds like it happens with other videos.  Can you provide more details?  We'll need a reliable way to reproduce this.
I've tested this on Ubuntu 9.04 native with PulseAudio and it is not reproducible.  You mentioned that the video does not work from "your country".  

This causes all kinds of questions:

1. Are you using en-US Firefox?  If not, what version of Firefox?  If so, do you have a language pack installed? If so, what one?
2. Are you using en-US Ubuntu?  If not, what version of Ubuntu? If so, do you have a language pack installed? If so, what one?
3. What country are you using Firefox from?
Wait, I just realized you are using Fedora 11 x86_64.  All the questions I asked previously still apply, but we don't actively test against your OS.  It will take me some time to attempt to repro this.
I'm referring to the Lady Gaga video Tony linked to.  I'm in NZ using en-US everything.  We need reproducible steps for the Windows 7 problem.

So far this bug had been classified Linux only, and the Linux problem is reproducible on a number of configurations.  I'm working on fixing that bug right now, but it's a Linux only fix.
(In reply to comment #38)
> I'm referring to the Lady Gaga video Tony linked to.  I'm in NZ using en-US
> everything.  We need reproducible steps for the Windows 7 problem.
> 
> So far this bug had been classified Linux only, and the Linux problem is
> reproducible on a number of configurations.  I'm working on fixing that bug
> right now, but it's a Linux only fix.

I'll try the steps again, and installing the flash plugin to see if i can repro it.  be right back
See http://www.screencast.com/t/azb2qqnYRux for the visual steps to repro.
It might be helpful to know exactly what "configurations" this bug is reproducible under by you, Matthew.  We are having a hard time reproducing this in a native Linux environment.
Fedora FAIL...I can't even get Fedora 11 64-bit to install.  The installer displays their crash reporter.  I'm going to do a quick spotcheck on Ubuntu 64-bit.
> See http://www.screencast.com/t/azb2qqnYRux for the visual steps to repro.

Are you seeing it with other videos, too?  At Tinyvid or just Dailymotion?  I can't access that particular video due to geographical content restrictions that DailyMotion have in place (presumably that video is only available within the US), so other links to reproduce the problem would be appreciated.

> It might be helpful to know exactly what "configurations" this bug is
reproducible under by you, Matthew.  We are having a hard time reproducing this
in a native Linux environment.

Fedora 11 x86_64 (with a 64-bit build of trunk) running natively, Ubuntu 8.10 x86 (trunk build) in a VM, Fedora 10 x86 (with an older trunk build) running natively, all different on machines, all using PulseAudio.  The behaviour is a bit different on each.  F10 plays the video but drops audio very frequently (making it unwatchable), F11 plays the first few frames very quickly and then plays extremely slowly and erratically with no audio, Ubuntu 8.10 behaves somewhat like F11.

I had previously removed PulseAudio from the F10 machine, and it played the video fine (using ALSA directly).  After reinstalling PulseAudio, the problem returned.  Downloading the video from tinyvid and playing it locally using Totem works fine in all cases.

This is tested using the URL linked in the bug URL (Google GData presentation).  So this is bug #1, and is PulseAudio specific as far as I can tell.  It's reproducible with other videos, but something about that video makes it particularly easy to reproduce.

The Windows issue is most likely a different bug, we need to investigate and work out what's going on.
Ok.  This is completely different to what we were seeing in this bug.  When this bug was originally reported, it was about the video not playing at all.  The video would buffer but would never start playing.  You'd just see a black frame.  Upon installing Flash, it would magically start to play.

You are saying it plays on all tested platforms, even though it is a crappy experience with PulseAudio.  This is a different bug.
I'm not convinced that's true, but the report of a similar sounding problem happening on Windows is confusing the issue.  We need more details about the Windows issue, and a way to reproduce it that doesn't rely on that particular DailyMotion video (which I can't access).

The bug as originally filed seemed to narrow down (e.g. by the time we get to comment 21) to the symptoms I'm seeing and working on fixing.  Especially as this sounds like a regression from beta 4.  Between beta 4 and now, we became reliant on the backend audio clock to advance to make progress playing video, and that is exactly where the problem I'm investigating is occurring.  In the F11/Ubuntu 8.10 case, the problem occurs so early that the video doesn't appear to play at all because we're stuck at time 0... sometimes it doesn't get stuck until a few seconds into the video.

One way to test if the problem you're seeing is the one I'm working on (on Linux) is to try seeking after the video fails to play.  If you can get the video to play a little (it may become stuck again), it's the PulseAudio/underrun problem.
As I said before, I do not see on issue on any platform running natively.  Only in VMs.  The problem, as originally stated, "the video stops at 0:00, it never plays. However, if you go to a site without flash, it plays."

Your problem is that the video plays poorly and the audio is poor.  This is not the same issue.
Anthony, what platforms can you reproduce on?
I cannot reproduce on any platforms natively.
What about in a VM?
Any platform in a VM using VMWare Tools can reproduce it.  Any VM without cannot.
So both Windows and Linux in a VM?  If so, can you please provide steps for reproducing the problem on Windows (as I requested in earlier comments) that don't rely on a URL that's geographically restricted such that I can't access it?  I'm asking because I can't reproduce the Windows problem on DailyMotion's HTML5 video pages or Tinyvid, with Vista in a VM, with flash enabled, disabled, or uninstalled.

If it's only various Linux platforms, can you please try reproduce it with PulseAudio removed?  On Fedora systems, it's sufficient to remove the pulseaudio and alsa-plugins-pulseaudio packages, then retest (no need to reboot or log out).  On Ubuntu, the packages to remove are pulseaudio and libasound2-plugins (it will also remove ubuntu-desktop automatically, that's fine).  To re-enable PulseAudio, reinstall the packages you removed (including ubuntu-desktop on Ubuntu) and log out and in again.
Using the same Ubuntu 9.04 32-bit VM:
VMWare w/PulseAudio - video doesn't play
VMWare w/ALSA - video doesn't play
VirtualBox w/PulseAudio - video plays
VirtualBox w/ALSA - video plays
Native w/PulseAudio - video plays
Native w/ALSA - video plays

My results above seem to point more toward VMWare than they do anything else.  Since VMWare Tools is not officially supported by VMWare on Ubuntu 9.04 yet, I suspect there could be some problems going on with Tools.  But this is conjecture.  I can't say for certain.

Windows tests forthcoming...
Is everyone who can see this using the same version of VMWare?  What version are you using?
We all use the latest version of VMWare Fusion at the Mozilla office.  At home, I have VirtualBox 2.2.4.
Thanks, I'm using the same (VMWare Fusion 2.0.4).

Just to double check, when you did the test with PulseAudio disabled, did you remove the packages?  I just want to make sure, because there are other ways to (supposedly) disable PulseAudio such as running a process with pasuspender or possibly by changing the settings in System->Preferences->Sound, but they don't seem to actually disable PA for me.
I actually removed the packages using Synaptic Package Manager and opted for "complete removal"
Attachment #383406 - Attachment is obsolete: true
Anthony or Tony, one thing which could be helpful here is a debug log of the video. Please do the following steps, run your STR in debug mode and attach the file here.

1. Open your Fx.app and move to Content/Mac/chrome
2. Open toolkit.jar and move to content/global/bindings
3. Edit videocontrols.xml
4. Search for debug and change the value to true
5. Start Firefox and run your own steps to reproduce the problem
6. Attach the output from the console to this bug

Thanks.
Good idea, Henrik, thanks.

It'd also be worth setting the environment variable NSPR_LOG_MODULES to nsMediaDecoder:5,nsMediaCache:5 when reproducing the problem.  The debugging output from this will go to the console too.
I cannot reproduce.  Handing off to Tony to attempt reproduction.
Tony, any update for comment 57? Where you able to run it with debug output?
We fixed some playback problems over in bug 506061.  That solves or improves the situations we're currently aware of and know how to fix.

There may still be problems like this bug describes on Linux.  I'm pretty sure the mention of Windows problems in this bug were a red herring and can be ignored.  The core remaining problem is that sound is quite broken when running Linux on VMWare, particularly with recent distributions.  I've been using Virtualbox for testing as sound works fine there.

Links to discussions of the problem:
https://bugzilla.redhat.com/show_bug.cgi?id=496714
http://communities.vmware.com/message/1350081
Video: http://www.dailymotion.com/html5
Build: Mozilla/5.0 (X11; Linux i686; rv:2.0b8) Gecko/20100101 Firefox/4.0b8 20101214164501
OS: Ubuntu 10.10 32-bit (Kernel: 2.6.35-22-generic) Gnome 2.32.0
VMWare: Fusion 3.1.0 (261058)

Video and audio play flawlessly.  Marking RESOLVED WORKSFORME.  Please reopen giving details of your environment similar to above if you can reproduce on the latest version of Firefox.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
Issue is Resolved - removing QA-Wanted Keywords - QA-Wanted query clean-up task
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: