Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ffmpeg \
- -init_hw_device vaapi=decdev:/dev/dri/renderD129 \
- -init_hw_device vaapi=encdev:/dev/dri/renderD128 \
- -hwaccel vaapi \
- -hwaccel_device decdev \
- -hwaccel_output_format vaapi \
- -f v4l2 -input_format mjpeg -framerate 30 -video_size 1920x1080 \
- -i /dev/video0 \
- -filter_hw_device encdev \
- -filter_complex \
- "[0:v]hwdownload, settb=AVTB, setpts='trunc(PTS/1K)*1K+st(1,trunc(RTCTIME/1K))-1K*trunc(ld(1)/1K)',
- drawtext=fontfile=/usr/share/fonts/TTF/Verdana.TTF:text='(%{localtime\:%A, %B-%-d-%Y}\) \ \
- [%{localtime\:%-I}\:%{localtime\:%M}\:%{localtime\:%S}\:%{eif\:1M*t-1K*trunc(t*1K)\:d} \ %{localtime\:%p}\]':x=0:y=0:borderw=3:bordercolor=#000000:fontsize=50:fontcolor=orange:box=1:boxcolor=black@0.3, split=2[v_1][v_2];\
- [v_1]format=nv12, hwupload[out_1];\
- [v_2]select='gt(scene,0.04)'[out_2]" \
- -map '[out_1]' -c:v hevc_vaapi -b:v 2M -rc_mode 2 -qp 20 -level 4.1 -f segment -segment_time 600 -reset_timestamps 1 -strftime 1 BNC/"(%b-%-d-%Y-%a)_%-I::%M::%S::%p.mp4" \
- -map '[out_2]' -f image2 -r 1/5 -strftime 1 BNC_Snap/"(%b-%-d-%Y-%a)_%-I::%M::%S::%p.jpg"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement