user21025: its my first post on this community.
Im from brazil, so im sorry for bad english.
I am using FFMPEG on Ubuntu VPS for streaming 24/7 mp4 video on youtube.
I am using this code:

VBR="2500k"                                    
FPS="30"                                    
QUAL="veryfast"                              
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2"

SOURCE="/stream/video.mp4"           
KEY="my_Secret_key"                               

ffmpeg \
    -i "$SOURCE" -deinterlace \
    -vcodec libx264 -pix_fmt yuv420p -preset $QUAL -r $FPS -g $(($FPS * 2)) -b:v $VBR \
    -acodec libmp3lame -ar 44100 -threads 6 -qscale 3 -b:a 712000 -bufsize 512k \
    -f flv "$YOUTUBE_URL/$KEY"

With this code, i have sucesfully put my stream online, but i need that the code loop and repeat the mp4 file, because i dont want to make a 24h mp4 file.
How can i make that this mp4 file (SOURCE="/stream/video.mp4") repeat itself infinitely?
I dont have imagens and notthing, i only put a mp4 file on stream!
Ideas?

user21133: You should be able to achieve this by prepending the source with stream_loop parameter and -1 value specifying indefinite looping.
Replace
-i "$SOURCE" -deinterlace \

with
-stream_loop -1 -i "$SOURCE" -deinterlace \

See https://ffmpeg.org/ffmpeg.html#Main-options

21025: <p>its my first post on this community.</p>

<p>Im from brazil, so im sorry for bad english.</p>

<p>I am using FFMPEG on Ubuntu VPS for streaming 24/7 mp4 video on youtube.</p>

<p>I am using this code:</p>

<pre>
VBR="2500k"                                    
FPS="30"                                    
QUAL="veryfast"                              
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2"

SOURCE="/stream/video.mp4"           
KEY="my_Secret_key"                               

ffmpeg \
    -i "$SOURCE" -deinterlace \
    -vcodec libx264 -pix_fmt yuv420p -preset $QUAL -r $FPS -g $(($FPS * 2)) -b:v $VBR \
    -acodec libmp3lame -ar 44100 -threads 6 -qscale 3 -b:a 712000 -bufsize 512k \
    -f flv "$YOUTUBE_URL/$KEY"
</pre>

<p>With this code, i have sucesfully put my stream online, but i need that the code loop and repeat the mp4 file, because i dont want to make a 24h mp4 file.</p>

<p>How can i make that this mp4 file (SOURCE="/stream/video.mp4") repeat itself infinitely?</p>

<p>I dont have imagens and notthing, i only put a mp4 file on stream!</p>

<p>Ideas?</p>
 21133: <p>You should be able to achieve this by prepending the source with stream_loop parameter and -1 value specifying indefinite looping.</p>

<p>Replace</p>

<pre><code>-i "$SOURCE" -deinterlace \
</code></pre>

<p>with</p>

<pre><code>-stream_loop -1 -i "$SOURCE" -deinterlace \
</code></pre>

<p>See <a href="https://ffmpeg.org/ffmpeg.html#Main-options" rel="nofollow noreferrer">https://ffmpeg.org/ffmpeg.html#Main-options</a></p>
