GNOME Bugzilla – Bug 650652
encodebin: missing encoder error when trying to remux
Last modified: 2014-08-11 16:24: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.
Just to be clear, your system has no h264 encoder or parser at all?
I'm getting the same error with and without the autoplugging patch. Could you double check, please?
the h264parse element is present but no h264 encoder (the material must not be reencoded)
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.
Created attachment 192354 [details] [review] encodebin: Enable parsers if available
Created attachment 192355 [details] [review] encodebin: Allow passthrough
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
Created attachment 192357 [details] [review] encodebin: Improve error handling and messages Error earlier when encoder and parser are missing. Also improves error messages posted
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.
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.
Created attachment 192637 [details] [review] encodebin: Enable parsers if available
Created attachment 192638 [details] [review] encodebin: Allow passthrough
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
Created attachment 192640 [details] [review] encodebin: Improve error handling and messages Error earlier when encoder and parser are missing. Also improves error messages posted
All these updated patches applied cleanly for me and have so far caused no regressions. Hopefully they can be merged soon.
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.
Created attachment 193213 [details] [review] encodebin: Enable parsers if available Re-enable the parsers codepath in encodebin as they can now be used.
Created attachment 193214 [details] [review] encodebin: Allow passthrough Avoid erroring out when there's an encoder missing as passthrough could still work.
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
Created attachment 193216 [details] [review] encodebin: Improve error handling and messages Error earlier when encoder and parser are missing. Also improves error messages posted
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.
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.
Any progress on this?
Ping?
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
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.
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