WIP
This commit is contained in:
parent
7f5a8fa23c
commit
c18e5b46d7
1 changed files with 30 additions and 4 deletions
|
@ -79,12 +79,38 @@ ffmpeg \
|
|||
-pixel_format yuv420p \
|
||||
-filter_complex "[1:a]volume=-10dB;[0:v]drawtext='font=DejaVuSansMono:text=%{pts}: fontcolor=white: fontsize=h/12: box=1: boxcolor=black@0.43: boxborderw=5: x=mod(floor(t/10+1)\,2)*mod(t*(w-text_w)/10\,w-text_w)+mod(floor(t/10)\,2)*(w-text_w-mod(t*(w-text_w)/10\,w-text_w)): y=text_h/2', drawtext='font=DejaVuSansMono:text=%{localtime}: fontcolor=white: fontsize=h/20: box=1: boxcolor=black@0.43: boxborderw=5: x=text_h: y=h-3*text_h/2', split=2[out1][out2]" \
|
||||
-codec:v libx264 \
|
||||
-preset fast \
|
||||
-preset superfast \
|
||||
-x264opts nal-hrd=cbr:force-cfr=1:vbv-bufsize=${BUFFERSIZE}:bitrate=${VBITRATE}:vbv-maxrate=${VBITRATE} \
|
||||
-c:a aac -b:a ${ABITRATE}k \
|
||||
-g 1 -segment_format_options movflags=+frag_keyframe+empty_moov+default_base_moof -segment_time 5 -f segment \
|
||||
-flags +global_header \
|
||||
-map '[out1]' -s ${LIVE_RESOLUTION} -map 1:a -f flv ${URL} \
|
||||
-map '[out2]' -s ${REPLAY_RESOLUTION} -map 1:a -f matroska \
|
||||
-map '[out1]' -s ${LIVE_RESOLUTION} -c:v libx264 -b:v 1024k -maxrate:v 1280k -g:v 48 \
|
||||
-keyint_min:v 48 -r:v 24 -x264-params:v scenecut=0:open_gop=0 -bufsize:v 1280k -profile:v high \
|
||||
-map 1:a -f flv ${URL} \
|
||||
-map '[out2]' -s ${REPLAY_RESOLUTION} -c:v libx264 -b:v 2048k -maxrate:v 3072k -g:v 48 \
|
||||
-keyint_min:v 48 -r:v 24 -x264-params:v scenecut=0:open_gop=0 -bufsize:v 3072k -profile:v high \
|
||||
-map 1:a -f matroska \
|
||||
-f segment -segment_time 10:00 -reset_timestamps 1 \
|
||||
-strftime 1 "${FILENAME}_%Y-%m-%d_%H-%M-%S.mkv"
|
||||
|
||||
|
||||
|
||||
# Notes
|
||||
# Commande ffmpeg utilisée par own_cast
|
||||
echo /usr/bin/ffmpeg -hide_banner -loglevel warning \
|
||||
-fflags +genpts \
|
||||
-i pipe:0 -map v:0 \
|
||||
-c:v:0 libx264 -b:v:0 1008k -maxrate:v:0 1088k -g:v:0 48 -keyint_min:v:0 48 -r:v:0 24 \
|
||||
-x264-params:v:0 scenecut=0:open_gop=0 -bufsize:v:0 1088k -profile:v:0 high \
|
||||
-map a:0? -c:a:0 copy \
|
||||
-preset superfast \
|
||||
-var_stream_map v:0,a:0 \
|
||||
-f hls -hls_time 2 -hls_list_size 15 -hls_flags program_date_time+independent_segments+omit_endlist \
|
||||
-segment_format_options mpegts_flags=mpegts_copyts=1 \
|
||||
-tune zerolatency \
|
||||
-pix_fmt yuv420p \
|
||||
-sc_threshold 0 \
|
||||
-master_pl_name stream.m3u8 \
|
||||
-hls_segment_filename http://127.0.0.1:45627/%v/stream--KmjKxb4g-%d.ts \
|
||||
-max_muxing_queue_size 400 \
|
||||
-method PUT http://127.0.0.1:45627/%v/stream.m3u8
|
||||
|
||||
|
|
Loading…
Reference in a new issue