<p>The direct answer is to add <code>-stream_loop -1 -t 6:00:00</code> before <code>-i HayDay.mp4</code> but the better answer is to encode it once and then apply the above options to the encoded file and stream that.</p>

CC BY-SA 4.0
2023-05-28T19:06:13.263Z
2023-05-28T19:06:13.263Z
Gyan
<p>I'm currently using this, and i want it to be loop 6 or 8hours, how to edit this?</p>
<p>ffmpeg -re -y -i HayDay.mp4 -c:a copy -ac 1 -ar 44100 -b:a 96k -vcodec libx264 -pix_fmt yuv420p -vf scale=1080:-1 -r 30 -g 60 -tune zerolatency -f flv -maxrate 2000k -preset veryfast &quot;rtmps://live-api-s.facebook.com:443/rtmp/FB-222653387188323-0-AbwCY_lFkOiN-FhG&quot;</p>

<ffmpeg><live>
how to input ffmpeg to live loop 6 or 8 hours?
user41409
# how to input ffmpeg to live loop 6 or 8 hours?

(Asked by: username_0 on 2023-05-28)

I'm currently using this, and i want it to be loop 6 or 8hours, how to edit this?

ffmpeg -re -y -i HayDay.mp4 -c:a copy -ac 1 -ar 44100 -b:a 96k -vcodec libx264 -pix\_fmt yuv420p -vf scale=1080:-1 -r 30 -g 60 -tune zerolatency -f flv -maxrate 2000k -preset veryfast "rtmps://live-api-s.facebook.com:443/rtmp/FB-222653387188323-0-AbwCY\_lFkOiN-FhG"

**Tags:** ffmpeg, live


---

## 1 answers

### Answer by username_1 on 2023-05-28. Score: 0 | Accepted answer

The direct answer is to add `-stream_loop -1 -t 6:00:00` before `-i HayDay.mp4` but the better answer is to encode it once and then apply the above options to the encoded file and stream that.


---

