mediamtx icon indicating copy to clipboard operation
mediamtx copied to clipboard

"invalid FU-A packet" and frozen stream when using OBS Studio, WHIP and AMD HW H264

Open idon69 opened this issue 1 year ago • 8 comments

Which version are you using?

v1.1.1

Which operating system are you using?

  • [ ] Linux amd64 standard
  • [ ] Linux amd64 Docker
  • [ ] Linux arm64 standard
  • [ ] Linux arm64 Docker
  • [ ] Linux arm7 standard
  • [ ] Linux arm7 Docker
  • [ ] Linux arm6 standard
  • [ ] Linux arm6 Docker
  • [x] Windows amd64 standard
  • [ ] Windows amd64 Docker (WSL backend)
  • [ ] macOS amd64 standard
  • [ ] macOS amd64 Docker
  • [ ] Other (please describe)

Describe the issue

Invalid FU-A Packet thens literally stream stop while using WHIP

Describe how to replicate the issue

  1. start the server
  2. publish with OBS Studio
  3. read with browser

Did you attach the server logs?

yes log.txt

Did you attach a network dump?

no

idon69 avatar Sep 28 '23 14:09 idon69

My situation is that the video cannot be played at first. When I randomly change a setting value in OBS, "Invalid FU-A Packet" will pop up, and then the video will play normally.

I'm using OBS-30.0.0-beta3 and RTMP and SRT streaming works fine. Only WHIP does this.

Taiyopen avatar Oct 02 '23 11:10 Taiyopen

Hello, i tried to replicate the issue but in my case everything worked flawlessly. I used OBS 30.0.0-beta3, MediaMTX v1.1.1, both installed on the same Windows machine, and the NVIDIA NVENC H264 encoder with the default settings. No errors were reported:

2023/10/02 16:21:10 INF MediaMTX v1.1.1
2023/10/02 16:21:10 INF [RTSP] listener opened on :8554 (TCP), :8000 (UDP/RTP), :8001 (UDP/RTCP)
2023/10/02 16:21:10 INF [RTMP] listener opened on :1935
2023/10/02 16:21:10 INF [HLS] listener opened on :8888
2023/10/02 16:21:10 INF [WebRTC] listener opened on :8889 (HTTP)
2023/10/02 16:21:10 INF [SRT] listener opened on :8890 (UDP)
2023/10/02 16:21:15 INF [WebRTC] [session 7320aec7] created by 127.0.0.1:60063
2023/10/02 16:21:17 INF [WebRTC] [session 7320aec7] peer connection established, local candidate: host/udp/fd00::ea77:7a80:4223:55fa/56904, remote candidate: host/udp/fd00::ea77:7a80:4223:55fa/56903
2023/10/02 16:21:17 INF [WebRTC] [session 7320aec7] is publishing to path 'test', 2 tracks (Opus, H264)

Can you post the output settings of OBS? what is the video encoder and what are its settings?

aler9 avatar Oct 02 '23 14:10 aler9

Screenshot 2023-10-07 214750

idon69 avatar Oct 07 '23 14:10 idon69

@aler9

idon69 avatar Oct 17 '23 13:10 idon69

This bug is related to the "AMD HW" encoder, which is AMD-CPU specific, and at the moment i don't have an AMD CPU which would allow me to replicate the bug in an autonomous way. Please generate a network dump of traffic between OBS Studio and the server (by using RTMP, not WebRTC, since the latter is encrypted) in this way:

  1. Download wireshark (https://www.wireshark.org/)
  2. Start capturing on the interface used for exchanging RTMP (if the server and the target software are both installed on your pc, the interface is probably "loopback", otherwise it's the one of your network card)
  3. Start the server and replicate the issue
  4. Stop capturing, save the result in .pcap format
  5. Attach

aler9 avatar Oct 17 '23 13:10 aler9

i am currently using AMD GPU, Intel CPU

this is my pc spec if you need tho : Operating System: Windows 10 Enterprise 64-bit (10.0, Build 19045) (19041.vb_release.191206-1406) System Manufacturer: ASUS Processor: Intel(R) Core(TM) i5-4460 CPU @ 3.20GHz (4 CPUs), ~3.2GHz Memory: 24576MB RAM Card name: Radeon RX 580 Series Manufacturer: Advanced Micro Devices, Inc. Chip type: AMD Radeon Graphics Processor (0x67DF) DAC type: Internal DAC(400MHz) Device Type: Full Device (POST)

somehow still happens on my intel intergrated graphics laptop

idon69 avatar Oct 19 '23 10:10 idon69

Then it's AMD GPU-related, anyway the AMD HW encoder is only available for people that own such card. Provide a network dump generated with the AMD HW encoder.

aler9 avatar Oct 19 '23 11:10 aler9

image

network dump : https://www.mediafire.com/file/gs341g74q5saw4p/miz.pcap/file (intel cus my pc is in repair)

@aler9

idon69 avatar Nov 18 '23 12:11 idon69