Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[编码时间显示错误]Linux fps计算错误 显示编码时间比实际时间长较多倍 #28

Open
Yang-Xijie opened this issue Apr 6, 2021 · 0 comments

Comments

@Yang-Xijie
Copy link

版本信息:Linux, Ubuntu 18.04.2 LTS, uavs3e version: 1.2.208_release

编码使用脚本:

import os
import time

uavs3_v1_2_208 = "/home/yxj/yangxijie/software/git/uavs3e/build/linux/uavs3enc"

yuv_video = "/mnt/video/E/FourPeople_1280x720_60.yuv"
yuv_width = '1280'
yuv_height = '720'
yuv_fps = '60'

set_qp = '45'
set_speed_level = '3'

coding_video = ' ./uavs3e.avs3'

begin_time = time.time()
cmd = uavs3_v1_2_208 + ' --speed_level ' + set_speed_level + ' --width ' + yuv_width + ' --height ' + yuv_height + ' --fps_num ' + yuv_fps + ' --fps_den 1 ' + ' --i_period ' + yuv_fps + ' --rc_type 0 ' + ' --input_bit_depth 8 ' + ' --qp ' + set_qp + ' --wpp_threads 40 ' + ' --frm_threads 40 ' + ' --input ' + yuv_video + ' --output ' + coding_video + ' --verbose 2 ' 
os.system(cmd)
end_time = time.time()
print('END' + str(end_time - begin_time) + 's')

使用python3 a.py得到输出:

xj@coolc:~/yangxijie/playground/j$ python3 a.py
Version: 1.2.208_release,  SHA-1: cd295084706a307f887dea18b53d4716795974d4
-----------------------------------------------------------------------------------------------------------------------------------
< Sequence's Info >
	resolution input         : 1280 x 720
	resolution coding        : 1280 x 720
	bitdepth input           : 8
	bitdepth coding          : 8
	frame rate               : 60 / 1
	intra picture period     : 60
	close_gop                : 0
	max b frames             : 15
	signature                : 0

< LookAhead Info >
	lookahead                : 40
	scenecut                 : 0
	schistogram              : 0
	adaptive_gop             : 0

< Parallel Info >
	WPP threads              : 6
	frame threads            : 40

< RC Info >
	RC type                  : 0 (0: CQP, 1: CRF, 2: ABR, 3: CBR)
	qp                       : 45
	qp_offset_cb             : 0
	qp_offset_cr             : 0

< CU split CFG >
	ctu_size:        128
	min_cu_size:     4
	max_part_ratio:  8
	max_split_times: 6
	min_qt_size:     8
	max_bt_size:     64
	max_eqt_size:    32
	max_dt_size:     16

< Tool CFG >
	Loop Filter:  deblock: 1, sao: 1, alf: 1, cross_patch: 1,
	Inter: AMVR(1) HMVP_NUM(8) AFFINE(1) SMVD(1) UMVE(1) EMVR(1)
	Intra: TSCPM(1) IPF(1) DT(1)
	Transform: PBT(1) SECTrans(1)
	Quant: WeightedQuant: 0
	ENC-Side Tools: chroma_qp(1) AQ(0)
	Speed_level: 3
-----------------------------------------------------------------------------------------------------------------------------------
  Input YUV file           : /mnt/video/E/FourPeople_1280x720_60.yuv
  Output bitstream         : ./uavs3e.avs3
-----------------------------------------------------------------------------------------------------------------------------------
    POC | QP |  PSNR-Y  PSNR-U  PSNR-V| SSIM-Y SSIM-U SSIM-V|   Bits |  Time |        Ref. List      | Ext_info
************************************************************
    0(I)|41.0| 37.1648 42.2469 43.7415| 0.9491 0.9618 0.9743|  149888|   5838|L0         |L1         |[]
************************************************************
   16(B)|46.0| 36.3726 42.1169 43.4899| 0.9432 0.9609 0.9732|   13904|   1473|L0   0     |L1   0     |[]
***************************************************************************************
(省略)

===============================================================================
  PSNR Y(dB)       : 35.8344
  PSNR U(dB)       : 41.9294
  PSNR V(dB)       : 43.3710
  SSIM Y(dB)       : 0.9391
  SSIM U(dB)       : 0.9603
  SSIM V(dB)       : 0.9724
  Total bits(bits) : 2870696
  bitrate(kbps)    : 287.0696
===============================================================================
Encoded frame count               = 600
Total encoding time               = 450612.000 msec, 450.612 sec
Average encoding time for a frame = 751.020 msec
Average encoding speed            = 1.33152 frames/sec
===============================================================================
END80.22815370559692s

可以看到输出log的后面Total encoding time为450s,但是用python脚本提供的时间计算发现实际编码时间为80.2s。这也导致fps计算错误。(也可能是我对log中Total的理解有差。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant