Opened 2 months ago

Closed 8 weeks ago

#6432 closed defect (invalid)

~1800 DNS requests per hour

Reported by: Darkjacky Owned by:
Priority: normal Component: ffmpeg
Version: 3.2.4 Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Summary of the bug:
I am recording a stream and I found out through pi-hole logging that FFmpeg is doing ~1800 DNS requests every hour. Basically it looks like FFmpeg does not care about DNS TTL.
How to reproduce:

ffmpeg -i -bsf:a aac_adtstoasc -vcodec copy "/tmp/test.mp4"

Please let me know if you need more information.


Change History (4)

comment:1 Changed 2 months ago by stevenliu

sysctl -a | grep ttl

or this maybe should fix by your system, not ffmpeg

comment:2 Changed 2 months ago by Darkjacky

#sysctl -a | grep ttl
net.ipv4.inet_peer_maxttl = 600
net.ipv4.inet_peer_minttl = 120
net.ipv4.ip_default_ttl = 64

The DNS requests go out every ~10 seconds. 4 each time.

comment:3 Changed 2 months ago by Cigaes

This sysclt output means Linux. On Linux, like all real Unix, DNS resolving is done by the libc, not the kernel, so this sysctl output is completely useless ; the DNS TTL has nothing to do with the packets' TTL.

FFmpeg indeed does not care about DNS TTL. In fact, like all normal network applications for Unix, it does not even has access to it. If you want to reduce outgoing queries, you need to install a local cache, either nscd or a real DNS cache.

But remember that each DNS request will likely result in a network connection immediately afterward, so the benefit is limited.

comment:4 Changed 8 weeks ago by Darkjacky

  • Resolution set to invalid
  • Status changed from new to closed

Alright in that case I will close this ticket.

Thanks for your help.

Note: See TracTickets for help on using tickets.