ClassicOldSong / moonlight-android

GameStream client for Android
GNU General Public License v3.0
272 stars 7 forks source link

[Issue]: Av1 stream fails on av1 supported hardware #45

Open LuisB79 opened 12 hours ago

LuisB79 commented 12 hours ago

Describe the bug

when trying to use av1 stream on the snapdragon 8 gen 3 soc phone the video output is just black, when finishing the session a message appears saying "video decoder failed", it happens at every resolution and framerate

Steps to reproduce

force enable av1 on settings, then start a session

Affected games

everything

Other Moonlight clients

None

Moonlight adjusted settings

Yes

Moonlight adjusted settings (please complete the following information)

custom resolution and bitrate

Moonlight default settings

Yes

Gamepad-related connection issue

No

Gamepad-related input issue

No

Gamepad-related streaming issue

No

Android version

14

Device model

zfold 6

Server PC OS version

Arch

Server PC GeForce Experience version

n/a

Server PC Nvidia GPU driver version

n/a

Server PC antivirus and firewall software

n/a

Screenshots

n/a

Relevant log output

10-25 09:57:10.294  2098  2098 D MediaCodecsXmlParser: MediaCodec: cannot update non-existing codec: c2.android.av1-dav1d.decoder at line 140 of /vendor/etc/media_codecs_performance_pineapple.xml
10-25 09:57:10.294  2098  2098 D MediaCodecsXmlParser: MediaCodec: cannot update non-existing codec: c2.android.av1.encoder at line 213 of /vendor/etc/media_codecs_performance_pineapple.xml
10-25 09:57:10.296  2098  2098 D MediaCodecsXmlParser: MediaCodec: cannot update non-existing codec: c2.android.av1-dav1d.decoder at line 140 of /vendor/etc/media_codecs_performance_pineapple.xml
10-25 09:57:10.296  2098  2098 D MediaCodecsXmlParser: MediaCodec: cannot update non-existing codec: c2.android.av1.encoder at line 213 of /vendor/etc/media_codecs_performance_pineapple.xml
10-25 09:57:10.641  2086  2086 D MediaCodecsXmlParser: disabling c2.android.av1.encoder
10-25 09:57:10.641  2086  2086 I MediaCodecsXmlParser: codec c2.android.av1.encoder enabled, device sdk 35 >= required 34
10-25 09:57:10.643  2086  2086 D MediaCodecsXmlParser: MediaCodec: cannot add existing codec: c2.android.av1.decoder at line 80 of /vendor/etc/media_codecs_google_c2_video.xml
10-25 09:57:10.723  1564  2541 E QC2CompStore: Failed to locate interface with name c2.android.av1-dav1d.decoder
10-25 09:57:10.725  1564  2541 E QC2CompStore: Failed to locate interface with name c2.android.av1.decoder
10-25 09:57:10.726  1564  2541 E QC2CompStore: Failed to locate interface with name c2.android.av1.encoder
10-25 09:58:39.627 19952 19952 I com.limelight.LimeLog: Examining decoder capabilities of c2.qti.av1.decoder (round 1)
10-25 09:58:39.627 19952 19952 I com.limelight.LimeLog: Examining decoder capabilities of c2.qti.av1.decoder.low_latency (round 1)
10-25 09:58:39.627 19952 19952 I com.limelight.LimeLog: Found AV1 decoder, but it's not whitelisted - c2.qti.av1.decoder.low_latency
10-25 09:58:39.627 19952 19952 I com.limelight.LimeLog: Forcing AV1 enabled despite non-whitelisted decoder
10-25 09:58:39.627 19952 19952 I com.limelight.LimeLog: Selected AV1 decoder: c2.qti.av1.decoder.low_latency
10-25 09:58:39.627 19952 19952 I com.limelight.LimeLog: Enabling AV1 RFI based on low latency option support
10-25 09:58:39.627 19952 19952 I com.limelight.LimeLog: Decoder c2.qti.av1.decoder.low_latency will use reference frame invalidation for AV1
10-25 09:58:41.353 19952 27071 I CCodec  : allocate(c2.qti.av1.decoder.low_latency)
10-25 09:58:41.361  1564  6962 I QC2Comp : [cmpav1DL_28] KPI_L1: init: ms=0
10-25 09:58:41.361  1564  6962 I QC2Comp : [c2.qti.av1.decoder.low_latency] KPI_L1: Create: ms=1
10-25 09:58:41.361  1564  6962 I QC2CompStore: Created component(c2.qti.av1.decoder.low_latency) id(28) sStore[0xb400006e49d20570]
10-25 09:58:41.362 19952 27071 I CCodec  : Created component [c2.qti.av1.decoder.low_latency]
10-25 09:58:41.362 19952 27071 I CCodec  : [c2.qti.av1.decoder.low_latency] state->set(ALLOCATED)
10-25 09:58:41.363  1564  2535 W QC2Interface: [av1DL_28] Failed to query parameters
10-25 09:58:41.371  1564  6962 W QC2Interface: [av1DL_28] Failed to query parameters
10-25 09:58:41.373 19952 27070 I MediaCodec: [c2.qti.av1.decoder.low_latency] setting surface generation to 20430849
10-25 09:58:41.374 19952 27071 D CCodec  : [c2.qti.av1.decoder.low_latency] buffers are bound to CCodec for this session
10-25 09:58:41.375  1564  6962 W QC2Interface: [av1DL_28] Failed to query parameters
10-25 09:58:41.376  1564  6962 W QC2Interface: [av1DL_28] Failed to query parameters
10-25 09:58:41.377  1909  4890 D CodecSolution_MediaStatisticsData: label: SEC_HW_AV1
10-25 09:58:41.377  1909  1909 D CodecSolution_Logging: dma : true, feature: VDEC, extra: SEC_HW_AV1, value: -1
10-25 09:58:41.378 19952 27070 I CCodec  : [c2.qti.av1.decoder.low_latency] state->set(STARTING)
10-25 09:58:41.378  1564  6962 I QC2Comp : [av1DL_28] CPU perf resource value pair found: [1082130688, 4095, ]
10-25 09:58:41.379  1564  6962 I QC2Registry: GetEnabledFilters for c2.qti.av1.decoder.low_latency
10-25 09:58:41.379  1564  6962 I QC2Registry: Created 0 filters for pipelined codec c2.qti.av1.decoder.low_latency
10-25 09:58:41.379  1564  6962 E QC2Comp : [av1DL_28] configureIntf failed 95
10-25 09:58:41.385  1564  6962 I QC2V4l2Codec: [v4lav1DL_28] KPI_L1: init: ms=5
10-25 09:58:41.385  1564 27078 E QC2V4l2Codec: [v4lav1DL_28]  ? is not a supported pixel format!
10-25 09:58:41.390  1564  6962 I QC2V4l2Codec: [v4lav1DL_28] KPI_L1: start: ms=4
10-25 09:58:41.390  1564  6962 I QC2Comp : [av1DL_28] KPI_L1: start: ms=12
10-25 09:58:41.391  1564  2535 W QC2Interface: [av1DL_28] Failed to query parameters
10-25 09:58:41.391  1564  2535 W QC2Interface: [av1DL_28] Failed to query parameters
10-25 09:58:41.391 19952 27071 D CCodecBufferChannel: [c2.qti.av1.decoder.low_latency#962] Query input allocators returned 0 params => BAD_INDEX (6)
10-25 09:58:41.392 19952 27071 D CCodecBufferChannel: [c2.qti.av1.decoder.low_latency#962] Created input block pool with allocatorID 16 => poolID 17 - OK (0)
10-25 09:58:41.392 19952 27071 I CCodecBufferChannel: [c2.qti.av1.decoder.low_latency#962] start: max output delay 11
10-25 09:58:41.392  1564  2535 W QC2Interface: [av1DL_28] Failed to query parameters
10-25 09:58:41.392 19952 27071 D CCodecBufferChannel: [c2.qti.av1.decoder.low_latency#962] Query output allocators returned 0 params => BAD_INDEX (6)
10-25 09:58:41.392  1564  2535 W QC2Interface: [av1DL_28] Failed to query parameters
10-25 09:58:41.392 19952 27071 D CCodecBufferChannel: [c2.qti.av1.decoder.low_latency#962] Query output surface allocator returned 0 params => BAD_INDEX (6)
10-25 09:58:41.393 19952 27071 I CCodecBufferChannel: [c2.qti.av1.decoder.low_latency#962] Created output block pool with allocatorID 18 => poolID 22 - OK
10-25 09:58:41.394 19952 27071 D CCodecBufferChannel: [c2.qti.av1.decoder.low_latency#962] Configured output block pool ids 22 => OK
10-25 09:58:41.394  1564  2535 W QC2Interface: [av1DL_28] Few parameters failed to configure
10-25 09:58:41.395 19952 27071 I CCodec  : [c2.qti.av1.decoder.low_latency] state->set(RUNNING)
10-25 09:58:41.396 19952 27071 I CCodecBufferChannel: [c2.qti.av1.decoder.low_latency#962] 10 initial input buffers available
10-25 09:58:41.396  1564  2535 W QC2Interface: [av1DL_28] Failed to query parameters
10-25 09:58:41.396  2086 26047 I ResourceManagerService: getMediaResourceInfo (PID : 19952, clientID : -5476376679004457376, non-secure-codec/video-codec:[]:1, 1676x1440 (fps:60) - sw codec : no, encoder : no componentName = c2.qti.av1.decoder.low_latency bitrate = 17000000)
10-25 09:58:41.397 19952 27010 I com.limelight.LimeLog: Using codec c2.qti.av1.decoder.low_latency for hardware decoding video/av01
10-25 09:58:41.494 19952 27071 I CCodecBufferChannel: [c2.qti.av1.decoder.low_latency#962] updating max output delay 22
10-25 09:58:41.495 19952 27075 D CCodecBufferChannel: [c2.qti.av1.decoder.low_latency#962] Ignoring stale input buffer done callback: last flush index = 0, frameIndex = 0
10-25 09:58:46.379  1564 27077 I StatsHandler: [av1DL_28] Stats: Pending(0) i/p-done(0) Works: Q: 28/Done 1|Work-Rate: Q(5.6/s Avg=5.6/s) Done(0.199/s Avg=0.199/s)| Stream: 30.00fps 18.4Mbps
10-25 09:58:46.379  1564 27077 I StatsHandler: [av1DL_28] Mem-usage:  [In-1D: 11 bufs 47.480 MB] [1D-21: 28 bufs 0.438 MB] [2D-22: 17 bufs 63.551 MB] | Total: 111.469 MB
10-25 09:58:51.380  1564 27077 I StatsHandler: [av1DL_28] Stats: Pending(0) i/p-done(0) Works: Q: 28/Done 1|Work-Rate: Q(0.0/s Avg=2.8/s) Done(0.000/s Avg=0.100/s)| Stream: 30.00fps 18.4Mbps
10-25 09:58:51.380  1564 27077 I StatsHandler: [av1DL_28] Mem-usage:  [In-1D: 11 bufs 47.480 MB] [1D-21: 28 bufs 0.438 MB] [2D-22: 17 bufs 63.551 MB] | Total: 111.469 MB
10-25 09:58:56.381  1564 27077 I StatsHandler: [av1DL_28] Stats: Pending(0) i/p-done(0) Works: Q: 28/Done 1|Work-Rate: Q(0.0/s Avg=1.9/s) Done(0.000/s Avg=0.067/s)| Stream: 30.00fps 18.4Mbps
10-25 09:58:56.381  1564 27077 I StatsHandler: [av1DL_28] Mem-usage:  [In-1D: 11 bufs 47.480 MB] [1D-21: 28 bufs 0.438 MB] [2D-22: 17 bufs 63.551 MB] | Total: 111.469 MB
10-25 09:58:59.651 19952 27085 E AndroidRuntime: PreSPSErrorFormat: 1000 | AVC Decoder: c2.qti.avc.decoder.low_latency | HEVC

Additional context

my hardware is able to stream av1 via nvenc, it has a 4000 series nvidia card, and the snapdragon 8 gen 3 is capable of av1 hw decoding, this issue is also related on official branch of moonlight https://github.com/moonlight-stream/moonlight-android/issues/1434

ClassicOldSong commented 2 hours ago

What device your using? Could you post the actual device model and system/ROM information?

I have two 8G3 devices and both of them can decode AV1 stream with no problems.

LuisB79 commented 2 hours ago

What device your using? Could you post the actual device model and system/ROM information?

I have two 8G3 devices and both of them can decode AV1 stream with no problems.

Its a zfold 6, android 14, one ui 6.1.1, no modifications, all stock

ClassicOldSong commented 1 hour ago

Samsung has the most issues reported than any other brands, from multiple different aspects...

Still a vendor issue though, might need to avoid Samsung devices for streaming in the future...