-
Notifications
You must be signed in to change notification settings - Fork 14
Firefox Can Only Play a Still Frame of Video #1
Comments
I tested on another computer configuring my webcam to use the YUV format my webcam supports (with As was stated in the original issue, I have both FFmpeg and GStreamer commands can reproduce this issue so they are definitely not the root cause. Both of these play raw YUV test video and put it into the
Conversely, here is an example of a working pipeline that Firefox will play the video of (converts YUV into MJPEG): All of these were tested in Firefox with the This must mean it is indeed a problem with In any case, I think it's definitely been narrowed down to an issue with Just want to clarify this issue's title as well ("Firefox Can Only Play a Still Frame of Video"): Upon giving Firefox access to the webcam, it will only display the first frame of video and then it will just be stuck displaying that first frame and won't display any more frames. Basically, it will just be a still image. If the page is reloaded, then it will take a new single frame of the webcam video feed and be stuck on that. |
Does Firefox change the format to MJPEG, or does it handle a source that only supports YUV? |
Firefox supports both MJPEG and YUV formats. I'm not sure if when Firefox gets YUV it (behind the scenes) converts the YUV to MJPEG in order to display it or what happens there. I know Chromium uses |
Note in relation the Just to clarify, I was of course using the GStreamer pipelines in this project to stream the video over to the video receiving VM into |
@DemiMarie submitted the PR to fix this in Just waiting for it to be merged now. |
Firefox only seems to be able to play a single frame of video. I've already diagnosed why this is happening with both GStreamer and FFmpeg test commands leading to the same root issue.
Firefox doesn't seem to like the YUV video format but when I tried an MJPEG stream (stream of JPEG images, which is a common format for webcams) it works fine and plays the video back seamlessly.
We could add a conversion to the MJPEG format but I tested that and it results in big latency increase (not to mention the added attack surface). Additionally, to do that GStreamer actually relies on a libav (fork of FFmpeg) conversion algorithm that got bindings added to it for GStreamer. This is the element in question: https://gstreamer.freedesktop.org/documentation/libav/avenc_mjpeg.html. This means it's not packaged in Fedora due to the patent issues with FFmpeg.
So, with the problem diagnosed I'm going to try and make quick work on finding where the bug is so it can be patched. Firefox is the only application I've tested that has had problems so it may be a Firefox bug with YUV formats. I looked it up and Firefox should have full support for YUV webcam video just like Chromium but that doesn't appear to be the case.
Going to try and fix this ASAP because I hate to leave Firefox at a disadvantage.
The text was updated successfully, but these errors were encountered: