diff --git a/record-timestamp.sh b/record-timestamp.sh index d529d66..78809cc 100755 --- a/record-timestamp.sh +++ b/record-timestamp.sh @@ -28,14 +28,15 @@ segment_time=1800 # 30 min mkdir -p $dest_dir/$(date +%Y-%m-%d) ffmpeg \ - -nostdin \ - -i tcp://localhost:11000 \ - -ac 2 -channel_layout 2c -aspect 16:9 \ - -map 0:v -c:v:0 mpeg2video -pix_fmt:v:0 yuv422p -qscale:v:0 2 -qmin:v:0 2 -qmax:v:0 10 -keyint_min 0 -bf:0 0 -g:0 0 -intra:0 -maxrate:0 140M \ - -map 0:a -c:a:0 mp2 -b:a:0 192k -ac:a:0 2 -ar:a:0 48000 \ - -flags +global_header -flags +ilme+ildct \ + -nostdin -y \ + -analyzeduration 10000 \ + -thread_queue_size 512 \ + -i tcp://localhost:11000?timeout=3000 \ + -aspect 16:9 \ + -map 0:v -c:v:0 mpeg2video -pix_fmt:v:0 yuv420p -qscale:v:0 4 -qmin:v:0 4 -qmax:v:0 4 -keyint_min:v:0 5 -bf:v:0 0 -g:v:0 5 -me_method:v:0 dia \ + -map 0:a -c:a mp2 -b:a 384k -ac:a 2 -ar:a 48000 \ + -flags +global_header \ -f segment -segment_time $segment_time \ -segment_format mpegts \ -strftime 1 "$dest_dir/%Y-%m-%d/%H_%M_%S.ts" -