After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 728843 - [HSW/BDW]H264 encoded file has different size with same condition
[HSW/BDW]H264 encoded file has different size with same condition
Status: RESOLVED DUPLICATE of bug 768122
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
unspecified
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-04-24 03:31 UTC by zhixinx.liu
Modified: 2018-05-04 13:58 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description zhixinx.liu 2014-04-24 03:31:29 UTC
1. Testing Env:
========================================================================
Libva: (master)0d60132599318695dd1af8d51d2b160623ac4406
Libva_intel_driver: (master)75a7b090e9784864d7bf567ea7d68b1c13b19922
Gstreamer10: (1.0)4e880d4d1e151ea64f83c28b5c3e1bbc06c57903
Gst_plugins_base10: (1.0)2dd3f028c1e6dea799d7496639f53220818b20b1
Gst_plugins_good10: (1.0)643d425f51f81b56deec16c01162637546708ee5
Gst_plugins_bad10: (1.0)0587ab41b4f9979e9cfc11011ed5c970569ee3d3
Gst_plugins_ugly10: (1.0)c7c911b8320576429e4a4234a1e29ec7436e6814
Gst_plugins_vaapi10: (master)f2b0d02168e73feaae0023ccf864cea4805a0b88

2. Testing Steps:
========================================================================
    1.Run following command 5 times with different output file name
      Command: "gst-launch-1.0 -v filesrc location=/root/media_tools/encoder/encoderbitstreams/1080p_blue_sky.yuv ! videoparse format=i420 width=1920 height=1080 ! vaapiencode_h264 rate-control=cqp keyframe-period=30 max-bframes=2 init-qp=28 cabac=true ! qtmux faststart=true ! filesink location=1.264"
    2.Check the file size of these output file, we found the file size is different
    	12144944   1.264
    	12137815   2.264
    	12136041   3.264
    	12142938   4.264
    	12142876   5.264

3. Frequency of Occurence:
========================================================================
100%
Comment 1 Gwenole Beauchesne 2014-04-24 05:38:07 UTC
Please extract and compare the headers for each of those. If they have the same size (in bits), then redirect the issue to driver. Though, 10 KB difference in there is unlikely caused by headers size.
Comment 2 zhixinx.liu 2014-05-08 03:44:24 UTC
in HSW, 
1.Run following command 5 times with different output file name
  Command:"/opt/X11R7/bin/avcenc 1920 1080 /root/media_tools/encoder/encoderbitstreams/1080p_blue_sky.yuv 1.264 qp=28 mode=2"

2.Check the file size of these output file, we found the file size is same
    11649909 1.264
    11649909 2.264
    11649909 3.264
    11649909 4.264
    11649909 5.264
Comment 3 sreerenj 2014-09-08 12:23:53 UTC
It would be good if you can provide the test results with out qtmux.

gst-launch-1.0 -v filesrc
location=/root/media_tools/encoder/encoderbitstreams/1080p_blue_sky.yuv !
videoparse format=i420 width=1920 height=1080 ! vaapiencode_h264
rate-control=cqp keyframe-period=30 max-bframes=2 init-qp=28 cabac=true !   vaapiparse_h264 ! "video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal"  ! filesink location=1.264"

This is the format that avcenc producing. But still there are other major differences between avcenc and gst-enc. (for eg: gst-enc inserting slice headers by itself).
Comment 4 zhixinx.liu 2014-09-09 06:18:22 UTC
H264 encoded file also has different size with out qutmux

Run following command 5 times with different output file name 
command: "gst-launch-1.0 -v filesrc location=/root/media_tools_back/encoder/encoderbitstreams/1080p_blue_sky.yuv ! videoparse format=i420 width=1920 height=1080 ! vaapiencode_h264 rate-control=cqp keyframe-period=30 max-bframes=2 init-qp=28 cabac=true ! vaapiparse_h264 ! "video/x-h264, stream-format=(string)byte-stream,alignment=(string)nal"  ! filesink location=1.264"(with out qtmux)

Check the file size of these output file, we found the file size is different.
[root@x-hsw29 tmp]# ll
-rw-r--r-- 1 root root 11417715 Sep  9 07:09 1.264
-rw-r--r-- 1 root root 11419317 Sep  9 07:10 2.264
-rw-r--r-- 1 root root 11417270 Sep  9 07:10 3.264
-rw-r--r-- 1 root root 11419537 Sep  9 07:10 4.264
-rw-r--r-- 1 root root 11418857 Sep  9 07:10 5.264

Test ENV:
Libva: (master)c356638098e55453d2fac8bbb92eafc8cc32d6f4
Libva_intel_driver:           (master)812d8d039031bf20e66748a39edcdb8f9c798ec4
Gstreamer10: (1.2)861ca3d6787d84c9bea7110cb46821e9b8f63aff
Gst_plugins_base10: (1.2)df7e7daa29ba14447b4d8dd43c35d8a3ad9e4984
Gst_plugins_good10: (1.2)e0417c28d56ac64a2e8d149bbaf812d2ce227153
Gst_plugins_bad10: (1.2)277b8c34e7214177764833b73f17e43ced496f8f
Gst_plugins_ugly10: (1.2)2233d97e6ad1a3988d9a9ca0fc0cf00ec4031a8f
Gst_plugins_vaapi10: (master)406aa37373e2b9917714eccd2834a45d18b61fd1
Comment 5 Gwenole Beauchesne 2014-11-26 14:38:19 UTC
Hi, please try with the current git master branch. Thanks.
Comment 6 zhixinx.liu 2014-11-27 01:53:07 UTC
H264 encoded file also has different size.

Run following command 5 times with different output file name.
command: "gst-launch-1.0 -v filesrc location=/root/media_tools/encoder/encoderbitstreams/1080p_blue_sky.yuv ! videoparse format=i420 width=1920 height=1080 ! vaapiencode_h264 rate-control=cqp keyframe-period=30 max-bframes=2 init-qp=28 cabac=true ! vaapiparse_h264 ! "video/x-h264, stream-format=(string)byte-stream,alignment=(string)nal"  ! filesink location=1.264"

Check the file size of these output file, we found the file size is different.
[root@x-hsw29 tmp]# ll
total 55700
-rw-r--r-- 1 root root 11354831 Nov 27 09:47 1.264
-rw-r--r-- 1 root root 11417149 Nov 27 09:47 2.264
-rw-r--r-- 1 root root 11418898 Nov 27 09:47 3.264
-rw-r--r-- 1 root root 11419556 Nov 27 09:47 4.264
-rw-r--r-- 1 root root 11418232 Nov 27 09:47 5.264

Test ENV:
Libva:(master)c095cc6cf08523cd0dffcfe5ac4bce9122527f22
Libva_intel_driver:(master)edbb8cdada09cd116103e68f942b0889fd767391
Gstreamer10:(1.2)861ca3d6787d84c9bea7110cb46821e9b8f63aff
Gst_plugins_base10:(1.2)df7e7daa29ba14447b4d8dd43c35d8a3ad9e4984
Gst_plugins_good10:(1.2)08ab260b8a39791e7e62c95f4b64fd5b69959325
Gst_plugins_bad10:(1.2)277b8c34e7214177764833b73f17e43ced496f8f
Gst_plugins_ugly10:(1.2)2233d97e6ad1a3988d9a9ca0fc0cf00ec4031a8f
Gst_plugins_vaapi10:(master)0508e13ddfd03e5f7a8e06273bba70925a523c1d
Comment 7 sreerenj 2016-03-24 16:55:57 UTC
Moving to Product:GStreamer, Component:gstreamer-vaapi
Comment 8 mingruo.sun@intel.com 2016-07-04 08:12:54 UTC
Still could reproduce the issue on the latest Gstreamer version. Any update on this bug?
Comment 9 sreerenj 2016-07-04 08:20:48 UTC
(In reply to mingruo.sun@intel.com from comment #8)
> Still could reproduce the issue on the latest Gstreamer version. Any update
> on this bug?

Please see this:
https://bugzilla.gnome.org/show_bug.cgi?id=768122#c2
Comment 10 Víctor Manuel Jáquez Leal 2018-05-04 13:58:29 UTC

*** This bug has been marked as a duplicate of bug 768122 ***