Looping an mp4 video file -> a HLS stream #4083
Unanswered
Oliver-Mardle
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Hi @Oliver-Mardle. By default your video file will be continuously looping. videostream = mksafe(single("video.mp4"))
midfi = %ffmpeg(format="mpegts",
%audio(
codec="aac",
samplerate=44100,
channels=2,
b="192k",
profile="aac_low"
),
%video(codec="libx264",
g="50",maxrate="6500k",
bufsize="13000k",
preset="ultrafast",
tune="zerolatency"
)
)
streams = [("midfi", midfi)]
def segment_name(~position,~extname,stream_name) =
timestamp = int_of_float(time())
duration = 3
"#{stream_name}_#{duration}_#{timestamp}_#{position}.#{extname}"
end
output.file.hls(playlist="stream.m3u8",
segment_duration=3.0,
segments=10,
segments_overhead=10,
segment_name=segment_name,
"/hls",
streams,
videostream) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a single video file source that I'm outputting to a HLS file.
Is there a quick / easy way to loop this file so I get a continuous stream? The stream is processed by FFMPEG, I couldn't see any obvious "fflags".
Beta Was this translation helpful? Give feedback.
All reactions