Caps Do Not Completely Specify the Output Format

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

Caps Do Not Completely Specify the Output Format

RedMarsBlueMoon
Hi Everyone!

I'm completely new to GStreamer so sorry about probably doing stupid things!
:)

My goal is to learn if the omx h264 Hardware decoder for my raspberry Pi 4
works in GStreamer.  (it doesn't in avcodec)
The first step is me trying to use gstreamer to decode just an h264 file.
This is a demuxed file that has only the h264 video component.

The closest Iv'e come so far is this but it still doesn't play:
(note I'm trying to start with a non omx decoder to make things more likely
to work at first. Once it does I will swap to omx)


gst-launch-1.0 -v -m filesrc location=/home/pi/Videos/mulan.h264 !
video/x-h264,format=I420,width=1920,height=804,framerate=24/1 ! v4l2h264dec
! autovideosink


*The error messages I get are:*

Got message #39 from element "capsfilter0" (error): GstMessageError,
gerror=(GError)NULL, debug=(string)"gstcapsfilter.c\(455\):\
gst_capsfilter_prepare_buf\ \(\):\
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0:\012Output\ caps\ are\
unfixed:\ EMPTY";

and
ERROR: from element /GstPipeline:pipeline0/GstCapsFilter:capsfilter0: Filter
caps do not completely specify the output format.
Output caps are unfixed: EMPTY
ERROR: pipeline doesn't want to preroll.


It seems the docs are saying that 'autovideosink' accepts any kind of input
so I have no clue what to try now.

Any ideas?

Cheers
Fred








--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Caps Do Not Completely Specify the Output Format

Matthew Waters


On 29/10/20 9:15 am, RedMarsBlueMoon wrote:

> Hi Everyone!
>
> I'm completely new to GStreamer so sorry about probably doing stupid things!
> :)
>
> My goal is to learn if the omx h264 Hardware decoder for my raspberry Pi 4
> works in GStreamer.  (it doesn't in avcodec)
> The first step is me trying to use gstreamer to decode just an h264 file.
> This is a demuxed file that has only the h264 video component.
>
> The closest Iv'e come so far is this but it still doesn't play:
> (note I'm trying to start with a non omx decoder to make things more likely
> to work at first. Once it does I will swap to omx)
>
>
> gst-launch-1.0 -v -m filesrc location=/home/pi/Videos/mulan.h264 !
> video/x-h264,format=I420,width=1920,height=804,framerate=24/1 ! v4l2h264dec
> ! autovideosink
You probably want:

filesrc location=$blah ! h264parse ! queue ! v4l2h264dec ! queue !
autovideosink

Or, with your original file you may want to try:

gst-play-1.0 $file

Cheers
-Matt

> *The error messages I get are:*
>
> Got message #39 from element "capsfilter0" (error): GstMessageError,
> gerror=(GError)NULL, debug=(string)"gstcapsfilter.c\(455\):\
> gst_capsfilter_prepare_buf\ \(\):\
> /GstPipeline:pipeline0/GstCapsFilter:capsfilter0:\012Output\ caps\ are\
> unfixed:\ EMPTY";
>
> and
> ERROR: from element /GstPipeline:pipeline0/GstCapsFilter:capsfilter0: Filter
> caps do not completely specify the output format.
> Output caps are unfixed: EMPTY
> ERROR: pipeline doesn't want to preroll.
>
>
> It seems the docs are saying that 'autovideosink' accepts any kind of input
> so I have no clue what to try now.
>
> Any ideas?
>
> Cheers
> Fred
>
>
>
>
>
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

OpenPGP_signature (505 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Caps Do Not Completely Specify the Output Format

RedMarsBlueMoon

Hi and thanks for the suggestion!
I ran:

> gst-launch-1.0 -v -m filesrc location=/home/pi/Videos/mulan.h264 !
> h264parse ! queue ! v4l2h264dec ! queue ! autovideosink

but it also didn't work and I got output ending with:

Got message #54 from element "h264parse0" (error): 0:00:01.320284179  8828
0x16e96a0 WARN               structure
gststructure.c:1832:priv_gst_structure_append_to_gstring: No value transform
to serialize field 'gerror' of type 'GError'
GstMessageError, gerror=(GError)NULL,
debug=(string)"gstbaseparse.c\(3611\):\ gst_base_parse_loop\ \(\):\
/GstPipeline:pipeline0/GstH264Parse:h264parse0:\012streaming\ stopped\,\
reason\ not-negotiated\ \(-4\)", details=(structure)"details\,\
flow-return\=\(int\)-4\;";
ERROR: from element /GstPipeline:pipeline0/GstH264Parse:h264parse0: Internal
data stream error.
Additional debug info:
gstbaseparse.c(3611): gst_base_parse_loop ():
/GstPipeline:pipeline0/GstH264Parse:h264parse0:
streaming stopped, reason not-negotiated (-4)


I tried swapping the decoder for 'avdec_h264' with no luck. I also tried
with the pre-muxed video file plus another .h264 file that is also correct.

Btw, this is the output of doing,

ffprobe /home/pi/Videos/mulan.h264

[h264 @ 0x18e2a00] Stream #0: not enough frames to estimate rate; consider
increasing probesize
Input #0, h264, from '/home/pi/Videos/mulan.h264':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive),
1920x804 [SAR 1:1 DAR 160:67], 90k tbr, 1200k tbn, 180k tbc




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Caps Do Not Completely Specify the Output Format

Matthew Waters
You may need a videoconvert/videoscale/etc chain if your chosen sink
doesn't like the video format that the decoders produce

On 29/10/20 1:12 pm, RedMarsBlueMoon wrote:

> Hi and thanks for the suggestion!
> I ran:
>
>> gst-launch-1.0 -v -m filesrc location=/home/pi/Videos/mulan.h264 !
>> h264parse ! queue ! v4l2h264dec ! queue ! autovideosink
> but it also didn't work and I got output ending with:
>
> Got message #54 from element "h264parse0" (error): 0:00:01.320284179  8828
> 0x16e96a0 WARN               structure
> gststructure.c:1832:priv_gst_structure_append_to_gstring: No value transform
> to serialize field 'gerror' of type 'GError'
> GstMessageError, gerror=(GError)NULL,
> debug=(string)"gstbaseparse.c\(3611\):\ gst_base_parse_loop\ \(\):\
> /GstPipeline:pipeline0/GstH264Parse:h264parse0:\012streaming\ stopped\,\
> reason\ not-negotiated\ \(-4\)", details=(structure)"details\,\
> flow-return\=\(int\)-4\;";
> ERROR: from element /GstPipeline:pipeline0/GstH264Parse:h264parse0: Internal
> data stream error.
> Additional debug info:
> gstbaseparse.c(3611): gst_base_parse_loop ():
> /GstPipeline:pipeline0/GstH264Parse:h264parse0:
> streaming stopped, reason not-negotiated (-4)
>
>
> I tried swapping the decoder for 'avdec_h264' with no luck. I also tried
> with the pre-muxed video file plus another .h264 file that is also correct.
>
> Btw, this is the output of doing,
>
> ffprobe /home/pi/Videos/mulan.h264
>
> [h264 @ 0x18e2a00] Stream #0: not enough frames to estimate rate; consider
> increasing probesize
> Input #0, h264, from '/home/pi/Videos/mulan.h264':
>    Duration: N/A, bitrate: N/A
>      Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive),
> 1920x804 [SAR 1:1 DAR 160:67], 90k tbr, 1200k tbn, 180k tbc
>
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

OpenPGP_signature (505 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Caps Do Not Completely Specify the Output Format

RedMarsBlueMoon

Yes!  That got me much closer I now get a window showing the beginning of
that clip! Awesome!
I did,

gst-launch-1.0 -v -m filesrc location=/home/pi/Videos/mulan.h264 ! h264parse
! queue ! v4l2h264dec ! videoconvert ! videoscale ! queue ! autovideosink

It just plays the first couple of frames though and then stops and after a
while crashes.
Maybe there's something wrong with the demuxing I did. I'm going to try that
part again.

Thank You!



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Caps Do Not Completely Specify the Output Format

Mandar Joshi

> gst-launch-1.0 -v -m filesrc location=/home/pi/Videos/mulan.h264 ! h264parse
> ! queue ! v4l2h264dec ! videoconvert ! videoscale ! queue ! autovideosink
>
> It just plays the first couple of frames though and then stops and after a
> while crashes.
>
Can you run the pipeline with GST_DEBUG=4 environment variable set and post the output?
This is how you can do it

GST_DEBUG=4 gst-launch-1.0 ...

Also, any chance you can share the mulan.h264 file?
Or tell us how you generated it?

Regards
Mandar

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel