Advertisement
rajhlinux

Untitled

Aug 7th, 2022 (edited)
475
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. ffmpeg \
  2. -init_hw_device vaapi=decdev:/dev/dri/renderD129 \
  3. -init_hw_device vaapi=encdev:/dev/dri/renderD128 \
  4. -hwaccel vaapi \
  5. -hwaccel_device decdev \
  6. -hwaccel_output_format vaapi \
  7. -f v4l2 -input_format mjpeg -framerate 30 -video_size 1920x1080 \
  8. -i /dev/video0 \
  9. -filter_hw_device encdev \
  10. -filter_complex \
  11. "[0:v]hwdownload, settb=AVTB, setpts='trunc(PTS/1K)*1K+st(1,trunc(RTCTIME/1K))-1K*trunc(ld(1)/1K)',
  12. drawtext=fontfile=/usr/share/fonts/TTF/Verdana.TTF:text='(%{localtime\:%A, %B-%-d-%Y}\) \ \
  13. [%{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];\
  14. [v_1]format=nv12, hwupload[out_1];\
  15. [v_2]select='gt(scene,0.04)'[out_2]" \
  16. -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" \
  17. -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