Flussonic

Transcoding with a GeForce GTX 1070

Hi,
I’ve a server with a GeForce GTX 1070 and I’m trying to use hardware for transcoding my videos (only for adding watermark).
I used ffmpeg on this server and it works with the GPU using the following command line:
ffmpeg ajout logo : /opt/flussonic/bin/ffmpeg -c:v h264_cuvid -i infile.mp4 -i logo.png -filter_complex … -c:v h264_nvenc -codec:a copy out.mp4

The input file is h.264 720x576.

My flussonic.conf is:
file archived {
path /opt/videos/archived;
auth /etc/flussonic/watermark.lua;
cache /opt/videos/flussonic/cache 10G;
}

Plugins:

plugin dynafile {
cache /opt/videos/flussonic/dynacache 2G;
transcoder vb=2048k hw=nvenc size=720x576 ab=64k;
}

The result is:

  • CPU (8 cores) is at 50-75%
  • GPU is not used at all
  • reading with the embedded player regularly freezes

In the logs (syslog and flussonic.log) I can see that it does not use GPU, only CPU. In fact I can see no evidence of using GPU.

syslog:
Dec 18 22:51:15 frhb12380ds flussonic[26073]: [aac @ 0x7fe6900639a0] Qavg: 1258.900
Dec 18 22:51:15 frhb12380ds flussonic[26073]: [libx264 @ 0x7fe69007b980] frame I:5 Avg QP: 1.53 size: 67689
Dec 18 22:51:15 frhb12380ds flussonic[26073]: [libx264 @ 0x7fe69007b980] frame P:65 Avg QP: 2.42 size: 21370
Dec 18 22:51:15 frhb12380ds flussonic[26073]: [libx264 @ 0x7fe69007b980] frame B:179 Avg QP: 3.62 size: 4774
Dec 18 22:51:15 frhb12380ds flussonic[26073]: [libx264 @ 0x7fe69007b980] consecutive B-frames: 0.4% 11.2% 0.0% 88.4%
Dec 18 22:51:15 frhb12380ds flussonic[26073]: [libx264 @ 0x7fe69007b980] mb I I16…4: 39.1% 0.0% 60.9%
Dec 18 22:51:15 frhb12380ds flussonic[26073]: [libx264 @ 0x7fe69007b980] mb P I16…4: 3.2% 0.0% 2.7% P16…4: 35.6% 9.2% 6.5% 0.0% 0.0% skip:42.9%
Dec 18 22:51:15 frhb12380ds flussonic[26073]: [libx264 @ 0x7fe69007b980] mb B I16…4: 0.4% 0.0% 0.2% B16…8: 18.1% 3.0% 1.1% direct: 9.3% skip:68.0% L0:36.7% L1:55.2% BI: 8.1%
Dec 18 22:51:15 frhb12380ds flussonic[26073]: [libx264 @ 0x7fe69007b980] coded y,uvDC,uvAC intra: 68.1% 52.5% 42.4% inter: 17.1% 8.7% 6.0%
Dec 18 22:51:15 frhb12380ds flussonic[26073]: [libx264 @ 0x7fe69007b980] i16 v,h,dc,p: 43% 27% 23% 6%
Dec 18 22:51:15 frhb12380ds flussonic[26073]: [libx264 @ 0x7fe69007b980] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 40% 16% 3% 3% 2% 3% 2% 3%
Dec 18 22:51:15 frhb12380ds flussonic[26073]: [libx264 @ 0x7fe69007b980] i8c dc,h,v,p: 60% 24% 14% 2%
Dec 18 22:51:15 frhb12380ds flussonic[26073]: [libx264 @ 0x7fe69007b980] Weighted P-Frames: Y:6.2% UV:0.0%
Dec 18 22:51:15 frhb12380ds flussonic[26073]: [libx264 @ 0x7fe69007b980] kb/s:2073.87
Dec 18 22:51:15 frhb12380ds flussonic[26073]: [libx264 @ 0x7fe69007b980] using SAR=1/1
Dec 18 22:51:15 frhb12380ds flussonic[26073]: [libx264 @ 0x7fe69007b980] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
Dec 18 22:51:15 frhb12380ds flussonic[26073]: [libx264 @ 0x7fe69007b980] profile Main, level 3.1
Dec 18 22:51:15 frhb12380ds flussonic[26073]: [libx264 @ 0x7fe69007b980] 264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=12 lookahead_threads=4 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=1 weightp=1 keyint=50 keyint_min=5 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=cbr mbtree=1 bitrate=2048 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=2048 vbv_bufsize=6144 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00

flussonic.log:
2018-12-18 21:51:29.129 <0.1222.0> [archived/CIVIL2017-5.mp4] dynafile_cache:73 watermark <<“b9c444ab6b97643eb0f78ed6b22d7aba2f644ca6”>> <<“720x576”>> not exist
2018-12-18 21:51:29.129 <0.1222.0> [archived/CIVIL2017-5.mp4] avcodec:1168 Init h264 decoder with options: []
2018-12-18 21:51:29.130 <0.1222.0> [archived/CIVIL2017-5.mp4] avcodec:1168 Init aac decoder with options: []
2018-12-18 21:51:29.130 <0.1223.0> [archived/CIVIL2017-5.mp4] avcodec:660 Init aac encoder with options: [{b,64000},{channels,2},{sample_rate,22050},{input_channel_layout,<<“stereo”>>},{input_sample_fmt,<<“fltp”>>},{input_sample_rate,<<“22050”>>},{codec,aac}], user: []
2018-12-18 21:51:29.132 <0.1224.0> [archived/CIVIL2017-5.mp4] avcodec:514 process_size 720x576 -> 720x576
2018-12-18 21:51:29.132 <0.1224.0> [archived/CIVIL2017-5.mp4] avcodec:660 Init h264 encoder with options: [{external,<<“true”>>},{b,2048000},{fps,25},{g,50},{‘rc-lookahead’,10},{bufsize,6144000},{maxrate,2048000},{preset,<<“veryfast”>>},{profile,<<“main”>>},{level,<<“3.1”>>},{width,720},{height,576},{in_width,720},{in_height,576},{filter_spec,<<“scale=w=720:h=576”>>},{codec,h264}], user: [{external,<<“true”>>}]
2018-12-18 21:51:29.905 <0.1222.0> [archived/CIVIL2017-5.mp4] dynafile_cache:160 encoded 465 => 465=410+55 frames
2018-12-18 21:51:29.905 <0.460.0> dynafile_cache:194 cache file <<"/opt/videos/flussonic/dynacache/archived/CIVIL2017-5.mp4/v1a1/b9c444ab6b97643eb0f78ed6b22d7aba2f644ca6-1275.m4f">>

Have you solved this issue?