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 719799 - vp8enc: Fails to renegotiate if irrelevant parts of the caps change
vp8enc: Fails to renegotiate if irrelevant parts of the caps change
Status: RESOLVED DUPLICATE of bug 747728
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-12-03 19:55 UTC by Oleksij Rempel
Modified: 2016-02-05 11:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
error.log (6.49 KB, text/plain)
2013-12-05 12:31 UTC, Oleksij Rempel
Details

Description Oleksij Rempel 2013-12-03 19:55:17 UTC
vp8enc fails some where about at 45min on this dvd:
https://www.dropbox.com/s/rzn444d9sz8k8pa/stream.dump

i use this script to encode it:
echo "======== VIDEO, pass 1 ========="
date
gst-launch-1.0 filesrc location=stream.dump ! mpegpsdemux name=demux demux.video_e0 ! mpegvideoparse ! mpeg2dec ! videorate ! \
    vp8enc threads=2 multipass-mode=1 target-bitrate=1000000 \
      multipass-cache-file=multipass.cache end-usage=vbr auto-alt-ref=1 \
      keyframe-max-dist=360 min-quantizer=0 max-quantizer=60 \
      token-partitions=2 lag-in-frames=16 ! fakesink


echo "======== VIDEO, pass 2 ========="
date
gst-launch-1.0 filesrc location=stream.dump ! mpegpsdemux name=demux \
  webmmux name=mux ! filesink location=out_video.webm \
  demux.video_e0 ! mpegvideoparse ! mpeg2dec ! videorate ! \
    vp8enc threads=2 multipass-mode=2 target-bitrate=1000000 \
      multipass-cache-file=multipass.cache end-usage=vbr auto-alt-ref=1 \
      keyframe-max-dist=360 min-quantizer=0 max-quantizer=60 \
      token-partitions=2 lag-in-frames=16 ! queue ! mux. \
  demux.audio_81 ! a52dec mode=2 ! audiorate tolerance=50000000 ! \
    audioconvert ! audioresample ! \
    taginject tags="language-code=eng" ! queue ! vorbisenc ! mux. \
  demux.audio_80 ! a52dec mode=2 ! audiorate tolerance=50000000 ! \
    audioconvert ! audioresample ! \
    taginject tags="language-code=ger" ! queue ! vorbisenc ! mux.


Already on first pass vp8enc will fail.
Comment 1 Oleksij Rempel 2013-12-05 06:56:13 UTC
Here is error message:

ERROR: from element /GstPipeline:pipeline0/GstVP8Enc:vp8enc0: GStreamer error: negotiation problem.
Additional debug info:
gstvideoencoder.c(1366): gst_video_encoder_chain (): /GstPipeline:pipeline0/GstVP8Enc:vp8enc0:
Comment 2 Sebastian Dröge (slomo) 2013-12-05 08:23:32 UTC
What's the output with gst-launch-1.0 -v? Also try inserting a videoconvert in front of the encoder.
Comment 3 Oleksij Rempel 2013-12-05 12:31:25 UTC
Created attachment 263583 [details]
error.log

Here is error log with gst-launch-1.0 -v and videoconvert.

SO answer is yes, it fails with videoconvert too. It takes about 40 minutes until it fail.
Comment 4 Oleksij Rempel 2013-12-10 19:55:28 UTC
It fails one frame before end of stream on caps renegotiation. The caps are same, so probably encoder should accept it end not fail.
Comment 5 Oleksij Rempel 2013-12-15 16:01:18 UTC
With this workaround I'm able to encode this any many other videos:

diff --git a/ext/vpx/gstvp8enc.c b/ext/vpx/gstvp8enc.c
index d68cdff..8bb64e4 100644
--- a/ext/vpx/gstvp8enc.c
+++ b/ext/vpx/gstvp8enc.c
@@ -1511,7 +1511,8 @@ gst_vp8_enc_set_format (GstVideoEncoder * video_encoder,
 
   if (encoder->inited) {
     GST_DEBUG_OBJECT (video_encoder, "refusing renegotiation");
-    return FALSE;
+    //return FALSE;
+    return TRUE;
   }
 
   g_mutex_lock (&encoder->encoder_lock);
Comment 6 Sebastian Dröge (slomo) 2013-12-16 15:46:29 UTC
The caps are not the same, the interlace mode is changing for some reason. For exactly-same caps the video encoder base class already ignores this.

I think vp8enc and other encoder subclasses should check for this themselves, as we can't do this in the baseclass because for some codecs reconfiguration might be needed if the interlace mode changes.
Comment 7 Tim-Philipp Müller 2016-02-05 11:25:53 UTC
Oleksij, what fixed this, or when/where was it fixed?
Comment 8 Oleksij Rempel 2016-02-05 11:27:44 UTC
It was fixed here https://bugzilla.gnome.org/show_bug.cgi?id=747728
Comment 9 Tim-Philipp Müller 2016-02-05 11:44:01 UTC

*** This bug has been marked as a duplicate of bug 747728 ***