Created
January 8, 2018 18:19
-
-
Save max-verem/baa58636b5403f820d4ecebed19ef125 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
D1="[f=hls:hls_flags=delete_segments:hls_list_size=10:hls_time=20:use_localtime=1:hls_segment_filename='/var/www/html/hls2/%s.ts']/var/www/html/hls2/stream.m3u8" | |
D2="[f=mpegts]udp://239.1.1.2:10480?localaddr=10.1.5.99&pkt_size=1316&fifo_size=1000000" | |
D3="[f=dash:window_size=5:extra_window_size=5:remove_at_exit=1]/var/www/html/dash2/stream.mpd" | |
ffmpeg \ | |
-v verbose \ | |
-f decklink -format_code pal -i "DeckLink SDI (2)" \ | |
-vf "setdar=dar=16/9" \ | |
-f libndi_newtek -reference_level -20 -y CH2 \ | |
-vcodec h264_nvenc -a53cc 0 \ | |
-minrate 512k \ | |
-maxrate 1536k \ | |
-vb 1024k \ | |
-profile:v main -level:v 31 \ | |
-preset:v medium -bf 2 -g 50 -keyint_min 50 -pix_fmt nv12 \ | |
-acodec libfdk_aac -ab 128k -ar 48000 \ | |
-vf "yadif=0:-1:0,setdar=dar=16/9,hwupload_cuda,scale_npp=w=1280:h=720:format=nv12:interp_algo=lanczos,hwdownload" \ | |
-af "volume=volume=10.0dB'" \ | |
-threads 8 \ | |
-flags +global_header \ | |
-f tee -map 0:v -map 0:a \ | |
"$D1|$D2|$D3" 2>&1 | stdbuf -i0 -o0 tr '\r' '\n' | awk '{ print strftime("%F %T : "), $0; fflush(); }' | tee SDI2-SD-qsv.log | |
#-`date +%Y%m%d_%H%M%S` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment