<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Ok, thanks. <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 8, 2022 at 6:56 PM Arun Raghavan <<a href="mailto:arun@arunraghavan.net">arun@arunraghavan.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sat, 5 Nov 2022, at 6:30 PM, Bill Hofmann via gstreamer-devel wrote:<br>
> OK. Looking with the GST_DEBUG=2,vaapi*:5 results. The two Gstreamer <br>
> calls are Gst.init(None) and<br>
> Gst.parse_launch with this pipeline:<br>
>> souphttpsrc location="<a href="http://localhost/foo.m3u8" rel="noreferrer" target="_blank">http://localhost/foo.m3u8</a>" ! parsebin name=pb ! queue ! vaapih265dec !<br>
>> video/x-raw,format=P010_10LE ! queue max-size-bytes=100663300 ! kmssink connector-id=308 plane-id=31<br>
>> pb. ! queue ! fdkaacdec ! scaletempo ! volume volume=0.9 ! alsasink<br>
><br>
> The Gst logging output is (from system log..., this is running as a service):<br>
>> *Nov 05 15:08:09 player0 systemd[682]: Queued start job for default target Main User Target.*<br>
>> Nov 05 15:08:19 player0 python3[716]: 0:00:10.017282911   716 0x562e9953f890 INFO                  python lvplayer.py:74:__init__: Start init config: '/media/views/content/config/nuc.json'<br>
>> Nov 05 15:08:21 player0 python3[716]: 0:00:11.516405122   716 0x562e9953f890 ERROR           GST_PIPELINE subprojects/gstreamer/gst/parse/grammar.y:499:gst_parse_element_make: no element "vaapih265dec"<br>
>> Nov 05 15:08:21 player0 python3[716]: 0:00:11.516417510   716 0x562e9953f890 ERROR           GST_PIPELINE subprojects/gstreamer/gst/parse/grammar.y:1118:priv_gst_parse_yyparse: link has no sink [source=@0x562e99792190]<br>
>> Nov 05 15:08:21 player0 python3[716]: 0:00:11.516439058   716 0x562e9953f890 ERROR           GST_PIPELINE subprojects/gstreamer/gst/parse/grammar.y:1118:priv_gst_parse_yyparse: link has no source [sink=@0x562e99792490]<br>
>> Nov 05 15:08:21 player0 python3[716]: Traceback (most recent call last):<br>
>> Nov 05 15:08:21 player0 python3[716]:   File "/home/player/lvplayer/src/lvplayer/lvplayer.py", line 948, in <module><br>
>> Nov 05 15:08:21 player0 python3[716]:     sys.exit(main(sys.argv))<br>
>> Nov 05 15:08:21 player0 python3[716]:   File "/home/player/lvplayer/src/lvplayer/lvplayer.py", line 938, in main<br>
>> Nov 05 15:08:21 player0 python3[716]:     player = Player(args[1])<br>
>> Nov 05 15:08:21 player0 python3[716]:   File "/home/player/lvplayer/src/lvplayer/lvplayer.py", line 112, in __init__<br>
>> Nov 05 15:08:21 player0 python3[716]:     self._player = Gst.parse_launch(PIPELINE)<br>
>> Nov 05 15:08:21 player0 python3[716]: gi.repository.GLib.GError: gst_parse_error: no element "vaapih265dec" (1)<br>
>> Nov 05 15:08:21 player0 systemd[682]: player_service.service: Main process exited, code=exited, status=1/FAILURE<br>
>> Nov 05 15:08:21 player0 systemd[682]: player_service.service: Failed with result 'exit-code'.<br>
>> Nov 05 15:08:21 player0 systemd[682]: Failed to start LiquidView Player Service.<br>
>> Nov 05 15:08:21 player0 systemd[682]: Reached target Main User Target.<br>
>> Nov 05 15:08:21 player0 systemd[682]: Startup finished in 12.175s.<br>
>> Nov 05 15:08:26 player0 systemd[682]: player_service.service: Scheduled restart job, restart counter is at 1.<br>
>> Nov 05 15:08:26 player0 systemd[682]: Stopped LiquidView Player Service.<br>
>> *Nov 05 15:08:26 player0 systemd[682]: Starting LiquidView Player Service...*<br>
>> Nov 05 15:08:27 player0 python3[1857]: Loading LiquidView Player version lvplayer@9aa933d3c03040baa072d02e28942744b70d5c38<br>
>> Nov 05 15:08:27 player0 python3[1858]: 0:00:00.002161960  1858 0x560ca588c830 INFO                   vaapi gstvaapiutils.c:95:gst_vaapi_log: VA-API version 1.14.0<br>
>> Nov 05 15:08:27 player0 python3[1858]: 0:00:00.002183680  1858 0x560ca588c830 INFO                   vaapi gstvaapiutils.c:95:gst_vaapi_log: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so<br>
><br>
> It then relaunches the service, and this time after Gst.init(None), <br>
> there are a whole raft of Vaapi calls before "Start init config", and <br>
> it succeeds.  Full log of my player service up until successful launch <br>
> attached.<br>
><br>
> What's the best solution here? Seems pretty reliably unable to start <br>
> until the second try, or, maybe, 20 seconds after boot?<br>
<br>
My best guess is that it takes some time for the /dev nodes to appear and thus for the vaapi plugin to find the required resources to expose the plugin at all. Why that might be is pretty system-specific and might need some digging in.<br>
<br>
Cheers,<br>
Arun<br>
</blockquote></div>