After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 778934 - vp8enc: Using Threads property causes major artifacts
vp8enc: Using Threads property causes major artifacts
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.10.3
Other Mac OS
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-02-20 03:34 UTC by purebordem
Modified: 2018-11-03 15:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
vp8enc threads debug logs and screenshot (37.13 KB, application/zip)
2017-02-21 20:25 UTC, purebordem
Details
GST to Janus WebRTC Artifacts (243.08 KB, image/png)
2017-02-21 20:38 UTC, purebordem
Details

Description purebordem 2017-02-20 03:34:51 UTC
1.10.3 Mac OS - Installed via Brew

Using the "threads" property causes the encoded video to refuse to play. Changing "error-resilient" to 1-3 with threads causes the video to play but incurs intense rainbow artifacting. Tested with various pipelines with varying degrees of success.

gst-launch-1.0 videotestsrc ! vp8enc ! decodebin ! autovideosink

will play

gst-launch-1.0 videotestsrc ! vp8enc threads=4 ! decodebin ! autovideosink

will not play

gst-launch-1.0 videotestsrc ! vp8enc threads=4 error-resilient=3 ! decodebin ! autovideosink

will play with heavy artifacts

gst-launch-1.0 filesrc location=file.mp4 ! decodebin ! videoconvert ! vp8enc ! decodebin ! autovideosink

will play

gst-launch-1.0 filesrc location=file.mp4 ! decodebin ! videoconvert ! vp8enc threads=4 ! decodebin ! autovideosink

will not play

gst-launch-1.0 filesrc location=file.mp4 ! decodebin ! videoconvert ! vp8enc ! rtpvp8pay ! udpsink host=127.0.0.1 port=5004

will stream

gst-launch-1.0 filesrc location=file.mp4 ! decodebin ! videoconvert ! vp8enc threads=4 ! rtpvp8pay ! udpsink host=127.0.0.1 port=5004

will stream

gst-launch-1.0 filesrc location=file.mp4 ! decodebin name=decode ! videoconvert ! vp8enc end-usage=vbr min-quantizer=5 max-quantizer=50 undershoot=95 cpu-used=5 deadline=1 static-threshold=50 error-resilient=1 ! rtpvp8pay ! udpsink host=127.0.0.1 port=5004

will stream without artifacts

gst-launch-1.0 filesrc location=file.mp4 ! decodebin name=decode ! videoconvert ! vp8enc end-usage=vbr min-quantizer=5 max-quantizer=50 undershoot=95 cpu-used=5 threads=4 deadline=1 static-threshold=500 error-resilient=1 ! rtpvp8pay ! udpsink host=127.0.0.1 port=5004

will stream with heavy artifacts


Bottom two streaming examples were viewed in WebRTC compatible browser.
Comment 1 Nicolas Dufresne (ndufresne) 2017-02-21 12:11:32 UTC
(In reply to purebordem from comment #0)
> 1.10.3 Mac OS - Installed via Brew
> 
> Using the "threads" property causes the encoded video to refuse to play.
> Changing "error-resilient" to 1-3 with threads causes the video to play but
> incurs intense rainbow artifacting. Tested with various pipelines with
> varying degrees of success.
> 
> gst-launch-1.0 videotestsrc ! vp8enc ! decodebin ! autovideosink
> 
> will play
> 
> gst-launch-1.0 videotestsrc ! vp8enc threads=4 ! decodebin ! autovideosink
> 
> will not play
> 
> gst-launch-1.0 videotestsrc ! vp8enc threads=4 error-resilient=3 ! decodebin
> ! autovideosink

Works on Linux, better if you set a deadline though (e.g. deadline=1). vp8enc without a deadline is not designed to be real-time. Can you attach a trace, maybe GST_DEBUG=2 and/or GST_DEBUG="vp*:7" ? Does using deadline=1 make it works ?

> 
> will play with heavy artifacts
> 
> gst-launch-1.0 filesrc location=file.mp4 ! decodebin ! videoconvert ! vp8enc
> ! decodebin ! autovideosink

I don't see visual artifacts. Note that by definition this would mean a corrupted image. Though, without deadline=1 my computer is too slow.

> 
> will play
> 
> gst-launch-1.0 filesrc location=file.mp4 ! decodebin ! videoconvert ! vp8enc
> threads=4 ! decodebin ! autovideosink

Works for me, lot of framedrop and deadline=1 helps.

> 
> will not play
> 
> gst-launch-1.0 filesrc location=file.mp4 ! decodebin ! videoconvert ! vp8enc
> ! rtpvp8pay ! udpsink host=127.0.0.1 port=5004
> 
> will stream
> 
> gst-launch-1.0 filesrc location=file.mp4 ! decodebin ! videoconvert ! vp8enc
> threads=4 ! rtpvp8pay ! udpsink host=127.0.0.1 port=5004
> 
> will stream
> 
> gst-launch-1.0 filesrc location=file.mp4 ! decodebin name=decode !
> videoconvert ! vp8enc end-usage=vbr min-quantizer=5 max-quantizer=50
> undershoot=95 cpu-used=5 deadline=1 static-threshold=50 error-resilient=1 !
> rtpvp8pay ! udpsink host=127.0.0.1 port=5004
> 
> will stream without artifacts

If the encoder is not real-time, getting visual artifacts makes a lot of sense due to packet lost. Again, using vpxenc without deadline make not sense for streaming. Same goes to VBR, it's not the best setting for streaming.

> 
> gst-launch-1.0 filesrc location=file.mp4 ! decodebin name=decode !
> videoconvert ! vp8enc end-usage=vbr min-quantizer=5 max-quantizer=50
> undershoot=95 cpu-used=5 threads=4 deadline=1 static-threshold=500
> error-resilient=1 ! rtpvp8pay ! udpsink host=127.0.0.1 port=5004
> 
> will stream with heavy artifacts
> 
> 
> Bottom two streaming examples were viewed in WebRTC compatible browser.

The is strange, since WebRTC compatible browser requires SRTP and an RTP sessions. Can you share your receiver pipeline ?
Comment 2 purebordem 2017-02-21 20:25:22 UTC
Created attachment 346393 [details]
vp8enc threads debug logs and screenshot
Comment 3 purebordem 2017-02-21 20:33:06 UTC
(In reply to Nicolas Dufresne (stormer) from comment #1)
> (In reply to purebordem from comment #0)
> > 1.10.3 Mac OS - Installed via Brew
> > 
> > Using the "threads" property causes the encoded video to refuse to play.
> > Changing "error-resilient" to 1-3 with threads causes the video to play but
> > incurs intense rainbow artifacting. Tested with various pipelines with
> > varying degrees of success.
> > 
> > gst-launch-1.0 videotestsrc ! vp8enc ! decodebin ! autovideosink
> > 
> > will play
> > 
> > gst-launch-1.0 videotestsrc ! vp8enc threads=4 ! decodebin ! autovideosink
> > 
> > will not play
> > 
> > gst-launch-1.0 videotestsrc ! vp8enc threads=4 error-resilient=3 ! decodebin
> > ! autovideosink
> 
> Works on Linux, better if you set a deadline though (e.g. deadline=1).
> vp8enc without a deadline is not designed to be real-time. Can you attach a
> trace, maybe GST_DEBUG=2 and/or GST_DEBUG="vp*:7" ? Does using deadline=1
> make it works ?
>

Attached a couple debugs with the above pipelines. Also included a screenshot. This artifacting is mild in comparison to the filesrc pipelines. Deadline does not cause the pipeline to play if it did not before. Only make pipelines that are playing to have a better playback frame rate.

> > 
> > will play with heavy artifacts
> > 
> > gst-launch-1.0 filesrc location=file.mp4 ! decodebin ! videoconvert ! vp8enc
> > ! decodebin ! autovideosink
> 
> I don't see visual artifacts. Note that by definition this would mean a
> corrupted image. Though, without deadline=1 my computer is too slow.
> 
> > 
> > will play
> > 
> > gst-launch-1.0 filesrc location=file.mp4 ! decodebin ! videoconvert ! vp8enc
> > threads=4 ! decodebin ! autovideosink
> 
> Works for me, lot of framedrop and deadline=1 helps.
> 
> > 
> > will not play
> > 
> > gst-launch-1.0 filesrc location=file.mp4 ! decodebin ! videoconvert ! vp8enc
> > ! rtpvp8pay ! udpsink host=127.0.0.1 port=5004
> > 
> > will stream
> > 
> > gst-launch-1.0 filesrc location=file.mp4 ! decodebin ! videoconvert ! vp8enc
> > threads=4 ! rtpvp8pay ! udpsink host=127.0.0.1 port=5004
> > 
> > will stream
> > 
> > gst-launch-1.0 filesrc location=file.mp4 ! decodebin name=decode !
> > videoconvert ! vp8enc end-usage=vbr min-quantizer=5 max-quantizer=50
> > undershoot=95 cpu-used=5 deadline=1 static-threshold=50 error-resilient=1 !
> > rtpvp8pay ! udpsink host=127.0.0.1 port=5004
> > 
> > will stream without artifacts
> 
> If the encoder is not real-time, getting visual artifacts makes a lot of
> sense due to packet lost. Again, using vpxenc without deadline make not
> sense for streaming. Same goes to VBR, it's not the best setting for
> streaming.
> 
> > 
> > gst-launch-1.0 filesrc location=file.mp4 ! decodebin name=decode !
> > videoconvert ! vp8enc end-usage=vbr min-quantizer=5 max-quantizer=50
> > undershoot=95 cpu-used=5 threads=4 deadline=1 static-threshold=500
> > error-resilient=1 ! rtpvp8pay ! udpsink host=127.0.0.1 port=5004
> > 
> > will stream with heavy artifacts
> > 
> > 
> > Bottom two streaming examples were viewed in WebRTC compatible browser.
> 
> The is strange, since WebRTC compatible browser requires SRTP and an RTP
> sessions. Can you share your receiver pipeline ?

Unfortunately I do not have the pipeline as I am feeding it to a Janus Gatewa and have yet to figure out what Janus does to handle the stream.
Comment 4 purebordem 2017-02-21 20:38:45 UTC
Created attachment 346396 [details]
GST to Janus WebRTC Artifacts
Comment 5 Tim-Philipp Müller 2018-05-06 13:36:51 UTC
I don't know what we can do about this? Are we sure the problem is GStreamer side and not in libvpx?
Comment 6 GStreamer system administrator 2018-11-03 15:16:39 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/348.