v4l2codecs: Delayed linking failed
Jagan Teki
jagan at amarulasolutions.com
Fri Jul 30 09:59:56 UTC 2021
On Fri, Jul 30, 2021 at 2:28 AM Nicolas Dufresne <nicolas at ndufresne.ca> wrote:
>
> Le jeudi 29 juillet 2021 à 18:23 +0530, Jagan Teki a écrit :
> > Hi Nicolas,
> >
> > This is regarding that request I have filed in gitlab,
> > https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1634
> >
> > Sorry, for posting it on GitLab. Now I'm writing here in mainling list
> > to assist further help on this.
> >
> > Yes. I have passed the videoconvert in between decoder and
> > autovideosink but it is playing very slow (even for 720p video) like
> >
> > # gst-launch-1.0 filesrc location=video.MP4 ! qtdemux ! h264parse !
> > v4l2slh264dec ! videoconvert ! autovideosink
>
> For others in the ML, as we discussed over IRC, glimagesink will perform better,
> but might not be elected by autovideosink. Assuming you stop the X11 or Wayland
> servers, you can also try kmssink.
Looks like there is some issue in gst or cedrus, I did check the
glimagesink in the X11 window.
# gst-launch-1.0 filesrc location=Big_Buck_Bunny_720_10s_1MB.mp4 !
qtdemux ! h264parse ! v4l2slh264dec ! glimagesink
1. It worked perfect on one of 720p, here is the file metadata,
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42mp41isomavc1
creation_time : 2015-07-16T01:37:07.000000Z
Duration: 00:05:55.39, start: 0.000000, bitrate: 2648 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661),
yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 2484 kb/s, 24 fps, 24
tbr, 24 tbn, 48 tbc (default)
Metadata:
creation_time : 2015-07-16T01:37:07.000000Z
handler_name : L-SMASH Video Handler
encoder : AVC Coding
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
stereo, fltp, 160 kb/s (default)
Metadata:
creation_time : 2015-07-16T01:37:07.000000Z
handler_name : L-SMASH Audio Handler
2. It is not working perfectly on usual Big Bunny 720p H264 video
(https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/720/Big_Buck_Bunny_720_10s_1MB.mp4).
Video playing perfect then jerks, pause and steady again.
Here is the metadata for this video,
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
title : Big Buck Bunny, Sunflower version
artist : Blender Foundation 2008, Janus Bager Kristensen 2013
composer : Sacha Goedegebure
encoder : Lavf57.63.100
comment : Creative Commons Attribution 3.0 -
http://bbb3d.renderfarming.net
genre : Animation
Duration: 00:00:10.00, start: 0.000000, bitrate: 775 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1280x720 [SAR 1:1 DAR 16:9], 772 kb/s, 30 fps, 30 tbr, 15360 tbn, 60
tbc (default)
Metadata:
handler_name : VideoHandler
You can even check the below debug gst log while playing the second one.
# GST_DEBUG=v4l2*:7 gst-launch-1.0 filesrc
location=Big_Buck_Bunny_720_10s_1MB.mp4 ! qtdemux ! h264parse !
v4l2slh264dec ! glimagesink 2> 1log
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Got context from element 'sink': gst.gl.GLDisplay=context,
gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0";
Redistribute latency...
Pipeline is PREROLLED ...0 %)
[00m v4l2codecs
gstv4l2codecdevice.c:331:gst_v4l2_codec_find_devices:[00m Analysing
media device '/dev/media0'
[00m v4l2codecs
gstv4l2codecdevice.c:347:gst_v4l2_codec_find_devices:[00m Found CODEC
entities
[00m v4l2codecs
gstv4l2codecdevice.c:357:gst_v4l2_codec_find_devices:[00m Analysing
entity cedrus-proc
[00m v4l2codecs
gstv4l2codecdevice.c:362:gst_v4l2_codec_find_devices:[00m Found source
and sink pads
[00m v4l2codecs
gstv4l2codecdevice.c:370:gst_v4l2_codec_find_devices:[00m Found source
and sink V4L IO entities
[00m v4l2codecs
gstv4l2codecdevice.c:388:gst_v4l2_codec_find_devices:[00m Found
decoder device cedrus-proc
[00m v4l2codecs-decoder
gstv4l2decoder.c:306:gst_v4l2_decoder_enum_sink_fmt:<v4l2decoder0>[00m
Found format MG2S (MPEG-2 Parsed Slice Data)
0m [00m v4l2codecs
plugin.c:62:register_video_decoder:<v4l2decoder0>[00m MG2S is not
supported.
[00m v4l2codecs-decoder
gstv4l2decoder.c:306:gst_v4l2_decoder_enum_sink_fmt:<v4l2decoder0>[00m
Found format S264 (H.264 Parsed Slice Data)
[00m v4l2codecs
plugin.c:50:register_video_decoder:<v4l2decoder0>[00m Registering
cedrus-proc as H264 Decoder
[00m v4l2codecs-decoder
gstv4l2decoder.c:306:gst_v4l2_decoder_enum_sink_fmt:<v4l2decoder0>[00m
Found format S265 (HEVC Parsed Slice Data)
0m [00m v4l2codecs
plugin.c:62:register_video_decoder:<v4l2decoder0>[00m S265 is not
supported.
[00m v4l2codecs-decoder
gstv4l2decoder.c:306:gst_v4l2_decoder_enum_sink_fmt:<v4l2decoder0>[00m
Found format VP8F (VP8 Frame)
[00m v4l2codecs
plugin.c:56:register_video_decoder:<v4l2decoder0>[00m Registering
cedrus-proc as VP8 Decoder
[00m v4l2codecs-h264dec
gstv4l2codech264dec.c:221:gst_v4l2_codec_h264_dec_open:<v4l2slh264dec0>[00m
Opened H264 slice based decoder without start-codes
[00m v4l2codecs-h264dec
gstv4l2codech264dec.c:784:gst_v4l2_codec_h264_dec_new_sequence:<v4l2slh264dec0>[00m
Resolution changed to 1280x720 (1280x720)
[00m v4l2codecs-h264dec
gstv4l2codech264dec.c:800:gst_v4l2_codec_h264_dec_new_sequence:<v4l2slh264dec0>[00m
Bitdepth changed to 8
[00m v4l2codecs-h264dec
gstv4l2codech264dec.c:806:gst_v4l2_codec_h264_dec_new_sequence:<v4l2slh264dec0>[00m
Chroma format changed to 1
[00m v4l2codecs-h264dec
gstv4l2codech264dec.c:323:gst_v4l2_codec_h264_dec_negotiate:<v4l2slh264dec0>[00m
Negotiate
[00m v4l2codecs-h264dec
gstv4l2codech264dec.c:352:gst_v4l2_codec_h264_dec_negotiate:<v4l2slh264dec0>[00m
Supported output formats: video/x-raw, format=(string)NV12_32L32;
video/x-raw, format=(string){ NV12_32L32, NV12 }
[00m v4l2codecs-h264dec
gstv4l2codech264dec.c:356:gst_v4l2_codec_h264_dec_negotiate:<v4l2slh264dec0>[00m
Peer supported formats: video/x-raw, format=(string)NV12, width=(int)[
1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[
0/1, 2147483647/1 ]
[00m v4l2codecs-decoder
gstv4l2decoder.c:445:gst_v4l2_decoder_select_src_format:<v4l2decoder1>[00m
Trying to use peer format: NV12
[00m v4l2codecs-decoder
gstv4l2decoder.c:461:gst_v4l2_decoder_select_src_format:<v4l2decoder1>[00m
Selected format NV12 1280x720
[00m v4l2codecs-decoder
gstv4l2decoder.c:479:gst_v4l2_decoder_request_buffers:<v4l2decoder1>[00m
Requesting 2 buffers
[00mv4l2codecs-allocator
gstv4l2codecallocator.c:107:gst_v4l2_codec_buffer_new:<v4l2codecallocator0>[00m
Create buffer 0 with 1 memory fds
[00mv4l2codecs-allocator
gstv4l2codecallocator.c:107:gst_v4l2_codec_buffer_new:<v4l2codecallocator0>[00m
Create buffer 1 with 1 memory fds
[00m v4l2codecs-decoder
gstv4l2decoder.c:479:gst_v4l2_decoder_request_buffers:<v4l2decoder1>[00m
Requesting 23 buffers
[00mv4l2codecs-allocator
gstv4l2codecallocator.c:107:gst_v4l2_codec_buffer_new:<v4l2codecallocator1>[00m
Create buffer 0 with 1 memory fds
[00mv4l2codecs-allocator
gstv4l2codecallocator.c:107:gst_v4l2_codec_buffer_new:<v4l2codecallocator1>[00m
Create buffer 1 with 1 memory fds
[00mv4l2codecs-allocator
gstv4l2codecallocator.c:107:gst_v4l2_codec_buffer_new:<v4l2codecallocator1>[00m
Create buffer 2 with 1 memory fds
[00mv4l2codecs-allocator
gstv4l2codecallocator.c:107:gst_v4l2_codec_buffer_new:<v4l2codecallocator1>[00m
Create buffer 3 with 1
On the kmssink side, I can see similar behaviour while running
gst-play-1.0 on the normal console (before running startx, no X)
# gst-play-1.0 --videosink="kmssink plane-properties=s,zpos=1"
Big_Buck_Bunny_720_10s_1MB.mp4
Please let me know if I miss anything or any insight where I would look further.
Thanks,
Jagan.
More information about the gstreamer-devel
mailing list