ffmpeg -f avfoundation -framerate 30 -video_size 1280x720 -i "0:none" -codec:v libx264 -bsf:v h264_mp4toannexb -f h264 udp://localhost:1234
ffmpeg -y \
-probesize 42M \
-rtsp_transport tcp \
-use_wallclock_as_timestamps 1 \
-i rtsp://url \
-c:v libx264 -x264opts keyint=1:min-keyint=1:scenecut=-1 \
-preset veryfast \
-tune zerolatency \
-ldash 1 \
-seg_duration 0.1 \
-frag_duration 0.1 \
-streaming 1 \
-frag_type every_frame \
-format_options 'movflags=cmaf' \
-timeout 0.5 \
-window_size 30 -remove_at_exit 1 \
-strict experimental -lhls 1 \
-hls_playlist 1 -hls_master_name live.m3u8 \
-utc_timing_url https://time.akamai.com/?iso \
-write_prft 1 \
-target_latency 1 \
/dev/shm/dash/live.mpd
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>MPEG-DASH Live Stream</title>
</head>
<body>
<h1>MPEG-DASH Live Stream</h1>
<script src="/dash.js/dist/dash.all.debug.js"></script>
<video id="videoPlayer" muted="" style="width: 90%"></video>
<script>
(function () {
var url = "dash/live.mpd";
var player = dashjs.MediaPlayer().create();
player.initialize(document.querySelector("#videoPlayer"), url, true);
player.updateSettings({
streaming: {
delay: {
liveDelayFragmentCount:0,
liveDelay: 0,
},
},
});
})();
</script>
</body>
</html>