avdec_h264 is not copying metadata to the outputbuffer

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

avdec_h264 is not copying metadata to the outputbuffer

parithi
I have implemented a new GstMeta with tag "video". It is populated in h264parse plugin and sent to downstream along with the output buffer. I am expecting all downstream elements should propagate this meta data along with output buffer. But if I run the following pipeline

gst-launch-1.0 filesrc location=input.ts ! tsdemux ! h264parse ! 'video/x-h264, stream-format=byte-stream' ! avdec_h264 ! x264enc ! mpegtsmux ! filesink location=out.ts

I am getting following error.

(gst-launch-1.0:22191): GStreamer-CRITICAL **: gst_buffer_add_meta: assertion 'gst_buffer_is_writable (buffer)' failed
Caught SIGSEGV.

From my analysis, I found that refcount of avdec_h264 is always 2. So the transform function is failed to append meta data to the outputbuffer.

Please let me if you have any suggestion/solution for this issue?
Reply | Threaded
Open this post in threaded view
|

Re: avdec_h264 is not copying metadata to the outputbuffer

Tim Müller
On Wed, 2016-11-23 at 04:43 -0800, parithi wrote:

Hi,

> But if I run the following pipeline
>
> gst-launch-1.0 filesrc location=input.ts ! tsdemux ! h264parse !
> 'video/x-h264, stream-format=byte-stream' ! avdec_h264 ! x264enc !
> mpegtsmux
> ! filesink location=out.ts
>
> I am getting following error.
>
> (gst-launch-1.0:22191): GStreamer-CRITICAL **: gst_buffer_add_meta:
> assertion 'gst_buffer_is_writable (buffer)' failed
> Caught SIGSEGV.
>
> From my analysis, I found that refcount of avdec_h264 is always 2. So
> the transform function is failed to append meta data to the
> outputbuffer.
>
> Please let me if you have any suggestion/solution for this issue?

Please could you file a bug about this in bugzilla (against gst-libav)?

https://gstreamer.freedesktop.org/bugs/
--
Tim Müller, Centricular Ltd - http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: avdec_h264 is not copying metadata to the outputbuffer

sudipj
I am using 1.10 version and don't get this issue.

Regards,
Sudip

On 23 November 2016 at 18:42, Tim Müller [via GStreamer-devel] <[hidden email]> wrote:
On Wed, 2016-11-23 at 04:43 -0800, parithi wrote:

Hi,

> But if I run the following pipeline
>
> gst-launch-1.0 filesrc location=input.ts ! tsdemux ! h264parse !
> 'video/x-h264, stream-format=byte-stream' ! avdec_h264 ! x264enc !
> mpegtsmux
> ! filesink location=out.ts
>
> I am getting following error.
>
> (gst-launch-1.0:22191): GStreamer-CRITICAL **: gst_buffer_add_meta:
> assertion 'gst_buffer_is_writable (buffer)' failed
> Caught SIGSEGV.
>
> From my analysis, I found that refcount of avdec_h264 is always 2. So
> the transform function is failed to append meta data to the
> outputbuffer.
>
> Please let me if you have any suggestion/solution for this issue?
Please could you file a bug about this in bugzilla (against gst-libav)?

https://gstreamer.freedesktop.org/bugs/
--
Tim Müller, Centricular Ltd - http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



If you reply to this email, your message will be added to the discussion below:
http://gstreamer-devel.966125.n4.nabble.com/avdec-h264-is-not-copying-metadata-to-the-outputbuffer-tp4680842p4680844.html
To start a new topic under GStreamer-devel, email [hidden email]
To unsubscribe from GStreamer-devel, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: avdec_h264 is not copying metadata to the outputbuffer

parithi
Tim Müller,

I filed a bug : https://bugzilla.gnome.org/show_bug.cgi?id=774983

Sudip,

I am using 1.10.0. Are you using the same version?

Regards,
Parithi
Reply | Threaded
Open this post in threaded view
|

Re: avdec_h264 is not copying metadata to the outputbuffer

sudipj
Parithi,

Its 1.10.0.

sudipjai@dell-ubuntu-laptop:~/gst/head/gst-libav$ gst-launch-1.0 --version
gst-launch-1.0 version 1.10.0
GStreamer 1.10.0
Unknown package origin

sudipjai@dell-ubuntu-laptop:~/gst/head/gst-libav$ gst-launch-1.0 filesrc location= ~/Streams/_TS/h264.ts ! tsdemux ! h264parse ! 'video/x-h264, stream-format=byte-stream' ! avdec_h264 ! x264enc ! mpegtsmux ! filesink location=out.ts Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Redistribute latency...
Redistribute latency...
Redistribute latency...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 0:00:11.894069396
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
sudipjai@dell-ubuntu-laptop:~/gst/head/gst-libav$

Regards,
Sudip

On 24 November 2016 at 12:07, parithi [via GStreamer-devel] <[hidden email]> wrote:
Tim Müller,

I filed a bug : https://bugzilla.gnome.org/show_bug.cgi?id=774983

Sudip,

I am using 1.10.0. Are you using the same version?

Regards,
Parithi


If you reply to this email, your message will be added to the discussion below:
http://gstreamer-devel.966125.n4.nabble.com/avdec-h264-is-not-copying-metadata-to-the-outputbuffer-tp4680842p4680849.html
To start a new topic under GStreamer-devel, email [hidden email]
To unsubscribe from GStreamer-devel, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: avdec_h264 is not copying metadata to the outputbuffer

parithi
Sudip,

Even I don't have any problem running this pipeline without meta data(with tag "video"). But problem arises when I add meta data with ouput buffer of h264_parse. The decoder element should copy this meta data on it's output buffer and pass it to downstream element.

avdec_h264 is receiving all meta data. I've checked this. Problem arises when it tries to add the meta data to its output buffer. The pipeline crashes at gst_buffer_add_meta(), since the buffer passed from avdec_h264 is not in writable mode.
call stack:
--------------------------------
#2 gst_buffer_add_meta
#3 gst_buffer_add_h264_meta
#4 gst_h264_meta_transform
#5 foreach_metadata
#6 gst_buffer_foreach_meta
#7 gst_video_decoder_finish_frame
#8 gst_ffmpegviddec_frame
----------------------------------
If the meta tag is "video" the frame work will do the copying, otherwise we have to retrieve it from input buffer and append it to the outut buffer.
I tried both ways, but the behaviour is same.  

Please let me know if you have any suggestion to resolve this issue.

Regards,
Parithi
Reply | Threaded
Open this post in threaded view
|

Re: avdec_h264 is not copying metadata to the outputbuffer

sudipj
I faced this issue earlier, the only difference being that I added video meta-data into hardware decoder plugin (vpudec) instead of h264parse.  I don't have the proper clue of the real issue, having a consumer of the output buffer downstream avoids it.  Here are some results that could help

.. h264parse ! vpudec ! videoconvert ! fakesink - error

.. h264parse ! vpudec ! videoconvert ! video/-raw, format =I420 ! fakesink  -the output of vpudec is NV12 format. Force video convert to avoid bypass mode - No error

.. h264patrse ! vpudec ! videorga ! fakesink - No error , videorga is hardware post process element, checks for the video meta data and copies to the output buffer, so I don't get the issue and is my default use case. I didn't investigated further.

You could give a similar try to your pipeline, though I am not sure as the the meta data is added in h264parse element. Or just try this if the same error comes
gst-launch-1.0 filesrc location=input.ts ! tsdemux ! h264parse ! fakesink

Then you could keep adding element..

Regards,
Sudip





On 24 November 2016 at 14:38, parithi [via GStreamer-devel] <[hidden email]> wrote:
Sudip,

Even I don't have any problem running this pipeline without meta data(with tag "video"). But problem arises when I add meta data with ouput buffer of h264_parse. The decoder element should copy this meta data on it's output buffer and pass it to downstream element.

avdec_h264 is receiving all meta data. I've checked this. Problem arises when it tries to add the meta data to its output buffer. The pipeline crashes at gst_buffer_add_meta(), since the buffer passed from avdec_h264 is not in writable mode.
call stack:
--------------------------------
#2 gst_buffer_add_meta
#3 gst_buffer_add_h264_meta
#4 gst_h264_meta_transform
#5 foreach_metadata
#6 gst_buffer_foreach_meta
#7 gst_video_decoder_finish_frame
#8 gst_ffmpegviddec_frame
----------------------------------
If the meta tag is "video" the frame work will do the copying, otherwise we have to retrieve it from input buffer and append it to the outut buffer.
I tried both ways, but the behaviour is same.  

Please let me know if you have any suggestion to resolve this issue.

Regards,
Parithi


If you reply to this email, your message will be added to the discussion below:
http://gstreamer-devel.966125.n4.nabble.com/avdec-h264-is-not-copying-metadata-to-the-outputbuffer-tp4680842p4680853.html
To start a new topic under GStreamer-devel, email [hidden email]
To unsubscribe from GStreamer-devel, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: avdec_h264 is not copying metadata to the outputbuffer

parithi
Sudip,

Thanks for your input.

gst-launch-1.0 filesrc location=input.ts ! tsdemux ! h264parse ! fakesink - There is no issue with this pipeline.

avdec_h264 is the only software plugin available for h264 decoding. If I add this in to the pipeline, then the issue arises.

Any I'll try some other pipeline configuration and update you.

Regards,
Parithi