IGCIT / Intel-GPU-Community-Issue-Tracker-IGCIT

IGCIT is a Community-driven issue tracker for Intel GPUs.
GNU General Public License v3.0
115 stars 4 forks source link

qsv encoder fails in OBS with `advanced_video_recording` error #662

Closed BuyMyMojo closed 7 months ago

BuyMyMojo commented 9 months ago

Checklist [README]

Application [Required]

OBS

Processor / Processor Number [Required]

5900x

Graphic Card [Required]

a770

GPU Driver Version [Required]

31.0.101.5084

Rendering API [Required]

Windows Build Number [Required]

Other Windows build number

No response

Intel System Support Utility report

SSU_2024-01-02.txt

Description and steps to reproduce [Required]

When recording at 4K using any of the QSV encoders in OBS (Test with ICQ and CQP both error out at all encoder speeds) after a few minutes it will crash the encoder and stop recording with the following error in the logs:

18:09:55.861: ==== Recording Start ===============================================
18:09:55.861: [ffmpeg muxer: 'adv_file_output'] Writing file 'R:/4k/2024-01-04_18-09-55.mov'...
18:12:17.856: Stopping recording due to OutputTimer timeout
18:12:17.859: Stopping recording due to OutputTimer timeout
18:12:17.862: Stopping recording due to OutputTimer timeout
18:12:17.866: Stopping recording due to OutputTimer timeout
18:12:17.869: [ffmpeg muxer: 'adv_file_output'] Output of file 'R:/4k/2024-01-04_18-09-55.mov' stopped
18:12:17.869: Output 'adv_file_output': stopping
18:12:17.869: Output 'adv_file_output': Total frames output: 8506
18:12:17.869: Output 'adv_file_output': Total drawn frames: 8521
18:12:17.880: ==== Recording Stop ================================================

I will note I have maxed out GPU usage while playing Viewfinder at 4K in these tests

This seems like it could be an old error from 2019 but this is with the latest driver and I'm not sure what earlier driver to go back to.

this issue along with #660 make using intel arc for recording an issue.

I will try with the an older WHQL driver and report back (31.0.101.4953)

Device / Platform

No response

Crash dumps [Required, if applicable]

No response

Application / Windows logs

OBS log with multiple encoder crashes with different encoders and settings: 2024-01-04 17-54-41.txt

BuyMyMojo commented 9 months ago

Update did one more test on the current driver recording 4K with just my capture card in OBS so no hard hitting content running on the PC itself and the same issue occurred.

Log: 2024-01-04 19-00-07.txt

BuyMyMojo commented 9 months ago

I don't know if this counts as an "application crash" exactly, OBS doesn't close the encoder just stops working and the recording ends prematurely. the program stays open

BuyMyMojo commented 8 months ago

now on 31.0.101.4953 and the same issue occurs with the same log output:

20:05:41.067: [ffmpeg muxer: 'adv_file_output'] Using muxer settings:
20:05:41.067:   movflags=frag_keyframe+empty_moov+delay_moov
20:05:41.074: ==== Recording Start ===============================================
20:05:41.074: [ffmpeg muxer: 'adv_file_output'] Writing file 'R:/4k/2024-01-04_20-05-40.mov'...
20:08:03.069: Stopping recording due to OutputTimer timeout
20:08:03.073: Stopping recording due to OutputTimer timeout
20:08:03.081: [ffmpeg muxer: 'adv_file_output'] Output of file 'R:/4k/2024-01-04_20-05-40.mov' stopped
20:08:03.081: Output 'adv_file_output': stopping
20:08:03.081: Output 'adv_file_output': Total frames output: 8508
20:08:03.081: Output 'adv_file_output': Total drawn frames: 8518 (8521 attempted)
20:08:03.081: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 3 (0.0%)
20:08:03.081: Video stopped, number of skipped frames due to encoding lag: 3/8519 (0.0%)
20:08:03.088: ==== Recording Stop ================================================
BuyMyMojo commented 8 months ago

Actually going down to that driver version has this issue appear inside intel arc control's screen capture too! My guess is it spikes to a bitrate too high for a moment and crashes?

Recording the screen at the max bitrate at 4K of 140400kbps stops recording after 3 ish seconds but dropping to the lowest of 11800kbps it records without issues

BuyMyMojo commented 8 months ago

Actually going down to that driver version has this issue appear inside intel arc control's screen capture too! My guess is it spikes to a bitrate too high for a moment and crashes?

Recording the screen at the max bitrate at 4K of 140400kbps stops recording after 3 ish seconds but dropping to the lowest of 11800kbps it records without issues

To Corroborate this theory I was setting up a 4K screen cast setup (but with output colour being I444 instead of NV12) and the general bitrate has been sub 2,000kbps for just typing and browsing the web and so far I have tested with a 30 minute recording with no flaws but swapping back to NV12 or even P010 with all other settings the same it crashed when recording gameplay (I444 drops too many frames even at the fastest encode settings when recording a proper 4K 60 game but NV12 still runs perfectly for screen cast content) so I think it's related to the encoder getting completely overwhelmed by something.

Gabriela-Intel commented 8 months ago

Hey @BuyMyMojo! Would you mind providing a screenshot of the exact settings in OBS that you were able to reproduce with? I see some settings listed in the past 2 comments, but I want to make sure everything aligns on my end so I can check this out.

BuyMyMojo commented 8 months ago

Hey @BuyMyMojo! Would you mind providing a screenshot of the exact settings in OBS that you were able to reproduce with? I see some settings listed in the past 2 comments, but I want to make sure everything aligns on my end so I can check this out.

Of course, these are the original settings I've encountered this issue with

OBS:

(I've tried TU7 and TU6, I think I also used TU5, I do remember TU1 was too slow to keep up with recording 4K60 viewfinder) image

image

image

Viewfinder:

image

image

Intel Arc Performance Tuning:

tried with both of these:

image

or

image

BuyMyMojo commented 8 months ago

Seems to possibly be fixed with 31.0.101.5085 will report back if something comes up later

edit: test video

Gabriela-Intel commented 8 months ago

Thanks for the update! Keep me posted.

Gabriela-Intel commented 8 months ago

Hi @BuyMyMojo Have you seen the issue come up again when using 101.5085?

Gabriela-Intel commented 7 months ago

Don't see any updates on this issue thread either. Please close. @IGCIT