Screen recording video is not played using janus and chrome, throws a lot of Nack errors

Hey,

Recently I used Janus a lot for streaming video purpose. It worked very well!
In the last days I am trying to play a screen recording of Google Earth usage via Janus but unfortunately it is not playing. From time to time it shows some frames but generally the video is not playing. Looking up the logs of Janus I saw a lot of nack messages such as:
2024-01-23 14:37:07 [5373221474420025] Just got some NACKS (24) we should handle…
2024-01-23 14:37:07 [ice.c:janus_ice_cb_nice_recv:3099] [5373221474420025] >> 20755
2024-01-23 14:37:07 [5373221474420025] >> >> Can’t retransmit packet 20755, we don’t have it…
2024-01-23 14:37:07 [ice.c:janus_ice_cb_nice_recv:3099] [5373221474420025] >> 20757
2024-01-23 14:37:07 [5373221474420025] >> >> Can’t retransmit packet 20757, we don’t have it…
2024-01-23 14:37:07 [ice.c:janus_ice_cb_nice_recv:3099] [5373221474420025] >> 20759
2024-01-23 14:37:07 [5373221474420025] >> >> Can’t retransmit packet 20759, we don’t have it…

I opened up the webrtc stats in chrome and there is a very high packet lost:

image

The video was recored using XBOX game bar screen recording feature and then transcoded using ffmpeg with the following flags:

ffmpeg -i GoogleEarthTrial.mp4 -c:v copy -preset ultrafast -map 0:v -b:v 3000k -maxrate 3000k -minrate 3000k -f mpegts GoogleEarthTrial3000K.ts

I tried to use hls.js to play this video (after creating hls segments out of the video using ffmpeg) and it played well, therefore I guess that the video can be played using chrome player.

My chrome version is: 120.0.6099.225 (Official Build) (64-bit) (cohort: Stable)
My janus version is: v1.1.4

A link for the video that causes the problem:

I would really appreciate it if you could help me

Asked many times already. Your packets probably exceed the MTU, so you need to tell FFmpeg to packetize RTP in smaller packets. Check older posts for how.

Make also sure you’re using helper threads in the mountpoint you create, or for high bitrates it may struggle to keep up.

I will check it up.
Thanks a lot!!

Thaks a lot for the quick response.
However, I added a packet size parameter and added threads in my mountpoint but that video still not playing (other videos plays well).

My ffmpeg command to stream the video is:

ffmpeg -fflags +nobuffer+flush_packets -re -stream_loop -1 -i GoogleEarthTrial3000K.ts -c:v copy -preset ultrafast -map 0:v -f rtp rtp://127.0.0.1:8004?pkt_size=1200

My mountpoint configuration is:

h264-sample: {
	type = "rtp"
	id = 1
	description = "H.264 live stream coming from ffmpeg"
	audio = true
	audioport = 7004
	audiopt = 97
	audiortpmap = "opus/48000/2"
	video = true
	videoport = 8004
	videopt = 96
	videortpmap = "H264/90000"
	videofmtp = "profile-level-id=42e01f;packetization-mode=1"
	secret = "SecretSample"
	data = true
	dataport = 5009
	datatype = "binary"
	threads = 2
}

I would thank you for help

In addition to the nack log messages, I see a lot of the following log:
No medium with a valid peer SSRC found for transport-wide CC feedback

Perhaps as a result the an inappropriate bitrate is used in the link?

@lorenzo Could you please have a look?