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 650652 - encodebin: missing encoder error when trying to remux
encodebin: missing encoder error when trying to remux
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other All
: Normal normal
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 655244
 
 
Reported: 2011-05-20 10:39 UTC by Andreas Frisch
Modified: 2014-08-11 16:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ts to m2ts remuxer using encodebin (9.34 KB, text/x-csrc)
2011-05-20 10:39 UTC, Andreas Frisch
  Details
encodebin: Only error out on missing encoder if required (1.50 KB, patch)
2011-07-21 05:24 UTC, Thiago Sousa Santos
none Details | Review
encodebin: Enable parsers if available (1.20 KB, patch)
2011-07-21 05:24 UTC, Thiago Sousa Santos
none Details | Review
encodebin: Allow passthrough (1.59 KB, patch)
2011-07-21 05:24 UTC, Thiago Sousa Santos
none Details | Review
encodebin: Only need a smart encoder when there is no parser (2.60 KB, patch)
2011-07-21 05:24 UTC, Thiago Sousa Santos
none Details | Review
encodebin: Improve error handling and messages (6.59 KB, patch)
2011-07-21 05:24 UTC, Thiago Sousa Santos
none Details | Review
encodebin: Only error out on missing encoder if required (1.50 KB, patch)
2011-07-25 21:46 UTC, Thiago Sousa Santos
none Details | Review
encodebin: Enable parsers if available (1.20 KB, patch)
2011-07-25 21:47 UTC, Thiago Sousa Santos
none Details | Review
encodebin: Allow passthrough (1.59 KB, patch)
2011-07-25 21:47 UTC, Thiago Sousa Santos
none Details | Review
encodebin: Only need a smart encoder when there is no parser (2.60 KB, patch)
2011-07-25 21:47 UTC, Thiago Sousa Santos
none Details | Review
encodebin: Improve error handling and messages (6.59 KB, patch)
2011-07-25 21:47 UTC, Thiago Sousa Santos
none Details | Review
encodebin: Only error out on missing encoder if required (1.50 KB, patch)
2011-08-04 01:14 UTC, Thiago Sousa Santos
accepted-commit_now Details | Review
encodebin: Enable parsers if available (1.27 KB, patch)
2011-08-04 01:15 UTC, Thiago Sousa Santos
none Details | Review
encodebin: Allow passthrough (1.67 KB, patch)
2011-08-04 01:15 UTC, Thiago Sousa Santos
none Details | Review
encodebin: Only need a smart encoder when there is no parser (2.60 KB, patch)
2011-08-04 01:15 UTC, Thiago Sousa Santos
none Details | Review
encodebin: Improve error handling and messages (6.59 KB, patch)
2011-08-04 01:15 UTC, Thiago Sousa Santos
none Details | Review
encodebin: delay missing encoder error as passthrough is still possible (10.31 KB, patch)
2014-07-23 21:44 UTC, Thiago Sousa Santos
committed Details | Review

Description Andreas Frisch 2011-05-20 10:39:54 UTC
Created attachment 188213 [details]
ts to m2ts remuxer using encodebin

i'm trying to use encodebin to convert a video from one container format into another. in this case, it's about reading an mpeg TS and outputting it as M2TS. so, the elementary streams don't have to be touched. 
still i get the following errors:

0:00:00.495527000   964   0x4e03b0 ERROR              encodebin gstencodebin.c:1300:_create_stream_group:<encodebin> Couldn't create encoder for format video/x-h264, parsed=(boolean)true
ERROR: from element /GstPipeline:bluraydisc stream remuxer/GstEncodeBin:encodebin: Your GStreamer installation is missing a plug-in.
Additional debug info:
gstencodebin.c(1305): _create_stream_group (): /GstPipeline:bluraydisc stream remuxer/GstEncodeBin:encodebin:
Couldn't create encoder for format video/x-h264, parsed=(boolean)true

before autoplugging of parsers was enabled in git, my pipeline would break because it was missing h264parse.
Comment 1 Thiago Sousa Santos 2011-05-24 21:13:06 UTC
Just to be clear, your system has no h264 encoder or parser at all?
Comment 2 Thiago Sousa Santos 2011-05-24 21:35:03 UTC
I'm getting the same error with and without the autoplugging patch. Could you double check, please?
Comment 3 Andreas Frisch 2011-06-01 15:04:26 UTC
the h264parse element is present but no h264 encoder (the material must not be reencoded)
Comment 4 Thiago Sousa Santos 2011-07-21 05:24:37 UTC
Created attachment 192353 [details] [review]
encodebin: Only error out on missing encoder if required

encodebin would error out on missing encoder even if it wouldn't
be required as in passthrough cases.

This might delay error posting a little, but is required for
passthrough to work when user doesn't have the encoder.
Comment 5 Thiago Sousa Santos 2011-07-21 05:24:41 UTC
Created attachment 192354 [details] [review]
encodebin: Enable parsers if available
Comment 6 Thiago Sousa Santos 2011-07-21 05:24:45 UTC
Created attachment 192355 [details] [review]
encodebin: Allow passthrough
Comment 7 Thiago Sousa Santos 2011-07-21 05:24:49 UTC
Created attachment 192356 [details] [review]
encodebin: Only need a smart encoder when there is no parser

By not needing a smart encoder when there's an available parser
we can have passthrough working for more formats
Comment 8 Thiago Sousa Santos 2011-07-21 05:24:52 UTC
Created attachment 192357 [details] [review]
encodebin: Improve error handling and messages

Error earlier when encoder and parser are missing. Also
improves error messages posted
Comment 9 Christian Fredrik Kalager Schaller 2011-07-25 12:43:21 UTC
First patch I am told errors out unexpectedly in the middle of the file, secondly the patches do not seem to apply cleanly anymore, I am getting a lot of errors when patching about hunkX failing.
Comment 10 Thiago Sousa Santos 2011-07-25 21:46:58 UTC
Created attachment 192636 [details] [review]
encodebin: Only error out on missing encoder if required

encodebin would error out on missing encoder even if it wouldn't
be required as in passthrough cases.

This might delay error posting a little, but is required for
passthrough to work when user doesn't have the encoder.
Comment 11 Thiago Sousa Santos 2011-07-25 21:47:06 UTC
Created attachment 192637 [details] [review]
encodebin: Enable parsers if available
Comment 12 Thiago Sousa Santos 2011-07-25 21:47:11 UTC
Created attachment 192638 [details] [review]
encodebin: Allow passthrough
Comment 13 Thiago Sousa Santos 2011-07-25 21:47:16 UTC
Created attachment 192639 [details] [review]
encodebin: Only need a smart encoder when there is no parser

By not needing a smart encoder when there's an available parser
we can have passthrough working for more formats
Comment 14 Thiago Sousa Santos 2011-07-25 21:47:22 UTC
Created attachment 192640 [details] [review]
encodebin: Improve error handling and messages

Error earlier when encoder and parser are missing. Also
improves error messages posted
Comment 15 Christian Fredrik Kalager Schaller 2011-07-27 12:01:04 UTC
All these updated patches applied cleanly for me and have so far caused no regressions. Hopefully they can be merged soon.
Comment 16 Thiago Sousa Santos 2011-08-04 01:14:07 UTC
Created attachment 193212 [details] [review]
encodebin: Only error out on missing encoder if required

encodebin would error out on missing encoder even if it wouldn't
be required as in passthrough cases.

This might delay error posting a little, but is required for
passthrough to work when user doesn't have the encoder.
Comment 17 Thiago Sousa Santos 2011-08-04 01:15:07 UTC
Created attachment 193213 [details] [review]
encodebin: Enable parsers if available

Re-enable the parsers codepath in encodebin as they can
now be used.
Comment 18 Thiago Sousa Santos 2011-08-04 01:15:12 UTC
Created attachment 193214 [details] [review]
encodebin: Allow passthrough

Avoid erroring out when there's an encoder missing
as passthrough could still work.
Comment 19 Thiago Sousa Santos 2011-08-04 01:15:16 UTC
Created attachment 193215 [details] [review]
encodebin: Only need a smart encoder when there is no parser

By not needing a smart encoder when there's an available parser
we can have passthrough working for more formats
Comment 20 Thiago Sousa Santos 2011-08-04 01:15:20 UTC
Created attachment 193216 [details] [review]
encodebin: Improve error handling and messages

Error earlier when encoder and parser are missing. Also
improves error messages posted
Comment 21 Tim-Philipp Müller 2011-08-09 16:51:01 UTC
As I said on IRC earlier, I think we need to come up with a better way of making sure that we handle errors properly if there's no suitable encoder. Just going ahead with "maybe passthrough is all that's needed" and then later failing with a not-linked error if encoding is required seems .. suboptimal. Maybe one could come up with a fake encoder element that just posts an error (and a missing-plugin message) if it receives a buffer or something like that.

Also, not entirely sure if the whole parser issue has really been fixed, I think we still need to make parsers accept parsed input (which we can do now, but haven't done it yet afaik). Might do that later if I don't forget.
Comment 22 Thiago Sousa Santos 2011-09-19 13:32:36 UTC
While trying to improve the error handling I noticed another piece of this problem. When encoder is missing and you try to link a pad with raw format to encodebin it fails. That's because the path of raw format is unlinked and the get_caps won't provide raw formats on encodebin's sinkpad. Not sure how to report a proper error at this stage.
Comment 23 Sebastian Dröge (slomo) 2012-12-17 11:22:22 UTC
Any progress on this?
Comment 24 Sebastian Dröge (slomo) 2013-07-23 13:01:00 UTC
Ping?
Comment 25 Thiago Sousa Santos 2014-07-23 21:44:14 UTC
Created attachment 281533 [details] [review]
encodebin: delay missing encoder error as passthrough is still possible

Set up a fakesink with a pad probe to replace the missing encoder to detect
if encoding was really required and only error out in this case. Otherwise
just let passthrough branch work.

This delays the error posting from the set_state function to when buffers
are really flowing. Unit test updated accordingly
Comment 26 Thiago Sousa Santos 2014-07-23 21:44:59 UTC
Sorry for the long delay. Seems most of issues have been fixed on the long way to 1.0. The remaining one should be fixed by the patch attached.
Comment 27 Thiago Sousa Santos 2014-08-11 16:20:27 UTC
commit c9904fb639023d73d338a09ea2fb029e9f4be6ac
Author: Thiago Santos <thiagoss@osg.samsung.com>
Date:   Wed Jul 30 16:59:15 2014 -0300

    encodebin: delay missing encoder error as passthrough is still possible
    
    Set up a fakesink with a pad probe to replace the missing encoder to detect
    if encoding was really required and only error out in this case. Otherwise
    just let passthrough branch work.
    
    This delays the error posting from the set_state function to when buffers
    are really flowing. Unit test updated accordingly
    
    https://bugzilla.gnome.org/show_bug.cgi?id=650652