RTPで映像と音声が送られてくる場合のffmpegトランスコード
※パラメータ未チューニング
RTP -> RTMP
ffmpeg -analyzeduration 30M -probesize 30M -protocol_whitelist file,crypto,udp,rtp -re -vcodec h264 -acodec opus -i ~/local.sdp -pix_fmt yuv420p -preset veryfast -r 15 -c:v libx264 -an -acodec copy -b:v 500k -b:a 64k -ar 48000 -bufsize 1024k -maxrate 500k -g 50 -threads 1 -f flv rtmp://127.0.0.1:1935/live/stream
RTP -> HLS
ffmpeg -analyzeduration 30M -probesize 30M -protocol_whitelist file,crypto,udp,rtp -re -vcodec h264 -acodec opus -i ~/local.sdp -pix_fmt yuv420p -preset veryfast -r 15 -c:v libx264 -an -acodec copy -b:v 500k -b 500k -b:a 64k -ar 48000 -bufsize 1024k -maxrate 500k -g 20 -threads 0 -flags -global_header -hls_time 2 -hls_list_size 2 -hls_wrap 10 -hls_flags delete_segments -hls_allow_cache 0 -f hls ./hls.m3u8