Closed Bug 740045 Opened 12 years ago Closed 12 years ago

Video playback with appCache is slow (at least with OGV)


(Core :: Audio/Video, defect)

Not set





(Reporter: kaze, Unassigned)


See this B2G/Gaia issue:

The OGV video playback became very slow after we switched to appCache’d apps. I tend to think it’s related (which would mean it’s more an appCache issue than a video one) but I can’t be sure.
Maybe you're being stung by bug 737745; disk I/O in our decode loop on Ogg video. You could test this by hacking nsOggReader::GetBuffered() [1] to just return [0,duration].

Playback looks fine on my B2G device, with the exception that the progress bar doesn't work. Can you give more details on the steps you took to demonstrate the problem?
By “slow playback” I actually meant that we can’t seek forward: the “+15” button in the Gaia video player UI is supposed to set the current time 15s later (player.currentTime += 15), but on my GS2 it can’t get further than one or two seconds later.

This might just be a data transfer issue, as the OGV video file is significantly bigger than the WebM one — 219 kB/s and 106 kB/s, respectively. I think the data transfer rate has become significantly slower lately in B2G (probably because of the AppCache move).

(In reply to Chris Pearce (:cpearce) from comment #1)
> Maybe you're being stung by bug 737745;

Oh, that would explain why we don’t have this issue with WebM. Gotta check, thanks for the pointer.
On desktop I can't get videos to play back from the app cache at all. Both webm and ogv give 'network error' messages. Ogv doesn't even load - presumably failing getting the duration. Webm shows the first couple of frames then fails.

The playback fails when playing videos from the app cache while offline due to an error in nsBuiltinDecoder::NotifyDownloadEnded where the status is 804b0046 (NS_ERROR_DOCUMENT_NOT_CACHED). If I comment that out the NotifyError, the video does play however.
Assignee: nobody → chris.double
I'm seeing this bug, too, which is blocking me from shipping an offline webapp.  Chris, are you actually working on fixing this bug?  If not, maybe it should be reassigned.
Unlike comment 5, I'm seeing one instance where status is 804B001E (NS_ERROR_NET_TIMEOUT).  If I comment out the call to NotifyError in that case, video will play for 5-10s or so -- but it eventually freezes the image and stops playing as before.
Assignee: chris.double → nobody
How are apps stored in the appcache? Are they stored in JAR files? If so then the media cache won't be able to seek them since IIRC nsIJarChannels aren't seekable. That would explain the "By “slow playback” I actually meant that we can’t seek forward" issue Fabien mentioned.
AppCache files are not stored in JARs, they are plain files in the OfflineCache directory (albeit with hashed names).

See for the set of "media playing from appcache" issues I've identified and filed separate bugs for.  FWIW, as comment 7 says I tried the 'workaround' in comment 5 and it didn't fix the problem for me.  Something more fundamental here.

I suggest focusing this bug on the "doesn't seek" issue.  I can't even see that bug because ogv video won't play at all from appcache.  But it's possible that when that bug is fixed the "doesn't seek" issue will re-emerge.
The upstream issue has been closed a month ago, so closing this here.

The issue cscott is referring to regarding Ogg's not working from appcache can be fixed in bug 791017.
Closed: 12 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.