You can select live stream duration length before publishing it.
The maximum live stream duration on Facebook is 8 hours.
There is no limitations for Youtube stream duration. It can be live even for weeks if you need to.
If you want to stream a countdown that lasts for days, we suggest to create and schedule separate streams with a countdown clock that lasts for 8 hours each. For example: You want to stream a countdown that lasts 40 hours. In this case, you can create 5 separate streams, that are launched one after another and last for 8 hours each.