question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Codec issues: H264 vs VP8

See original GitHub issue

I’ve noticed some interesting behaviour. Lately, I’ve been experimenting with the codec settings in the deployment, notably the following three environment variables:

ENABLE_CODEC_VP8
ENABLE_CODEC_VP9
ENABLE_CODEC_H264

Right now, I have it set to the following:

ENABLE_CODEC_VP8="false"
ENABLE_CODEC_VP9="false"
ENABLE_CODEC_H264="true"

The reason here being that we use Jitsi mostly for voice and screen sharing, and the occasional video. I’ve noticed that the H264 coding yields the sharpest screen share image without flickering.

Using VP8 only:

  • Screen sharing is pixelated. It gets sharp after about 10 seconds, but returns to pixels when the screen is scrolled.
  • Camera video is very sharp.

Using H264 only:

  • Screen sharing is very sharp, and even when scrolling the screen share remains very sharp.
  • Camera video is very pixelated. Even though my Jitsi says I’m uploading 1280x720 at 30 frames per seconds, everybody else sees video that looks like 640x360 or even less sharp.

Using VP9 only: For some reason, this falls back to VP8.

Enabling all three codecs: This also falls back to VP8.

Since we need to have sharp screen sharing and camera video is just for the occasional lulz, the codec is set to H264, and VP8 and VP9 are off.

Now, this is where it gets interesting: this is all using the Jitsi Meet Electron desktop app. Also when using a Chrome-based browser, the behaviour is like this. But when I switch to Firefox, even when using H264 the video is crystal clear in 720p and also the screen sharing is crisp. So it seems like Firefox is compressing the video differently? But using the Electron app is much more convenient, so Firefox rarely gets used.

So I have some questions:

  • Why is H264 so much better than VP8 for screen sharing and horrible for video (in Chrome and Electron)?
  • Why is VP8 so much better for video and horrible for screen sharing (in Chrome and Electron)?
  • Is it possible to have a different codec when using the camera as opposed to when sharing the computer screen (to use the best of both worlds)?
  • Why is H264 video in Firefox so much better than H264 video in Chrome (and Electron)?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:19 (19 by maintainers)

github_iconTop GitHub Comments

2reactions
cedricroijakkerscommented, Apr 12, 2021

That sounds like something that should be fixed in the docker configuration file templates. I will see if I can make a pull request for this. Many thanks for the investigation!

0reactions
saghulcommented, Apr 15, 2021

Ack.

Read more comments on GitHub >

github_iconTop Results From Across the Web

H.264 vs VP8: Which is the Better Codec for WebRTC?
Another point around cost reduction. If my information is correct H.264 SVC is a premium cost on top of regular licensing fees. VP8...
Read more >
VP8 vs. H.264. A codec showdown | by Brandon Aaskov
“When comparing VP8 and x264, VP8 also shows 5–25 times lower encoding speed with 20–30% lower quality at average. For example x264 High-Speed ......
Read more >
VP8 vs H.264 - Which One is Better? - gists · GitHub
H.264 encoded with the latest x264 offers notably higher quality while encoding almost twice as fast as VP8 encoded with the latest libvpx ......
Read more >
First Look: H.264 and VP8 Compared - Streaming Media
VP8 is now free, but if the quality is substandard, who cares? Well, it turns out that the quality isn't substandard, so that's...
Read more >
(PDF) Detailed Comparative Analysis of VP8 and H.264
Abstract ; Perceptual Video Quality. Figures 1 and 2 compare VP8 and H.264 in terms of PSNR ; and SSIM, respectively. H.264 performs...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found