[Libva] CBR encoding fails

Artem Makhutov artem at makhutov.org
Mon Jul 21 03:45:02 PDT 2014


Hello,

I have tried out avcenc.
I hangs after encoding the last frame and I have to end it using Ctrl + C:

artem at gandalf /tmp $ avcenc 1920 1080 /tmp/MI201208080140.yuv /tmp/test.264 fb=8500000 mode=2
error: can't connect to X server!
libva info: VA-API version 0.35.1
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/va/drivers/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_35
libva info: va_openDriver() returns 0
  1376/1376 ...^C

I have tried latest git master and also the stable versions libva 1.3.1 and intel-driver 1.3.2.
Both have the same results.

Thanks, Artem

Zhao, Yakui schrieb:
> On Sun, 2014-07-20 at 11:34 -0600, Artem Makhutov wrote:
>> Hello,
>>
>> I am trying to do CBR encoding of a video.
>>
>> I am using lates git master of libva and libva-intel-drivers.
>>
>> Before commit "745340dd013399f64507de73401ab3adb712dad5 in intel-drivers (Encoding: Use the different delimeter to pass packed_rawdata and slice_header based on VAConfigAttribEncPackedHeaders attribute)" it just segfaults in intel_mfc_brc_prepare.
>> After this commit I am getting this:
>>
>> h264encode -w 1920 -h 1080 --srcyuv /tmp/123.yuv -f 25 -n 0 --rcmode CBR --bitrate 8500000
>> Source YUV file /tmp/123.yuv with 1376 frames
>> Source frame is 1920x1080 and will code clip to 1920x1088 with crop
>
> Thanks for reporting this issue.
>
> Will you please try to use the avcenc tool and see whether the CBR
> encoding can work for you? The following is the CBR command:
>     >avcenc width height source_input output fb=XXX mode=0/1/2( 0 means
> that  the clip is encoded with all-I frames. 1 means that it is encoded
> with I and P frames. 2 means that it is encoded with I/P/B frames).
>
> For some history reasons there exist two encoding test_case in
> libva(avcenc and h264encode). For the libva-intel-driver, it will be
> better that the avcenc tool is preferred. After some
> features/enhancements are added in the libva-intel-driver, avcenc will
> be updated.
>
> Thanks.
>      Yakui
>
>>
>>
>> INPUT:Try to encode H264...
>> INPUT: RateControl  : CBR
>> INPUT: Resolution   : 1920x1080, 1376 frames
>> INPUT: FrameRate    : 25
>> INPUT: Bitrate      : 8500000
>> INPUT: Slieces      : 1
>> INPUT: IntraPeriod  : 30
>> INPUT: IDRPeriod    : 60
>> INPUT: IpPeriod     : 1
>> INPUT: Initial QP   : 26
>> INPUT: Min QP       : 0
>> INPUT: Source YUV   : FILE:/tmp/123.yuv (fourcc NV12)
>> INPUT: Coded Clip   : /tmp/test.264
>> INPUT: Rec   Clip   : Not save reconstructed frame
>>
>>
>> libva info: VA-API version 0.35.2
>> libva info: va_getDriverName() returns 0
>> libva info: Trying to open /usr/lib64/va/drivers/i965_drv_video.so
>> libva info: Found init function __vaDriverInit_0_35
>> libva info: va_openDriver() returns 0
>> Use profile VAProfileH264High
>> Support rate control mode (0x12):CBR CQP
>> Support VAConfigAttribEncPackedHeaders
>> Support packed sequence headers
>> Support packed picture headers
>> Support packed slice headers
>> Support packed misc headers
>> Support 1 RefPicList0 and 1 RefPicList1
>> WARNING: packed slice_header data is missing for some slice under packed SLICE_HEADER mode
>> encode_frames:vaEndPicture (2013) failed,exit
>>
>> Also any stable releases segfaults when trying to encode CBR.
>>
>> Any chance to fix it?
>>
>> Thanks, Artem
>>
>>
>
>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4291 bytes
Desc: Kryptographische S/MIME-Signatur
URL: <http://lists.freedesktop.org/archives/libva/attachments/20140721/9bdbf172/attachment.bin>


More information about the Libva mailing list