Created
January 8, 2018 18:20
-
-
Save max-verem/4b9a097af173586408791e6c8d840f73 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/hls3/%s.ts']/var/www/html/hls3/stream.m3u8" | |
D2="[f=mpegts]udp://239.1.1.3: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/dash3/stream.mpd" | |
ffmpeg \ | |
-v verbose \ | |
-f decklink -format_code pal -i "DeckLink Mini Recorder" \ | |
-vf "setdar=dar=16/9" \ | |
-f libndi_newtek -reference_level -20 -y CH3 \ | |
-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 SDI3-SD-qsv.log | |
#-`date +%Y%m%d_%H%M%S` |
you can try -muxrate parameter of mpegts muxer and bitrate parameter of output udp url.
but i am not sure it helps to fix PCR accuracy.
try piping tsduck with ffmpeg
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Hope you are doing well.
I am struggling with Proper CBR MPEGTS UDP stream from Decklink SDI input.
On Stream analyzer I am getting error of PCR accuracy.
Regards,
Fahad